Fusion reasoning methods, devices, equipment, and media based on large models and knowledge graphs

By combining the fusion reasoning method of large models and knowledge graphs, the accuracy and efficiency issues of large language models in professional field question answering are solved, and more accurate equipment maintenance diagnosis and knowledge acquisition are achieved.

CN120429446BActive Publication Date: 2025-09-05NAT UNIV OF DEFENSE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510927884.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-09-05
Estimated Expiration
2045-07-07

AI Technical Summary

Technical Problem

Large-scale language models face problems such as lack of training samples, difficulty in understanding professional knowledge, high update costs, and model hallucinations in professional field applications. Knowledge graphs have poor scalability and lack of knowledge controllability when facing complex semantic queries, resulting in insufficient accuracy in question and answering in professional fields.

Method used

Combining the big model with the knowledge graph, through intent understanding, question classification and rewriting, fuzzy information extraction, and using the entity node information vector library for accurate information matching and knowledge retrieval, the answers are integrated.

Benefits of technology

It improves the accuracy and reliability of question-answering in professional fields, shortens the reasoning process, optimizes the efficiency of knowledge graph retrieval, enhances the accuracy and efficiency of equipment maintenance diagnosis, and realizes automated knowledge acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120429446B_ABST
    Figure CN120429446B_ABST
Patent Text Reader

Abstract

The present application relates to a fusion reasoning method, device, equipment and medium based on a large model and a knowledge graph. The method includes: using a large model to sequentially understand the intention of the user input question, classify and rewrite the question, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question; obtaining a knowledge graph in a professional field, and using a vectorization model to construct the entity types and node names contained in the knowledge graph into an entity node information vector library; performing precise information matching on the fuzzy information based on the entity node information vector library, and obtaining the precise entity type and precise node name in the question; performing knowledge retrieval on the precise entity type and precise node name in the knowledge graph, obtaining the entity node information related to the question, and splicing it with the answer to the question output by the large model, and then re-inputting the information into the large model for information integration, and outputting the final answer to the question. This method can improve the accuracy and reliability of questions and answers in professional fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a fusion reasoning method, apparatus, device and medium based on a large model and a knowledge graph. Background Art

[0002] In recent years, large language models (LLMs, hereinafter referred to as large models) have acquired powerful semantic understanding and generation capabilities through pre-training on massive corpora, demonstrating excellent performance in various general natural language processing tasks such as intelligent question answering, machine translation, and text generation. However, in specialized applications such as equipment maintenance and diagnosis, large model training samples are scarce because specialized data (such as equipment parameters and fault cases) often involve privacy and sensitive information. Furthermore, because specialized fields contain a large number of specific terms and concepts, large models may struggle to understand and accurately apply this specialized knowledge, which can easily lead to incorrect reasoning. Furthermore, knowledge in specialized fields changes rapidly, requiring large models to be constantly updated to maintain their accuracy and relevance. However, large model training is expensive, making it difficult to synchronize with the latest knowledge in real time. Furthermore, large models present challenges that need to be overcome, such as model hallucinations and high training and deployment costs.

[0003] Compared to large models, knowledge graphs organize professional knowledge in a graphical format. This structured representation facilitates machine understanding and reasoning, compensating for the implicit knowledge modeling flaws of large models. Furthermore, graph-based reasoning paths can trace the basis for decisions, enhancing the credibility of question-and-answer results. However, knowledge graphs rely on manual rule construction, resulting in poor scalability for complex semantic queries and a lack of knowledge controllability, making it difficult to guarantee the accuracy of professional answers.

[0004] Therefore, there are still many challenges in completing question-answering tasks in professional fields relying solely on knowledge graphs or large models. There is an urgent need for a collaborative framework that integrates large models and knowledge graphs to enhance professional knowledge representation and reasoning capabilities and improve the accuracy of question-answering in professional fields. Summary of the Invention

[0005] Based on this, it is necessary to provide a fusion reasoning method, device, equipment and medium based on large models and knowledge graphs to address the above technical problems.

