Dike danger intelligent diagnosis and auxiliary decision-making method fusing knowledge graph and large language model

CN122989381APending Publication Date: 2026-10-27CHINA THREE GORGES UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610989906.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

上述研究为水利知识的结构化组织提供了重要基础,但仍存在一些局限性:一是对堤防险情这一高频、高风险细分场景缺乏系统化覆盖,导致现有图谱难以直接支撑险情诊断的实际应用;二是构建方法主要依赖传统深度学习模型,在标注数据稀缺的背景下,知识抽取效率不高,且尚未充分利用LLM在少样本学习与语义理解方面的优势

Benefits of technology

1、本发明针对堤防险情知识分散于多源异构文本中,知识利用率低、检索效率差,难以满足智慧水利背景下快速智能诊断的需求,通过引入检索增强生成技术,通过融合知识图谱、向量数据库与规则库的协同推理诊断,克服了单一大语言模型诊断存在幻觉、而单一知识图谱存在覆盖范围有限、缺乏数值化判定能力、语义匹配能力弱等局限,实现了堤防险情快速、准确诊断和辅助决策。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989381A_ABST
    Figure CN122989381A_ABST
Patent Text Reader

Abstract

The present application belongs to the field of embankment risk safety diagnosis and evaluation, and specifically proposes an embankment risk intelligent diagnosis and auxiliary decision-making method fusing knowledge graph and large language model. First, an embankment risk field knowledge graph is constructed based on a large language model, including mode layer construction and data layer construction. The mode layer takes the design of the embankment risk field ontology as the core, defines classes, and constructs the hierarchical structure, attributes, attribute constraints and semantic associations of the classes, and other knowledge graph core concepts. The data layer construction includes data collection and processing, knowledge extraction, knowledge fusion and storage. Then, structured reasoning is carried out based on the knowledge graph, risk level determination is carried out based on the rule base, and semantic retrieval is carried out based on the vector database. After fusing the multi-source retrieval results, the diagnosis result is generated by inputting the large language model. The present application constructs an embankment risk field knowledge graph based on LLM, establishes a collaborative reasoning framework fusing knowledge graph, vector database and rule base, and realizes intelligent diagnosis and auxiliary decision-making of risk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of levee risk and safety diagnosis and evaluation. Specifically, it relates to an intelligent diagnosis and auxiliary decision-making method for levee risks that integrates knowledge graphs and large language models. Background Technology

[0002] As the core of the flood control system, the safety of dikes is directly related to the ecological and social stability of the river basin. Most dikes are old, with complex geological conditions. Coupled with frequent human and animal activities, they harbor hidden dangers such as cracks, ant nests, and animal burrows. During the flood season, these can easily lead to seepage, piping, landslides, and other emergencies. If these are not addressed promptly, they can easily cause major disasters such as breaches and collapses. In 2020, piping and seepage accounted for 68.3% of the dike emergencies in the middle and lower reaches of the Yangtze River, indicating a severe situation for prevention and control. Traditional manual inspections are labor-intensive and rely heavily on human experience, making it difficult for grassroots personnel to accurately assess emergencies, resulting in low efficiency in handling dike emergencies. Currently, the Ministry of Water Resources is promoting the construction of "smart water conservancy," introducing large-scale language models into the field of dike emergency diagnosis, which is expected to drive the transformation of dike management from experience-based to intelligent reasoning.

[0003] In recent years, Large Language Models (LLMs) have been successfully applied in various fields such as medicine and law. However, when generating content, LLMs may produce information that is inconsistent with objective facts or even completely fictitious. This problem is particularly prominent in vertical fields such as water conservancy and medicine, where the accuracy of knowledge is extremely important. Incorrect knowledge output can directly mislead engineering decisions or professional judgments, leading to serious consequences. To address this issue, combining knowledge graphs with LLMs and using retrieval-enhanced generation to provide reliable knowledge support for LLMs is an effective way to mitigate knowledge distortion.

[0004] Knowledge graphs, as a structured semantic knowledge base, can accurately express semantic relationships and realize intelligent reasoning of complex knowledge. In the field of water conservancy, scholars have conducted a series of studies on knowledge graphs, mainly divided into two categories: comprehensive water conservancy knowledge graphs and knowledge graphs oriented towards specific scenarios. The above studies have provided an important foundation for the structured organization of water conservancy knowledge, but there are still some limitations: First, there is a lack of systematic coverage of the high-frequency, high-risk sub-scenario of dike emergencies, making it difficult for existing graphs to directly support the practical application of emergency diagnosis; second, the construction methods mainly rely on traditional deep learning models, which have low knowledge extraction efficiency in the context of scarce labeled data, and have not fully utilized the advantages of LLM in few-shot learning and semantic understanding. Summary of the Invention

[0005] The technical problem to be solved by this invention is to provide an intelligent diagnosis and decision support method for dike hazards that integrates knowledge graphs and large language models. Based on LLM, a knowledge graph for the dike hazard domain is constructed, retrieval enhancement generation technology is introduced, and a collaborative reasoning framework integrating knowledge graphs, vector databases and rule bases is established to realize intelligent diagnosis and decision support for hazards.

