Flood control scheduling method and system based on GraphRAG

By building a flood control scheduling knowledge graph through GraphRAG technology and combining it with a large language model, the problem of traditional flood control scheduling relying on human factors has been solved, intelligent flood control scheduling decision support has been realized, and the scientific nature and timeliness of flood control scheduling have been improved.

CN120655035APending Publication Date: 2025-09-16CHINA THREE GORGES UNIV

Patent Information

Application Number
CN202510796361.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The traditional flood control scheduling operation process is complicated, highly dependent on the level of professional personnel and scheduling experience, and is easily affected by human factors. The existing RAG technology is difficult to effectively solve the problem of multi-document knowledge association, and the knowledge representation and reasoning capabilities are insufficient, making it impossible to quickly generate reasonable scheduling strategies.

Method used

Using GraphRAG technology, we collect and clean multi-source heterogeneous document data to build a flood control scheduling knowledge graph, combine it with a large language model for intelligent generation and optimization, use graph neural networks for knowledge completion and verification, and combine real-time data feedback and visual display to achieve flood control scheduling decision support.

Benefits of technology

It improves the scientificity, accuracy and timeliness of flood control scheduling decisions, can mine multi-source data associations, generate scientific and reasonable scheduling plans, and reduce losses caused by flood disasters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120655035A_ABST
    Figure CN120655035A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of hydraulic engineering big data processing, in particular to a flood control scheduling method and system based on GraphRAG. Comprising a data acquisition and processing module, a knowledge graph construction module, a knowledge base construction module and a workflow arrangement module. Multi-source heterogeneous data related to flood control dispatching are collected through the data collecting and processing module, the knowledge graph construction module constructs a flood control dispatching knowledge graph by applying semantic comprehension and generation capacity of a large model, the knowledge base construction module enhances a knowledge base of GraphRAG on the basis of the knowledge graph, and the flood control dispatching knowledge graph is constructed. And the workflow arrangement module arranges a large language model workflow based on a business process, realizes knowledge retrieval and reasoning, provides scheduling scheme adjustment suggestions for decision makers in combination with real-time data feedback and visual display, and improves timeliness and flexibility of flood control scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water conservancy project big data processing, and in particular to a flood control scheduling method and system based on GraphRAG. Background Art

[0002] Under the dual influence of global climate change and rapid urbanization, floods are occurring more frequently and causing greater harm. Flood control and scheduling, a key component of flood prevention and disaster reduction, requires comprehensive consideration of complex data from multiple aspects, including meteorology, hydrology, geography, and engineering facilities, to develop scientific and rational scheduling plans.

[0003] GraphRAG technology combines the powerful knowledge representation and reasoning capabilities of knowledge graphs with the advantages of retrieval-enhanced generative models, and combines the good understanding and generation capabilities of large language models.

[0004] At present, flood control scheduling mostly adopts traditional methods, with complicated operation procedures, highly dependent on the level of professional personnel and scheduling experience, and easily affected by human factors. Some use RAG (retrieval enhanced generation) technology, relying on language models to carry out scheduling, which has improved the intelligence level of flood control scheduling to a certain extent. However, facing the complex scenarios of flood control scheduling, RAG technology has obvious limitations, and it is difficult to effectively solve the problem of multi-document knowledge association. At the same time, existing methods also have limitations in knowledge representation and reasoning, and it is difficult to accurately present complex knowledge in the field of flood control scheduling, such as the collaborative relationship between different engineering facilities, the dynamic process of flood evolution, etc. When faced with new flood scenarios and complex constraints, the knowledge reasoning ability is insufficient, and it is impossible to quickly generate reasonable scheduling strategies. In order to be able to construct a flood control scheduling knowledge graph by integrating multi-source data, combining the learning ability of large models with retrieval enhanced generation mechanisms, to realize the intelligent generation and optimization of flood control scheduling plans, improve the scientificity, accuracy and timeliness of flood control scheduling decisions, and reduce the losses caused by flood disasters, we propose a flood control scheduling method and system based on GraphRAG. Summary of the Invention

[0005] The purpose of this invention is to solve the problems of traditional flood control scheduling, which are complicated, highly dependent on the level of professional personnel and scheduling experience, and easily affected by human factors. In order to be able to construct a flood control scheduling knowledge graph by integrating multi-source data, combining the learning ability of large models with the retrieval enhancement generation mechanism, the intelligent generation and optimization of flood control scheduling plans can be realized, the scientificity, accuracy and timeliness of flood control scheduling decisions can be improved, and the losses caused by flood disasters can be reduced.

[0006] To achieve the above object, the present invention provides a flood control scheduling method based on GraphRAG, comprising the following steps:

[0007] S1. Collect documents related to flood control dispatch, use document parsing technology to extract text content and metadata from multi-source heterogeneous documents, and use data cleaning technology to clean and remove noise from the extracted text content, providing a basic data set for subsequent text analysis and knowledge graph construction;

[0008] S2. Use GraphRAG technology to extract entities such as water conservancy projects and their corresponding attributes, as well as relationships between entities such as scheduling conditions, activation timing, and scheduling methods, from the basic data set, and construct a flood control scheduling knowledge graph. Combined with graph neural network technology, the constructed knowledge graph is completed and verified.