[0006] A fusion reasoning method based on a large model and a knowledge graph, the method comprising:

[0007] The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0008] Obtain a knowledge graph in a professional field and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph;

[0009] Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem;

[0010] Perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0011] The entity node information related to the question and the answer to the question output by the large model are re-input into the large model for information integration, and the final answer to the question is output.

[0012] In one embodiment, a large model is used to sequentially understand the intent of a question input by a user, classify and rewrite the question, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question, including:

[0013] The user question after text segmentation is input into the large model. The large model first understands the intent and obtains the answer to the question and the text vector sequence of the question.

[0014] Then, the big model classifies the text vector sequence into explicit questions and implicit questions. After rewriting the implicit questions into explicit questions, the big model is used to extract fuzzy information from all the classified and rewritten explicit questions, and output the fuzzy information set existing in the questions input by the user.

[0015] In one embodiment, a user question after text segmentation is input into a large model. The large model first understands the intent and obtains the answer to the question and a text vector sequence of the question, including:

[0016] Questions entered by the user Perform text segmentation to obtain the text representation after question segmentation , the specific expression is:

[0017] ;

[0018] in, Indicates text segmentation processing, , Indicates the problem i Words, n Indicates a problem The total number of words in

[0019] The text representation after question segmentation Input the large model, the large model is The encoding is mapped to a vector sequence for intent understanding, obtaining the text vector sequence of the question answer and the question , The specific expression is:

[0020] ;

[0021] in, Indicates text encoding, , Represents a dimension OK A vector of columns, represents the set of real numbers, Represents a sequence of text vectors The i vectors.

[0022] In one embodiment, the large model classifies questions into explicit questions and implicit questions by classifying text vector sequences. After rewriting the implicit questions into explicit questions, the large model is used to extract fuzzy information from all the classified and rewritten explicit questions, and outputs a set of fuzzy information present in the question input by the user, including:

[0023] The large model is trained on the text vector sequence Classify the problems into explicit problems and implicit problems, which can be expressed as:

[0024] ;

[0025] in, represents the question encoding vector obtained after question classification and text vectorization processing, Indicates explicit questions, represents an implicit problem, Indicates the use of large models For text vector sequence to classify;

[0026] For implicit problems The large model further transforms implicit questions into Split into single or multiple explicit questions that contain entity relationship information ;

[0027] Finally, the large model is used to extract fuzzy information from all explicit questions obtained through classification and rewriting, and the fuzzy information set in the questions input by the user is output. , expressed as:

[0028] ;

[0029] Among them, the fuzzy information set Including fuzzy entities and fuzzy relations.

[0030] In one embodiment, accurate information matching is performed on the fuzzy information extracted from the large model based on the entity node information vector library to obtain the accurate entity type and accurate node name in the question, including:

[0031] Entity node information vector library includes entity type vector library and node name vector library ;

[0032] Randomly select the fuzzy information set extracted from the large model Any fuzzy information in the entity type vector library Perform precise information matching to obtain the precise entity type corresponding to a single fuzzy information ;

[0033] Will match the exact entity type The fuzzy information from the fuzzy information set Eliminate them and get a new set of fuzzy information;

[0034] Randomly select any fuzzy information in the new fuzzy information set and add it to the node name vector library Perform precise information matching to obtain the precise node name corresponding to a single fuzzy information ;

[0035] Will match the exact node name The fuzzy information is removed from the new fuzzy information set, and all the remaining fuzzy information is traversed to repeat the precise information matching until all the precise entity types and precise node names in the problem are obtained; wherein, the precise information matching is implemented based on similarity search.

[0036] In one embodiment, a knowledge search is performed on the precise entity type and precise node name in the knowledge graph to obtain the entity node information related to the question, including:

[0037] Based on the precise entity type and precise node name, the corresponding node in the knowledge graph is activated and used as a query node. Knowledge retrieval is performed on the query node in the knowledge graph, and the entity node related to the question is obtained as the answer node and the attribute information stored in the answer node is extracted. The structural relationship between the query node and the answer node includes:

[0038] The basic structure means that the query node and the answer node are directly connected through a single relationship;

[0039] The two-step structure means that the query node and the answer node are indirectly connected through an intermediate node, forming a two-hop path;

[0040] Inward intersecting structure means that multiple query nodes point to the same answer node;

[0041] Outward intersection structure means that a query node points to multiple answer nodes.

[0042] In one embodiment, the method further includes:

[0043] When no question-related entity node is found in the knowledge graph, the answer to the question output by the large model is directly used as the final answer to the question input by the user, and the accuracy of the final answer is manually judged.

[0044] A fusion reasoning device based on a large model and a knowledge graph, comprising:

[0045] The large model reasoning module is used to use the large model to sequentially understand the intent of the user's input questions, classify and rewrite the questions, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0046] The vector library construction module is used to obtain the knowledge graph of the professional field and use the vectorization model to construct the entity types and node names contained in the knowledge graph into an entity node information vector library;

[0047] The precise information matching module is used to perform precise information matching on the fuzzy information extracted from the large model based on the entity node information vector library to obtain the precise entity type and precise node name in the problem;

[0048] The knowledge retrieval module is used to perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain the entity node information related to the question;

[0049] The fusion output module is used to re-input the problem-related entity node information and the problem answer output by the large model into the large model for information integration and output the final answer to the problem.

[0050] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0051] The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0052] Obtain a knowledge graph in a professional field and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph;

[0053] Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem;

[0054] Perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0055] The entity node information related to the question and the answer to the question output by the large model are re-input into the large model for information integration, and the final answer to the question is output.

[0056] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0057] The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0058] Obtain a knowledge graph in a professional field and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph;

[0059] Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem;

[0060] Perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0061] The entity node information related to the question and the answer to the question output by the large model are re-input into the large model for information integration, and the final answer to the question is output.

[0062] The above-mentioned integrated reasoning method, device, equipment, and medium based on the big model and knowledge graph first uses the big model to sequentially understand the intent of the input question, classify and rewrite the question, and extract fuzzy information. Leveraging the big model's advanced natural language processing capabilities, it can accurately capture the subtle semantics and deep meaning of the question. Then, a vectorized model is used to construct an entity node information vector library for the knowledge graph, and the entity node information vector library and the knowledge graph are used for precise information matching and knowledge retrieval, respectively. This fully utilizes the rich, structured professional domain knowledge provided by the knowledge graph and adapts to the rapid iteration of professional domain knowledge, thereby more accurately understanding user questions and needs and improving the accuracy and reliability of professional domain question-answering. Furthermore, the big model prioritizes question semantics mining and fuzzy information extraction, significantly narrowing the search scope of the knowledge graph and improving knowledge graph retrieval efficiency. Furthermore, guided by the question-related entity nodes retrieved from the knowledge graph, the big model can more quickly find the key points of the question, shortening the reasoning process and improving question-answering efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 11. A flowchart of a fusion reasoning method based on a large model and a knowledge graph in one embodiment;

[0064] Figure 2 A schematic diagram of intent understanding for a large model in one embodiment;

[0065] Figure 3 A schematic diagram of fuzzy information extraction from a large model in one embodiment;

[0066] Figure 4 Schematic diagram of performing precise information matching based on an entity node information vector library in one embodiment;

[0067] Figure 5 A schematic diagram of a knowledge graph retrieval method in one embodiment;

[0068] Figure 6 Schematic diagram of the structure of a fusion reasoning device based on a large model and a knowledge graph in one embodiment; wherein, Figure 6 601 is the large model reasoning module, 602 is the vector library construction module, 603 is the precise information matching module, 604 is the knowledge retrieval module, and 605 is the fusion output module;

[0069] Figure 7 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0071] In one embodiment, taking the application in the field of equipment maintenance diagnosis as an example, a fusion reasoning method based on a large model and a knowledge graph is provided. Figure 1 As shown, the method includes the following steps:

[0072] Step 1: Use the large model to understand the intention, classify and rewrite the questions, and extract fuzzy information from the questions input by the user, and output the answer to the question and the fuzzy information in the question.

[0073] Specifically, step 1 includes:

[0074] First, the user question after text segmentation is input into the big model for intent understanding, and the text vector sequence of the question answer and question is obtained. Figure 2 As shown in the figure, the large model for intent understanding includes the following steps:

[0075] First, the question entered by the user Perform text segmentation to obtain the text representation after question segmentation , the specific expression is:

[0076] ;

[0077] in, Indicates text segmentation processing, , Indicates the problem i Words, n Indicates a problem The total number of words in .

[0078] Then the text after question segmentation is represented as Input the large model, the large model is The encoding is mapped to a vector sequence for intent understanding, obtaining the text vector sequence of the question answer and the question , which retains the semantic information in the question text, The specific expression is:

[0079] ;

[0080] in, Indicates text encoding, , Represents a dimension OK A vector of columns, represents the set of real numbers, Represents a sequence of text vectors The i vectors.

[0081] Then, the large model classifies the text vector sequence into explicit questions and implicit questions, and after rewriting the implicit questions into explicit questions, it uses the large model to extract fuzzy information from all the explicit questions obtained through classification and rewriting, and outputs the fuzzy information set in the questions input by the user. Figure 3 As shown in the figure, the fuzzy information extraction of the large model includes the following steps:

[0082] First, the large model is trained on the text vector sequence Classify the problems into explicit problems and implicit problems, which can be expressed as:

[0083] ;

[0084] in, represents the question encoding vector obtained after question classification and text vectorization processing, Indicates explicit questions, represents an implicit problem, Indicates the use of large models For text vector sequence to classify.

[0085] For implicit problems The large model further transforms implicit questions into Split into single or multiple explicit questions containing equipment maintenance diagnosis entity relationship information .

[0086] Finally, the large model is used to extract fuzzy information from all explicit questions obtained through classification and rewriting, and the fuzzy information set in the questions input by the user is output. , expressed as:

[0087] ;

[0088] Among them, the fuzzy information set Including fuzzy entities and fuzzy relations.

[0089] Step 2: Obtain the knowledge graph of the professional field and use a vectorization model to construct the entity types and node names contained in the knowledge graph into an entity node information vector library.

[0090] Among them, the entity node information vector library includes the entity type vector library and node name vector library .

[0091] Step 3: Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem.

[0092] Specifically, the steps for accurate information matching based on the entity node information vector library are as follows: Figure 4 Shown, including:

[0093] (1) Randomly select the fuzzy information set extracted from the large model Any fuzzy information in the entity type vector library Perform precise information matching to obtain the precise entity type corresponding to a single fuzzy information .

[0094] (2) Matching to the exact entity type The fuzzy information from the fuzzy information set Eliminate them and get a new fuzzy information set.

[0095] For example, Figure 4As shown in the figure, the large model first outputs a set of fuzzy information, including "navigation, system, subsystem, navigation subsystem, navigation subsystem composition, composition". These fuzzy information may contain redundant, repeated or unstructured content. First select "navigation subsystem" in the entity type vector library. Perform similarity search, and if a precise entity type is found, eliminate “navigation subsystem” from the fuzzy information set, and obtain a new fuzzy information set including “navigation, system, subsystem, composition of navigation subsystem, and composition”.

[0096] (3) Randomly select any fuzzy information in the new fuzzy information set and add it to the node name vector library Perform precise information matching to obtain the precise node name corresponding to a single fuzzy information .

[0097] (4) Match the exact node name The fuzzy information is removed from the new fuzzy information set, and all the remaining fuzzy information is traversed, and steps (1) to (3) are repeated to perform precise information matching until all the precise entity types and precise node names in the problem are obtained; wherein, precise information matching is implemented based on similarity search, and in this embodiment, a vector space nearest neighbor search algorithm is specifically adopted.