[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for intelligent diagnosis and auxiliary decision-making of dike risks that integrates knowledge graphs and large language models, comprising the following steps: Step 1: Construct a knowledge graph for the levee hazard domain based on a large language model. This includes the construction of the schema layer and the data layer. The schema layer construction is centered on the ontology design of the levee hazard domain, defining classes, constructing the hierarchical structure of classes, class attributes, attribute constraints, and semantic relationships, etc., which are core concepts of the knowledge graph. The data layer construction includes data collection and preprocessing, knowledge extraction, knowledge fusion, and storage. Step 2: Risk information collection. Then, based on retrieval enhancement generation technology, the three retrieval paths of knowledge graph, rule base and vector database are called in a coordinated manner. The knowledge graph is used for structured reasoning, the rule base is used for risk level determination, and the vector database is used for semantic retrieval. The multi-source retrieval results are fused and input into the large language model to generate diagnostic results.

[0007] In the preferred embodiment, step one, the pattern layer construction adopts the Stanford seven-step method, which includes: clarifying the domain boundaries; reusing the core concepts of existing hydraulic ontology; extracting high-frequency terms from standards, specifications and technical documents, and summarizing the core concept set; defining the class hierarchy, semantic relationships and attribute constraints.

[0008] In the preferred embodiment, the attribute relationship model takes the type of danger as the core and establishes a conceptual system of eight categories: danger manifestation, danger cause, danger level, danger measures, environmental conditions, emergency supplies, and dike location. Ten semantic relationships are defined between the concepts: manifestation, taking measures, having a level, need, occurring, cause, affected, environmental impact, triggering, and accompanying occurrence.

[0009] In the preferred embodiment, step one, data collection includes collecting industry standards, academic works, and academic papers related to dike breaches; data preprocessing specifically involves converting the original PDF data into plain text format, removing redundant spaces, special control characters, and page number information; automatically identifying the document hierarchy based on chapter titles, segmenting and labeling paragraphs, and retaining the chapter and document type metadata of the paragraphs to form the corpus basis for subsequent knowledge extraction.

[0010] In the preferred embodiment, step one, knowledge extraction employs a method based on ontology constraints and self-verification enhancement, specifically including the following sub-steps: (a) Multiple independent extractions under ontology constraints: The domain ontology defined in the pattern layer is transformed into structured extraction constraints, and the large language model is guided to perform multiple independent extractions under the given constraints through prompt word engineering. (b) Multi-round result fusion and filtering: In the entity fusion stage, the quadruple <text content, type, start position, end position> is used as the criterion for determining the same entity. All candidate entities are deduplicated, each entity is assigned a globally unique identifier, and a mapping relationship from the original identifier to the new identifier is established. In the relation filtering stage, the head and tail entity identifiers in each relation are updated according to the mapping table. If the entity identifier referenced by a relation cannot be found in the mapping table, it indicates that the entity has been merged or is invalid, and it is directly removed. For relations that are still valid after the update, only the one with the highest confidence is retained in the same relation. (c) Self-checking and correction based on ontology constraints: Using the relation constraints defined in the ontology as the set of verification rules, the large language model performs logical verification on the extracted results after fusion, deletes relations that do not meet the constraints, and outputs the corrected set of structured knowledge.

[0011] In the preferred embodiment, the knowledge fusion and storage in step one specifically involves: fusion of the triples obtained from knowledge extraction, including entity alignment, relation fusion, and conflict resolution, to eliminate entity redundancy and semantic conflicts; importing the fused structured knowledge into a graph database to complete node creation and relation establishment, thereby obtaining a knowledge graph of dike hazards.

[0012] In the preferred embodiment, the structured reasoning based on the knowledge graph in step two includes: using the longest matching algorithm to identify entities in user questions; classifying user intent into four core categories for intent determination: hazard identification, cause analysis, response measure query, and material demand query; outputting a structured query instruction tuple Query = (Intent, EntityList), where Intent represents the purpose of the question or the type of action, and EntityList represents the entity list; and automatically matching the preset Cypher query template library according to the query instruction type to retrieve related entities and relationships from the knowledge graph.

[0013] In the preferred embodiment, the risk level determination based on the rule base in step two specifically involves: 1) Feature extraction: A combination of regular expressions and keyword matching is used to extract quantitative parameters and qualitative features from user input; 2) Rule base construction: A three-layer rule base system of hazard type, hazard level, and discrimination rule is adopted. Based on the feature extraction results, reasoning and matching are performed in order of hazard severity from high to low, and the preliminary hazard level judgment result and corresponding handling measures are output.

[0014] In the preferred embodiment, the semantic retrieval based on the vector database in step two specifically involves: using a sliding window strategy to segment the external document into text blocks, selecting a Chinese text embedding model to vectorize the text blocks and constructing a FAISS vector index; after vectorizing the user query text using the same model, retrieving it from the vector database by calculating cosine similarity, and returning the top k text blocks with the highest similarity and their source information.

[0015] In the preferred embodiment, the fusion of multi-source retrieval results in step two specifically follows the following principles: priority principle, using the rule base's level determination result as the beginning of the context; structure priority principle, organizing the structured information returned by the knowledge graph in logical order; supplementary principle, placing text fragments from the vector database as supplementary evidence after the structured information; and traceability principle, retaining the source identifier for each piece of information. Based on the above principles, a unified prompt word template is designed. The prompt word template consists of four parts: system role setting, hard rules, multi-source context, and output format constraints. The constructed prompt words are input into the large language model to generate the final answer.

[0016] The present invention provides an intelligent diagnosis and auxiliary decision-making method for dike hazard situation that integrates knowledge graph and large language model, which has the following beneficial effects: 1. This invention addresses the problem that knowledge about dike hazards is scattered across multiple heterogeneous text sources, resulting in low knowledge utilization and poor retrieval efficiency, which makes it difficult to meet the needs of rapid and intelligent diagnosis in the context of smart water conservancy. By introducing retrieval-enhanced generation technology and integrating collaborative reasoning diagnosis with knowledge graphs, vector databases, and rule bases, this invention overcomes the limitations of single large language models in diagnosis, such as the illusion of diagnosis, and single knowledge graphs having limited coverage, lack of numerical judgment capabilities, and weak semantic matching capabilities. This enables rapid and accurate diagnosis of dike hazards and assisted decision-making.

[0017] 2. The knowledge extraction method based on ontology constraints and self-verification enhancement disclosed in this invention overcomes the illusion of knowledge extraction from a single large language model by performing multiple extractions, fusion screening, and self-verification correction, and achieves stable knowledge extraction. Attached Figure Description

[0018] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, do not constitute an undue limitation thereof. In the drawings: Figure 1 Flowchart for constructing a knowledge graph of dike hazards; Figure 2 A framework diagram for intelligent diagnosis and auxiliary decision-making of dike risks; Figure 3 A flowchart for constructing the main body of dike hazard situations; Figure 4For the ontological attribute relationship model of dike risk; Figure 5 This is a flowchart of knowledge extraction based on ontology constraints and self-verification enhancement. Figure 6 This is the result of the "piping" hazard query in the example; Figure 7 This is a partial result of the inquiry regarding the risk of seepage. Figure 8 Generate a question-answering architecture diagram for knowledge graph-based retrieval enhancement; Figure 9 Example of rules for judging seepage hazards; Figure 10 Example image for the prompt template; Figure 11 Generate a template diagram for the answer; Figure 12 This is a typical sinkhole in the drainage ditch of the embankment; Figure 13 The results of the "falling into a pit" risk query are shown in the example. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention.