[0009] S3. Use the constructed flood control dispatch knowledge graph and the flood control dispatch related documents after data preprocessing as the global knowledge base and local knowledge base of the large language model respectively;

[0010] S4. Combining the workflow orchestration technology of flood control scheduling process and large language model, the flood control scheduling scenario is orchestrated, and the above-mentioned global knowledge base and local knowledge base are cross-validated to realize the construction of flood control scheduling system based on large language model and carry out flood control scheduling.

[0011] Compared with the prior art, the present invention has the following beneficial effects:

[0012] 1. This GraphRAG-based flood control scheduling method and system leverages GraphRAG technology to mine the relationships between multiple sources of data, including meteorological, hydrological, geographical, and engineering facilities, breaking down data silos. By building a knowledge graph, it enables the fusion and association analysis of multi-document knowledge, unlocking the value of data and providing comprehensive and accurate data support for flood control scheduling decisions.

[0013] 2. Based on the construction of a knowledge graph, it can present the complex knowledge and relationships in the field of flood control scheduling, and combined with GraphRAG technology, it can realize knowledge retrieval and reasoning. Based on the input questions and scenarios, the model can obtain relevant knowledge from the knowledge graph and original documents to generate scientific and reasonable flood control scheduling plans, improving the scientificity and accuracy of decision-making;

[0014] 3. Combining real-time data feedback and visual display, the flood control scheduling decision support module can provide decision makers with scheduling plan adjustment suggestions, orchestrate large language model workflows based on business processes, help decision makers cope with complex and changeable flood scenarios, and improve the timeliness and flexibility of flood control scheduling.

[0015] As a further improvement of the present technical solution, the S1 preprocesses the data, including using Apache Tika and other parsing technologies to extract the text content and metadata of multi-source heterogeneous documents and unify the data format during document parsing; using semantic analysis algorithms to check and correct text errors during data cleaning and noise removal, and using text deduplication algorithms to identify and delete duplicate content.

[0016] The beneficial effect of these further improvements is that, when cleaning and removing noise from data, semantic analysis algorithms can deeply understand the semantic information of text, accurately identifying and correcting errors in the text, such as spelling errors, grammatical errors, and semantic ambiguity. This helps ensure data accuracy and avoid analytical bias and decision-making errors caused by erroneous data. Text deduplication algorithms can effectively identify and remove duplicate text content, preventing the accumulation of large amounts of redundant information in datasets. Unified data formats ensure that data maintains consistency in structure and representation, facilitating subsequent analysis and processing, and improving data consistency and usability.

[0017] As a further improvement of this technical solution, the specific steps of S2 constructing the knowledge graph are as follows:

[0018] S2.1.1. Schema object-oriented modeling: Using OpenSPG technology, use SPG-Schema to define the structure of the knowledge graph, define entity types, attributes, and relationships between entities, etc.

[0019] S2.1.2. Design a large language model prompt project: Use a large language model based on the prompt project (prompt) to jointly extract entity relationships. The prompt word design focuses on the field of water conservancy and flood control, including clarifying task objectives, limiting entity types and relationship types, and guiding the model output format; at the same time, set special instructions for complex scenarios such as nested entities, implicit relationships, and multi-relationship entities, and optimize the prompt effect through small sample examples, staged verification, and error case analysis, so as to obtain a high-quality water conservancy and flood control knowledge graph.

[0020] S2.1.3. Regularly complete the knowledge graph: Use a completion algorithm based on embedding representation to regularly complete the knowledge graph.

[0021] The beneficial effect of adopting the above further improvements is that the knowledge graph represents and stores a large amount of complex knowledge in a structured manner, clearly displays entities, concepts and their relationships, facilitates the management and maintenance of knowledge, helps to improve the efficiency of knowledge utilization, can integrate knowledge from different data sources and different formats, integrate scattered knowledge into a unified framework, eliminate knowledge silos, and realize the interconnection and sharing of knowledge.

[0022] As a further improvement of this technical solution, after completing the knowledge graph, S2 uses knowledge graph embedding technology to map entities into a low-dimensional vector space, determines the alignment relationship by comparing the similarity of entity vectors in the two knowledge graphs, and then merges the completed knowledge graph with the original knowledge graph.

[0023] The beneficial effect of adopting the above-mentioned further improvements is that when the completed knowledge graph is merged with the original knowledge graph, the knowledge graph is usually composed of data from multiple sources and different structures. Embedding technology can map entities in these heterogeneous data into low-dimensional vectors, providing a unified digital representation, making it possible to compare and merge entities between different knowledge graphs, and effectively solving the problem of inconsistent data formats. Each entity vector contains multiple information such as the structural information and semantic information of the entity in the original knowledge graph. Aligning entities by comparing vector similarity can comprehensively consider this information, which is more comprehensive and accurate than fusion based solely on a certain feature or attribute, and helps to unearth deeper connections between different knowledge graphs.

[0024] As a further improvement of this technical solution, the steps of constructing the enhanced GraphRAG knowledge base in S3 are as follows:

[0025] S3.1.1. Fusion of structured knowledge and unstructured domain documents: Extracting structured knowledge from massive text data on flood control and scheduling, and integrating it with historical case data on flood control and scheduling into a knowledge graph;

[0026] S3.1.2. Connect the constructed knowledge graph to the big model in the form of GraphRAG.

[0027] The beneficial effect of adopting the above further improvements is that the GraphRAG knowledge base uses graph structures to represent knowledge, which can better capture the complex relationships between entities and thus more accurately understand the semantics of user queries. Compared with traditional text retrieval, it can not only match keywords, but also accurately judge the query intent based on the association information of entities in the knowledge graph, thereby improving the relevance and accuracy of search results.

[0028] Fusion of knowledge from multiple sources, such as structured data, semi-structured data, and unstructured text data. By integrating these different types of data into a unified graph structure, it is possible to fully leverage the strengths of various data, provide more comprehensive and rich knowledge support, and thus give more accurate and detailed answers in the question-answering system.

[0029] As a further improvement of this technical solution, S3.1.1 integrates structured knowledge with unstructured domain documents, and then uses a key entity retrieval algorithm to retrieve entities, attributes and relationships related to key information.

[0030] The beneficial effect of these improvements is that structured knowledge, typically stored in clear tables and databases, follows well-defined formats and specifications, making it easy for computers to process and query. Unstructured domain documents, such as scheduling reports, academic papers, and meeting minutes, contain rich textual information. These documents contain a wealth of potentially valuable information, but their flexible formats make them difficult to retrieve efficiently. By integrating the two, we can fully leverage the precision of structured knowledge and the richness of unstructured documents, providing more comprehensive coverage of various information sources and preventing information omissions.

[0031] As a further improvement of this technical solution, S3.1.1 uses semantic similarity calculation to filter out relevant fragments from the original document, and inputs the retrieved knowledge and original document fragments together with the original question into the large language model. The large language model integrates its own internal knowledge and retrieval information to generate a flood control scheduling plan.

[0032] The beneficial effect of this further improvement is that by calculating semantic similarity and filtering relevant fragments of the original document, a large amount of professional knowledge and real-world case information related to flood control scheduling can be obtained. This information is input into the large language model along with the retrieved knowledge and the original question. The model can integrate information from multiple sources, avoiding the limitations of a single information source, thereby achieving a more comprehensive and accurate understanding of the flood control scheduling problem and generating solutions that are more tailored to the actual situation.

[0033] Original documents often contain specialized knowledge in fields such as water conservancy engineering, hydrology, and meteorology. By integrating this knowledge, the large language model can analyze and reason based on specialized principles and patterns. For example, based on flood evolution models and reservoir flood control calculation principles, it can accurately calculate the flood control effects under different scheduling measures, making the generated flood control scheduling plan more technically accurate and scientific.

[0034] As a further improvement of this technical solution, the steps of orchestrating the large language model workflow based on the business process in S4 are as follows:

[0035] S4.1.1. Build a visualization framework: Construct a 3D visualization system that integrates Building Information Modeling (BIM) with a lightweight front-end framework to achieve full-factor digital mapping and interactive data analysis of water conservancy project facilities. The platform interface allows users to explore data details through multiple operations such as zooming, panning, and hovering.

[0036] S4.1.2. Build an interactive decision-making platform: Use a web development framework to build back-end services, receive actual information input by decision makers through the front-end interface, use large models to identify intent, and provide business answers based on user intent, ultimately feeding back the results to the user.

[0037] S4.1.3 Workflow Orchestration: Based on the flood control and dispatch business process, the Dify platform was used to build workflow orchestration for the business. This low-code platform enabled visual orchestration and dynamic optimization of the flood control and dispatch process, and combined with large model capabilities, enabled intelligent triggering of process nodes and strategy generation.

[0038] As a further improvement of this technical solution, the S4.1.2 takes real-time meteorological data, hydrological data and geographic data as input, combines the calculation results of the flood evolution model and the reservoir flood control calculation model, uses a large language model to extract key information, and retrieves related entities, attributes and relationships, integrates its own internal knowledge and retrieval information, and generates a detailed flood control scheduling plan.

[0039] The beneficial effect of these improvements is that they comprehensively consider multiple data sources, including meteorological, hydrological, and geographical data, encompassing multiple key factors in flood formation and evolution. This includes not only the impact of meteorological conditions on rainfall, but also the flow conditions of rivers as reflected by hydrological data, and the impact of topography and landforms on flood control or acceleration as reflected by geographical data. This fusion of multi-source data enables the large language model to comprehensively consider various factors when generating flood control and scheduling plans, avoiding loopholes in plans caused by incomplete information.

[0040] A second object of the present invention is to provide a flood control scheduling system based on GraphRAG, including any one of the flood control scheduling methods based on GraphRAG described above, including a data acquisition and processing module, a knowledge graph construction module, a knowledge base construction module and a workflow orchestration module;

[0041] The data acquisition and processing module collects documents related to flood control scheduling, uses OCR recognition and text extraction technology to extract data information on scheduling conditions, activation timing and scheduling methods from the documents, and uses text cleaning technology to clean and remove noise from the data;