[0098] For example, Figure 4 As shown, select "Composition" in the new fuzzy information set in the node name vector library Perform similarity search. If the precise node name is found, remove the "composition" in the new fuzzy information set, traverse the remaining fuzzy information, repeat the precise information matching, and output all the precise entity types and precise node names in the question to continue the knowledge graph retrieval.

[0099] This precise information matching method based on the entity node information vector library can effectively eliminate redundant content in fuzzy information through two-level matching, and convert the fuzzy information output by the large model into structured entity types and node names, taking into account accuracy, efficiency and result interpretability.

[0100] Step 4: Perform knowledge retrieval on the precise entity type and precise node name in the knowledge graph to obtain the entity node information related to the question.

[0101] Specifically, if Figure 5 As shown in the figure, based on the precise entity type and precise node name, the corresponding node in the knowledge graph is activated and used as a query node. Knowledge retrieval is performed on the query node in the knowledge graph, and the entity node related to the question is obtained as the answer node and the attribute information stored in the answer node is extracted. The structural relationship between the query node and the answer node includes:

[0102] The basic structure means that the query node and the answer node are directly connected through a single relationship;

[0103] The two-step structure means that the query node and the answer node are indirectly connected through an intermediate node, forming a two-hop path;

[0104] Inward intersecting structure means that multiple query nodes point to the same answer node;

[0105] Outward intersection structure means that a query node points to multiple answer nodes.

[0106] Figure 5 Here, e represents a node, and r represents the relationship between different nodes.

[0107] Step 5: Re-input the question-related entity node information and the question answer output by the large model into the large model for information integration, and output the final answer to the question.

[0108] Specifically, step 5 includes: when a question-related entity node is queried in the knowledge graph, the question-related entity node information is converted into a natural language description fragment, and spliced ​​with the question answer output by the large model, and then input into the large model for text reorganization, and output the final answer in a predetermined format that is more readable and more in line with user reading habits according to the preset prompt words.

[0109] Furthermore, the above method also includes: when no question-related entity node is found in the knowledge graph, the answer to the question output by the large model is directly used as the final answer to the question input by the user, and the accuracy of the final answer is manually judged.

[0110] In summary, the above method provides a joint reasoning framework for large models and knowledge graphs. Compared with existing technologies, this method has the following advantages:

[0111] 1. Enhanced comprehension of specialized domain knowledge: Leveraging its advanced natural language processing capabilities, the large model can accurately parse complex technical documents, manuals, and user feedback, capturing the subtle semantics and underlying meaning of user input. The knowledge graph provides rich, structured domain knowledge, providing a solid foundation for the large model, enabling a deeper understanding of the specialized terminology, processes, and principles of equipment maintenance and diagnosis. The integrated joint reasoning framework incorporates contextual information from the equipment maintenance and diagnosis domain to more accurately understand user questions and needs, enabling appropriate responses even to ambiguous or cryptic expressions.

[0112] 2. Improved accuracy of question answering and equipment maintenance diagnosis: The rich expertise contained in the knowledge graph provides strong support for the large model, enabling it to more accurately identify and diagnose the causes of equipment failures. By combining typical cases and diagnostic rules from the knowledge graph, the large model can effectively reduce misdiagnoses and missed diagnoses, improving diagnostic accuracy and reliability. Furthermore, the knowledge graph's dynamic update mechanism ensures that the large model always has the latest diagnostic knowledge, further improving diagnostic accuracy.

[0113] 3. Optimize reasoning efficiency: The large model prioritizes processing and mining the semantics of the problem and extracting fuzzy information, which can greatly narrow the search scope of the knowledge graph and improve the efficiency of knowledge graph retrieval. Moreover, guided by the problem-related entity nodes retrieved in the knowledge graph, the large model can find the key points of the problem more quickly, shorten the reasoning process, and improve the efficiency of question answering.

[0114] 4. Automated knowledge acquisition: Large models can extract knowledge from unstructured text. This knowledge can be used to update and expand the knowledge graph, realizing the automated acquisition and accumulation of knowledge.

