Integrating knowledge graphs as external knowledge bases can effectively mitigate knowledge hallucination issues in large language models within specialized domains. To this end, a knowledge graph construction method for dam safety diagnosis is proposed using deep learning. A dual-path collaborative modeling approach is implemented based on a hybrid framework: the schema layer is designed top-down, establishing a four-dimensional conceptual system encompassing monitoring locations, monitoring instruments, monitoring indicators, and safety evaluation, while domain ontology integrating concrete dams, earth-rock dams, slopes, discharge structures, and comprehensive safety evaluation methods is built using the seven-step methodology; the data layer is generated bottom-up, with a targeted RoMBA-CRF-Joint joint extraction model developed. This model employs multi-level feature collaboration through RoBERTa-Mamba-BiLSTM and end-to-end decoding via CRF-relation extraction to achieve joint entity-relation extraction. The model extracted over 11,000 entities and 13,000 relations from normative texts, achieving an annotation accuracy exceeding 80%. Finally, visualization and semantic retrieval of the knowledge graph were implemented using the Neo4j open-source graph database, providing a verifiable knowledge foundation and technical support for future large language model-driven intelligent dam safety diagnosis. |