[0042] The knowledge graph construction module uses the semantic understanding and generation capabilities of the large model to construct a flood control and dispatch knowledge graph; it combines graph neural network technology to complete the constructed knowledge graph, and at the same time, domain experts calibrate the knowledge graph;

[0043] The knowledge base construction module is based on the knowledge graph, deeply combing and integrating the structured information therein, and widely collecting various original documents related to flood control scheduling. The two are integrated as the knowledge base of the large language model to enhance the knowledge base of GraphRAG;

[0044] The workflow orchestration module combines the needs of actual flood control scheduling scenarios, monitors the execution of scheduling plans in real time according to real-time data feedback, and orchestrates large language model workflows based on business processes.

[0045] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flowchart of the overall method of the present invention;

[0047] Figure 2 is a flow chart of the steps of S2 of the present invention;

[0048] Figure 3 is a flowchart of the steps of S3 of the present invention;

[0049] Figure 4 is a flowchart of the steps of S4 of the present invention;

[0050] Figure 5 It is a system module block diagram of the present invention;

[0051] Figure 6 It is a detailed block diagram of each module of the present invention.

[0052] The meaning of each number in the figure is:

[0053] 100. Data acquisition and processing module; 200. Knowledge graph construction module; 300. Knowledge base construction module; 400. Workflow orchestration module. DETAILED DESCRIPTION

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0055] At present, the traditional flood control and scheduling operation process is complicated, highly dependent on the level of professional personnel and scheduling experience, and is easily affected by human factors. In order to be able to construct a flood control and scheduling knowledge graph by integrating multi-source data, combined with the learning ability of large models and retrieval enhancement generation mechanism, the intelligent generation and optimization of flood control and scheduling plans can be realized, the scientificity, accuracy and timeliness of flood control and scheduling decisions can be improved, and the losses caused by flood disasters can be reduced.

[0056] Therefore, the present invention proposes to collect flood control scheduling related documents through a data acquisition and processing module, use OCR recognition and text extraction technology to extract data information on scheduling conditions, activation time and scheduling methods from the documents, use text cleaning technology to clean and denoise the data, build a knowledge graph module and use the semantic understanding and generation capabilities of the large model to build a flood control scheduling knowledge graph, build a knowledge base module based on the knowledge graph, deeply sort out and integrate the structured information therein, and at the same time widely collect various types of original documents related to flood control scheduling, integrate the two as the knowledge base of the large language model, enhance the knowledge base of GraphRAG, and combine the needs of actual flood control scheduling scenarios. The workflow orchestration module monitors the execution of the scheduling plan in real time according to real-time data feedback, and orchestrates the large language model workflow based on business processes.

[0057] The details are as follows:

[0058] like Figure 1 As shown, one of the purposes of the present invention is to provide a flood control scheduling method based on GraphRAG, comprising the following steps:

[0059] S1. Collect documents related to flood control dispatch, use document parsing technology to extract text content and metadata from multi-source heterogeneous documents, and use data cleaning technology to clean and remove noise from the extracted text content, providing a basic data set for subsequent text analysis and knowledge graph construction;

[0060] S2. Use GraphRAG technology to extract entities such as water conservancy projects and their corresponding attributes, as well as relationships between entities such as scheduling conditions, activation timing, and scheduling methods, from the basic data set, and construct a flood control scheduling knowledge graph. Combined with graph neural network technology, the constructed knowledge graph is completed and verified.

[0061] S3. Use the constructed flood control dispatch knowledge graph and the flood control dispatch related documents after data preprocessing as the global knowledge base and local knowledge base of the large language model respectively;

[0062] S4. Combining the workflow orchestration technology of flood control scheduling process and large language model, the flood control scheduling scenario is orchestrated, and the above-mentioned global knowledge base and local knowledge base are cross-validated to realize the construction of flood control scheduling system based on large language model and carry out flood control scheduling.

[0063] During data preprocessing, structured data is cleaned and de-noised to improve data quality by identifying and removing duplicate data, correcting incorrect data formats, and filling in missing values. For scanned text data, OCR technology is used to accurately recognize text within images and convert them into editable text. For unstructured text data, such as weather reports and hydrological analysis documents, natural language processing toolkits such as NLTK and spaCy are used for preprocessing, including word segmentation and part-of-speech tagging, to accurately extract key information, laying a solid foundation for subsequent analysis and application.

[0064] To better pre-process the data, S1 performs data pre-processing, including using Apache Tika and other parsing technologies to extract text content and metadata from multi-source heterogeneous documents and unify the data format during document parsing. During data cleaning and noise removal, semantic analysis algorithms are used to check and correct text errors, and text deduplication algorithms are used to identify and delete duplicate content.

[0065] First, we use OCR recognition and text extraction technology to extract key information such as scheduling conditions, activation time, and scheduling methods from these document data. Then, we use text cleaning technology to remove noise such as garbled characters and invalid characters. We use semantic analysis algorithms to check and correct text errors to ensure data accuracy. Then, we use text deduplication algorithms to identify and delete duplicate content, unify data formats, and ensure data consistency. Finally, with the help of data quality assessment algorithms, we score the data based on key indicators such as data accuracy, completeness, and consistency, filter out low-quality data, and lay the data foundation for subsequent model training and knowledge graph construction.