[0020] Example 1: To address the problem that knowledge about dike hazards is scattered across multiple heterogeneous text sources, resulting in low knowledge utilization and poor retrieval efficiency, which fails to meet the needs of rapid intelligent diagnosis in the context of smart water conservancy, this paper proposes an intelligent diagnosis and decision support method for dike hazards that integrates knowledge graphs and large language models. First, a dike hazard domain ontology covering core concepts such as hazard types, causes, and mitigation measures is constructed based on the Stanford seven-step method. Then, combining a large language model and prompt word engineering, a knowledge extraction method based on ontology constraints and self-verification enhancement is adopted. Carefully designed prompt templates guide the large language model to automatically identify and extract entities and relationships. Finally, the identification results are fused to construct a knowledge graph for the dike hazard domain, and the structured knowledge is stored in the Neo4j graph database. Then, the ontology model is combined to achieve problem understanding and intent recognition. Next, the Cypher query language is used to extract related entities and relationships from the levee hazard knowledge graph. Simultaneously, the cosine similarity algorithm is used to retrieve similar text from the vector database, and the hazard level judgment criteria in the standard provisions are transformed into explicit "IF-THEN" logical rules. Finally, the above retrieval results are fused with the preliminary hazard level judgment information in the rule base, and together they serve as enhanced contextual input to the large language model to generate accurate and interpretable hazard diagnosis and handling suggestions. Specifically, the following steps are included: Step 1: Construction of a knowledge graph for the levee hazard domain based on a large language model (LLM) Constructing a knowledge graph for the domain of dike hazard situation based on a large language model, such as Figure 1 As shown, this includes schema layer construction and data layer construction. Schema layer construction is centered on the ontology design of the dike hazard domain, defining core knowledge graph concepts such as classes, class hierarchy, class attributes, attribute constraints, and semantic relationships.

[0021] Specifically, the pattern layer is constructed with domain ontology design as its core. It focuses on core concepts such as the type, manifestation, cause, and measures of the hazard, clarifies the concept hierarchy, attribute constraints, and semantic relationships, and forms the conceptual framework of the knowledge graph.

[0022] The data layer construction includes data collection and preprocessing, knowledge extraction, knowledge fusion, and storage. First, multi-source unstructured text is cleaned and standardized in format, transforming it into a unified input for knowledge extraction. Then, using an ontology-constrained and self-verifying enhancement method, LLM is invoked to extract entities and relations from the text, obtaining candidate knowledge triples. Finally, after entity alignment and conflict resolution, the structured knowledge is imported into the Neo4j graph database, enabling knowledge graph storage and visualization.

[0023] Step 2: Intelligent Diagnosis and Decision Support Method for Dike Risk Based on Retrieval-Augmented Generation (RAG) Technology By introducing RAG technology, a collaborative retrieval and reasoning framework integrating knowledge graphs, vector databases, and rule bases is proposed for intelligent diagnosis and decision support in dike breach situations. Figure 2 As shown.

[0024] The system collects hazard information and then uses retrieval enhancement generation technology to collaboratively call three retrieval paths: knowledge graph, rule base, and vector database. It performs structured reasoning based on the knowledge graph, determines the hazard level based on the rule base, and performs semantic retrieval based on the vector database. The multi-source retrieval results are then fused and input into a large language model to generate diagnostic results.

[0025] The system employs a sequential approach, executing hazard data collection, intelligent diagnosis, and decision support to form a closed-loop business process from on-site inspection to feedback optimization. In the hazard data collection phase, information such as hazard type, manifestations, and location obtained during on-site inspections is transformed into standardized input, providing a data foundation for subsequent diagnosis. The intelligent diagnosis phase collaboratively utilizes three retrieval paths: a knowledge graph, a rule base, and a vector database. The knowledge graph path retrieves entities and relationships related to the hazard from the graph, providing structured knowledge support. The rule base path uses predefined hazard level rules to quickly assess severity, compensating for the graph's limitations in numerical judgment. The vector database path matches similar hazard texts from unstructured case texts, expanding the breadth of knowledge coverage. The multi-source retrieval results are then fused and input into a large language model to generate diagnostic results, providing decision support for operations and maintenance personnel. The handling feedback is incorporated into the knowledge base, supporting continuous updates to the knowledge graph and rule base.

[0026] Example 2: In this embodiment, two steps of a method for intelligent diagnosis and decision support of dike hazards that integrates knowledge graphs and large language models are described in detail: (I) Construction of a knowledge graph for the levee hazard domain based on LLM, including the following steps: S1.1, Pattern Layer Construction The Stanford seven-step method was used to construct the levee hazard profile, such as... Figure 3As shown, this study first clarifies the domain boundaries, positioning it within the intelligent decision-making stage of levee operation safety management, focusing on hazard identification, cause analysis, and response. Then, it reuses core concepts from existing water conservancy ontologs. The earth-rock dam hazard ontolog provides three core concepts: hazard type, hazard cause, and hazard measures. The flood control and emergency rescue ontolog supplements these with two additional concepts: hazard manifestation and hazard level. Together, these provide a reusable conceptual foundation for this research. Next, high-frequency terms are extracted from relevant standards, specifications, and technical literature to summarize a set of core concepts. Finally, the class hierarchy, semantic relationships, and attribute constraints are defined.

[0027] Specifically, the core of the system is the type of hazard, establishing an eight-category conceptual system encompassing hazard manifestations, causes, levels, measures, environmental conditions, emergency supplies, and levee locations. Hazard types include typical hazards such as seepage, piping, and landslides, serving as the central node for hazard diagnosis. Based on this, hazard manifestations describe distinguishing features such as seepage, landslides, and sinkholes. Hazard causes are categorized into natural, human, and engineering factors, collectively used for hazard identification and tracing. Hazard levels are classified into three severity levels: general, significant, and major, serving as the basis for tiered responses. Hazard measures specify the handling plans and applicable conditions for various hazards, such as typical methods like constructing secondary dikes and using reverse-filter wells. Furthermore, environmental conditions include hydrological, meteorological, and geological backgrounds; emergency supplies list the required materials and equipment; and levee locations cover engineering structures such as the dike crest, water-facing slope, back slope, and dike toe. These three elements serve as auxiliary concepts supporting the entire hazard diagnosis process. Ten semantic relationships are defined between concepts: "manifested as," "measures taken," "having a hierarchy," "needed," "occurring in," "cause," "affected," "environmental impact," "cause," and "accompanying." The conceptual structure of the dike hazard domain ontology is as follows: Figure 4 As shown.

[0028] S1.2, Data layer construction, including the following steps: S1.2.1 Data Collection and Preprocessing Aiming to cover various knowledge types, including the manifestations, causes, and measures of dike hazards, this study collected industry standards, academic works, and academic papers related to dike hazards. Industry standards and academic works were the core knowledge sources, as shown in Table 1. In addition, over 100 academic papers related to dike hazards were retrieved and downloaded from the CNKI database as supplementary data.

[0029] Since the original data was primarily in PDF format, preprocessing was required. First, the PDF documents were converted to plain text format, removing unnecessary spaces, special control characters, and page numbers. Then, based on the chapter titles, the document hierarchy was automatically identified, paragraphs were segmented and tagged, and metadata such as the chapter and document type of each paragraph was retained. Using this method, over 100 documents were processed, yielding 7140 valid paragraphs, which served as the corpus for subsequent knowledge extraction.

[0030]

