Water affair industry plug-in knowledge base system based on large model technology and method thereof
By providing a plug-in knowledge base system for big models in water industry, the shortcomings of big models in common sense understanding and complex logical reasoning are solved, the accuracy of answers and the performance of the model are improved, and the risks of generating bias and harmful content are reduced.
Patent Information
- Application Number
- CN202411820048.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-11
AI Technical Summary
Large models have shortcomings in common sense understanding and complex logical reasoning, which may lead to the generated answers being illogical or inaccurate, and at the same time there is a risk of generating biased, discriminatory or harmful content, and the internal mechanism is complex and difficult to explain, especially in areas such as laws and regulations that require high rigor.
Provide a plug-in knowledge base system for big models in the water industry, through which the system overcomes forgetting problems, improves factual accuracy, and enhances model performance through a real-time updating knowledge base. The system includes underlying model capabilities, water industry knowledge Q&A system and downstream water wading business scenario application model, and provides additional water industry knowledge through knowledge base services, index model services and file processing model services.
Improves the accuracy of the water industry knowledge answers to the question, enhances the performance and interpretability of the model, and reduces the risk of generating biased or harmful content.
Smart Images

Figure CN119807352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a water industry plug-in knowledge base system based on large model technology and a method thereof. Background Art
[0002] Although large models perform well in language generation, they still have deficiencies in common sense understanding and complex logical reasoning, which may lead to illogical or inaccurate responses. Secondly, large models may generate texts with bias, discrimination or other harmful content, which requires strict monitoring and filtering. In addition, the internal mechanism of large models is complex and it is difficult to explain their decision-making process. If the water industry involves areas such as laws and regulations that require a high degree of interpretability, it is not rigorous enough.
[0003] In response to the above technical problems, the present invention provides an external knowledge base for the large model of the water industry to overcome the forgetting problem, improve the accuracy of facts, and enhance the performance of the model by providing a real-time and updateable knowledge base. Summary of the invention
[0004] In this regard, the present invention provides a water industry plug-in knowledge base method, system, electronic device, computer storage medium and computer program product based on large model technology to solve the above technical problems.
[0005] The present invention discloses a water industry plug-in knowledge base system based on a large model technology, wherein the water industry plug-in knowledge base system is applied to a water system, wherein the water system comprises an L0 layer, an L1 layer, and an L2 layer, wherein the L0 layer is a bottom-level model capability, the L1 layer is an industry large model, namely, a water industry knowledge question and answer system, and the L2 layer is a scenario model, namely, a downstream water-related business scenario application model; wherein the bottom-level model capability is used to select and switch a large model, and output the model capability to the water industry knowledge question and answer system, and the water industry knowledge question and answer system is used to output water industry knowledge to the downstream water-related business scenario application model;
[0006] The water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model.
[0007] Optionally, the water service system includes a model calling layer, a basic service layer, and an application service layer;
[0008] Among them, the application service layer includes knowledge base service, index model service, and file processing model service; the basic service layer includes AI service, PDF parsing service, and QA parsing service; the model call layer includes a large model call chain;
[0009] Furthermore, when the water system calls the index model service and the file processing model service, it bypasses the basic service layer and directly calls the large model call chain of the model call layer to select the appropriate model service.
[0010] Optionally, the index model uses an Embedding model or an M3E vector model, and the file processing model uses a domestic open source basic large model;
[0011] And, through the QA parsing service of the basic service layer, the unstructured data can be converted into a number of QA pairs, each QA pair is a structured JSON data file, and the JSON data file consists of a file name, an author, and a QA array;
[0012] The knowledge base service manages the imported QA pairs and supports online updating of question and answer content.
[0013] Optionally, the water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model, specifically:
[0014] The water affairs system determines the respondent of the user's question, that is, determines whether the water affairs industry knowledge question-answering system or the downstream water-related business scenario application model is responsible for processing and generating the response content of the user's question;
[0015] If the answering party is the water industry knowledge question and answer system, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the water industry knowledge question and answer system after a first delay;
[0016] If the responding party is the downstream water-related business scenario application model, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the downstream water-related business scenario application model after the second delay;
[0017] Wherein, the first delay is greater than the second delay.
[0018] Optionally, the second delay is determined by:
[0019] The water system measures the input time of the user's question, determines an adjustment coefficient according to the input time and the standard delay, and calculates the second delay by multiplying the adjustment coefficient by the standard delay;
[0020] Among them, the standard delay is the average value of the historical time from the completion of user question input to the start of generating reply content based on the downstream water-related business scenario application model.
[0021] Optionally, determining an adjustment coefficient according to the input duration and a standard delay includes:
[0022]
[0023] In the above formula, a is the adjustment coefficient, t is the input time of the user asking the question, is the standard delay.
[0024] Optionally, the water industry plug-in knowledge base system updates the water industry knowledge in the following manner:
[0025] The question and answer record data of the water system is obtained, the average response time is calculated based on the question and answer record data, and the update cycle of the water industry knowledge by the water industry plug-in knowledge base system is determined based on the average response time.
[0026] The present invention also discloses a working method of the water industry plug-in knowledge base system based on the large model technology as described in any of the above items, the method comprising:
[0027] When the water system receives a question from a user, additional water industry knowledge is provided to the water industry knowledge question and answer system in the water system or the downstream water-related business scenario application model.
[0028] The present invention also discloses an electronic device, comprising: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement any of the above methods.
[0029] The present invention also discloses a computer storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement any of the above methods.
[0030] The present invention also discloses a computer program product, which can implement any of the above methods when the computer program product is executed by a processor.
[0031] The present invention improves the water system by adding a water industry plug-in knowledge base system to the water system. The water industry plug-in knowledge base system can provide additional water industry knowledge for the water industry knowledge question and answer system and downstream water-related business scenario application models in the water system, thereby improving the accuracy of answers to water industry knowledge questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 is a schematic diagram of the structure of the water system disclosed in an embodiment of the present invention;
[0034] Figure 2 It is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following is a description of the implementation of the present application by specific specific embodiments. People familiar with the technology can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0036] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0037] like Figure 1 As shown, an embodiment of the present invention discloses a water industry plug-in knowledge base system based on a large model technology, wherein the water industry plug-in knowledge base system is applied to a water system, wherein the water system includes an L0 layer, an L1 layer, and an L2 layer, wherein the L0 layer is the underlying model capability, the L1 layer is the industry large model, i.e., the water industry knowledge question and answer system, and the L2 layer is the scenario model, i.e., the downstream water-related business scenario application model; wherein, the underlying model capability is used to select and switch the large model, and output the model capability to the water industry knowledge question and answer system, and the water industry knowledge question and answer system is used to output the water industry knowledge to the downstream water-related business scenario application model;
[0038] The water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model.
[0039] First, the water system of the present invention includes three layers, namely the above-mentioned L0 layer, L1 layer, and L2 layer, which are the underlying model capabilities, the water industry knowledge question and answer system, and the downstream water-related business scenario application model. The underlying model capabilities are used to select and switch large models (existing commercial large models, such as Wenxin Yiyan, KI MI, etc.), and output model capabilities to the water industry knowledge question and answer system based on this, and the water industry knowledge question and answer system outputs water industry knowledge to the downstream water-related business scenario application model. Therefore, when the user asks the downstream water-related business scenario application model about water industry knowledge, the downstream water-related business scenario application model can be based on the water industry knowledge provided by the water industry knowledge question and answer system, thereby realizing questions and answers with the user.
[0040] Based on the above-mentioned water system, the present invention improves the water system by adding a water industry plug-in knowledge base system (built based on big model technology) to the water system. The water industry plug-in knowledge base system can provide additional water industry knowledge for the water industry knowledge question and answer system and downstream water-related business scenario application models in the water system, thereby improving the accuracy of the answers to the water industry knowledge questions.
[0041] Optionally, the water service system includes a model calling layer, a basic service layer, and an application service layer;
[0042] Among them, the application service layer includes knowledge base service, index model service, and file processing model service; the basic service layer includes AI service, PDF parsing service, and QA parsing service; the model call layer includes a large model call chain;
[0043] Furthermore, when the water system calls the index model service and the file processing model service, it bypasses the basic service layer and directly calls the large model call chain of the model call layer to select the appropriate model service.
[0044] Optionally, the index model uses an Embedding model or an M3E vector model, and the file processing model uses a domestic open source basic large model;
[0045] And, through the QA parsing service of the basic service layer, the unstructured data can be converted into a number of QA pairs, each QA pair is a structured JSON data file, and the JSON data file consists of a file name, an author, and a QA array;
[0046] The knowledge base service manages the imported QA pairs and supports online updating of question and answer content.
[0047] In addition, you can also create virtual files to manage the QA pairs represented by the above JSON files, and perform search tests to verify the hit rate and recall rate of the QA pairs. The knowledge base service manages these imported QA pairs and supports online updating of question and answer content.
[0048] Optionally, the water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model, specifically:
[0049] The water affairs system determines the respondent of the user's question, that is, determines whether the water affairs industry knowledge question-answering system or the downstream water-related business scenario application model is responsible for processing and generating the response content of the user's question;
[0050] If the answering party is the water industry knowledge question and answer system, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the water industry knowledge question and answer system after a first delay;
[0051] If the responding party is the downstream water-related business scenario application model, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the downstream water-related business scenario application model after the second delay;
[0052] Wherein, the first delay is greater than the second delay.
[0053] The present invention further designs a strategy for controlling the above-mentioned water industry plug-in knowledge base system to provide additional water industry knowledge to the water system. Specifically, when a user asks a specific water issue to a downstream water-related business scenario application model, a judgment is made as to which layer is responsible for the reply, that is, whether the water industry knowledge question and answer system at the L1 layer or the downstream water-related business scenario application model at the L2 layer is responsible for processing and generating the reply content to the user's question. If the responding party is the water industry knowledge question and answer system, the water industry plug-in knowledge base system is controlled to provide additional water industry knowledge to the water industry knowledge question and answer system after a first delay; and if the responding party is a downstream water-related business scenario application model, the water industry plug-in knowledge base system is controlled to provide additional water industry knowledge to the downstream water-related business scenario application model after a shorter second delay. With this setting, it is possible to provide additional water industry knowledge to the downstream water-related business scenario application model at the L2 layer or the water industry knowledge question and answer system at the L1 layer after they have "thought" about the questions for a certain period of time, so as to help the downstream water-related business scenario application model or the water industry knowledge question and answer system to quickly generate or modify the reply content.
[0054] It should be noted that, since the downstream water-related business scenario application model is a regional model, it has less water industry knowledge than the water industry knowledge question and answer system and has weaker response capabilities. Therefore, the present invention sets the second delay for the downstream water-related business scenario application model to be smaller than the first delay for the water industry plug-in knowledge base system, that is, when the responding party is the downstream water-related business scenario application model, additional water industry knowledge is provided to the downstream water-related business scenario application model after waiting for a shorter period of time (e.g., 1 second).
[0055] Optionally, the second delay is determined by:
[0056] The water system measures the input time of the user's question, determines an adjustment coefficient according to the input time and the standard delay, and calculates the second delay by multiplying the adjustment coefficient by the standard delay;
[0057] Among them, the standard delay is the average value of the historical time from the completion of user question input to the start of generating reply content based on the downstream water-related business scenario application model.
[0058] When the user inputs a question, the water system also times the user's input time, which can be text input, voice input, or text / picture input. Then, the adjustment coefficient is determined based on the input time and the standard delay, and the second delay is calculated by multiplying the adjustment coefficient by the standard delay. Among them, the standard delay is the average "thinking" time of the downstream water-related business scenario application model for user questions, that is, the average historical time from the completion of the user's question input to the start of generating the answer content.
[0059] In addition, the first delay may be the product of the second delay and another adjustment coefficient greater than 1, and the other adjustment coefficient is, for example, 1.1, 1.2, etc., which is not specifically limited in the present invention.
[0060] Optionally, determining an adjustment coefficient according to the input duration and a standard delay includes:
[0061]
[0062] In the above formula, a is the adjustment coefficient, t is the input time of the user asking the question, is the standard delay.
[0063] When the input time of the user's question is lower than the standard delay, it is determined that the input of the question is relatively brief, and the "thinking" time of the downstream water-related business scenario application model will be shorter. At this time, the adjustment coefficient a is set to a value less than 1, and a smaller adjustment coefficient is used to lower the second delay, that is, to control the water industry plug-in knowledge base system to provide additional water industry knowledge to the downstream water-related business scenario application model earlier, so as to facilitate the downstream water-related business scenario application model to obtain additional water industry knowledge in time during the "thinking" stage.
[0064] When the input time of the user's question is longer than the standard delay, it is determined that the input of the question is relatively lengthy, and the "thinking" time of the downstream water-related business scenario application model will be longer. At this time, the adjustment coefficient a is set to a value greater than 1, and a larger adjustment coefficient is used to increase the second delay, that is, to control the water industry plug-in knowledge base system to provide additional water industry knowledge to the downstream water-related business scenario application model later, so as to prompt the downstream water-related business scenario application model to "think" based on its own knowledge reserves, and then correct the "thinking" results based on the additional water industry knowledge obtained subsequently.
[0065] It should be noted that the answering strategy for user questions in the solution of the present invention is that the downstream water-related business scenario application model and the water industry knowledge question and answer system first generate preliminary answer content based on their own knowledge reserves, and then control the water industry plug-in knowledge base system to send additional water industry knowledge to it, so as to provide assistance when it is unable to generate answer content or the generated answer content is unreasonable.
[0066] Optionally, the water industry plug-in knowledge base system updates the water industry knowledge in the following manner:
[0067] The question and answer record data of the water system is obtained, the average response time is calculated based on the question and answer record data, and the update cycle of the water industry knowledge by the water industry plug-in knowledge base system is determined based on the average response time.
[0068] Within a certain period, the question and answer record data of the water system is statistically analyzed, that is, the average response time to user questions is calculated. If the average response time is longer, it is determined that the additional water industry knowledge provided by the water industry plug-in knowledge base system is insufficient or inappropriate, and cannot assist the downstream water-related business scenario application model and the water industry knowledge question and answer system to provide better and faster responses. At this time, it is necessary to set the update cycle of the water industry plug-in knowledge base system to be shorter, that is, to update at a higher frequency, otherwise the update cycle should be set to be longer.
[0069] The embodiment of the present invention further discloses a working method of the water industry plug-in knowledge base system based on the large model technology as described in any of the above items, the method comprising:
[0070] When the water system receives a question from a user, additional water industry knowledge is provided to the water industry knowledge question and answer system in the water system or the downstream water-related business scenario application model.
[0071] like Figure 2 As shown, an embodiment of the present invention further discloses an electronic device, comprising: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the method described in the aforementioned embodiment.
[0072] An embodiment of the present invention further discloses a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the method described in the above embodiment.
[0073] The embodiment of the present invention further discloses a computer program product, which can implement the method described in the above embodiment when the computer program product is executed by a processor.
[0074] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0076] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0077] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0078] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0079] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-On lyMemory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0080] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A plug-in knowledge base system for the water industry based on large model technology, characterized by: The water industry plug-in knowledge base system is applied to the water system, and the water system includes L0 layer, L1 layer, and L2 layer, wherein L0 layer is the underlying model capability, L1 layer is the industry large model, namely the water industry knowledge question and answer system, and L2 layer is the scenario model, namely the downstream water-related business scenario application model; wherein the underlying model capability is used to select and switch the large model, and output the model capability to the water industry knowledge question and answer system, and the water industry knowledge question and answer system is used to output the water industry knowledge to the downstream water-related business scenario application model; The water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model.
2. According to claim 1, a plug-in knowledge base system for the water industry based on large model technology is characterized by: The water service system includes a model calling layer, a basic service layer, and an application service layer; Among them, the application service layer includes knowledge base service, index model service, and file processing model service; the basic service layer includes AI service, PDF parsing service, and QA parsing service; the model call layer includes a large model call chain; Furthermore, when the water system calls the index model service and the file processing model service, it bypasses the basic service layer and directly calls the large model call chain of the model call layer to select the appropriate model service.
3. According to claim 2, a plug-in knowledge base system for the water industry based on large model technology is characterized by: The index model uses the Embedding model or the M3E vector model, and the file processing model uses the domestic open source basic large model; And, through the QA parsing service of the basic service layer, the unstructured data can be converted into a number of QA pairs, each QA pair is a structured JSON data file, and the JSON data file consists of a file name, an author, and a QA array; The knowledge base service manages the imported QA pairs and supports online updating of question and answer content.
4. According to claim 3, a plug-in knowledge base system for the water industry based on large model technology is characterized by: The water industry plug-in knowledge base system is used to provide additional water industry knowledge for the water industry knowledge question and answer system and the downstream water-related business scenario application model, specifically: The water affairs system determines the respondent of the user's question, that is, determines whether the water affairs industry knowledge question-answering system or the downstream water-related business scenario application model is responsible for processing and generating the response content of the user's question; If the answering party is the water industry knowledge question and answer system, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the water industry knowledge question and answer system after a first delay; If the responding party is the downstream water-related business scenario application model, then controlling the water industry plug-in knowledge base system to provide additional water industry knowledge to the downstream water-related business scenario application model after the second delay; Wherein, the first delay is greater than the second delay.
5. According to claim 4, a plug-in knowledge base system for water industry based on large model technology is characterized by: The second delay is determined by: The water system measures the input time of the user's question, determines an adjustment coefficient according to the input time and the standard delay, and calculates the second delay by multiplying the adjustment coefficient by the standard delay; Among them, the standard delay is the average value of the historical time from the completion of user question input to the start of generating reply content based on the downstream water-related business scenario application model.
6. According to claim 5, a plug-in knowledge base system for the water industry based on large model technology is characterized by: The step of determining the adjustment coefficient according to the input duration and the standard delay includes: In the above formula, a is the adjustment coefficient, t is the input time of the user asking the question, is the standard delay.
7. The water industry plug-in knowledge base system based on large model technology according to claim 6 is characterized by: The water industry plug-in knowledge base system updates the water industry knowledge in the following ways: The question and answer record data of the water system is obtained, the average response time is calculated based on the question and answer record data, and the update cycle of the water industry knowledge by the water industry plug-in knowledge base system is determined based on the average response time.
8. A working method of the water industry plug-in knowledge base system based on large model technology as described in any one of claims 1 to 7, characterized in that: The method comprises: When the water system receives a question from a user, additional water industry knowledge is provided to the water industry knowledge question and answer system in the water system or the downstream water-related business scenario application model.
9. An electronic device, comprising: At least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the method according to claim 8.
10. A computer storage medium storing a computer program, characterized in that: The computer program is executed by a processor to implement the method according to claim 8.
Citation Information
Cited By
Data query and auxiliary reservoir operation method and system using context engineering enhanced agent
CN120911917A