Water conservancy knowledge graph intelligent question-answering system and method based on large language model

By constructing an intelligent question-and-answer system based on a water resources knowledge graph, the problems of insufficient semantic understanding and high update costs in the processing of multi-source heterogeneous data in traditional water resources question-and-answer systems have been solved. This system enables efficient and interpretable water resources professional question-and-answer, adapting to the rapid development of the water resources industry and international cooperation.

CN120849544APending Publication Date: 2025-10-28ANHUI & HUAI RIVER WATER RESOURCES RES INST +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510844352.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Traditional water conservancy question-answering systems suffer from insufficient semantic understanding, low knowledge fusion efficiency, high update costs, and an inability to adapt to the rapidly evolving needs of the industry when processing multi-source heterogeneous water conservancy data. Furthermore, large language models exhibit significant comprehension biases in water conservancy professional applications, failing to meet the interpretability requirements of decision support.

Method used

A water resources knowledge graph-based intelligent question answering system based on a large language model is constructed. Multi-source water resources data are integrated through ETL tools and NLP technology to construct a triple knowledge graph, which is dynamically updated through incremental learning algorithms. Intent recognition and entity linking are performed by combining graph convolutional neural networks and Stanford NLP tools to generate interpretable answers.

Benefits of technology

It significantly improves the accuracy and professionalism of intelligent question answering in the water conservancy field, can efficiently process multi-source heterogeneous data, integrate new knowledge in real time, meet the interpretability requirements of decision support, and adapt to international cooperation scenarios in the water conservancy industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849544A_ABST
    Figure CN120849544A_ABST
Patent Text Reader

Abstract

The invention discloses a water conservancy knowledge graph intelligent question-answering system and method based on a large language model, and relates to the technical field of water conservancy information, and the method comprises the following steps: carrying out the fusion processing of multi-source water conservancy data in advance, constructing a triple knowledge graph containing a water conservancy field entity type and a relation system, and dynamic updating of the knowledge graph is realized through an incremental learning algorithm. According to the method, the defects of a traditional method in semantic understanding are effectively overcome, deep semantic association of professional query can be accurately captured, and answer deviation caused by keyword matching limitation is avoided. Meanwhile, a dynamic updating mechanism of the knowledge graph can integrate new knowledge such as new projects and industry standard updating in real time through an incremental learning algorithm and a time decay function, obsolete out-of-time information synchronously, ensure that a knowledge system of the system is synchronous with development of the water conservancy industry, and solve the problems that a traditional system is high in updating cost and long in period.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water conservancy information technology, and more specifically, to an intelligent question-answering system and method based on a large language model and a water conservancy knowledge graph. Background Technology

[0002] With the deepening of digital transformation in the water conservancy industry, massive amounts of multi-source heterogeneous data have been generated in fields such as water conservancy engineering construction, hydrological monitoring, and water resources management. These data include structured real-time monitoring data, semi-structured engineering reports, and unstructured policy documents. Traditional water conservancy question-answering systems and methods mainly rely on keyword matching or rule engines, which expose significant shortcomings when processing this data. On the one hand, their semantic understanding capabilities are severely insufficient, failing to capture the deep semantic relationships between professional queries such as "frequency of once-in-a-century floods in the Yellow River Basin" and "Yellow River flood control design standards," resulting in low question-answering accuracy. On the other hand, facing the integration challenges brought about by the multi-source and heterogeneous nature of water conservancy data, traditional methods struggle to efficiently integrate knowledge from monitoring data, engineering documents, and policy documents, leading to low efficiency in knowledge retrieval and updates. Furthermore, when new knowledge emerges in the water conservancy industry, such as new dam materials and the latest hydrological models, the system lacks a dynamic learning mechanism, resulting in high update costs and long cycles, making it difficult to adapt to the rapidly developing needs of the industry.