[0031] S1.2.2 Knowledge Extraction Knowledge extraction is a crucial step in constructing a domain knowledge graph, primarily comprising two core tasks: entity recognition and relation extraction. Entity recognition aims to locate entities related to dike hazards in unstructured text and categorize them into a predefined conceptual framework. Relation extraction, on the other hand, builds upon the identified entities to determine the semantic relationships between them, forming a "entity-relation-entity" triple knowledge representation. These two processes are interdependent, working together to transform raw text into structured knowledge.

[0032] Traditional supervised learning methods are difficult to apply to the scarcity of labeled data in the field of dike hazard information. While large language models possess powerful semantic understanding capabilities, their direct application in domain knowledge extraction is prone to illusions, leading to problems such as blurred entity boundaries and misjudgment of relation directions. This invention proposes a knowledge extraction method based on ontology constraints and self-verification enhancement. It embeds the domain ontology defined at the schema layer as a priori constraint into the reasoning process of the large language model and verifies and corrects the results through a self-verification mechanism. Figure 5 As shown.

[0033] Knowledge extraction employs an ontology-constrained and self-verification-enhanced approach, specifically including the following sub-steps: (a) Multiple independent extractions under ontology constraints: The domain ontology defined in the schema layer is transformed into structured extraction constraints, and the large language model is guided to perform multiple independent extractions under the given constraints through prompt word engineering.

[0034] Through prompt word engineering, the domain ontology defined in step S1.1 is transformed into structured extraction constraints. Entity type constraints clarify the semantic scope and typical examples of each concept category, while relation type constraints limit the legal type combinations of head and tail entities through domain and value range, thereby suppressing relation misjudgments. Based on this, the above constraints, along with the task description and output specifications, are embedded into prompt words to guide the large language model to perform multiple independent extractions under given constraints, reducing random fluctuations in a single extraction and generating diverse candidate results.

[0035] (b) Multi-round result fusion and filtering: The candidate results generated from multiple rounds of extraction contain duplicate entities and redundant relationships, which need to be deduplicated and selected. In the entity fusion stage, the four-tuple <text content, type, start position, end position> is used as the criterion for determining the same entity. All candidate entities are deduplicated, each entity is assigned a globally unique identifier, and a mapping relationship from the original identifier to the new identifier is established. In the relationship filtering stage, the head and tail entity identifiers in each relationship are updated according to the mapping table. If the entity identifier referenced by a relationship cannot be found in the mapping table, it indicates that the entity has been merged or is invalid, and it is directly removed. For relationships that are still valid after the update, only the one with the highest confidence is retained.

[0036] (c) Self-checking and correction based on ontology constraints: Using the relation constraints defined in the ontology as the set of verification rules, the large language model performs logical verification on the extracted results after fusion, deletes relations that do not meet the constraints, and outputs the corrected set of structured knowledge.

[0037] The verification process includes two aspects: first, verifying whether the types of the head and tail entities conform to the domain and range constraints of the relation; and second, verifying whether the entity identifiers referenced by the relation actually exist in the entity list. When calling the model, the temperature parameter is set to zero to maximize output determinism. Relationships that do not meet the constraints are deleted. Automatic correction of the extraction results is achieved by eliminating non-compliant knowledge, ultimately outputting a corrected set of structured knowledge.

[0038] S1.2.3 Knowledge Fusion and Storage Knowledge graphs are primarily stored using three methods: relational database storage, RDF triple storage, and native graph storage. This invention selects the Neo4j graph database as the storage platform for the knowledge graph of dike hazard situations.

[0039] The extracted triples are fused, including entity alignment, relation fusion, and conflict resolution, to eliminate entity redundancy and semantic conflicts. The fused structured knowledge is then imported into a graph database to complete node creation and relation establishment, thereby obtaining a knowledge graph of dike risks.

[0040] The triples obtained from knowledge extraction originate from heterogeneous texts from multiple sources. Before being stored in the database, they need to undergo knowledge fusion to eliminate entity redundancy and semantic conflicts. The fusion process includes entity alignment, relation fusion, and conflict resolution. Entity alignment, through text normalization, synonym matching, and string similarity calculation, merges entities pointing to the same real-world object into globally unique identifiers. Relation fusion removes duplicates and verifies the direction of multi-source relations. Conflict resolution makes a comprehensive decision based on the authority of the source and the constraints of the ontology type. After the above processing, 19,743 duplicate entities were merged from 30,584 original entities, resulting in 10,841 globally unique entities, with an entity redundancy elimination rate of 64.55%. From 11,538 original relations, 2,493 redundant relations were removed, retaining 9,045 normalized relations, with a relation deduplication rate of 21.61%.

[0041] The fused structured knowledge is imported into Neo4j to complete node creation and relationship establishment. Nodes represent entities, with different colors distinguishing types; edges represent semantic relationships, and arrows indicate direction. This constructs a knowledge graph of levee hazards. Based on the constructed knowledge graph, semantic retrieval can be implemented using the Cypher language, facilitating the retrieval of knowledge graph results for hazards such as piping and seepage. Figures 6-7 As shown.

[0042] (II) Intelligent Diagnosis and Decision Support Method for Dike Risk Based on RAG Figure 2 A framework for intelligent diagnosis and decision support for dike risks is presented, which involves sequentially executing risk collection, intelligent diagnosis, and decision support to form a closed-loop business process from on-site inspection to feedback optimization.

[0043] The hazard data collection phase transforms information such as hazard type, manifestations, and location obtained from on-site inspections into standardized inputs, providing a data foundation for subsequent diagnosis. The intelligent diagnosis phase collaboratively utilizes three retrieval paths: a knowledge graph, a rule base, and a vector database. The multi-source retrieval results are fused and input into a large language model to generate diagnostic results, providing decision support for operations and maintenance personnel. Furthermore, the handling feedback is incorporated into the knowledge base, supporting the continuous updating of the knowledge graph and rule base. The specific steps of intelligent diagnosis are detailed below: S2.1 Structured Reasoning Based on Knowledge Graphs This invention, based on a knowledge graph of dike hazards, designs a structured reasoning method for hazard diagnosis. This method includes three core components: entity recognition, intent determination, and graph query. The overall process is as follows: Figure 8 As shown.

[0044] The longest matching algorithm is used to identify entities in user queries; user intent is divided into four core categories for intent determination: hazard identification, cause analysis, response measure query, and material demand query; a structured query instruction tuple Query = (Intent, EntityList) is output, where Intent represents the purpose of the question or the type of action, and EntityList represents the list of entities; based on the query instruction type, a preset Cypher query template library is automatically matched to retrieve related entities and relationships from the knowledge graph.

