Water conservancy knowledge intelligent question and answer method and device based on large model and medium
By adopting the intelligent question and answer method of water conservancy knowledge based on large models in the water conservancy industry, we build a water conservancy knowledge base and question and answer model, which solves the problem of low knowledge utilization in the water conservancy industry and achieves efficient and intelligent management and data support of water conservancy knowledge.
Patent Information
- Application Number
- CN202410709123.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-08-23
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The utilization rate of knowledge in the water conservancy industry is low, it cannot meet the needs of water conservancy plan formulation, and the level of intelligence and technology is low.
Adopt the intelligent question and answer method of water conservancy knowledge based on large models, build a water conservancy knowledge base by extracting and managing water conservancy industry data from multiple data sources, build a question and answer model and tool module based on a large language model, and build a knowledge question and answer set and knowledge map. and perform model training and optimization.
It realizes the efficient utilization and intelligent management of water conservancy knowledge, improves the intelligent level of data application, provides high-precision data support, and provides a basis for decision-making in the water conservancy industry.
Smart Images

Figure CN118535703A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent question-answering of water conservancy knowledge, and in particular to a method, device and medium for intelligent question-answering of water conservancy knowledge based on a large model. Background Art
[0002] At present, digital transformation has become important and urgent for more and more industries. How to better utilize data and how to more conveniently provide data according to different data types have become the key to digital transformation. The accuracy, real-time, comprehensiveness and intelligence of data often determine the core competitiveness and value of products.
[0003] For the water conservancy industry, the reuse rate of water conservancy knowledge seriously affects the formulation of various emergency plans and water supply and withdrawal plans. However, the current utilization efficiency and utilization rate of water conservancy industry knowledge are low and cannot meet the needs of water conservancy plan formulation. Therefore, it is urgent to further develop the knowledge intelligent question-answering platform of the water conservancy industry to realize the classification retrieval and intelligent reasoning of structured and unstructured data, so as to efficiently utilize water conservancy data and provide data support for decision-making in the water conservancy industry. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and medium for intelligent question answering of water conservancy knowledge based on a large model, which are used to solve the following technical problems: currently, the utilization rate of water conservancy industry knowledge is low, and the level of intelligence and technology in the utilization of water conservancy knowledge is low, which cannot meet the needs of water conservancy plan formulation.
[0005] The embodiment of the present invention adopts the following technical solutions:
[0006] On the one hand, an embodiment of the present invention provides a method for intelligent question answering of water conservancy knowledge based on a large model, the method comprising:
[0007] Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data; connect the multi-source water conservancy knowledge data to a water conservancy knowledge base, and perform data fusion to obtain water conservancy fusion data; based on the water conservancy fusion data, build a water conservancy knowledge question and answer model and tool module based on a large language model; based on the water conservancy fusion data, construct a knowledge question and answer set and a water conservancy knowledge graph; and train the water conservancy knowledge question and answer model through the water conservancy knowledge graph and the knowledge question and answer set; based on a preset time interval, extract the question and answer records of the water conservancy knowledge question and answer model, and perform a question and answer audit; optimize the water conservancy knowledge question and answer model according to the audit results.
[0008] In a feasible implementation, water conservancy industry data is extracted from multiple data sources and data governance is performed to obtain multi-source water conservancy knowledge data, specifically including: extracting water conservancy industry data from each data source related to the water conservancy industry; performing data governance on the extracted water conservancy industry data to obtain the multi-source water conservancy knowledge data; wherein the data governance includes the following methods: data quality management, data security management, data privacy protection, and data compliance checking; the multi-source water conservancy knowledge data includes at least library table data and unstructured data.
[0009] In a feasible implementation manner, the multi-source water conservancy knowledge data is connected to a water conservancy knowledge base, and data fusion is performed to obtain water conservancy fusion data, which specifically includes: connecting the water conservancy fusion data to a water conservancy knowledge base through a data access module; wherein the connected water conservancy fusion data includes: library table data, unstructured data and service interface data; data cleaning is performed on the connected multi-source water conservancy knowledge data to remove duplicate data and erroneous data; standardization is performed on the cleaned multi-source water conservancy data, and data fusion is performed to obtain water conservancy fusion data with a consistent format; and the water conservancy fusion data is stored in the water conservancy knowledge base.
[0010] In a feasible implementation, based on the water conservancy fusion data, a water conservancy knowledge question and answer model and tool module based on a large language model are built, specifically including: constructing a maintenance entrance for question and answer set key-value pairs; the maintenance entrance supports maintaining questions and answers of standard questions and answers, and supports importing question and answer sets; building a water conservancy knowledge question and answer model based on a large language model; creating a text input interactive question and answer entrance and a voice input interactive question and answer entrance for the water conservancy knowledge question and answer model; building a tool module for the water conservancy knowledge question and answer model, and performing scenario training management of the tool module.
[0011] In a feasible implementation, a tool module of the water conservancy knowledge question and answer model is built, and scenario training management of the tool module is performed, specifically including: setting the attributes of the large model understanding tool according to the interface question and answer scenario that needs to be bound; wherein the attributes of the large model understanding tool include at least: tool name, tool description and tool input parameters; the tool input parameters include at least: input parameter name, input parameter field type, input parameter description and whether it is required; based on the calling tool attributes, determining the interface attributes corresponding to the calling tool; wherein the interface attributes include at least: interface request mode, url address, interface input parameters corresponding to the url address, header file of the url interface and tool target value path; generating a python tool class according to the calling tool attributes and the corresponding interface attributes; for scenarios where multiple calling tools are called in series, establishing the sequence between the calling tools in a pipeline manner, and the output parameters of the previous calling tool are used as the input parameters of the next calling tool.
[0012] In a feasible implementation, a knowledge question and answer set is constructed based on the water conservancy fusion data, specifically including: extracting water conservancy problems and answers from the water conservancy fusion data; expanding the question method for the same water conservancy problem to obtain an expanded problem; storing the water conservancy problem or expanded problem and the corresponding answer in the form of a key-value pair to generate the water conservancy knowledge question and answer set.
[0013] In a feasible implementation, a water conservancy knowledge graph is constructed based on the water conservancy fusion data, specifically including: based on the library table data in the water conservancy fusion data, importing the structured data therein into the neo4j graph database and creating entities; based on the attributes of each entity, determining the association relationship between each entity; based on the association relationship between each entity, constructing triples, and based on the triples, constructing the water conservancy knowledge relationship graph.
[0014] In a feasible implementation, based on a preset time interval, the question and answer records of the water conservancy knowledge question and answer model are extracted, and a question and answer audit is performed; the water conservancy knowledge question and answer model is optimized according to the audit results, specifically including: based on a preset time interval, the question and answer records are extracted from the water conservancy knowledge question and answer model; wherein the question and answer records include at least question and answer historical records, question and answer unmatched records, and question and answer evaluation records; the proportion of question and answer unmatched records in the question and answer records, and the proportion of negative reviews in the question and answer evaluation records are calculated; if the proportion of question and answer unmatched records or the proportion of negative reviews reaches the corresponding limiting conditions, the water conservancy knowledge question and answer model is optimized and improved.
[0015] On the other hand, an embodiment of the present invention further provides a water conservancy knowledge intelligent question-answering device based on a large model, the device comprising:
[0016] at least one processor; and,
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor so that the at least one processor can execute the intelligent question-answering method of water conservancy knowledge based on a large model.
[0019] Finally, an embodiment of the present invention also provides a storage medium, which is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by a terminal, the terminal executes the large model-based water conservancy knowledge intelligent question and answer method.
[0020] Compared with the prior art, the method, device and medium for intelligent question answering of water conservancy knowledge based on a large model provided by the embodiment of the present invention have the following beneficial effects:
[0021] 1. The present invention realizes the association between water conservancy data knowledge and large models based on a dynamically configurable manner, establishes a knowledge question-and-answer tool that relies on large models, realizes unified knowledge management, and establishes a knowledge question-and-answer system.
[0022] 2. The present invention can more conveniently manage various key data of the water conservancy industry and provide high-precision reference for early warning and decision-making.
[0023] 3. The method used in the present invention can be extended to other fields for knowledge question and answer analysis.
[0024] 4. The present invention effectively improves the intelligent level of data application in the water conservancy industry. The data question and answer results can more accurately reflect the factual data for reference by the user units. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0026] Figure 1 A flow chart of a method for intelligent question-answering of water conservancy knowledge based on a large model provided by an embodiment of the present invention;
[0027] Figure 2 A schematic diagram of the structure of a large-model-based intelligent question-answering device for water conservancy knowledge provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0029] The embodiment of the present invention provides a water conservancy knowledge intelligent question answering method based on a large model, such as Figure 1 As shown, the water conservancy knowledge intelligent question answering method based on the large model specifically includes steps S101-S105:
[0030] S101. Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data.
[0031] Specifically, water conservancy industry data is extracted from various data sources related to the water conservancy industry; data governance is performed on the extracted water conservancy industry data to obtain multi-source water conservancy knowledge data; wherein data governance includes the following methods: data quality management, data security management, data privacy protection, and data compliance checking; multi-source water conservancy knowledge data includes at least library table data and unstructured data.
[0032] As a feasible implementation method, the knowledge extraction module provides unified access to library table data, unstructured data, and service interface APIs, supports the application of different modules of the entire system, realizes centralized management of knowledge, and has a single maintenance entry to prevent knowledge inconsistency.
[0033] S102, connecting multi-source water conservancy knowledge data to a water conservancy knowledge base, and performing data fusion to obtain water conservancy fusion data.
[0034] Specifically, the water conservancy fusion data is connected to the water conservancy knowledge base through the data access module; wherein the accessed water conservancy fusion data includes: library table data, unstructured data and service interface data.
[0035] Furthermore, the accessed multi-source water conservancy knowledge data is cleaned to remove duplicate data and erroneous data; the cleaned multi-source water conservancy data is standardized and fused to obtain water conservancy fusion data with a consistent format; and the water conservancy fusion data is stored in a water conservancy knowledge base.
[0036] S103. Based on the water conservancy fusion data, build a water conservancy knowledge question and answer model and tool module based on the large language model.
[0037] Specifically, a maintenance entry for question-and-answer set key-value pairs is constructed; the maintenance entry supports maintaining questions and answers of standard questions and answers, and supports importing question-and-answer sets.
[0038] Furthermore, a water conservancy knowledge question-and-answer model is built based on the large language model. A text input interactive question-and-answer portal and a voice input interactive question-and-answer portal are created for the water conservancy knowledge question-and-answer model.
[0039] Furthermore, a tool module for the water conservancy knowledge question and answer model is built, and scenario training management of the tool module is carried out.
[0040] Furthermore, the calling tool attributes are set according to the interface question and answer scenario that needs to be bound; wherein the calling tool attributes include at least: the calling tool name, the calling tool description and the calling tool input parameters; the calling tool input parameters include at least: the input parameter name, the input parameter field type, the input parameter description and whether it is required.
[0041] Then, based on the calling tool attributes, the interface attributes corresponding to the calling tool are determined; wherein the interface attributes include at least: interface request method, url address, interface input parameters corresponding to the url address, header file of the url interface, and tool target value path.
[0042] Finally, a Python tool class is generated based on the calling tool attributes and the corresponding interface attributes. For scenarios where multiple calling tools are called in series, the order between the calling tools is established through pipelines, and the output parameters of the previous calling tool are used as the input parameters of the next calling tool.
[0043] As a feasible implementation method, knowledge fusion is the core part of the entire knowledge management question-answering tool. It realizes knowledge question-answering and includes three parts:
[0044] a) FAQ: Provides a maintenance entry for key-value pairs of question and answer sets, supports maintaining questions and answers for standard questions and answers, and can also maintain multiple extended questions for one answer. It supports importing question and answer sets through database tables and Excel to facilitate user operations, and pushes the maintained data set to the large model question and answer module to implement knowledge question and answer for fixed question and answer pairs.
[0045] b) Reading comprehension: Based on the unstructured data maintained by the knowledge extraction module, it is pushed to the knowledge base question and answer of langchain through an interface to realize document-related question and answer and reasoning.
[0046] c) Scenario training management:
[0047] 1) Tool management: According to the interface question and answer scenarios that need to be bound, establish a system including tool name, tool description, tool input parameters (the input parameters need to define the input parameter name, field type, description, whether it is required, etc.), tool corresponding interface request method, tool corresponding URL address, URL corresponding interface input parameters, URL interface header file, tool target value path, etc., and generate Python tool class with one click through system configuration.
[0048] 2) Model management: Based on the scenario of multiple tools being called in series, the order between tools is established by dragging and dropping the pipeline, and the output parameters of the previous tool are used as the input parameters of the next tool. After the model is built, the semantic matching of the tools is understood through the big model to realize the question and answer of the tool module.
[0049] S104. Based on the water conservancy fusion data, a knowledge question and answer set and a water conservancy knowledge graph are constructed; and the water conservancy knowledge question and answer model is trained through the water conservancy knowledge graph and the knowledge question and answer set.
[0050] Specifically, water conservancy questions and answers are extracted from the water conservancy fusion data. The same water conservancy question is expanded to obtain an expanded question. The water conservancy question or expanded question and the corresponding answer are stored in the form of a key-value pair to generate a water conservancy knowledge question and answer set.
[0051] Furthermore, based on the library table data in the water conservancy fusion data, the structured data is imported into the neo4j graph database and entities are created. Based on the attributes of each entity, the association relationship between each entity is determined. Based on the association relationship between each entity, a triple is constructed, and based on the triple, a water conservancy knowledge relationship map is constructed.
[0052] As a feasible implementation method, based on the library table data in the knowledge extraction module, the structured data is imported into the neo4j graph database to establish the relationship between entities, and then the relationship search and path exploration between entities are provided based on the existing graph data. The graph relationship exploration includes three levels: 1. Searching for the attributes of the target node; 2. Searching for the attributes of the nodes related to the target node; 3. Searching for the relationship between the target node, covering all the knowledge scope of the graph data.
[0053] Furthermore, the water conservancy knowledge question-answering model is trained through the water conservancy knowledge graph and knowledge question-answering set. Then, an interactive question-answering entrance with text input and voice input is provided for the knowledge question-answering model, providing a unified caliber for knowledge question-answering.
[0054] S105. Based on a preset time interval, extract the question and answer records of the water conservancy knowledge question and answer model, and conduct a question and answer audit; optimize the water conservancy knowledge question and answer model according to the audit results.
[0055] Specifically, based on a preset time interval, question and answer records are extracted from the water conservancy knowledge question and answer model; wherein the question and answer records include at least question and answer historical records, question and answer unmatched records, and question and answer evaluation records.
[0056] Furthermore, the proportion of unmatched question and answer records in the question and answer records and the proportion of negative reviews in the question and answer evaluation records are calculated; if the proportion of unmatched question and answer records or the proportion of negative reviews reaches the corresponding limiting conditions, the water conservancy knowledge question and answer model is optimized and improved.
[0057] As a feasible implementation method, the user's question and answer history records, question and answer unmatched records, and question and answer evaluation records are recorded to facilitate the optimization and improvement of knowledge questions and answers.
[0058] The present invention is used in the field of intelligent question-answering of water conservancy industry knowledge. It relies on the vertical field training technology, attribute extraction, semantic understanding and other characteristics of large models to change the traditional way of question-answering, retrieval and application of water conservancy industry knowledge. By covering FAQ, reading comprehension and real-time data tool access, it provides tool support for water conservancy knowledge application and industry decision-making. It mainly includes the following contents:
[0059] 1. Support real-time data access through API interface;
[0060] 2. Support unified management of unstructured data files;
[0061] 3. Supports access to database tables of mainstream databases including MySQL, Oracle, SQLserver, PostgreSQL, and domestic databases such as DAMO, HANGO, Renmin University of China Jincang, and Nanda General;
[0062] 4. Support structured data retrieval;
[0063] 5. Support unstructured data reading comprehension question and answer, and realize document reasoning, summarization, and search;
[0064] 6. Support API interface to build model tools and conduct customized scenario Q&A through AIagent;
[0065] 7. Easy to use, convenient interface operation;
[0066] 8. Single-unit maintenance and multi-level use, different users import data, establish a data resource library, and a multi-person sharing model to achieve a shared data model of single-unit maintenance and multi-person use.
[0067] In addition, the embodiment of the present invention also provides a water conservancy knowledge intelligent question-answering device based on a large model, such as Figure 2 As shown in the figure, the intelligent question-answering device for water conservancy knowledge based on the large model specifically includes:
[0068] at least one processor; and a memory in communication with the at least one processor; wherein,
[0069] The memory stores instructions executable by at least one processor to enable the at least one processor to perform:
[0070] Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data;
[0071] Connecting the multi-source water conservancy knowledge data to a water conservancy knowledge base and performing data fusion to obtain water conservancy fusion data;
[0072] Based on the water conservancy fusion data, a water conservancy knowledge question-answering model and tool module based on a large language model are constructed;
[0073] Based on the water conservancy fusion data, a knowledge question and answer set and a water conservancy knowledge graph are constructed; and the water conservancy knowledge question and answer model is trained through the water conservancy knowledge graph and the knowledge question and answer set;
[0074] Based on a preset time interval, the question and answer records of the water conservancy knowledge question and answer model are extracted, and a question and answer audit is performed; and the water conservancy knowledge question and answer model is optimized according to the audit results.
[0075] Finally, an embodiment of the present invention further provides a storage medium, which is a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium stores at least one program, each of which includes instructions, and when the instructions are executed by a terminal, the terminal executes:
[0076] Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data;
[0077] Connecting the multi-source water conservancy knowledge data to a water conservancy knowledge base and performing data fusion to obtain water conservancy fusion data;
[0078] Based on the water conservancy fusion data, a water conservancy knowledge question-answering model and tool module based on a large language model are constructed;
[0079] Based on the water conservancy fusion data, a knowledge question and answer set and a water conservancy knowledge graph are constructed; and the water conservancy knowledge question and answer model is trained through the water conservancy knowledge graph and the knowledge question and answer set;
[0080] Based on a preset time interval, the question and answer records of the water conservancy knowledge question and answer model are extracted, and a question and answer audit is performed; and the water conservancy knowledge question and answer model is optimized according to the audit results.
[0081] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0082] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0083] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0084] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, the embodiments of this specification may be in the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the embodiments of this specification may be in the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0085] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0086] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0088] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0089] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0090] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0091] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0092] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0093] Each embodiment of the present invention is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0094] The above describes specific embodiments of the present invention. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0095] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention should be included in the protection scope of the present invention.
Claims
1. A water conservancy knowledge intelligent question answering method based on a large model, characterized in that: The method comprises: Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data; Connecting the multi-source water conservancy knowledge data to a water conservancy knowledge base and performing data fusion to obtain water conservancy fusion data; Based on the water conservancy fusion data, a water conservancy knowledge question-answering model and tool module based on a large language model are constructed; Based on the water conservancy fusion data, a knowledge question and answer set and a water conservancy knowledge graph are constructed; and the water conservancy knowledge question and answer model is trained through the water conservancy knowledge graph and the knowledge question and answer set; Based on a preset time interval, the question and answer records of the water conservancy knowledge question and answer model are extracted, and a question and answer audit is performed; and the water conservancy knowledge question and answer model is optimized according to the audit results.
2. According to the large model-based intelligent question-answering method for water conservancy knowledge according to claim 1, it is characterized in that: Extract water conservancy industry data from multiple data sources and perform data governance to obtain multi-source water conservancy knowledge data, including: Extract water conservancy industry data from various data sources related to the water conservancy industry; The extracted water conservancy industry data is subjected to data governance to obtain the multi-source water conservancy knowledge data; wherein the data governance includes the following methods: data quality management, data security management, data privacy protection and data compliance checking; the multi-source water conservancy knowledge data includes at least library table data and unstructured data.
3. According to the large model-based intelligent question-answering method for water conservancy knowledge according to claim 1, it is characterized in that: The multi-source water conservancy knowledge data is connected to the water conservancy knowledge base, and data fusion is performed to obtain water conservancy fusion data, which specifically includes: The water conservancy fusion data is accessed to the water conservancy knowledge base through a data access module; wherein the accessed water conservancy fusion data includes: library table data, unstructured data and service interface data; Clean the accessed multi-source water conservancy knowledge data to remove duplicate and erroneous data; Standardize the cleaned multi-source water conservancy data and perform data fusion to obtain water conservancy fusion data with consistent format; The water conservancy fusion data is stored in the water conservancy knowledge base.
4. According to the large model-based intelligent question-answering method for water conservancy knowledge according to claim 1, it is characterized in that: Based on the water conservancy fusion data, a water conservancy knowledge question-answering model and tool module based on a large language model are built, specifically including: Constructing a maintenance entry for question-answer set key-value pairs; the maintenance entry supports maintaining questions and answers of standard questions and answers, and supports importing question-answer sets; Based on the large language model, build a water conservancy knowledge question-answering model; Creating a text input interactive question and answer portal and a voice input interactive question and answer portal for the water conservancy knowledge question and answer model; Build a tool module for the water conservancy knowledge question-answering model and perform scenario training management for the tool module.
5. The method for intelligent question-answering of water conservancy knowledge based on a large model according to claim 4 is characterized in that: Building a tool module for the water conservancy knowledge question-answering model and performing scenario training management for the tool module specifically includes: According to the interface question and answer scenario that needs to be bound, set the properties of the large model understanding tool; wherein the properties of the large model understanding tool at least include: tool name, tool description and tool input parameters; the tool input parameters at least include: input parameter name, input parameter field type, input parameter description and whether it is required; Based on the calling tool attributes, determine the interface attributes corresponding to the calling tool; wherein the interface attributes at least include: interface request mode, url address, interface input parameters corresponding to the url address, header file of the url interface, and tool target value path; Generate a Python tool class according to the calling tool attributes and the corresponding interface attributes; For scenarios where multiple calling tools are called in series, the order between the calling tools is established through pipelines, and the output parameters of the previous calling tool are used as the input parameters of the next calling tool.
6. The method for intelligent question-answering of water conservancy knowledge based on a large model according to claim 1 is characterized in that: Based on the water conservancy fusion data, a knowledge question-answer set is constructed, specifically including: Extracting water conservancy problems and answers from the water conservancy fusion data; Expand the questioning method for the same water conservancy problem to obtain an expanded question; The water conservancy questions or extended questions and corresponding answers are stored in the form of key-value pairs to generate the water conservancy knowledge question and answer set.
7. The method for intelligent question-answering of water conservancy knowledge based on a large model according to claim 1 is characterized in that: Based on the water conservancy fusion data, a water conservancy knowledge graph is constructed, which specifically includes: Based on the library table data in the water conservancy fusion data, the structured data therein is imported into the graph database of neo4j, and entities are created; Based on the attributes of each entity, determine the association relationship between the entities; Based on the association relationship between the entities, triples are constructed, and based on the triples, the water conservancy knowledge relationship map is constructed.
8. The method for intelligent question-answering of water conservancy knowledge based on a large model according to claim 1 is characterized in that: Based on a preset time interval, extract the question and answer records of the water conservancy knowledge question and answer model, and conduct a question and answer audit; The water conservancy knowledge question-answering model is optimized according to the audit results, including: Based on a preset time interval, extracting question and answer records in the water conservancy knowledge question and answer model; wherein the question and answer records at least include question and answer history records, question and answer unmatched records, and question and answer evaluation records; Calculate the proportion of unmatched question and answer records in the question and answer records, and the proportion of negative reviews in the question and answer evaluation records; If the proportion of unmatched records of the question and answer or the proportion of negative reviews reaches the corresponding limiting conditions, the water conservancy knowledge question and answer model is optimized and improved.
9. A water conservancy knowledge intelligent question-answering device based on a large model, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, so that the at least one processor can execute the large model-based intelligent question-answering method of water conservancy knowledge according to any one of claims 1-8.
10. A storage medium, characterized in that: The storage medium is a non-volatile computer-readable storage medium, which stores at least one program. Each of the programs includes instructions, and when the instructions are executed by the terminal, the terminal executes the large-model-based intelligent question-answering method for water conservancy knowledge according to any one of claims 1-8.
Citation Information
Patent Citations
Dialogue system and method applied to robot, robot and readable medium
CN113076409A
Multi-engine intelligent question answering system for multi-type knowledge base
CN115238101A
Large-model-oriented universal tool collaboration and refined learning system and method
CN116594768A
Question and answer data construction method and device based on large language model
CN117591661A
Cited By
Drop knowledge question-answering method and device based on large model
CN119621889A
Question and answer model training method and device, answer generation method and device, equipment and medium
CN120234621A
Question-answering model training method, answer generation method, device, equipment and medium
CN120234621B
Basin intelligent question and answer method and system fusing knowledge graph and hydrological large model
CN123178547A