[0115] In one embodiment, Figure 6 As shown, a fusion reasoning device based on a large model and a knowledge graph is provided, including:

[0116] The large model reasoning module 601 is used to use the large model to sequentially understand the intent of the user's input question, classify and rewrite the question, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0117] A vector library construction module 602 is used to obtain a knowledge graph in a professional field and construct an entity node information vector library from the entity types and node names contained in the knowledge graph using a vectorization model;

[0118] The precise information matching module 603 is used to perform precise information matching on the fuzzy information extracted from the large model based on the entity node information vector library to obtain the precise entity type and precise node name in the question;

[0119] The knowledge retrieval module 604 is used to perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0120] The fusion output module 605 is used to re-input the question-related entity node information and the question answer output by the large model into the large model for information integration, and output the final answer to the question.

[0121] For the specific limitations of the fusion reasoning device based on the large model and the knowledge graph, please refer to the limitations of the fusion reasoning method based on the large model and the knowledge graph above, which will not be repeated here. The various modules in the above-mentioned fusion reasoning device based on the large model and the knowledge graph can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0122] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a fusion reasoning method based on a large model and a knowledge graph is implemented. The display screen of the computer device can be a liquid crystal display or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the computer device housing, or an external keyboard, touchpad or mouse.

[0123] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0124] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0125] The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0126] Obtain a knowledge graph in a professional field and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph;

[0127] Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem;

[0128] Perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0129] The entity node information related to the question and the answer to the question output by the large model are re-input into the large model for information integration, and the final answer to the question is output.

[0130] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0131] The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question;

[0132] Obtain a knowledge graph in a professional field and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph;

[0133] Based on the entity node information vector library, the fuzzy information extracted from the large model is accurately matched to obtain the precise entity type and precise node name in the problem;

[0134] Perform knowledge retrieval on precise entity types and precise node names in the knowledge graph to obtain entity node information related to the question;

[0135] The entity node information related to the question and the answer to the question output by the large model are re-input into the large model for information integration, and the final answer to the question is output.

[0136] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0137] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0138] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A fusion reasoning method based on a large model and knowledge graph, characterized by: The method comprises: The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question; Obtain a knowledge graph in a professional field, and use a vectorization model to construct an entity node information vector library from the entity types and node names contained in the knowledge graph; Based on the entity node information vector library, accurate information matching is performed on the fuzzy information extracted from the large model to obtain the accurate entity type and accurate node name in the problem; Performing knowledge retrieval on the precise entity type and precise node name in the knowledge graph to obtain entity node information related to the question; Re-inputting the entity node information related to the question and the answer to the question output by the large model into the large model for information integration, and outputting the final answer to the question; The large model is used to sequentially understand the user's input questions, classify and rewrite them, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question, including: The user question after text segmentation is input into the large model. The large model first understands the intent and obtains the answer to the question and the text vector sequence of the question. Then, the large model is trained on the text vector sequence Classify the problems into explicit problems and implicit problems, which can be expressed as: ; in, represents the question encoding vector obtained after question classification and text vectorization processing, Indicates explicit questions, represents an implicit problem, Indicates the use of large models For text vector sequence to classify; For implicit problems The large model further transforms implicit questions into Split into single or multiple explicit questions that contain entity relationship information ; Finally, the large model is used to extract fuzzy information from all explicit questions obtained through classification and rewriting, and the fuzzy information set in the questions input by the user is output. , expressed as: ; Among them, the fuzzy information set Including fuzzy entities and fuzzy relations.

2. The method according to claim 1, characterized in that After the text segmentation process, the user question is input into the large model. The large model first understands the intent and obtains the answer to the question and the text vector sequence of the question, including: Questions entered by the user Perform text segmentation to obtain the text representation after question segmentation , the specific expression is: ; in, Indicates text segmentation processing, , Indicates the problem i Words, n Indicates a problem The total number of words in The text representation after question segmentation Input the large model, the large model is The encoding is mapped to a vector sequence for intent understanding, obtaining the text vector sequence of the question answer and the question , The specific expression is: ; in, Indicates text encoding, , Represents a dimension OK A vector of columns, represents the set of real numbers, Represents a sequence of text vectors The i vectors.