[0066] like Figure 2 As shown, the specific steps for S2 to construct the knowledge graph are as follows:

[0067] S2.1.1. Schema object-oriented modeling: Using OpenSPG technology, use SPG-Schema to define the structure of the knowledge graph, define entity types, attributes, and relationships between entities, etc.

[0068] S2.1.2. Design a large language model prompt project: Use a large language model based on the prompt project (prompt) to jointly extract entity relationships. The prompt word design focuses on the field of water conservancy and flood control, including clarifying task objectives, limiting entity types and relationship types, and guiding the model output format; at the same time, set special instructions for complex scenarios such as nested entities, implicit relationships, and multi-relationship entities, and optimize the prompt effect through small sample examples, staged verification, and error case analysis, so as to obtain a high-quality water conservancy and flood control knowledge graph.

[0069] S2.1.3. Regularly complete the knowledge graph: Use a completion algorithm based on embedding representation to regularly complete the knowledge graph.

[0070] Based on pre-processed data, we define entity types (such as meteorological entities, hydrological entities, and flood control project entities), attributes (such as water level values ​​and reservoir names), and relationships (such as the upstream and downstream relationship between reservoirs and downstream rivers, and the causal relationship between rainfall and floods). Through a small amount of data annotation and prompting engineering, we use large language models to extract entities and inter-entity relationships from text and semi-structured data, and integrate the extracted knowledge into the knowledge graph.

[0071] A knowledge graph storage environment was built using the Neo4j graph database. An entity relationship extraction tool based on a large language model was used to deeply mine the preprocessed data. Leveraging its powerful semantic understanding and analysis capabilities, the large language model accurately identifies various entities in the flood control and scheduling field, such as reservoirs, rivers, and flood levees, and effectively extracts relationships between entities, such as the upstream and downstream relationships between reservoirs and rivers, and the protective relationships between flood control facilities and protected areas. Using specific algorithms, these entities and relationships are systematically stored in the knowledge graph, building a comprehensive and systematic knowledge system for flood control and scheduling, which is then stored in the knowledge graph.

[0072] In order to better complete the knowledge graph, after completing the knowledge graph, S2 uses knowledge graph embedding technology to map entities into a low-dimensional vector space, and determines the alignment relationship by comparing the similarity of entity vectors in the two knowledge graphs, and then merges the completed knowledge graph with the original knowledge graph;

[0073] The selected embedding model is trained using the triples in the knowledge graph as input. During the training process, the vector representations of entities and relationships are continuously adjusted so that the model can learn the structure and semantic information of the knowledge graph. After training, each entity is mapped to a low-dimensional vector that contains the structure and semantic information of the entity in the knowledge graph.

[0074] Based on the similarity calculation results, an appropriate threshold is set. When the similarity between two entity vectors exceeds the threshold, the two entities are considered to be aligned.

[0075] During the alignment process, there may be conflicts between one entity and multiple entities. In this case, a comprehensive judgment can be made based on the entity's attribute information and context information, or a voting mechanism can be used to resolve the conflict.

[0076] The merged entity and relationship information is updated into the original knowledge graph to form a fused knowledge graph. At the same time, the fused knowledge graph is quality assessed and verified to ensure its accuracy and consistency.

[0077] like Figure 3As shown, the steps for S3 to build an enhanced GraphRAG knowledge base are as follows:

[0078] S3.1.1. Fusion of structured knowledge and unstructured domain documents: Extracting structured knowledge from massive text data on flood control and scheduling, and integrating it with historical case data on flood control and scheduling into a knowledge graph;

[0079] S3.1.2. Connect the constructed knowledge graph to the big model in the form of GraphRAG.

[0080] The large language model focuses on learning language patterns and professional knowledge in the field of flood control scheduling, and has strong language understanding and generation capabilities. The GraphRAG module retrieves relevant knowledge information from the flood control scheduling knowledge graph based on the input questions or scenarios, supplementing the large language model with key knowledge.

[0081] When building the knowledge base, we extracted structured knowledge from massive text data in the flood control and scheduling field (such as historical scheduling documents and research reports), and integrated it with historical case data of flood control and scheduling into the knowledge graph. In this way, we built a large model knowledge base based on the knowledge graph and enhanced original documents, providing solid data support for subsequent flood control and scheduling decisions.

[0082] For example, when a user inputs a question related to flood control scheduling (such as "What is the best scheduling plan for a certain reservoir under the current flow conditions"), the question understanding unit first parses the question and extracts key information such as "flow" and "a certain reservoir". Subsequently, the GraphRAG unit uses algorithms based on graph traversal and key entity retrieval to retrieve entities, attributes, and relationships related to key information in the flood control scheduling knowledge graph. At the same time, semantic similarity calculation is used to filter out relevant fragments from the original document, and the retrieved knowledge and original document fragments are input into the large language model together with the original question. The large language model integrates its own internal knowledge and retrieval information to generate a flood control scheduling plan for the problem.

[0083] In order to better retrieve data information, S3.1.1 integrates structured knowledge with unstructured domain documents and uses key entity retrieval algorithms to retrieve entities, attributes, and relationships related to key information;