[0003] Currently, the emergence of Large Language Models (LLM) offers a potential technological breakthrough for intelligent question answering in the water resources field, but it still faces multiple challenges in professional applications. Due to the sparse nature and high concentration of specialized terminology in water resources data, general-purpose LLM models exhibit biases in their understanding of specialized concepts such as "reservoir flood control calculation" and "levee permeability coefficient" when directly applied, leading to insufficient question-answering accuracy. Furthermore, traditional LLM models lack explicit modeling of the relationships between water resources entities such as "reservoir-spillway-downstream river," resulting in a black-box reasoning process that fails to meet the stringent interpretability requirements of the water resources industry for decision support. More importantly, facing the need for spatiotemporal dynamic fusion of real-time water level monitoring data and historical flood control knowledge, existing models struggle to efficiently handle collaborative reasoning between time-series data and structured knowledge, and lack the ability to process multilingual water resources data (such as international water conservancy conventions and foreign language technical reports), making them unsuitable for the demands of international cooperation scenarios in the water resources industry.

[0004] There are currently no effective solutions to the problems in the relevant technologies. Summary of the Invention

[0005] To address the problems in related technologies, this invention proposes an intelligent question-answering system and method based on a large language model and a water conservancy knowledge graph, in order to overcome the aforementioned technical problems existing in the current related technologies.

[0006] The technical solution of this invention is implemented as follows:

[0007] One aspect of the present invention:

[0008] A water resources knowledge graph-based intelligent question answering method based on a large language model includes the following steps:

[0009] Multi-source water conservancy data are pre-processed to construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and the knowledge graph is dynamically updated through an incremental learning algorithm.

[0010] Domain-adaptive pre-training is performed on the basic model, knowledge graph structure information is integrated into the training of the large language model, and task-specific parameters are optimized for the water conservancy question-answering task.

[0011] The system understands and identifies user queries, performs entity linking and relational reasoning based on knowledge graphs, and combines a large language model for semantic expansion. It generates natural language answers based on the reasoning results and extracts supporting evidence chains.

[0012] The query vector is dynamically updated by collecting user feedback, and the model is periodically fine-tuned using newly labeled data.

[0013] The process of fusing multi-source water conservancy data includes: using ETL tools and NLP technology to perform unified preprocessing on structured hydrological data, semi-structured engineering reports and unstructured documents, and extracting entities and relationships. The NLP technology includes multilingual word segmentation, part-of-speech tagging, named entity recognition and multilingual entity alignment.

[0014] The types of entities in the water conservancy field include engineering entities, hydrological elements, policies and regulations, and disaster events.

[0015] The dynamic updating of the knowledge graph is represented as follows:

[0016] G t =G t-1 ∪ΔG t -O t ;

[0017] Among them, G t For the knowledge graph at time t, G t-1 To add new knowledge units, G t This refers to outdated knowledge identified through a dual mechanism of time decay function and manual review.

[0018] The domain adaptation of the basic model adopts a pre-trained language model based on the Transformer architecture, and uses water conservancy text data containing multilingual data for domain adaptation pre-training.

[0019] The knowledge graph structure information is integrated into the training of the large language model, including: calculating entity embedding vectors through a graph convolutional neural network (GCN), represented as:

[0020]

[0021] Wherein, M(t) ai ,t bj ) represents subtree similarity, dtw represents dynamic time-warped distance, and n ai and n bj denoted as the number of fraudulent nodes, and μ2 is an adjustment parameter.

[0022] The process of understanding and identifying user queries includes the following steps:

[0023] Beforehand, Stanford NLP tools are used for semantic matching with the knowledge graph to parse the user's query intent. The intent is identified and represented as follows:

[0024]

[0025] Among them, e q The query embedding vector is obtained through encoding by a pre-trained model, where C is a predefined set of intent categories, c j For category embedding vectors;

[0026] Knowledge retrieval and reasoning are integrated, including entity linking and relational reasoning based on knowledge graphs, and semantic expansion based on a large language model. The weights of the retrieval results are assigned as follows:

[0027] W i =α×S i +β×R i +γ×T i ;