3. The method according to claim 1, characterized in that Based on the entity node information vector library, accurate information matching is performed on the fuzzy information extracted from the large model to obtain the precise entity type and precise node name in the problem, including: The entity node information vector library includes an entity type vector library and node name vector library ; Randomly select the fuzzy information set extracted from the large model Any fuzzy information in the entity type vector library Perform precise information matching to obtain the precise entity type corresponding to a single fuzzy information ; Will match the exact entity type The fuzzy information is obtained from the fuzzy information set Eliminate them and get a new set of fuzzy information; Randomly select any fuzzy information in the new fuzzy information set and add it to the node name vector library Perform precise information matching to obtain the precise node name corresponding to a single fuzzy information ; Will match the exact node name The fuzzy information is removed from the new fuzzy information set, and all the remaining fuzzy information is traversed to repeat the precise information matching until all the precise entity types and precise node names in the question are obtained; wherein, the precise information matching is implemented based on similarity search.

4. The method according to claim 3, characterized in that Perform knowledge retrieval on the precise entity type and precise node name in the knowledge graph to obtain the entity node information related to the question, including: Based on the precise entity type and precise node name, the corresponding node in the knowledge graph is activated and used as a query node. Knowledge retrieval is performed on the query node in the knowledge graph to obtain the question-related entity node as the answer node and extract the attribute information stored in the answer node. The structural relationship between the query node and the answer node includes: The basic structure means that the query node and the answer node are directly connected through a single relationship; The two-step structure means that the query node and the answer node are indirectly connected through an intermediate node, forming a two-hop path; Inward intersecting structure means that multiple query nodes point to the same answer node; Outward intersection structure means that a query node points to multiple answer nodes.

5. The method according to claim 4, characterized in that The method further comprises: When no question-related entity node is found in the knowledge graph, the answer to the question output by the large model is directly used as the final answer to the question input by the user, and the accuracy of the final answer is manually judged.

6. A fusion reasoning device based on a large model and a knowledge graph, characterized in that: The device comprises: The large model reasoning module is used to use the large model to sequentially understand the intent of the user's input questions, classify and rewrite the questions, and extract fuzzy information, and output the answer to the question and the fuzzy information in the question; A vector library construction module is used to obtain a knowledge graph in a professional field and use a vectorization model to construct the entity types and node names contained in the knowledge graph into an entity node information vector library; An accurate information matching module is used to perform accurate information matching on the fuzzy information extracted from the large model based on the entity node information vector library to obtain the accurate entity type and accurate node name in the problem; A knowledge retrieval module is used to perform knowledge retrieval on the precise entity type and precise node name in the knowledge graph to obtain entity node information related to the question; A fusion output module is used to re-input the entity node information related to the question and the answer to the question output by the large model into the large model for information integration and output the final answer to the question; The large model inference module is specifically used for: The user question after text segmentation is input into the large model. The large model first understands the intent and obtains the answer to the question and the text vector sequence of the question. Then, the large model is trained on the text vector sequence Classify the problems into explicit problems and implicit problems, which can be expressed as: ; in, represents the question encoding vector obtained after question classification and text vectorization processing, Indicates explicit questions, represents an implicit problem, Indicates the use of large models For text vector sequence to classify; For implicit problems The large model further transforms implicit questions into Split into single or multiple explicit questions that contain entity relationship information ; Finally, the large model is used to extract fuzzy information from all explicit questions obtained through classification and rewriting, and the fuzzy information set in the questions input by the user is output. , expressed as: ; Among them, the fuzzy information set Including fuzzy entities and fuzzy relations.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Large language model knowledge question-answering method and system fused with multi-modal knowledge graph

    CN118627628A