[0084] Index the identified entities, attributes, and relationships for fast retrieval. This can be done using data structures like inverted indexes, with entities, attributes, and relationships as index items and the corresponding text positions or document numbers as index values. This allows for quick location of text fragments containing specific entities, attributes, and relationships.

[0085] When a user enters key information for a query, the query is first parsed to identify the key entities and related attributes and relationship keywords. Then, matching and searching are performed in the index to find entities, attributes, and relationships related to the key information.

[0086] To better generate flood control scheduling plans, S3.1.1 uses semantic similarity calculation to filter relevant fragments from the original document. The retrieved knowledge, original document fragments, and the original question are input into the large language model. The large language model integrates its own knowledge and the retrieved information to generate a flood control scheduling plan.

[0087] Integrate the original question, selected document fragments, and relevant structured knowledge (such as real-time water level data and weather forecasts). Arrange them in the logical order of "problem description → background information → relevant knowledge" to ensure that the input content is coherent and focused.

[0088] Format input data uniformly, for example, by converting structured data into JSON format, adding title tags to text snippets (such as "Reservoir Operation Rules" and "Historical Flood Cases"), and controlling the total length to not exceed the input limit of the large language model;

[0089] Design guiding prompts to clearly instruct the model to generate a plan based on the input information. For example: "Based on the following real-time hydrological data, historical flood control experience, and project parameters, please develop a flood control scheduling plan that includes reservoir flood discharge strategies, personnel evacuation plans, and material deployment plans. Explain the basis for each measure."

[0090] like Figure 4 As shown, the steps for S4 to orchestrate the large language model workflow based on business processes are as follows:

[0091] S4.1.1. Build a visualization framework: Construct a 3D visualization system that integrates Building Information Modeling (BIM) with a lightweight front-end framework to achieve full-factor digital mapping and interactive data analysis of water conservancy project facilities. The platform interface allows users to explore data details through multiple operations such as zooming, panning, and hovering.

[0092] S4.1.2. Build an interactive decision-making platform: Use a web development framework to build back-end services, receive actual conditions input by decision makers through the front-end interface, use the IoT gateway to collect real-time data transmitted by sensors, and store it in a time series database;

[0093] S4.1.3. Workflow orchestration: Based on the flood control and dispatching business process, use the large language model to perform workflow orchestration.

[0094] Utilize the low-code platform to achieve visual orchestration and dynamic optimization of flood control scheduling processes, and combine the capabilities of large models to achieve intelligent triggering of process nodes and strategy generation. By carefully designing the layout, color, axis labels and other elements of the chart, the key data of the scheduling plan generated by the model is presented in an intuitive and clear manner. For example, the water level change curve can intuitively show the rise and fall trend of the water level over time, and the flood discharge trend chart can clearly reflect the dynamic changes in the flood discharge, helping decision makers to quickly grasp the core points of the scheduling plan. At the same time, a three-dimensional visualization system that integrates the building information model (BIM) and the lightweight front-end framework is constructed. The platform interface allows users to explore the details of the data in depth through various operations such as zooming, panning, and hovering. Users can view the precise changes in water levels within a specific time period through zooming operations, or obtain the specific value of the flood discharge at a certain moment through hovering operations, providing decision makers with a more flexible and in-depth data observation perspective;

[0095] Using flood evolution models, combined with real-time hydrological and geographic data, we simulate the evolution of floods within the basin and predict the inundation range and duration under different scheduling schemes. Using reservoir flood control calculation models, based on the reservoir's storage capacity curve, discharge capacity curve, and real-time water level, inflow, and other data, we calculate the reservoir's water level changes and discharge flow under different scheduling strategies, providing technical support for the scientific formulation of reservoir scheduling plans.

[0096] Based on business scenarios, such as when encountering sudden rainstorms and floods, the business demand is to quickly formulate a reasonable flood control and scheduling plan to ensure the safety of life and property of downstream residents.

[0097] To better generate detailed flood control scheduling plans, S4.1.2 uses real-time meteorological, hydrological, and geographic data as input, combined with the calculation results of the flood evolution model and the reservoir flood control routing model, and uses a large language model to extract key information and retrieve relevant entities, attributes, and relationships. It integrates its own internal knowledge with the retrieved information to generate detailed flood control scheduling plans.

[0098] Flood evolution model: Build a flood evolution model based on hydrodynamic equations (such as the Saint-Venant equations), input real-time water level and topographic data, simulate the spread of floods within the basin, and output key parameters such as inundation range, arrival time, and peak flow.

[0099] Reservoir flood control calculation model: Combining the reservoir characteristic curve (reservoir capacity-water level relationship) and flood discharge facility parameters, the flood control calculation model calculates water level changes and discharge flow processes under different flood discharge strategies, providing a scientific basis for reservoir operation;

[0100] Model calculation results (e.g., "The water level at XX Reservoir will exceed the flood limit by 0.5 meters in one hour") and real-time data are converted into natural language text and input into the Large Language Model (LLM). Leveraging the LLM's text parsing capabilities, key entities (reservoirs, river channels, risk areas), attributes (water levels, flow values), and relationships (upstream and downstream, flood control responsibilities) are extracted.