[0045] The details are as follows: (1) Entity recognition. Using the entity types, names and examples defined in the aforementioned ontology as a dictionary, the longest matching algorithm is used to scan the user's questions, segment and extract specific domain entities from the continuous text, such as "back slope foot" (dike location) and "reverse filter well" (hazard control measures), and each entity is labeled with its predefined type.

[0046] (2) Intent Determination. In the intent determination stage, by analyzing and summarizing typical questions regarding dike emergencies, this invention categorizes user intent into four core types: hazard identification, cause analysis, response measure query, and material demand query. The system pre-sets a keyword trigger list and sentence structure template for each type of intent. Based on entity recognition, user intent can be quickly determined by matching keywords (such as "cause," "how to handle," and "what is needed") and sentence structure in the questions. Specific intent classifications, core objectives, and examples are shown in Table 2.

[0047]

[0048] (3) Structured Query Instruction Output. Based on the entity recognition and intent determination described above, a structured query instruction tuple is output: Query = (Intent, EntityList). Where Intent ∈ {hazard identification, cause analysis, response measure query, material demand query}; EntityList is a list of identified entities, each represented as (Type, Value), such as (HAZARD_TYPE, "piping"). For example, for the question "What are the causes of piping?", the parsed result is: (cause analysis, [(HAZARD_TYPE, "piping")]). This structured query instruction provides a clear input specification for subsequent accurate retrieval of the knowledge graph.

[0049] (4) GraphRAG-based graph query. To ensure the accuracy and efficiency of the query, this invention pre-designed a complete Cypher query template library, as shown in Table 3. For each predefined query intent, each template strictly follows the ontology structure of the knowledge graph, uses parameterized placeholders to ensure query security, and uniformly names the returned fields for easy subsequent processing.

[0050]

[0051] When the system receives a query command, it automatically matches a preset query template based on the command type. Taking hazard cause as an example, for the command ("Cause Analysis", [("HAZARD_TYPE", "Piping")]), the system matches template T02 and binds the entity "Piping" to the placeholder $hazard_name, generating a complete Cypher query statement, such as "MATCH (h:Hazard)-[:causedBy]->(c:Cause) WHERE h.name = "Piping" RETURN h.name AS hazard,c.name AS cause, c.type AS cause_type". This statement first locates the hazard node named "Piping", and then searches for all related cause nodes along the causeBy relationship. In actual queries, the system may retrieve specific causes such as "There is a gravel permeable layer in the levee foundation" or "Poor drainage on the back slope". Each record is marked with the cause type and source document, ensuring the traceability of information.

[0052] All query results are converted into structured JSON format for easier subsequent processing and analysis. The system encapsulates the retrieved node attributes, relationship types, and path information into complete knowledge fragments. When no matching results are found, the system returns an empty dataset and provides a natural language prompt to the user in subsequent steps that the relevant information is not currently included in the knowledge base.

[0053] S2.2, Risk Level Determination Based on Rule Base Based on the "Technical Guidelines for Emergency Flood Control and Damage Prevention" (SL / T 832-2024), this invention designs an automatic hazard level determination method based on a rule base, comprising three stages: feature extraction, rule base construction, and inference decision-making, as detailed below: 1) Feature extraction.

[0054] A combination of regular expressions and keyword matching is used to extract quantitative parameters and qualitative features from user input.

[0055] The feature extraction module extracts key information for risk assessment from the user's input natural language description. Due to the diverse and unstructured nature of risk descriptions, this invention employs a combination of regular expressions and keyword matching to automate the extraction of quantitative parameters and qualitative features.

[0056] (a) Quantitative Parameter Extraction. Based on the clearly defined grading thresholds in the "Technical Guidelines for Dike Emergency Repair," the system extracts key numerical values ​​from natural language descriptions using regular expressions. For example, the extraction rule for the distance from a piping outlet to the dike toe is "[prefix] (distance / away / distance) dike toe [modifier] (approximately / about) ? [number] + [unit] (meters / m)," which matches "distance from dike toe X meters" to obtain the distance between the piping outlet and the dike toe. Similarly, regular expressions are used to identify expressions such as "outlet diameter X centimeters," extracting the leak size and converting it to centimeters; from descriptions such as "seepage height is 1 / 2 of the dike height," the ratio of seepage height to dike height is extracted; for landslides, sinkholes, and other hazards, the system can identify expressions such as "volume X cubic meters" to extract the volume of the collapsed or landslide body. All of the above extraction processes consider the unified conversion of different units (meters, centimeters, millimeters, percentages, etc.) to ensure standardized numerical processing.

[0057] (b) Qualitative Feature Recognition. The system determines the state attributes in the hazard description through keyword matching. For example, it identifies keywords such as "turbid water" and "sand inrush" to determine whether the water quality is turbid; it identifies the water flow pattern based on descriptions such as "jet flow" and "slope flow"; it maps the qualitative scale to the corresponding level from expressions such as "large scale" and "relatively large scale"; it distinguishes the crack type based on keywords such as "transverse crack" and "longitudinal crack"; and it determines whether there is leakage through descriptions such as "seepage" and "concentrated seepage". The recognition of these qualitative features provides key state information for subsequent rule matching.

[0058] 2) Rule base construction A three-tiered rule base—hazard type, hazard level, and judgment rule—transforms scattered provisions into systematic and executable knowledge. The top tier is classified according to hazard type (such as piping and seepage); the middle tier is divided into three levels—major, relatively major, and general—according to the degree of hazard; and the bottom tier consists of one or more specific rules under each level.

[0059] Each rule consists of two parts: first, the rule text for manual interpretation, which uses natural language to describe the judgment conditions (e.g., "≤25 meters from the toe of the dike and large-scale turbid water flow"); second, the logical conditions for automatic judgment, which combine the parameters and states output by the feature extraction module to determine whether the rule is met. Taking seepage hazards as an example, the classification and handling measures are shown in Table 4, and examples of judgment rules are provided in [reference needed]. Figure 9 .

[0060]

[0061] 3) Reasoning and decision making The inference module receives the feature extraction results and matches them against the rule base in descending order of hazard severity. If a match is successful, the module outputs the corresponding level and corresponding measures; otherwise, it determines the situation as "unable to determine" and prompts the user to provide a more detailed description of the hazard.

[0062] S2.3 Semantic Retrieval Based on Vector Database Because knowledge graph retrieval is limited to modeled triples, it struggles to cover unstructured information in manuals, papers, monographs, and historical cases. To address this deficiency, this invention introduces a retrieval enhancement generation based on a vector database. Through similarity matching in the semantic vector space, it retrieves the most relevant information fragments to the hazard description from an unstructured text library. The specific process includes data preprocessing, vector library construction, and similarity retrieval. Specifically: external documents are segmented into text blocks using a sliding window strategy; Chinese text embedding models are used to vectorize these text blocks and construct a FAISS vector index; user query text is vectorized using the same model, and cosine similarity is calculated to retrieve the top k most similar text blocks and their source information from the vector library.