[0028] Where α, β, and γ are dynamic weighting coefficients, and S i For similarity, R i For correlation and T i For timeliness.

[0029] The process of generating answers includes: generating natural language responses based on reasoning results and extracting supporting evidence chains from the knowledge graph.

[0030] The dynamic updating of the query vector by collecting user feedback information is expressed as follows:

[0031]

[0032] Where μ is the learning rate, diff is the difference between the query and the document, and w m Document weight.

[0033] Another aspect of the present invention:

[0034] A water resources knowledge graph-based intelligent question-answering system based on a large language model includes:

[0035] The knowledge graph construction module is used to fuse and process multi-source water conservancy data, construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and realize dynamic maintenance.

[0036] The model training module is used to adapt the basic model to the domain, integrate knowledge graph structure information into the training of the large language model, and optimize task-specific parameters.

[0037] The question-answering module is used to understand and identify user queries, perform retrieval reasoning based on knowledge graphs and large language models, and generate answers.

[0038] The feedback optimization module is used to collect user feedback information and optimize and update the model.

[0039] The beneficial effects of this invention are:

[0040] 1. This invention significantly improves the accuracy and professionalism of intelligent question answering in the water resources field by deeply integrating a large language model with a water resources knowledge graph. The system can efficiently process multi-source heterogeneous water resources data, including structured hydrological data, semi-structured engineering reports, and unstructured documents. Through the combination of ETL tools and NLP technology, it achieves unified preprocessing and entity relation extraction of multilingual data, constructing a triplet knowledge graph containing core types such as engineering entities and hydrological elements. This effectively solves the shortcomings of traditional methods in semantic understanding, accurately captures the deep semantic relationships of professional queries, and avoids answer bias caused by the limitations of keyword matching. At the same time, the dynamic update mechanism of the knowledge graph, through incremental learning algorithms and time decay functions, can integrate new knowledge such as newly built projects and updated industry standards in real time, and synchronously eliminate outdated information, ensuring that the system's knowledge system is synchronized with the development of the water resources industry, solving the problems of high update costs and long cycles of traditional systems.

[0041] 2. The innovative design of this invention in the model training and question-answering processing stages significantly enhances the system's reasoning ability and interpretability. By integrating water conservancy expertise into a large language model through domain-adaptive pre-training and combining it with Graph Convolutional Neural Networks (GCNs) to calculate entity embedding vectors, the model can explicitly model relationships between water conservancy entities. This breaks the limitations of the traditional black-box reasoning in large language models, allowing the extraction of supporting evidence chains from the knowledge graph during answer generation, meeting the stringent interpretability requirements of the water conservancy industry for decision support. When processing user queries, the system uses Stanford NLP tools and semantic matching with the knowledge graph for intent recognition. Combining the semantic expansion of the large language model with entity linking and relational reasoning from the knowledge graph, it can flexibly address the needs of various scenarios such as real-time hydrological question answering and policy and regulatory interpretation. Especially in multilingual data processing, it can achieve semantic mapping of cross-language entities, adapting to international cooperation scenarios in the water conservancy industry and providing more intelligent and reliable technical support for practical applications such as water conservancy engineering consulting and real-time monitoring and early warning. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart illustrating an intelligent question-answering method for water conservancy knowledge graphs based on a large language model, according to an embodiment of the present invention.

[0044] Figure 2 This is a schematic diagram of a water conservancy knowledge graph intelligent question-answering system based on a large language model, according to an embodiment of the present invention. Detailed Implementation