[0101] Combined with the extracted key information, relevant knowledge is retrieved from the pre-built flood control knowledge graph (including project parameters, historical cases, and emergency plans). For example, by searching for the "XX reservoir exceeding the flood limit" incident, historical solutions and reservoir scheduling rules for similar events are retrieved to provide reference for solution generation.

[0102] Design guiding prompts to require the LLM to integrate input information and generate a plan. For example: "Based on real-time data showing that the current water level in the XX River Basin is 0.3 meters above the warning level and that the XX Reservoir has 20% remaining capacity, and the flood evolution model predicting that the XX area will be flooded in three hours, combined with historical flood control experience, develop a detailed flood control and scheduling plan that includes reservoir discharge strategies, evacuation routes, and material deployment plans. Explain the scientific basis for each measure."

[0103] The second object of the present invention is to provide a flood control scheduling system based on GraphRAG, including any one of the above-mentioned flood control scheduling methods based on GraphRAG, such as Figure 5 As shown, it includes a data collection and processing module 100, a knowledge graph construction module 200, a knowledge base construction module 300 and a workflow orchestration module 400;

[0104] The data acquisition and processing module 100 collects documents related to flood control scheduling, uses OCR recognition and text extraction technology to extract data information on scheduling conditions, activation timing and scheduling methods from the documents, and uses text cleaning technology to clean and remove noise from the data;

[0105] The knowledge graph construction module 200 uses the semantic understanding and generation capabilities of the large model to construct a flood control and dispatch knowledge graph; it uses graph neural network technology to complete the constructed knowledge graph, and at the same time, domain experts calibrate the knowledge graph;

[0106] The knowledge base module 300 is built on the knowledge graph, deeply combing and integrating the structured information therein. At the same time, a wide range of original documents related to flood control scheduling are collected and integrated into the knowledge base of the large language model to enhance the knowledge base of GraphRAG.

[0107] The workflow orchestration module 400 combines the needs of actual flood control scheduling scenarios, monitors the execution of scheduling plans in real time according to real-time data feedback, and orchestrates large language model workflows based on business processes.

[0108] Therefore, in summary, Figure 6 As shown, the data acquisition and processing module 100 includes a data collection module and a data preprocessing module. The data acquisition module collects multi-source heterogeneous structured data, unstructured data and semi-structured data. The data preprocessing module cleans the data by using text cleaning, text deduplication, stop word removal and data annotation. The knowledge graph construction module 200 is a knowledge graph construction module in the figure. It uses LLM to enhance domain vocabulary understanding, effectively integrates multi-source heterogeneous data, and establishes a knowledge graph. The knowledge base construction module 300 is a large model knowledge base construction module in the figure. Based on the knowledge graph, the structured information therein is deeply sorted and integrated. At the same time, various original documents related to flood control scheduling are widely collected and combined with structured knowledge graphs and unstructured domain documents to output flood control scheduling plans.

[0109] Workflow orchestration module 400 is the workflow orchestration module in the figure. It obtains meteorological data, hydrological monitoring data, and geographic data in real time, calls various data interfaces to maintain real-time communication with the meteorological department's data interface, obtains the latest meteorological data such as rainfall, rainfall range, typhoon path, etc., connects with the data interface of the hydrological monitoring station, collects hydrological data such as water level, flow, and flow velocity in real time, obtains geographic data such as topography, landform, and water system distribution through the data interface with the geographic information center, and collects engineering facility operation status data such as reservoir capacity, gate opening, and embankment height from the data interface of the automated control system of flood control engineering facilities, inputs it into the LLM model, and outputs the final plan.

[0110] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. The flood control scheduling method based on GraphRAG is characterized by: The following steps are involved: S1. Collect documents related to flood control dispatch, use document parsing technology to extract text content and metadata from multi-source heterogeneous documents, and use data cleaning technology to clean and remove noise from the extracted text content, providing a basic data set for subsequent text analysis and knowledge graph construction; S2. Use GraphRAG technology to extract entities such as water conservancy projects and their corresponding attributes, as well as relationships between entities such as scheduling conditions, activation timing, and scheduling methods, from the basic data set, and construct a flood control scheduling knowledge graph. Combined with graph neural network technology, the constructed knowledge graph is completed and verified. S3. Use the constructed flood control dispatch knowledge graph and the flood control dispatch related documents after data preprocessing as the global knowledge base and local knowledge base of the large language model respectively; S4. Combining the workflow orchestration technology of flood control scheduling process and large language model, the flood control scheduling scenario is orchestrated, and the above-mentioned global knowledge base and local knowledge base are cross-validated to realize the construction of flood control scheduling system based on large language model and carry out flood control scheduling.

2. The GraphRAG-based flood control scheduling method according to claim 1, characterized in that: The S1 preprocesses the data, including using Apache Tika and other parsing technologies to extract text content and metadata from multi-source heterogeneous documents and unify the data format during document parsing; using semantic analysis algorithms to check and correct text errors during data cleaning and noise removal, and using text deduplication algorithms to identify and delete duplicate content.

3. The flood control scheduling method based on GraphRAG according to claim 1, characterized in that: The specific steps of constructing the flood control dispatch knowledge graph in S2 are as follows: S2.1.