[0063] Includes the following steps: (1) Data preprocessing.

[0064] Using PDF documents such as manuals, monographs, and literature as external data sources, the text content is extracted while preserving the original order. Considering the context window limitations of large language models, a sliding window strategy is adopted to segment documents into text blocks, setting the block size to 600 characters and the overlap between blocks to 80 characters, in order to balance retrieval accuracy and contextual integrity. The maximum number of blocks per document is limited to 300, and each text block is associated with its source filename, facilitating the tracing of the source of search results.

[0065] (2) Vector library construction.

[0066] (a) Text vectorization. The text-embedding-v4 model, which is a text embedding model for the Chinese domain, is selected to vectorize the text blocks. Each text block is mapped to a high-dimensional floating-point vector (e.g., 1536-dimensional). After all text blocks are vectorized, an n×1536 vector matrix is ​​formed, where n is the total number of text blocks.

[0067] (b) Vector Normalization. To facilitate subsequent similarity calculations, the vector matrix is ​​normalized using the L2 norm, ensuring that the magnitude of each vector is 1. The L2 norm is defined as follows: (1); L2 norm normalization involves dividing each component of a vector by its L2 norm, making the normalized vector a unit vector. The process is as follows: (2); (c) Index Construction. To support efficient similarity retrieval, a vector index is constructed using the FAISS library. This library provides various index types, which can be flexibly selected according to accuracy and efficiency requirements, and also supports common operations such as vector normalization and batch retrieval. To avoid redundant calculations, the completed index and related data are saved locally for system reuse.

[0068] (3) Similarity search.

[0069] (a) Query Vectorization. The user query text is vectorized using the same model as the text blocks, ensuring that the query and the text blocks in the database are in the same vector space. The user question is input into the text embedding model to obtain the query vector. Since the index stores normalized text block vectors, the query vector needs to be L2 normalized.

[0070] (b) Similarity Calculation. After L2 normalization, comparing the cosine similarity of vectors a and b can be transformed into comparing the inner product of a and b. The larger the inner product, the higher the semantic similarity between the query and the text block. This study uses an exact inner product index to perform inner product search, returning the top k text blocks with the largest inner product, where k=5. The search results include the text block content, the source file name, and the similarity score, sorted in descending order of similarity.

[0071] Using the description of the emergency, "The piping outlet is 20m from the toe of the dike, turbid water is flowing out, the scale is large and the amount of sand flowing in is continuously increasing," as input, the top-5 text fragments were retrieved through similarity retrieval. Examples of similarity retrieval results are shown in Table 5.

[0072]

[0073] S2.4 Multi-source retrieval result fusion and answer generation Based on the retrieval results from steps S2.1 to S2.3 above, a fusion strategy is designed to integrate heterogeneous information into a logically coherent and comprehensive enhanced context. This includes fusion timing, information organization principles, prompt word template design, and answer generation.

[0074] (1) Timing of integration The fusion process occurs after the retrieval is completed but before the large language model generates the answer. At this stage, the rule base outputs the risk level and handling suggestions, the knowledge graph returns relevant entity relationships, and the vector database recalls similar text fragments. The fusion module is responsible for integrating this heterogeneous information to prepare input for the subsequent generation process.

[0075] (2) Information organization principles To ensure that the fused context is both comprehensive and clear, the following principles are followed: 1) Priority principle: The level determination results from the rule base are deterministic and serve as the beginning of the context, clearly defining the level of danger; 2) Structure priority principle: The structured information returned by the knowledge graph (such as the list of causes and the list of measures) is organized in a logical order, making it easy for the model to directly reference it; 3) Supplementary principle: Text fragments from the vector database serve as supplementary evidence and are placed after the structured information to provide detailed support; 4) Traceability principle: Each piece of information retains its source identifier, with the knowledge graph information labeled with the fact source (e.g., [KG: Fact ID]) and document fragments labeled with fragment numbers (e.g., [DOC: S1]).

[0076] (3) Prompt word template design Based on the above principles, a unified prompt template was designed to integrate multi-source information into input that the model can understand. The template consists of four parts: system role setting, hard rules, multi-source context, and output format constraints. The system role clearly defines the model as an expert assistant in the field of water conservancy and flood control; the hard rules stipulate that only given information can be used, the source must be labeled, and insufficient information must be explained truthfully; the multi-source context is organized into two parts: "knowledge graph information" and "document fragments," presenting structured facts and unstructured evidence respectively. It should be noted that the hazard level determination in the rule base is completed simultaneously as part of the knowledge graph retrieval, and its results are already included in the knowledge graph retrieval results. The output format is fixed at four paragraphs: "Hazard Identification, Cause Analysis, Handling Measures, and Precautions," with corresponding citations appended after the key conclusions in each paragraph. See the prompt template design and examples below. Figure 10 .

[0077] (4) Answer generation The constructed prompts are input into a large language model to generate the final answer. This invention uses Qwen3.6-Plus as the answer generation model, with the temperature parameter set to 0.2 during call to ensure output stability. The prompt is: "After a heavy rain, a volume of approximately 4m³ appeared on the back side of the dike." 3 Taking the collapse of the levee, with the bottom of the pit located below half the height of the levee, as an example, the diagnosis of the danger is as follows: Figure 11 As shown.

[0078] Example 3: The following is a description of a specific embodiment.

[0079] A Class II large (2) water conservancy project in Central China consists of hydraulic structures such as an earth-rock dam (including a dike), a spillway, a power plant, a gravity dam, and a ship lock. The earth-rock dams on the left and right banks are 6184.84m and 6442.80m long, respectively. The project has a heavy inspection workload, and during inspections, it was found that the drainage ditches of the dikes frequently exhibited seepage hazards such as sand boils, bulging at the bottom of the ditches, collapse of precast blocks, and burrowing by aquatic animals. How to quickly and accurately diagnose and assist in decision-making regarding the types, causes, and treatment measures of dike hazards is a concern for the project's operation and maintenance management unit. The following is based on the intelligent diagnosis and auxiliary decision-making method for dike hazards based on the fusion of knowledge graph and large language model of this invention, providing a rapid and accurate diagnosis and auxiliary decision-making process.

