An evidence subgraph-driven flood control emergency plan intelligent generation method
Patent Information
- Application Number
- CN202610920949.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-24
- Publication Date
- 2026-09-11
AI Technical Summary
[0005]本发明的目的是提出一种基于证据子图驱动的防洪应急预案智能生成方法,克服现有检索增强生成技术在防洪应急预案生成中知识碎片化、检索噪声大、生成结果不可追溯可解释性差的缺陷,实现险情下精准、可靠、可溯源的防洪应急方案自动生成
(1)本发明依托优化后的结构化证据子图对大模型生成过程进行事实约束,所有输出内容均以图谱实体、关联三元组为推理依据,避免了模型编造虚假险情、淹没范围、处置流程等信息;
Smart Images

Figure CN122735722A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence and flood control emergency technology, and in particular to an intelligent generation method for flood control emergency plans based on evidence subgraphs. Background Technology
[0002] Flood control and disaster reduction are core business areas of water conservancy project safety management and urban public emergency management. The flood control emergency plan system for various reservoirs, dikes, and rivers is vast, with related knowledge scattered across multiple heterogeneous documents such as management regulations, project archives, historical incident cases, and response plans. This encompasses multi-dimensional information including project parameters, incident types, response levels, personnel evacuation, rescue measures, and local responsible units. Traditional methods relying on manual compilation and retrieval of emergency plans are slow and costly, failing to meet the business needs for rapid assessment and immediate generation of response plans in the event of a sudden incident. Therefore, Retrieval Augmentation (RAG) technology is gradually being introduced into flood control emergency scenarios. By mounting external domain documents into a vector database, it supplements large language models with professional knowledge, thereby alleviating the deficiency of insufficient domain knowledge reserves in large models. While existing retrieval augmentation solutions such as RALM, TOC, RETRO, and GraphRAG can supplement external knowledge based on text or basic graph structures, they still cannot meet the professional business needs of flood control emergency plan generation and have multiple inherent shortcomings.
[0003] Traditional text-based RAG technology uses only independent text fragments as knowledge carriers, which has significant shortcomings in flood control scenarios: First, the knowledge representation is fragmented, only able to read isolated sections of the plan text, unable to establish the logical connections between reservoirs, flood risks, population evacuation, emergency measures, and resettlement sites, making it difficult to perform chain reasoning when facing complex dam breaches and overtopping risks with multiple coupled factors; Second, it is difficult to balance retrieval accuracy, as vector similarity retrieval easily introduces low-relevance redundant text and loses key cross-document association information, resulting in both retrieval noise and information omissions; Third, large models pose a significant risk of generating illusions, lacking structured factual constraints, and models are prone to fabricating false inundation areas, population evacuation, and emergency response procedures, which can create serious safety hazards in flood control decision-making scenarios; Fourth, the output content lacks reasoning basis, making it impossible to trace the original plan and knowledge source corresponding to each response suggestion, resulting in insufficient interpretability and verifiability of the plan, failing to meet the rigor requirements of emergency management.
[0004] While existing improved solutions such as GraphRAG and LightRAG, which integrate knowledge graphs, introduce graph structures to represent related knowledge, they still have adaptability deficiencies for flood control emergency scenarios. These general graph retrieval frameworks lack subgraph filtering mechanisms designed for specific entities and business logic such as water conservancy projects, flood risks, and emergency responses. During the local expansion phase of the knowledge graph, they introduce a large number of irrelevant nodes and redundant relationships, significantly increasing the contextual information load of the large model. Simultaneously, they lack weighted filtering and path optimization methods based on question semantics, failing to automatically eliminate weakly related reasoning links. The noise introduced by graph expansion continuously interferes with model reasoning, ultimately reducing the accuracy and logical consistency of the generated plans. In summary, existing retrieval enhancement technologies struggle to simultaneously address the multiple requirements of knowledge association representation, retrieval noise reduction, factual constraints, and traceable reasoning. There is an urgent need for a complete end-to-end technical solution for flood control emergency plan generation, integrated question standardization processing, evidence subgraph construction and lightweight optimization, and structured knowledge constraint generation. Summary of the Invention
[0005] The purpose of this invention is to propose an intelligent generation method for flood control emergency plans based on evidence subgraphs, which overcomes the shortcomings of existing retrieval-enhanced generation technologies in the generation of flood control emergency plans, such as knowledge fragmentation, high retrieval noise, and poor traceability and interpretability of generation results, so as to realize the automatic generation of accurate, reliable and traceable flood control emergency plans under dangerous situations.
[0006] To achieve the above objectives, this invention proposes an intelligent generation method for flood control emergency plans based on evidence subgraphs, the specific steps of which are as follows: Step S1: Receive the user's natural language question, perform semantic reconstruction on the user's question based on the CRISPE prompting framework to obtain a normalized reconstructed question, and extract entity information from the original question and the reconstructed question through the Named Entity Recognition (NER) model to form a question entity set; Step S2: Vectorize the reconstructed problem and perform cosine similarity matching with the text blocks in the preset flood control emergency plan text library. Select the top K text blocks with the highest similarity as the seed block set. Step S3: Extract entities from the seed block and merge them with the problem entities to obtain a seed entity set. Use FastText entity linking to map to the flood control emergency plan knowledge graph. Perform local graph expansion with the seed entities as the center to generate a candidate evidence subgraph containing multiple entities and multiple relationships. Step S4: Calculate the semantic relevance of each relation edge in the candidate evidence subgraph to the user's question as the edge weight, and use the Maximum Spanning Tree (MST) algorithm to optimize the candidate evidence subgraph, outputting a lightweight evidence subgraph. Step S5: Combine the original user question, the CRISPE refactoring question, and the lightweight evidence subgraph to construct a unified prompt message and input it into the locally deployed large language model. Based on the structured fact constraints of the evidence subgraph, complete the reasoning and output the flood control emergency plan, the risk analysis conclusion, or the emergency response suggestion.
[0007] Preferably, in step S1, the specific steps are as follows: Step S11: Receive the user's natural language question, and perform semantic reconstruction on the user's question based on the CRISPE prompt framework to obtain a normalized reconstructed question; wherein, the CRISPE framework includes Context, Role, Instruction, Subject, Preset, and Exception; Step S12: Perform joint entity extraction on the user problem and the reconstruction problem using the Named Entity Recognition (NER) model. The obtained entities include one or more of the following: reservoir project entities, hazard type entities, emergency response level entities, emergency measures entities, and responsible unit entities, forming a problem entity set. .
[0008] Preferably, in step S2, the specific steps are as follows: Step S21: Input the reconstruction problem into the text vector encoding model to obtain the vector representation of the problem; at the same time, perform vectorization encoding on each text block in the flood control emergency plan text library; Step S22: Calculate the semantic similarity between the question vector and each text block vector based on the cosine similarity retrieval method, using the following formula: ; in, Let the problem vector be... For text block vectors, The similarity between the question vector and the text block vector; Step S23: Sort the text blocks according to their similarity and select the top K text blocks with the highest similarity as the seed block set. The seed block contains information related to flood prevention knowledge, emergency response procedures, disposal measures, and management requirements relevant to the user's original question.
[0009] Preferably, in step S3, the specific steps are as follows: Step S31: Process the seed block Entity extraction is performed on the text content, and the extracted entities are then compared with the question entity set. The entities in the set together form the seed entity set. ; Step S32: Based on FastText entity links, map seed entities to corresponding nodes in the flood control emergency plan knowledge graph to obtain a set of valid seed nodes in the graph. The formula is as follows: ; ; in, For flood control emergency response plan knowledge graph, For a set of entity nodes, It is a set of relationship edges between entities; Step S33: After completing entity mapping, with For each node within the graph, traverse its first-order adjacent nodes and associated edges, integrating all nodes and relationships to generate a candidate evidence subgraph, as shown in the following formula: ; in, For candidate evidence subgraphs, This is the set of temporary relation edges obtained by expansion.
[0010] Preferably, in step S33, the local expansion of the graph only performs first-order neighborhood retrieval, does not perform multi-hop unlimited expansion, retains only entities and relationships strongly related to hazards, reservoirs, and emergency response, filters out irrelevant projects and non-synchronous emergency archive entity nodes, and controls the size of candidate subgraphs.
[0011] Preferably, in step S4, the specific steps are as follows: Step S41: Calculate the user problem using the reordering model. q The semantic matching score of each triple relation edge in the candidate evidence subgraph is used as the weight of the corresponding relation edge. Step S42: After obtaining the weights of all relation edges, construct a weighted undirected candidate evidence subgraph, and optimize the weighted undirected candidate evidence subgraph using the Maximum Spanning Tree (MST) algorithm, as shown in the following formula: ; in, For lightweight evidence subgraphs, The set of all relational edges in the candidate evidence subgraph; the MST algorithm retains high-weight inference edges while deleting low-relevance redundant edges and loops, while ensuring graph connectivity.
[0012] Preferably, in step S42, the evidence subgraph after maximum spanning tree optimization. The following conditions must be met: all seed entity nodes within the subgraph are connected, and the average weight of all relational edges within the subgraph is higher than the average weight of redundant edges removed during pruning.
[0013] Preferably, in step S5, the original user question, the CRISPE reconstruction question, and the lightweight evidence subgraph are jointly constructed into a unified prompt message, as shown in the following formula: ; in, As a unified input for large language models, For the original user's problem, For the CRISPE refactoring problem, For lightweight evidence subgraphs; The large language model relies on the structured fact constraints of the evidence subgraph to complete reasoning and output flood control emergency plans, hazard analysis conclusions, or emergency response suggestions, as shown in the following formula: ; in, Output suggestions for the model. For large language models deployed locally.
[0014] Therefore, this invention proposes an intelligent generation method for flood control emergency plans based on evidence subgraphs, the beneficial effects of which are as follows: (1) This invention relies on the optimized structured evidence subgraph to impose factual constraints on the large model generation process. All output content is based on graph entities and associated triples, which avoids the model from fabricating false information such as danger, flooding range, and disposal process. (2) This invention builds a complete link between reservoir projects, types of dangers, threatened populations, personnel transfer, emergency measures and responsible units by using a flood control emergency plan knowledge graph. This breaks through the limitation that traditional plain text RAG can only read fragments of content in isolation. It can support the linkage analysis and reasoning of complex dangers such as dam breaches and dike overflows. (3) The present invention first filters highly relevant seed texts of the preliminary plan by vector cosine similarity retrieval, and then uses the maximum spanning tree algorithm to weight and simplify the candidate evidence subgraph, automatically eliminating low-relevance redundant nodes, loops and irrelevant relationships, which greatly reduces the interference of irrelevant information on the reasoning of large models, while compressing the context load and improving the overall running efficiency. (4) The evidence subgraph in this invention completely preserves the full-link evidence from user query, plan text to graph reasoning path. Each emergency response suggestion can be traced back to the original plan document and graph triple, which meets the business requirements of rigorous verification and accountability for flood control emergency decision-making. (5) The complete end-to-end process in this invention can cover multiple scenarios such as automatic generation of flood control emergency plans, assessment of flood inundation range, flood control knowledge Q&A, emergency response decision-making for dangerous situations, and disaster prevention and mitigation knowledge services. It supports local deployment on water conservancy and emergency command platforms, and the data is secure and controllable with strong practicality.
[0015] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0016] Figure 1 This is a flowchart of an intelligent generation method for flood control emergency plans based on evidence subgraphs, according to the present invention. Figure 2 This is a framework diagram of an intelligent generation method for flood control emergency plans based on evidence subgraphs, as proposed in this invention. Detailed Implementation
[0017] To make the technical solutions, advantages, and objectives of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below. The described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0018] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.
[0019] Example 1 like Figures 1-2 As shown, this invention provides an intelligent generation method for flood control emergency plans based on evidence subgraph-driven methods (ES-KG-RAG), and the specific implementation steps are as follows: Step S1: Receive the user's natural language question, perform semantic reconstruction on the user's question based on the CRISPE prompting framework to obtain a normalized reconstructed question, and extract entity information from the original question and the reconstructed question using the Named Entity Recognition (NER) model to form a question entity set. The specific steps are as follows: Step S11: Receive the user's natural language question, and perform semantic reconstruction on the user's question based on the CRISPE prompt framework to obtain a normalized reconstructed question; wherein, the CRISPE framework includes Context, Role, Instruction, Subject, Preset, and Exception; Step S12: Perform joint entity extraction on the user problem and the reconstruction problem using the Named Entity Recognition (NER) model. The obtained entities include one or more of the following: reservoir project entities, hazard type entities, emergency response level entities, emergency measures entities, and responsible unit entities, forming a problem entity set. .
[0020] Step S2: Vectorize the reconstructed problem and perform cosine similarity matching with text blocks in the preset flood control emergency plan text library. Select the top K text blocks with the highest similarity as the seed block set. The specific steps are as follows: Step S21: Input the reconstruction problem into the text vector encoding model to obtain the vector representation of the problem; at the same time, perform vectorization encoding on each text block in the flood control emergency plan text library; Step S22: Calculate the semantic similarity between the question vector and each text block vector based on the cosine similarity retrieval method, using the following formula: ; in, Let the problem vector be... For text block vectors, The similarity between the question vector and the text block vector; Step S23: Sort the text blocks according to their similarity and select the top K text blocks with the highest similarity as the seed block set. The seed block contains information related to flood prevention knowledge, emergency response procedures, disposal measures, and management requirements relevant to the user's original question.
[0021] Step S3: Extract entities from the seed block and merge them with the problem entities to obtain a seed entity set. Use FastText entity linking to map to the flood control emergency plan knowledge graph. Perform local graph expansion centered on the seed entities to generate a candidate evidence subgraph containing multiple entities and multiple relationships. The specific steps are as follows: Step S31: Process the seed block Entity extraction is performed on the text content, and the extracted entities are then compared with the question entity set. The entities in the set together form the seed entity set. ; Step S32: Based on FastText entity links, map seed entities to corresponding nodes in the flood control emergency plan knowledge graph to obtain a set of valid seed nodes in the graph. The formula is as follows: ; ; in, For flood control emergency response plan knowledge graph, For a set of entity nodes, It is a set of relationship edges between entities; Step S33: After completing entity mapping, with For each node within the graph, traverse its first-order adjacent nodes and associated edges, integrating all nodes and relationships to generate a candidate evidence subgraph, as shown in the following formula: ; in, For candidate evidence subgraphs, For the extended set of temporary relation edges; In this step, the local expansion of the graph only performs first-order neighborhood search, without multi-hop unlimited expansion. It retains only entities and relationships that are strongly related to hazards, reservoirs, and emergency response, filters out irrelevant projects and entity nodes from non-synchronous emergency archives, and controls the size of candidate subgraphs.
[0022] Step S4: Calculate the semantic relevance of each relation edge in the candidate evidence subgraph to the user's question as the edge weight, and optimize the candidate evidence subgraph using the Maximum Spanning Tree (MST) algorithm to output a lightweight evidence subgraph. The specific steps are as follows: Step S41: Calculate the user problem using the reordering model. q The semantic matching score of each triple relation edge in the candidate evidence subgraph is used as the weight of the corresponding relation edge. Step S42: After obtaining the weights of all relation edges, construct a weighted undirected candidate evidence subgraph, and optimize the weighted undirected candidate evidence subgraph using the Maximum Spanning Tree (MST) algorithm, as shown in the following formula: ; in, For lightweight evidence subgraphs, The set of all relational edges in the candidate evidence subgraph; the MST algorithm retains high-weight inference edges and deletes low-relevance redundant edges and loops while ensuring graph connectivity. Evidence subgraph optimized from maximum spanning tree The following conditions must be met: all seed entity nodes within the subgraph are connected, and the average weight of all relational edges within the subgraph is higher than the average weight of redundant edges removed during pruning.
[0023] Step S5: Combine the original user question, the CRISPE refactoring question, and the lightweight evidence subgraph to construct a unified prompt message and input it into the locally deployed large language model. Based on the structured fact constraints of the evidence subgraph, complete the reasoning and output the flood control emergency plan, the risk analysis conclusion, or the emergency response suggestion. The original user question, the CRISPE reconstruction question, and the lightweight evidence subgraph are collectively constructed into a unified prompt message, as shown in the following formula: ; in, As a unified input for large language models, For the original user's problem, For the CRISPE refactoring problem, For lightweight evidence subgraphs; The large language model relies on the structured fact constraints of the evidence subgraph to complete reasoning and output flood control emergency plans, hazard analysis conclusions, or emergency response suggestions, as shown in the following formula: ; in, For model output, For large language models deployed locally.
[0024] Example 2 To verify the technical effectiveness of this invention, this embodiment takes a flood control emergency plan knowledge question-and-answer scenario as an example to verify the intelligent generation method of flood control emergency plans based on evidence subgraph driven proposed in this invention, and compares and analyzes it with existing typical retrieval-enhanced generation methods, as follows: 1. Construction of experimental dataset.
[0025] We collected flood control emergency response plan texts, emergency management standard documents, and related flood control knowledge documents to construct a flood control emergency response plan knowledge base. We used knowledge extraction methods to construct a flood control emergency response plan knowledge graph, which includes entities such as reservoir projects, hazard types, emergency response levels, emergency measures, responsible units, and their relationships. Simultaneously, we constructed a test set containing question-answer pairs to evaluate the generation performance of different models.
[0026] 2. Model performance comparison.
[0027] We selected representative models in the current field of retrieval enhancement generation as comparison objects, including the basic large language model Qwen2.5-3B-Instruct, the traditional text retrieval enhancement generation method RAG-text, the knowledge graph retrieval enhancement method KG-RAG, the graph structure retrieval enhancement method GraphRAG, and the lightweight graph retrieval enhancement method LightRAG.
[0028] Among them, Qwen2.5-3B-Instruct does not introduce an external knowledge retrieval mechanism; RAG-text uses vector retrieval to obtain relevant text blocks as external knowledge; KG-RAG obtains structured knowledge through knowledge graph entity retrieval; GraphRAG uses graph structure to organize knowledge and perform multi-hop reasoning; and LightRAG uses a lightweight graph retrieval strategy to reduce computational complexity.
[0029] 3. Experiments were conducted using the method proposed in this invention: First, the user question was reconstructed using the CRISPE framework, and key entities were extracted using a named entity recognition model; then, seed blocks were obtained based on vector retrieval, and candidate evidence subgraphs were constructed using a knowledge graph; the candidate subgraphs were optimized using the maximum spanning tree algorithm to obtain a compact evidence subgraph that is highly relevant to the question; finally, the original question, the reconstructed question, and the evidence subgraph were input into the Qwen2.5-3B-Instruct model to generate the answer.
[0030] 4. Model evaluation.
[0031] This embodiment uses three metrics—BLEU, ROUGE-L, and BERTScore—to evaluate the quality of the model generation.
[0032] Experimental results show that the proposed intelligent flood control emergency plan generation method based on evidence subgraphs achieves a BLEU score of 0.512, a ROUGE-L score of 0.648, and a BERTScore of 0.912, all outperforming comparative models such as Qwen2.5-3B-Instruct, RAG-text, KG-RAG, GraphRAG, and LightRAG. The results demonstrate that this invention enhances problem representation through problem reconstruction, strengthens knowledge organization through evidence subgraph construction, and reduces knowledge noise interference through maximum spanning tree optimization, thereby generating more accurate, complete, and fact-consistent flood control emergency plan answers.
[0033] Example 3 To quantitatively verify the contribution of CRISPE problem reconstruction and evidence subgraph construction optimization to the generation effect of flood control emergency plan in this invention, this embodiment conducts this ablation control experiment.
[0034] 1. Construct an ablation model.
[0035] Two ablation models were constructed based on the complete method model: ES-KG-RAG1: the problem reconstruction module was removed; ES-KG-RAG2: the evidence subgraph construction module was removed; the rest of the experimental environment and parameter settings were kept consistent with the complete model.
[0036] Experiments show that in the complete method model ES-KG-RAG, BLEU=0.512, ROUGE-L=0.648, and BERTScore=0.912; after removing the problem reconstruction module, BLEU=0.486, ROUGE-L=0.621, and BERTScore=0.903; and after removing the evidence subgraph construction module, BLEU=0.463, ROUGE-L=0.597, and BERTScore=0.891.
[0037] The experimental data above show that the problem reconstruction module in this invention can effectively improve the matching ability between user questions and knowledge graph entities, thereby improving the quality of knowledge retrieval; the evidence subgraph construction module can effectively organize structured knowledge and construct key reasoning paths, and its performance contribution is more significant; especially after removing the evidence subgraph module, the BLEU index decreased by about 9.6% and ROUGE-L decreased by about 7.9%, indicating that the evidence subgraph plays an important role in improving the efficiency of knowledge utilization and the accuracy of reasoning.
[0038] It is worth noting that all contents not described in detail in this invention are existing technologies and are well known to those skilled in the art.
[0039] Therefore, this invention provides an intelligent generation method for flood control emergency plans based on evidence subgraphs. By reconstructing CRISPE questions, retrieving seed texts from vectors, constructing knowledge graphs, and optimizing them with maximum spanning tree, evidence subgraphs are obtained. Flood control plans are generated by constraining large models with structured graph evidence. This method solves the problems of fragmented knowledge, high retrieval noise, and the tendency for models to generate illusions in traditional RAG models. It also makes the generated emergency plans interpretable and traceable, adaptable to various flood control business scenarios, and improves the accuracy and practicality of plan generation.
[0040] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for intelligent generation of flood control emergency plans based on evidence subgraphs, characterized in that, The specific steps are as follows: Step S1: Receive the user's natural language question, perform semantic reconstruction on the user's question based on the CRISPE prompting framework to obtain a normalized reconstructed question, and extract entity information from the original question and the reconstructed question through the Named Entity Recognition (NER) model to form a question entity set; Step S2: Vectorize the reconstructed problem and perform cosine similarity matching with the text blocks in the preset flood control emergency plan text library. Select the top K text blocks with the highest similarity as the seed block set. Step S3: Extract entities from the seed block and merge them with the problem entities to obtain a seed entity set. Use FastText entity linking to map to the flood control emergency plan knowledge graph. Perform local graph expansion with the seed entities as the center to generate a candidate evidence subgraph containing multiple entities and multiple relationships. Step S4: Calculate the semantic relevance of each relation edge in the candidate evidence subgraph to the user's question as the edge weight, and use the Maximum Spanning Tree (MST) algorithm to optimize the candidate evidence subgraph, outputting a lightweight evidence subgraph. Step S5: Combine the original user question, the CRISPE refactoring question, and the lightweight evidence subgraph to construct a unified prompt message and input it into the locally deployed large language model. Based on the structured fact constraints of the evidence subgraph, complete the reasoning and output the flood control emergency plan, the risk analysis conclusion, or the emergency response suggestion.
2. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 1, characterized in that, In step S1, the specific steps are as follows: Step S11: Receive the user's natural language question, and perform semantic reconstruction on the user's question based on the CRISPE prompt framework to obtain a normalized reconstructed question; wherein, the CRISPE framework includes Context, Role, Instruction, Subject, Preset, and Exception; Step S12: Joint entity extraction is performed on the user problem and the reconstruction problem using the Named Entity Recognition (NER) model. The obtained entities include one or more of the following: reservoir project entities, hazard type entities, emergency response level entities, emergency measures entities, and responsible unit entities, forming a problem entity set. .
3. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 2, characterized in that, In step S2, the specific steps are as follows: Step S21: Input the reconstruction problem into the text vector encoding model to obtain the vector representation of the problem; at the same time, perform vectorization encoding on each text block in the flood control emergency plan text library; Step S22: Calculate the semantic similarity between the question vector and each text block vector based on the cosine similarity retrieval method, using the following formula: ; in, Let the problem vector be... For text block vectors, The similarity between the question vector and the text block vector; Step S23: Sort the text blocks according to their similarity and select the top K text blocks with the highest similarity as the seed block set. The seed block contains information related to flood prevention knowledge, emergency response procedures, disposal measures, and management requirements relevant to the user's original question.
4. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 3, characterized in that, In step S3, the specific steps are as follows: Step S31: Process the seed block Entity extraction is performed on the text content, and the extracted entities are then compared with the question entity set. The entities in the set together form the seed entity set. ; Step S32: Based on FastText entity links, map seed entities to corresponding nodes in the flood control emergency plan knowledge graph to obtain a set of valid seed nodes in the graph. The formula is as follows: ; ; in, For flood control emergency response plan knowledge graph, For a set of entity nodes, It is a set of relationship edges between entities; Step S33: After completing entity mapping, with For each node within the graph, traverse its first-order adjacent nodes and associated edges, integrating all nodes and relationships to generate a candidate evidence subgraph, as shown in the following formula: ; in, For candidate evidence subgraphs, This is the set of temporary relation edges obtained by expansion.
5. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 4, characterized in that, In step S33, the local expansion of the graph only performs first-order neighborhood search, does not perform multi-hop unlimited expansion, retains only entities and relationships strongly related to hazards, reservoirs, and emergency response, filters out irrelevant projects and entity nodes of non-synchronous emergency archives, and controls the size of candidate subgraphs.
6. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 5, characterized in that, In step S4, the specific steps are as follows: Step S41: Calculate the user problem using the reordering model. q The semantic matching score of each triple relation edge in the candidate evidence subgraph is used as the weight of the corresponding relation edge. Step S42: After obtaining the weights of all relation edges, construct a weighted undirected candidate evidence subgraph, and optimize the weighted undirected candidate evidence subgraph using the Maximum Spanning Tree (MST) algorithm, as shown in the following formula: ; in, For lightweight evidence subgraphs, The set of all relational edges in the candidate evidence subgraph is used; the MST algorithm retains high-weight inference edges while deleting low-relevance redundant edges and loops, while ensuring graph connectivity.
7. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 6, characterized in that, In step S42, the evidence subgraph after the maximum spanning tree optimization. The following conditions must be met: all seed entity nodes within the subgraph are connected, and the average weight of all relation edges within the subgraph is higher than the average weight of redundant edges removed during pruning.
8. The method for intelligent generation of flood control emergency plans based on evidence subgraphs according to claim 7, characterized in that, In step S5, the original user question, the CRISPE reconstruction question, and the lightweight evidence subgraph are combined to construct a unified prompt message, as shown in the following formula: ; in, As a unified input for large language models, For the original user's problem, For the CRISPE refactoring problem, For lightweight evidence subgraphs; The large language model relies on the structured fact constraints of the evidence subgraph to complete reasoning and output flood control emergency plans, hazard analysis conclusions, or emergency response suggestions, as shown in the following formula: ; in, Output suggestions for the model. For large language models deployed locally.