[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention are within the scope of protection of the present invention.

[0046] According to an embodiment of the present invention, a water conservancy knowledge graph intelligent question answering system based on a large language model is provided.

[0047] like Figure 1 As shown, the intelligent question-answering system for water conservancy knowledge graphs based on a large language model according to an embodiment of the present invention includes the following steps:

[0048] Step S1: First, multi-source water conservancy data is fused and processed in advance to construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and the knowledge graph is dynamically updated through an incremental learning algorithm.

[0049] The process of fusing multi-source water resources data includes: using ETL tools, such as Apache NiFi, to perform data extraction, transformation, and loading in conjunction with NLP technology; and preprocessing structured hydrological data (e.g., reservoir water level monitoring data), semi-structured engineering reports (e.g., XML-formatted dam safety assessments), and unstructured documents (e.g., water resources journal articles, multilingual international water resources standards) in a unified manner. Specific steps include:

[0050] Using spaCy for multilingual word segmentation, part-of-speech tagging, and named entity recognition;

[0051] By combining a pre-defined rule engine with machine learning, multilingual entity alignment can be achieved, such as the semantic mapping between "dam" and "dam".

[0052] Data cleaning algorithms are used to achieve data consistency, such as outlier detection and missing value imputation.

[0053] The process involves constructing and dynamically maintaining a triplet knowledge graph. This includes: identifying core entity types and relationship systems in the water resources field to build the triplet knowledge graph; and using an online gradient descent algorithm to capture new knowledge in the water resources field in real time, such as newly constructed water conservancy projects, updated industry standards, and newly added multilingual literature. An incremental update strategy using the Neo4j graph database is employed to ensure the timeliness of the knowledge graph. The specific update formula is as follows:

[0054] G t =G t-1 ∪ΔG t -O t ;

[0055] Among them, G t For the knowledge graph at time t, G t-1 To add new knowledge units, G t This refers to outdated knowledge identified through a dual mechanism of time decay function and manual review.

[0056] The time decay function is expressed as:

[0057]

[0058] Among them, t now t represents the current time. create The knowledge creation time is denoted by λ, which is the decay coefficient and has a value of 0.01.

[0059] Step S2: Perform domain-adaptive pre-training on the basic model, integrate knowledge graph structure information into the training of the large language model, and optimize task-specific parameters for the water conservancy question-answering task.

[0060] For the domain adaptation of the aforementioned basic models, this includes: selecting a pre-trained language model based on the Transformer architecture, such as BERT-WWM-EXT, and performing domain adaptation pre-training using massive amounts of water conservancy text data. Simultaneously, improving the basic semantic representation capabilities through masked language modeling (MLM) and next-sentence prediction (NSP) tasks.

[0061] Specifically, the training data is divided as follows: engineering documents: 40%, hydrological monitoring reports: 30%, policies and regulations: 20%, and multilingual documents: 10%.

[0062] Furthermore, knowledge graph structure information is integrated into the large language model, including: calculating entity embedding vectors using a Graph Convolutional Neural Network (GCN) to incorporate knowledge graph structure information into the training of the large language model. The GCN network structure has two layers, with a node feature dimension of 768, and uses ReLU as the activation function. The entity embedding distance calculation is expressed as:

[0063]

[0064] Wherein, M(t) ai ,t bj ) represents subtree similarity, calculated using a tree matching algorithm based on edit distance, where dtw is the dynamic time warp distance, used to measure the similarity of time series data, and n ai and n bj The number of fraudulent nodes can be identified using a graph neural network anomaly detection algorithm. μ2 is an adjustment parameter with a value of 0.5.

[0065] Simultaneously, task-specific parameter optimization is performed, including: for the water conservancy question-answering task, a parallel feature extraction network is calibrated, including CNN and LSTM branches, forming a cascaded structure with the first feature extraction network of the pre-trained model. During training, the pre-trained model parameters are fixed, and only the task-specific network parameters are optimized to improve training efficiency. The feature fusion formula is expressed as:

[0066] h = Wx + BAx, W ∈ R d×d ,A∈R r×d ,B∈R d×r ;

[0067] Where r = d / 4, d is the dimension of the hidden layer of the pre-trained model, which is 768 by default.

[0068] Step S3: Understand and identify the user query, perform entity linking and relational reasoning based on the knowledge graph, and perform semantic expansion in combination with the large language model. Generate a natural language answer based on the reasoning results and extract supporting evidence chains.

[0069] Specifically, it includes the following steps:

[0070] Query understanding and intent recognition are performed using Stanford NLP tools and knowledge graph semantic matching to parse user query intent. Intent recognition is represented as follows:

[0071]

[0072] Among them, e q The query embedding vector is obtained through encoding by a pre-trained model, where C is a predefined set of intent categories, and c j This is a category embedding vector.

[0073] Knowledge retrieval and reasoning are integrated, including entity linking and relational reasoning based on knowledge graphs, and semantic expansion based on a large language model. The weights of the retrieval results are assigned as follows:

[0074] W i =α×S i +β×R i +γ×T i ;

[0075] Where α, β, and γ are dynamic weighting coefficients, with values ​​of α = 0.4, β = 0.3, and γ = 0.3, S i For similarity, R i For correlation and T i For timeliness.

[0076] In addition, the similarity S is obtained. i This includes calculating semantic similarity or structural similarity, as detailed below:

[0077] The calculation of semantic similarity includes:

[0078] The user query q and the text fragment d from the knowledge graph are combined using a pre-trained language model. i Encoded as vector e q and The semantic matching degree is calculated using cosine similarity, and is expressed as:

[0079]

[0080] The query and the entities in the document are linked to knowledge graph nodes, and structural similarity is calculated based on the graph path distance between entities (such as the shortest path length and the number of common neighbors). For example, the entity link path between the query "Three Gorges Dam Flood Control Standard" and the document "Three Gorges Project Design Specification" is "Three Gorges Dam → Engineering Entity → Design Specification". The shorter the path, the higher the similarity.

[0081] Specifically, for calculating structural similarity, for structured knowledge (such as triples), entity relationship pairs (such as "reservoir-flood discharge") are extracted from the query, similar subgraph structures are retrieved in the knowledge graph, and the subgraph isomorphism algorithm VF2 is used to calculate the matching degree.

[0082] Simultaneously, for hydrological data (such as water level and flow rate), the Dynamic Time Warping (DTW) algorithm is used to calculate the morphological similarity between the queried time series and historical data, expressed as:

[0083]

[0084] Where γ is the time series alignment path.

[0085] Among them, the correlation R is obtained. i This includes: if the entity pair (e1, e2) in the user query q has a direct relationship r in the knowledge graph, then the relevance is expressed as:

[0086]

[0087] Among them, w r Relationship weights are assigned to domain experts; s(e) represents the confidence level of entity links.

[0088] Among them, the timeliness T is obtained i This includes the following steps:

[0089] For non-real-time data, the timeliness is calculated using the logistic decay function, expressed as:

[0090]

[0091] Among them, t now t represents the current time. i The information release time is λ, which is the attenuation coefficient. The default value is 0.01, while the value for policies and regulations is 0.005 and for technical reports is 0.015.

[0092] For real-time monitoring data, an exponential decay function is used, expressed as:

[0093] T i =exp(-μ×(t) now -t i ))

[0094] Where μ is the real-time coefficient, with 0.5 for water level data and 0.2 for hourly updated data.

[0095] The process of generating answers includes: generating natural language responses based on reasoning results, and extracting supporting evidence chains from the knowledge graph to achieve interpretability of the responses.

[0096] This also includes: for time-sensitive queries, a time decay function is used to calculate the information weight, expressed as:

[0097]

[0098] Among them, t now t represents the current time. i λ represents the information release time, and λ is the decay coefficient, which can be dynamically adjusted according to the data type. For real-time data, λ = 0.5, and for historical data, λ = 0.1.

[0099] Step S4 involves collecting user feedback to dynamically update the query vector and periodically fine-tuning the model using newly labeled data. This includes collecting user satisfaction ratings and correction information for the answers, and dynamically updating the query vector, as shown below:

[0100]

[0101] Where μ is the learning rate, ranging from 0.1 to 0.3, diff is the difference between the query and the document, and w m Document weight.

[0102] like Figure 2 As shown in the embodiment of the present invention, a water conservancy knowledge graph-based intelligent question-answering system based on a large language model is provided, comprising:

[0103] Knowledge graph construction module 1 is used to fuse multi-source water conservancy data, construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and realize dynamic maintenance.

[0104] Model training module 2 is used to adapt the basic model to the domain, integrate knowledge graph structure information into the training of the large language model and optimize task-specific parameters.

[0105] Question answering module 3 is used to understand and identify user queries, perform retrieval reasoning based on knowledge graphs and large language models, and generate answers.

[0106] Feedback optimization module 4 is used to collect user feedback information and optimize and update the model.

[0107] Furthermore, specific case studies from the implementation process are as follows:

[0108] Specifically, in application, for water conservancy engineering consulting scenarios, taking the query "What is the flood control standard of the Three Gorges Dam?" as an example, the steps include:

[0109] We extracted the engineering parameters of the Three Gorges Dam from the structured database using Apache NiFi, performed Chinese word segmentation and entity recognition on the unstructured design documents using spaCy, and obtained the translated text of the relevant English design specifications through a machine translation interface.

[0110] Construct multilingual triples such as "Three Gorges Dam - flood control standard - 100-year flood" and "ThreeGorgesDam-floodcontrolstandard-100-yearflood" to establish cross-language entity links.

[0111] The intent was identified as "engineering parameter query", and the entity was linked to the "Three Gorges Dam" node in the knowledge graph. At the same time, the English term "floodcontrolstandard" in the user's query was identified and mapped to the Chinese entity.

[0112] By combining the design documents stored in the knowledge graph with the semantic expansion of "once-in-a-century flood" using a large language model, the flood control standard was determined to be "resisting once-in-a-millennium flood" through multiple rounds of reasoning, and Chinese and English design specifications were cited as evidence.

[0113] Return to natural language to answer "The flood control standard of the Three Gorges Dam is to withstand a once-in-a-millennium flood (based on the 'Design Code for the Yangtze River Three Gorges Water Conservancy Project' GB50199-2015 and relevant technical reports from the International Commission on Large Dams (ICOLD))", and attach a hyperlink to the design basis in the knowledge graph (supports switching between Chinese and English).

[0114] Specifically, in application, this is applied to real-time hydrological question-and-answer scenarios. Taking a user query, "Has the current water level of the Yangtze River in Wuhan exceeded the warning level?" (a multi-turn dialogue scenario), as an example, the details are as follows:

[0115] Real-time water level monitoring data (27.8 meters, updated every minute) of the Yangtze River in Wuhan is obtained via Kafka, while flow data from upstream hydrological stations is received as an auxiliary reference.

[0116] Query the knowledge graph for the warning water level in Wuhan (27.3 meters) and retrieve historical flood cases (such as the 1998 flood with a water level of 29.43 meters).

[0117] If the user subsequently asks about "the impact of exceeding the warning water level", the system maintains the context through the dialogue state tracking module, calls the large language model to generate semantics for "flood impact", and performs reasoning by combining the "water level-inundation range-economic loss" relationship chain in the knowledge graph.

[0118] The initial response stated, "The current water level is 27.8 meters, exceeding the warning level by 0.5 meters. Please pay attention to flood prevention safety," accompanied by a real-time water level change curve. The follow-up response stated, "Exceeding the warning level may put greater pressure on the Wuhan section of the levee. According to historical data, a water level of 27.8 meters may cause some areas of the Hankou riverbank to be submerged. It is recommended to pay attention to official early warning information," and included a knowledge graph link to the 1998 flood case.

[0119] Specifically, in application, this applies to policy and regulation interpretation scenarios. For example, consider a user querying "the latest provisions of a certain law regarding reservoir scheduling" (a multilingual scenario), as follows:

[0120] We analyzed the latest Chinese text and English translation of a certain law and used NLP technology to extract clauses related to reservoir scheduling, such as Article 44, which states that "The management units of reservoirs, hydropower stations, dams and other projects shall, based on the project planning and design, the approved flood control plan and flood scheduling plan, and the actual conditions of the project, formulate a flood season scheduling and operation plan under the premise of prioritizing flood control over water use and ensuring safety. After approval by the relevant water administrative department of the people's government at or above the county level, the project management unit shall organize its implementation."

[0121] The newly added legal provisions are integrated into the knowledge graph to establish multilingual relationships such as "Flood Control Law - Reservoir Scheduling - Scheduling Principle" and "Flood Control Law - Reservoir Scheduling Principle", while also linking relevant engineering cases.

[0122] By using a large language model to understand the semantic connotation of "reservoir scheduling", related query terms (such as "flood control scheduling" and "water resource allocation") can be expanded, and users' possible deeper needs can be identified.

[0123] Generate a structured answer, citing specific legal provisions and explaining with engineering examples: "According to Article X of a certain law, reservoir operation must adhere to the principle of 'benefiting the people while prioritizing flood control and ensuring safety,' which specifically includes: ① formulating a flood season operation plan; ② obtaining approval from the water administrative department at the county level or above; and ③ being organized and implemented by the project management unit. Taking the Xiaolangdi Reservoir as an example, its operation plan must be combined with flood forecasts for the Yellow River Basin to achieve optimal allocation of water resources while ensuring flood control safety."

[0124] In summary, by employing the above-described technical solution of the present invention, the following effects can be achieved:

[0125] 1. This invention significantly improves the accuracy and professionalism of intelligent question answering in the water resources field by deeply integrating a large language model with a water resources knowledge graph. The system can efficiently process multi-source heterogeneous water resources data, including structured hydrological data, semi-structured engineering reports, and unstructured documents. Through the combination of ETL tools and NLP technology, it achieves unified preprocessing and entity relation extraction of multilingual data, constructing a triplet knowledge graph containing core types such as engineering entities and hydrological elements. This effectively solves the shortcomings of traditional methods in semantic understanding, accurately captures the deep semantic relationships of professional queries, and avoids answer bias caused by the limitations of keyword matching. At the same time, the dynamic update mechanism of the knowledge graph, through incremental learning algorithms and time decay functions, can integrate new knowledge such as newly built projects and updated industry standards in real time, and synchronously eliminate outdated information, ensuring that the system's knowledge system is synchronized with the development of the water resources industry, solving the problems of high update costs and long cycles of traditional systems.

[0126] 2. The innovative design of this invention in the model training and question-answering processing stages significantly enhances the system's reasoning ability and interpretability. By integrating water conservancy expertise into a large language model through domain-adaptive pre-training and combining it with Graph Convolutional Neural Networks (GCNs) to calculate entity embedding vectors, the model can explicitly model relationships between water conservancy entities. This breaks the limitations of the traditional black-box reasoning in large language models, allowing the extraction of supporting evidence chains from the knowledge graph during answer generation, meeting the stringent interpretability requirements of the water conservancy industry for decision support. When processing user queries, the system uses Stanford NLP tools and semantic matching with the knowledge graph for intent recognition. Combining the semantic expansion of the large language model with entity linking and relational reasoning from the knowledge graph, it can flexibly address the needs of various scenarios such as real-time hydrological question answering and policy and regulatory interpretation. Especially in multilingual data processing, it can achieve semantic mapping of cross-language entities, adapting to international cooperation scenarios in the water conservancy industry and providing more intelligent and reliable technical support for practical applications such as water conservancy engineering consulting and real-time monitoring and early warning.

[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Those skilled in the art, upon considering the disclosure in the specification and embodiments, will readily conceive of other embodiments of this disclosure. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0128] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A smart question-answering method based on a large language model and a knowledge graph of water conservancy, characterized in that, The following steps are involved: Multi-source water conservancy data are pre-processed to construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and the knowledge graph is dynamically updated through an incremental learning algorithm. Domain-adaptive pre-training is performed on the basic model, knowledge graph structure information is integrated into the training of the large language model, and task-specific parameters are optimized for the water conservancy question-answering task. The system understands and identifies user queries, performs entity linking and relational reasoning based on knowledge graphs, and combines a large language model for semantic expansion. It generates natural language answers based on the reasoning results and extracts supporting evidence chains. The query vector is dynamically updated by collecting user feedback, and the model is periodically fine-tuned using newly labeled data.

2. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 1, characterized in that, The process of fusing multi-source water conservancy data includes: using ETL tools and NLP technology to perform unified preprocessing on structured hydrological data, semi-structured engineering reports and unstructured documents, and extracting entities and relationships. The NLP technology includes multilingual word segmentation, part-of-speech tagging, named entity recognition and multilingual entity alignment.

3. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 2, characterized in that, The types of entities in the water conservancy field include engineering entities, hydrological elements, policies and regulations, and disaster events.

4. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 3, characterized in that, The dynamic update of the knowledge graph is represented as follows: G t =G t-1 ∪ΔG t -O t ; Among them, G t For the knowledge graph at time t, G t-1 To add new knowledge units, G t This refers to outdated knowledge identified through a dual mechanism of time decay function and manual review.

5. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 1, characterized in that, The domain adaptation of the basic model adopts a pre-trained language model based on the Transformer architecture, and uses water conservancy text data containing multilingual data for domain adaptation pre-training.

6. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 1, characterized in that, The knowledge graph structure information is integrated into the training of the large language model, including: calculating entity embedding vectors through a graph convolutional neural network (GCN), represented as: Wherein, M(t) ai ,t bj ) represents subtree similarity, dtw represents dynamic time-normalized distance, and n ai and n bj denoted as the number of fraudulent nodes, and μ2 is an adjustment parameter.

7. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 1, characterized in that, The process of understanding and identifying user queries includes the following steps: Beforehand, Stanford NLP tools are used for semantic matching with the knowledge graph to parse the user's query intent. The intent is identified and represented as follows: Among them, e q The query embedding vector is obtained through encoding by a pre-trained model, where C is a predefined set of intent categories, c j For category embedding vectors; Knowledge retrieval and reasoning are integrated, including entity linking and relation reasoning based on knowledge graphs, and semantic expansion based on a large language model. The weights of the retrieval results are assigned as follows: IN i =α×S i +β×R i +γ×T i ; Where α, β, and γ are dynamic weighting coefficients, and S i For similarity, R i For correlation and T i For timeliness. The process of generating answers includes: generating natural language responses based on reasoning results and extracting supporting evidence chains from the knowledge graph.

8. The intelligent question-answering system and method based on a large language model and water conservancy knowledge graph according to claim 1, characterized in that, The process of dynamically updating the query vector by collecting user feedback information is represented as follows: Where μ is the learning rate, diff is the difference between the query and the document, and w m Document weight.

9. A water conservancy knowledge graph intelligent question answering system based on a large language model, used in the system of the water conservancy knowledge graph intelligent question answering method based on a large language model as described in any one of claims 1-8, characterized in that, include: The knowledge graph construction module (1) is used to fuse multi-source water conservancy data, construct a triplet knowledge graph containing entity types and relationship systems in the water conservancy field, and realize dynamic maintenance. The model training module (2) is used to adapt the basic model to the domain, integrate the knowledge graph structure information into the training of the large language model and optimize the task-specific parameters. The question-and-answer processing module (3) is used to understand and identify user queries, perform retrieval reasoning based on knowledge graphs and large language models, and generate answers. The feedback optimization module (4) is used to collect user feedback information and optimize and update the model.

Citation Information

Cited By

  • Historical health-care knowledge question-answering method and device based on fusion of knowledge graph and large-scale language model

    CN121434355A

  • Smart city information management method and system based on GIS and AI fusion

    CN121436295A

  • Dynamic weighted multi-knowledge-base-based medical question and answer enhanced generation method and system

    CN121597846A

  • Water conservancy intelligent question-answering system and method based on knowledge enhancement and data driving

    CN121860062A