[0080] I. Hazard Collection Based on the structural characteristics of the earth-rock embankment and the actual site conditions, on-site inspections were conducted. On July 14, 2024, the area where the project is located experienced a severe rainstorm, with a 24-hour rainfall of 128.62 mm. To assess the operational status of the earth-rock embankment after the heavy rainfall and ensure project safety, personnel were organized to conduct a post-rainstorm inspection on July 15-16. The inspection revealed that after the rainstorm, no subsidence was found on the right bank of the old river channel embankment and the upper section of the Gucheng earth-rock embankment bridge. However, one obvious subsidence was found at 3+800 meters on the left bank of the old river channel embankment, and one subsidence was found at 1+120 meters on the lower section of the Gucheng earth-rock embankment bridge. Typical subsidence points are shown below. Figure 12 As shown.

[0081] II. Risk Diagnosis 2.1 Hazard Diagnosis Process Taking the sinkhole at 3+800 on the left bank of the old river channel as an example for hazard diagnosis, the upper layer of the embankment foundation at this location consists of medium-fine sand 1.2–10m thick, with a lower layer of gravel. The dam body is mainly constructed with gravel, using a geomembrane inclined wall with a geomembrane covering approximately 50m long to extend the seepage path of the dam foundation. A drainage ditch 1.5m deep and 1m wide at the bottom is constructed at the downstream toe of the dam. Along the perimeter of the drainage ditch, from bottom to top, geotextile, gravel layers, and precast concrete blocks are laid to facilitate drainage. After a heavy rain, a sinkhole with a volume of approximately 4m³ appeared at this location. 3 The collapse occurred, with the bottom of the pit located below half the height of the embankment.

[0082] According to the relevant steps of the RAG-based intelligent diagnosis and auxiliary decision-making method for dike hazards described in Example 2, the hazard is intelligently diagnosed, and the specific implementation is as follows: (1) Knowledge Graph Retrieval. The system performs entity recognition and intent determination on the hazard description, generates structured query instructions, and calls Cypher query to retrieve structured knowledge related to "flooding," such as causes, treatment measures, and associated hazards, from the levee hazard knowledge graph. The query results for the flooding hazard section are as follows: Figure 13 As shown.

[0083] (2) Vector database retrieval. After the system vectorizes the description of the hazard, it performs similarity matching with the vector index library to recall relevant fragments from texts such as "Theory and Practice of Flood Control and Emergency Rescue in Dike Engineering" and "Technical Manual for Flood Control and Emergency Rescue". The content involves fine-grained knowledge such as "treatment of soft soil layer in dike foundation" and "collapse backfilling and compaction". The recall results are shown in Table 6.

[0084]

[0085] (3) Rule base level determination. Based on the judgment criteria for sinkhole hazards in the "Technical Guidelines for Dike Emergency Response", the system extracts features such as "collapse volume of approximately 4m³" and "bottom of the pit is located below 1 / 2 of the dike height" from the hazard description, matches them with the "major hazard" judgment conditions in the rule base, and automatically outputs the hazard level as major hazard. The classification of sinkhole hazard levels and the corresponding handling measures are shown in Table 7.

[0086]

[0087] 2.2 Hazard Diagnosis Results The three retrieval results from step 2.1 are fused to form an enhanced contextual input large language model. Based on this model, the model generates structured diagnostic conclusions including hazard identification, cause analysis, handling suggestions, and precautions, as follows: (1) Hazard identification The aforementioned dangerous situation meets the definition of "collapse hazard," which refers to a localized subsidence near the dike body, abutments, or toe under the influence of high water levels or rainwater inundation. According to the "Technical Guidelines for Dike Emergency Repair" (SL / T 832-2024), a collapse volume exceeding 1m³ is considered a hazard. 3 Furthermore, the bottom of the pit is located below half the height of the levee, which is considered a "major emergency".

[0088] (2) Causal analysis 1) The foundation of the dam has a hidden danger of weak soil layers. Rainwater infiltration exacerbates the consolidation deformation and uneven settlement of the soft soil, leading to the collapse of the overlying sand layer and the dam body in some areas; 2) The mismatch between the seepage prevention structure and the drainage system causes local seepage disturbance. Although this section is equipped with a geomembrane inclined wall and a 50m paving to extend the seepage path, the medium and fine sand layer has high permeability. During rainstorms, if there are minor defects in the joints of the geomembrane, the ends of the paving, or the junction with the dam body, concentrated seepage paths can easily form, eroding fine particles and inducing the collapse of the dam structure; 3) There are hidden dangers in the construction quality. The dam body is filled with gravel. If the compaction is insufficient or the layer interface is not properly treated, local settlement is likely to occur after the dam body is saturated by rainwater.

[0089] (3) Recommendations for handling Immediately implement temporary sealing and reverse filtration: If seepage or piping has already occurred at the collapse site, the "reverse filtration material filling" method should be prioritized. This involves laying geotextiles, gravel layers, and precast concrete blocks from bottom to top to prevent seepage from carrying away fine particles and to curb the expansion of the collapse. If conditions permit, a thorough "backfilling and compaction" treatment should be adopted: remove loose soil from the collapse area down to the stable layer, and backfill in layers with gravel of the same material as the original dam (moisture content and gradation matching), each layer ≤30cm thick. Compact the material mechanically or manually to the designed dry density, ensuring a compaction degree ≥95%. Required key materials include cohesive soil or loam, geotextiles, graded reverse filtration material (coarse sand, crushed stone), tamping tools (or small compaction machinery), and soil bags for the manhole.

[0090] (4) Precautions As the collapse progresses and water seepage intrudes, secondary hazards such as piping or landslides may occur, or even a major hazard of sudden collapse may arise. Therefore, it is essential to monitor the backwater side for seepage, piping, cracks, or slope displacement simultaneously, and escalate the response accordingly if any are detected. During rescue operations, it is strictly forbidden to pile loads or subject mechanical vibrations to the edge of the collapse to prevent secondary collapse. All personnel entering the collapse area must wear safety ropes and helmets, and must be supervised by designated personnel.

[0091] III. Decision Support for Risk Situation 3.1 Decision-making results in the event of a hazard The company's production technology department organized a consultation with experts and made a decision based on the actual situation on site. Analysis determined that the aforementioned emergency situation constituted a "fall-down emergency," classified as a major emergency. The primary cause of this emergency was the improper selection of geotextiles, which failed to adapt to the permeability characteristics of different soil layers such as fine sand and silty sand in the foundation. This resulted in insufficient permeability and anti-siltation properties of the filter layer, creating an inherent risk of seepage deformation. During the heavy rain, the reservoir water level rose rapidly, the outflow gradient around the downstream drainage ditch increased sharply, and a large amount of surface runoff flowed into the drainage ditch, causing a sudden rise in the water level. The filter layer's drainage capacity was insufficient to cope with the instantaneous seepage pressure. Furthermore, the shear strength decreased after the soil became saturated, ultimately leading to seepage deformation and even collapse of the drainage ditch slope. In response to the above emergency, the following comprehensive treatment plan was determined: (1) Structural design modification: In order to maintain the integrity of the drainage ditch after repair, the bottom slope and bottom elevation of the ditch after molding are kept consistent with the original ditch, and the slope of the precast slab protection on both sides of the drainage ditch is still 1:1.5. In order to ensure that there is sufficient weight on the geotextile to resist the deformation of the dam foundation soil, the slope of the geotextile on both sides is adjusted from the original design of 1:1.5 to 1:2; a 20cm thick gravel cushion layer is added above and below the geotextile, and the thickness of the gravel cushion layer at the bottom of the ditch is increased from 20cm to 30cm; a pebble weight layer is added to the surface layer of the precast slab, and a concrete drainage pipe is added to centrally discharge surface water.