1. Schema object-oriented modeling: Using OpenSPG technology, use SPG-Schema to define the structure of the knowledge graph, define entity types, attributes, and relationships between entities, etc. S2.1.

2. Design a large language model prompt project: Use a large language model based on the prompt project (prompt) to jointly extract entity relationships. The prompt word design focuses on the field of water conservancy and flood control, including clarifying task objectives, limiting entity types and relationship types, and guiding the model output format; at the same time, set special instructions for complex scenarios such as nested entities, implicit relationships, and multi-relationship entities, and optimize the prompt effect through small sample examples, staged verification, and error case analysis, so as to obtain a high-quality water conservancy and flood control knowledge graph. S2.1.

3. Regularly complete the knowledge graph: Use a completion algorithm based on embedding representation to regularly complete the knowledge graph.

4. The GraphRAG-based flood control scheduling method according to claim 3, characterized in that: After completing the knowledge graph, S2 uses knowledge graph embedding technology to map entities into a low-dimensional vector space, determines the alignment relationship by comparing the similarity of entity vectors in the two knowledge graphs, and then merges the completed knowledge graph with the original knowledge graph.

5. The flood control scheduling method based on GraphRAG according to claim 1, characterized in that: The steps for building an enhanced GraphRAG knowledge base on S3 are as follows: S3.1.

1. Fusion of structured knowledge and unstructured domain documents: Extracting structured knowledge from massive text data on flood control and scheduling, and integrating it with historical case data on flood control and scheduling into a knowledge graph; S3.1.

2. Connect the constructed knowledge graph to the big model in the form of GraphRAG.

6. The GraphRAG-based flood control scheduling method according to claim 5, characterized in that: After S3.1.1 integrates structured knowledge with unstructured domain documents, it uses a key entity retrieval algorithm to retrieve entities, attributes, and relationships related to key information.

7. The GraphRAG-based flood control scheduling method according to claim 6, characterized in that: The S3.1.1 uses semantic similarity calculation to filter out relevant fragments from the original document, and inputs the retrieved knowledge and the original document fragments together with the original question into the large language model. The large language model integrates its own internal knowledge and the retrieved information to generate a flood control scheduling plan.

8. The GraphRAG-based flood control scheduling method according to claim 1, characterized in that: The steps of S4 arranging the large language model workflow based on business processes are as follows: S4.1.

1. Build a visualization framework: Use Python's Matplotlib library to create high-quality static charts. At the same time, introduce the Plotly library to develop an interactive visualization interface that allows users to explore data details through various operations such as zooming, panning, and hovering. S4.1.

2. Build an interactive decision-making platform: Use a web development framework to build back-end services, receive actual conditions input by decision makers through the front-end interface, use the IoT gateway to collect real-time data transmitted by sensors, and store it in a time series database; S4.1.

3. Workflow orchestration: Based on the flood control and dispatching business process, use the large language model to perform workflow orchestration.

9. The GraphRAG-based flood control scheduling method according to claim 8, characterized in that: The S4.1.2 takes real-time meteorological data, hydrological data and geographic data as input, combines the calculation results of the flood evolution model and the reservoir flood control calculation model, uses the large language model to extract key information, and retrieves related entities, attributes and relationships, integrates its own internal knowledge and retrieved information, and generates a detailed flood control scheduling plan.

10. A method for implementing a GraphRAG-based flood control dispatching system, comprising the GraphRAG-based flood control dispatching method according to any one of claims 1 to 9, characterized in that: It includes a data collection and processing module (100), a knowledge graph construction module (200), a knowledge base construction module (300) and a workflow arrangement module (400); The data acquisition and processing module (100) collects documents related to flood control scheduling, uses OCR recognition and text extraction technology to extract data information on scheduling conditions, activation timing and scheduling methods from the documents, and uses text cleaning technology to clean and remove noise from the data; The knowledge graph construction module (200) uses the semantic understanding and generation capabilities of the large model to construct a flood control dispatch knowledge graph; combines graph neural network technology to complete the constructed knowledge graph, and at the same time, domain experts calibrate the knowledge graph; The knowledge base construction module (300) is based on the knowledge graph, deeply combs and integrates the structured information therein, and widely collects various original documents related to flood control scheduling, integrates the two as the knowledge base of the large language model, and enhances the knowledge base of GraphRAG; The workflow arrangement module (400) combines the needs of actual flood control scheduling scenarios, monitors the execution of scheduling plans in real time according to real-time data feedback, and arranges large language model workflows based on business processes.

Citation Information

Patent Citations

  • Intelligent flood control scheduling rule recommendation method and device based on knowledge graph

    CN116739259A

  • Dynamic correlation enhancement retrieval generation system and method driven by intelligent knowledge graph

    CN118839021A

  • Metadata query method based on knowledge graph

    CN119441386A

  • Water conservancy intelligent management system based on digital twinning

    CN119760109A

  • Water conservancy knowledge base construction method and system based on large model

    CN119807446A

Cited By

  • Data query and auxiliary reservoir operation method and system using context engineering enhanced agent

    CN120911917A

  • Meteorology-based online question and answer service agent construction method and device

    CN121352036A