[0092] (2) Optimization of filter material: Change the geotextile type and adjust the equivalent pore sizeO 95 The thickness is 0.25mm to ensure that its permeability, soil retention and silt prevention meet the reverse filtration requirements of medium sand and fine sand strata.

[0093] (3) Construction method control: A lightweight wellpoint dewatering scheme is adopted, and wellpoint pipes are arranged in layers on both sides of the drainage ditch to control the groundwater level and reduce seepage pressure; a layered excavation and protection method is adopted, and sand and gravel are filled in mesh bags to press the slope in time to prevent slope collapse; after the geotextile is laid, graded gravel is backfilled and precast slabs are laid immediately to ensure that the cushion layer is dense and the structure is stable.

[0094] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for intelligent diagnosis and auxiliary decision-making of dike risks that integrates knowledge graphs and large language models, characterized in that, Includes the following steps: Step 1: Construct a knowledge graph for the domain of dike hazard based on a large language model, including the construction of the schema layer and the data layer. The schema layer construction is based on the ontology design of the domain of dike hazards, defining classes, constructing the hierarchical structure of classes, class attributes, attribute constraints and semantic associations; The data layer construction includes data collection and preprocessing, knowledge extraction, knowledge fusion and storage; Step 2: Risk information collection. Then, based on retrieval enhancement generation technology, the three retrieval paths of knowledge graph, rule base and vector database are called in a coordinated manner. The knowledge graph is used for structured reasoning, the rule base is used for risk level determination, and the vector database is used for semantic retrieval. The multi-source retrieval results are fused and input into the large language model to generate diagnostic results.

2. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, In step one, the schema layer is constructed using the Stanford seven-step method, which includes: defining the domain boundaries; reusing the core concepts of existing hydraulic ontology; extracting high-frequency terms from standards, specifications and technical documents, and summarizing the core concept set; and defining the class hierarchy, semantic relationships and attribute constraints.

3. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 2, characterized in that, The attribute relationship model takes the type of danger as the core and establishes a conceptual system of eight categories: danger manifestation, danger cause, danger level, danger measures, environmental conditions, emergency supplies, and dike location, and defines semantic relationships between the concepts.

4. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, In step one, data collection includes collecting industry standards, academic works, and academic papers related to dike breaches; data preprocessing specifically involves converting the original PDF data into plain text format, removing extra spaces, special control characters, and page number information; automatically identifying the document hierarchy based on chapter titles, segmenting and labeling paragraphs, and retaining the chapter and document type metadata of each paragraph to form the corpus foundation for subsequent knowledge extraction.

5. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, In step one, knowledge extraction employs an ontology-constrained and self-verification-enhanced approach, specifically including the following sub-steps: (a) Multiple independent extractions under ontology constraints: The domain ontology defined in the pattern layer is transformed into structured extraction constraints, and the large language model is guided to perform multiple independent extractions under the given constraints through prompt word engineering. (b) Multi-round result fusion and filtering: In the entity fusion stage, the four-tuple <text content, type, start position, end position> is used as the criterion for determining the same entity. All candidate entities are deduplicated, each entity is assigned a globally unique identifier, and a mapping relationship from the original identifier to the new identifier is established. In the relationship filtering stage, the head and tail entity identifiers in each relationship are updated according to the mapping table. If the entity identifier referenced by a relationship cannot be found in the mapping table, it indicates that the entity has been merged or is invalid, and it is directly removed. For relationships that are still valid after the update, only the one with the highest confidence is retained in the same relationship. (c) Self-checking and correction based on ontology constraints: Using the relation constraints defined in the ontology as the set of verification rules, the large language model performs logical verification on the extracted results after fusion, deletes relations that do not meet the constraints, and outputs the corrected set of structured knowledge.

6. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, The knowledge fusion and storage in step one specifically involves: fusion of the extracted triples, including entity alignment, relation fusion, and conflict resolution, to eliminate entity redundancy and semantic conflicts; importing the fused structured knowledge into a graph database to complete node creation and relation establishment, thereby obtaining a knowledge graph of dike hazards.

7. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, The structured reasoning based on the knowledge graph in step two includes: using the longest matching algorithm to identify entities in user questions; classifying user intent into four core categories for intent determination: hazard identification, cause analysis, response measure query, and material demand query; outputting a structured query instruction tuple Query = (Intent, EntityList), where Intent represents the purpose of the question or the type of action, and EntityList represents the list of entities; and automatically matching the preset Cypher query template library according to the query instruction type to retrieve related entities and relationships from the knowledge graph.

8. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, The specific steps for determining the risk level based on the rule base in step two are as follows: 1) Feature extraction: A combination of regular expressions and keyword matching is used to extract quantitative parameters and qualitative features from user input; 2) Rule base construction: A three-layer rule base system of hazard type, hazard level, and discrimination rule is adopted. Based on the feature extraction results, reasoning and matching are performed in order of hazard severity from high to low, and the preliminary hazard level judgment result and corresponding handling measures are output.

9. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, The semantic retrieval based on the vector database in step two is as follows: the external document is segmented into text blocks using a sliding window strategy, the text blocks are vectorized using a Chinese text embedding model, and a FAISS vector index is constructed; the user query text is vectorized using the same model, and the cosine similarity is calculated to retrieve the top k text blocks with the highest similarity and their source information.

10. The intelligent diagnosis and auxiliary decision-making method for dike hazard situation integration based on knowledge graph and large language model as described in claim 1, characterized in that, The fusion of multi-source retrieval results in step two follows these principles: priority principle, using the rule base's level determination results as the beginning of the context; and structure priority principle, organizing the structured information returned by the knowledge graph in logical order. The principle of complementarity places text fragments from vector databases as supplementary evidence after structured information. The principle of traceability means that each piece of information retains its source identifier; Based on the above principles, a unified prompt word template is designed. The prompt word template consists of four parts: system role setting, hard rules, multi-source context, and output format constraints. The constructed prompt words are input into the large language model to generate the final answer.