Knowledge graph recall-based agent question and answer method, device, equipment and product

By introducing knowledge graphs into RAG technology, the problems of knowledge database structure and context maintenance are solved, and more efficient knowledge retrieval and more accurate answer generation are achieved, which is suitable for intelligent question-and-answer and content generation scenarios.

CN120578749AActive Publication Date: 2025-09-02BEIJING VOLCANO ENGINE TECH CO LTD

Patent Information

Application Number
CN202511088482.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-09-02
Estimated Expiration
2045-08-04

AI Technical Summary

Technical Problem

The existing RAG technology is difficult to maintain the structure and context of the knowledge database in complex scenarios, resulting in inefficient retrieval efficiency and insufficient accuracy in generating answers, and inability to effectively deal with complex problems.

Method used

By introducing a knowledge graph, organizing knowledge into a graph, using a question-and-answer model to perform in-depth reasoning in the knowledge graph, and combining the knowledge graph search and answer generation system for information retrieval and answer generation.

Benefits of technology

It improves the ability of the Q&A model to handle complex questions, improves the accuracy and comprehensiveness of the answers, and supports the systematic use and update of the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120578749A_ABST
    Figure CN120578749A_ABST
Patent Text Reader

Abstract

The invention discloses an agent question-answering method, device, equipment and product based on knowledge graph recall, and relates to the technical field of large models, agents, artificial intelligence and knowledge graphs. The agent question-answering method comprises the steps that a target question input by a user in an intelligent interaction page is obtained, keywords in the target question are extracted, and the keywords are extracted; a target knowledge graph node matched with the keyword is determined in a target knowledge graph, a target sub-graph is determined at least based on the target knowledge graph node, and the target knowledge graph comprises a plurality of knowledge graph nodes; and generating an answer corresponding to the target question at least based on the target question and the target sub-graph through the question and answer large model. By introducing the knowledge graph, in the process of generating the answer by the question and answer large model, deep reasoning can be carried out based on the input question along the path in the knowledge graph by using the multi-level and structured information of the knowledge graph, so that the processing capability of the question and answer large model on the complex question is improved, and the accuracy and comprehensiveness of outputting the answer are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the fields of large models, intelligent agents, artificial intelligence, and knowledge graph technology, and specifically to an intelligent agent question-answering method, apparatus, device, and product based on knowledge graph recall. Background Art

[0002] Retrieval-Augmented Generation (RAG) technology is an artificial intelligence technology that combines information retrieval and language generation. The retrieval module extracts document fragments related to the question from massive documents based on the input question. The generation module uses a large language model (LLM) to perform semantic understanding based on the question and retrieved document fragments and generate answers.

[0003] Then, since document fragments are obtained by dividing documents into blocks, different document fragments are independent of each other, which seriously destroys the original structure and context of knowledge, making it difficult for large models to perform structured processing and deep reasoning on the retrieved document fragments, thereby affecting the accuracy of the output answers. Summary of the Invention

[0004] This summary is provided to briefly introduce concepts that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides an intelligent agent question-answering method based on knowledge graph recall, the intelligent agent question-answering method comprising: Obtaining a target question input by a user on an intelligent interaction page and extracting keywords from the target question, wherein the intelligent interaction page is connected to an intelligent agent, and the intelligent agent is associated with a question-answering model, wherein the question-answering model is used to generate an answer based on the input question and a knowledge graph recalled based on the input question; Determine a target knowledge graph node that matches the keyword in a target knowledge graph, and determine a target subgraph based at least on the target knowledge graph node, wherein the target knowledge graph includes a plurality of knowledge graph nodes; An answer corresponding to the target question is generated by the question-answering model based at least on the target question and the target subgraph.

[0006] In a second aspect, the present disclosure provides an intelligent question-answering device based on knowledge graph recall, the intelligent question-answering device comprising: An acquisition module is configured to acquire a target question input by a user on an intelligent interaction page and extract keywords from the target question. The intelligent interaction page is connected to an agent, and the agent is associated with a question-answering model. The question-answering model is configured to generate an answer based on the input question and a knowledge graph retrieved based on the input question. a determination module, configured to determine a target knowledge graph node that matches the keyword in a target knowledge graph, and to determine a target subgraph based at least on the target knowledge graph node, wherein the target knowledge graph includes a plurality of knowledge graph nodes; A generation module is used to generate an answer corresponding to the target question based on at least the target question and the target subgraph through the question-answering model.

[0007] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when executed by a processing device.

[0008] In a fourth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0009] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0010] Through the above technical solution, the keywords in the target question input by the user are first extracted, and then the target knowledge graph nodes that match the keywords are determined in the target knowledge graph, and the target subgraph is determined at least based on the target knowledge graph nodes. Finally, the question-answering model generates the answer corresponding to the target question based at least on the target question and the target subgraph. Using this method, because the knowledge graph organizes knowledge in the form of a graph and has a clear structure and semantic relationship, it can accurately present the complex associations and hierarchical structures between knowledge. By introducing the knowledge graph, the question-answering model can utilize the multi-level and structured information of the knowledge graph in the process of generating answers, and perform deep reasoning based on the input question along the path in the knowledge graph, thereby improving the question-answering model's ability to handle complex questions and effectively improving the accuracy and comprehensiveness of the output answers.

[0011] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a schematic diagram illustrating a process of generating an answer based on a recalled knowledge fragment according to an exemplary embodiment of the present disclosure; Figure 2 1 is a flow chart illustrating an intelligent agent question-answering method based on knowledge graph recall according to an exemplary embodiment of the present disclosure; Figure 3 is a schematic diagram of a knowledge graph construction process according to an exemplary embodiment of the present disclosure; Figure 4 is a schematic diagram illustrating a knowledge graph partitioning node set according to an exemplary embodiment of the present disclosure; Figure 5 1 is a process diagram of an intelligent agent question answering method based on knowledge graph recall according to an exemplary embodiment of the present disclosure; Figure 6 is a schematic diagram showing an intelligent interactive page according to an exemplary embodiment of the present disclosure; Figure 7 1 is a structural block diagram of an intelligent question-answering device based on knowledge graph recall according to an exemplary embodiment of the present disclosure; Figure 8 The figure is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0013] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0014] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0015] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0017] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0018] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0019] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0020] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0021] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0023] At the same time, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0024] RAG technology is an artificial intelligence technology that combines information retrieval and language generation. It enhances the generation capabilities of large models by retrieving external knowledge sources and can be applied to business scenarios such as intelligent question-answering, content generation, and decision support. The retrieval module is responsible for retrieving relevant information from large-scale knowledge databases (such as document repositories and knowledge bases) based on the input question or prompt. The retrieval module uses various information retrieval techniques, such as inverted indexes and vector space models, to quickly find the documents or knowledge fragments most relevant to the question. The generation module uses the large model to generate natural and fluent answers or text based on the retrieved information and the input question. The generation module incorporates the retrieved knowledge into the generation process to improve the accuracy and relevance of the answers.

[0025] It is worth noting that compared with technical solutions based solely on large models, the use of RAG technology can retrieve external knowledge sources, obtain the latest and most accurate information, improve the accuracy of generated answers, help large models improve their generalization ability and adaptability, and provide the information source on which the large model generates answers, which has better explainability.

[0026] However, RAG technology still has many shortcomings when dealing with complex scenarios, such as Figure 1 As shown in the figure, after the document is segmented into multiple document fragments, each segmented text block is converted into a vector representation. Then, the text block most relevant to the input question is found through vector search technology, and the context of the text block is added and combined with the input question to generate prompts. The prompts are input into the large model to generate answers.

[0027] During retrieval, document fragments within knowledge databases are generated using fixed-length or delimiter-based chunking. These fragments are independent of each other, severely disrupting the original structure and context of the knowledge. Furthermore, treating all documents as independent, flattened data islands lacks a higher-dimensional perspective to understand and query the inherent connections between knowledge, resulting in low cross-document recall success rates and insufficient understanding of complex problems.

[0028] In the generation stage, all recalled text fragments are usually simply spliced ​​into the context of the large model. The large model acts more like a text summary, and it is difficult to perform structured processing and deep reasoning on the retrieved document fragments. This not only affects the accuracy of the output answers, but also cannot support the iteration and exploration process required for solving complex problems.

[0029] In addition, RAG technology converts massive documents directly into vector databases, lacking unified metadata standards, entity and relationship extraction, and hierarchical knowledge structures, making the document fragments in the entire knowledge database disordered and difficult to maintain. This not only leads to low retrieval efficiency, but also makes the knowledge database unable to be systematically used and updated.

[0030] In view of this, the present disclosure provides an intelligent question-answering method, device, equipment and product based on knowledge graph recall to solve the above technical problems.

[0031] The following further explains the embodiments of the present disclosure with reference to the accompanying drawings.

[0032] Figure 2 This is a flowchart of an intelligent agent question answering method based on knowledge graph recall according to an exemplary embodiment of the present disclosure, with reference to Figure 2 , the intelligent agent question answering method may include the following steps: S201: Obtain a target question input by a user on the intelligent interaction page, and extract keywords from the target question.

[0033] Among them, the intelligent interactive page is connected to an intelligent agent, and the intelligent agent is associated with a question-answering model. The question-answering model is at least used to generate answers based on input questions and knowledge graphs recalled based on the input questions.

[0034] For example, after obtaining the user's input question, keywords that can characterize the user's question can be extracted. Assuming that the question input by the user is "What courses do I need to learn in the xx major", the keywords "xx major" and "courses" can be extracted.

[0035] It should be noted that after the input question is semantically understood by the big model, the input question can be rewritten to make it clearer or easier to handle. Question rewriting may include simplifying the question, clarifying the key points of the question, or converting the question into a form that is easier for the model to understand. The big model can be the above-mentioned question-answering big model or other big models. The specific model can be determined according to needs, and this disclosure does not limit this.

[0036] S202: Determine a target knowledge graph node that matches the keyword in the target knowledge graph, and determine a target subgraph based at least on the target knowledge graph node, where the target knowledge graph includes multiple knowledge graph nodes.

[0037] It should be noted that if there is a knowledge graph, knowledge recall is performed directly in the knowledge graph based on keywords, such as a fusion knowledge graph composed of physical knowledge, geographical knowledge, etc. If there are multiple knowledge graphs, the target knowledge graph can be determined based on keywords in multiple knowledge graphs, and then knowledge recall is performed in the target knowledge graph based on keywords. For example, there are multiple knowledge graphs such as the historical knowledge graph corresponding to physical knowledge and the geographical knowledge graph corresponding to geographical knowledge. Continuing with the example of the above input problem, assuming that the xx major is related to physical knowledge, the physical knowledge graph can be determined from multiple knowledge graphs first, and then knowledge recall is performed in the physical knowledge graph based on keywords. The specific details can be determined according to the actual business scenario, and this disclosure does not limit this.

[0038] S203: Generate an answer corresponding to the target question based on at least the target question and the target subgraph through the question-answering large model.

[0039] Using the above method, since the knowledge graph organizes knowledge in the form of a graph and has a clear structure and semantic relationship, it can accurately present the complex associations and hierarchical structures between knowledge. By introducing the knowledge graph, the question-answering model can utilize the multi-level and structured information of the knowledge graph in the process of generating answers, and perform deep reasoning along the path in the knowledge graph based on the input question, thereby improving the question-answering model's ability to handle complex problems and effectively improving the accuracy and comprehensiveness of the output answers.

[0040] This embodiment solves the limitations of RAG technology in complex reasoning tasks by combining knowledge graph with RAG technology. The core is to add knowledge graph as an auxiliary on the basis of RAG retrieval to further enhance the large model's understanding and reasoning ability of complex information. First, it is necessary to convert unstructured text data into a structured graph form, in which entities and concepts in the text are regarded as nodes in the graph, and the relationships between them constitute the edges between nodes. This structured knowledge representation not only enhances the large model's ability to understand the data, but also provides the large model with richer information retrieval and reasoning paths.

[0041] It is worth noting that this embodiment provides a knowledge graph retrieval and generation system, including a knowledge graph builder, a retriever, a generator, and a graph reasoning module. The following describes an embodiment of the intelligent agent question-answering method provided by this disclosure in conjunction with the system architecture of the knowledge graph retrieval and generation system.

[0042] In a possible manner, the target knowledge graph is constructed in the following manner: obtaining initial knowledge data, the initial knowledge data including structured knowledge data and / or unstructured knowledge data; performing block processing on the initial knowledge data according to a second preset scale to obtain multiple knowledge data blocks; performing knowledge extraction on each knowledge data block to obtain a triple, wherein the triple includes a first entity, a second entity, and the relationship between the first entity and the second entity, or the triple includes a third entity, an attribute corresponding to the third entity, and the relationship between the third entity and the attribute; obtaining the target knowledge graph based on the triples corresponding to each knowledge data block.

[0043] For example, Figure 3 As shown, knowledge is first collected, including unstructured data such as images, audio, video, documents, and web pages, for subsequent content-based knowledge extraction. Structured data such as database table data, table data in spreadsheet files, and structured objects obtained through interfaces can also be included for subsequent knowledge mapping.

[0044] For example, continue to refer to Figure 3 , the collected knowledge data is divided into knowledge data blocks of preset sizes. For example, unstructured documents are divided into text blocks of fixed sizes, and structured data such as tabular data can be divided into a row of table data as a knowledge data block. The specific size can be determined according to needs, and this disclosure does not impose any restrictions on this.

[0045] It should be noted that larger text blocks require fewer large model calls, but this may result in a decrease in recall rate. Smaller text blocks can extract more entities, but may require more large model calls. Therefore, a preset scale can be set according to the requirements of recall rate and accuracy, and this disclosure does not impose any restrictions on this.

[0046] For example, continue to refer to Figure 3 The big model can be used to extract entities (such as people, events, and things) from knowledge data blocks, as well as the relationships between them and their descriptions, such as "Professional Direction 1, including Course AA." These triplet element instances can then be used to construct a knowledge graph. The big model can be the question-and-answer big model described above or another big model, depending on specific needs and not limited in this disclosure. This provides data support for building the knowledge graph.

[0047] In a possible manner, a target knowledge graph is obtained based on the triples corresponding to each knowledge data block, including: performing graph rendering according to the triples corresponding to each knowledge data block to obtain a preview knowledge graph, wherein an entity or attribute in the triple corresponds to a knowledge graph node in the preview knowledge graph, and a relationship in the triple corresponds to an edge between two knowledge graph nodes in the preview knowledge graph; in response to a confirmation operation on the preview knowledge graph, performing node matching in the historical knowledge graph based on the preview knowledge graph; in a case where there is no fifth knowledge graph node matching the preview knowledge graph node in the historical knowledge graph, merging the preview knowledge graph with the historical knowledge graph to obtain the target knowledge graph; in a case where there is a fifth knowledge graph node matching the preview knowledge graph node in the historical knowledge graph, fusing the knowledge graph node in the preview knowledge graph with the fifth knowledge graph node in the historical knowledge graph to obtain the target knowledge graph.

[0048] For example, continue to refer to Figure 3 , the graph can be rendered based on the triples corresponding to each knowledge data block to obtain a preview knowledge graph, which can be modified as needed, and this disclosure does not limit this. Figure 3 The preview knowledge graph can be stored for subsequent generation of the final knowledge graph, or it can be used in response to the trigger operation of the control in Figure 3 The trigger operation of the merge control is to query whether there is a knowledge graph node related to the preview knowledge graph in the historical knowledge graph. If not, the preview knowledge graph and the historical knowledge graph are merged to obtain the target knowledge graph, or the preview knowledge graph is generated into an independent knowledge graph. This disclosure does not impose any restrictions on this. If there are related knowledge graph nodes, the preview knowledge graph can be fused into the historical knowledge graph based on the fifth knowledge graph node. For example, if there is a "professional direction 1" node in both the preview knowledge graph and the historical knowledge graph, the two nodes can be merged into the same node, and the descriptions of the two nodes, related nodes, etc. can be fused to obtain the target knowledge graph.

[0049] It should be noted that when there are multiple historical knowledge graphs, you can manually or automatically select or merge one of the historical knowledge graphs. The specific selection can be determined according to needs, and this disclosure does not limit this.

[0050] In this way, entities and relationships can be extracted from the collected knowledge data and then converted into structured knowledge representations. New knowledge data can be periodically obtained to iteratively update the knowledge graph, so that the question-answering model can integrate the latest external information in real time through the knowledge graph based on the model training data, thereby helping the question-answering model to be more flexible and effective in dealing with questions involving real-time information, and to generate answers related to the latest information, which is highly adaptable to application scenarios that require timeliness.

[0051] Furthermore, the target knowledge graph can be divided into multiple node sets according to the connection characteristics between nodes, and one node set includes multiple knowledge graph nodes.

[0052] For example, Figure 4 As shown, you can select a clustering algorithm to perform community detection on the knowledge graph according to your needs, and divide the knowledge graph into node communities, that is, the above node sets. Figure 4 Each dotted box in the figure represents a node set. Furthermore, the connections between knowledge graph nodes within the same node set are stronger than the connections between knowledge graph nodes in different node sets. For example, let's say knowledge graph nodes A, B, and C belong to node set M, and knowledge graph node C belongs to node set N. Then, the connection between knowledge graph nodes A and B is stronger than the connection between knowledge graph nodes A and C.

[0053] Among them, whether to divide into the same node set can be determined according to the correlation between the nodes of the knowledge graph. Taking professional courses as an example, basic courses such as mathematics and algebra are a node set, and professional courses such as data structure, algorithm, and programming are a node set. The specific settings can be made according to needs, and this disclosure does not impose any restrictions on this.

[0054] Furthermore, a corresponding set summary can be generated for each node set. In a possible manner, the set summary corresponding to the node set is determined in the following manner: determining the knowledge graph node with the largest number of associated nodes from the node set as the third knowledge graph node; performing semantic induction on the node data corresponding to each knowledge graph node in the node set to obtain the set summary corresponding to the node set; among which, the content used to describe the third knowledge graph node accounts for the largest proportion in the set summary corresponding to the node set.

[0055] For example, a corresponding set summary can be generated for each node set of the knowledge graph in order from few to many node sets, and for each node set, a set summary can be generated based on the node data corresponding to each knowledge graph node, where the node data can include the name of the knowledge graph node, description content, associated knowledge graph nodes and other information, which can be set according to specific needs and is not limited in this disclosure.

[0056] Moreover, a node with more connected nodes has a higher importance in the node set. Therefore, the content describing the knowledge graph node with the largest number of connected nodes accounts for the largest proportion in the set summary corresponding to the node set.

[0057] By performing set preprocessing and summary generation on the knowledge graph, the corresponding node set can be located first and then knowledge recall can be performed during the query, thereby reducing the number of tokens that need to be passed into the large model, thereby reducing the computational overhead and response time of generating answers.

[0058] It is worth noting that by constructing a knowledge graph, an orderly knowledge base can be maintained in accordance with a unified metadata standard and a multi-level structure, which improves the efficiency of knowledge retrieval while facilitating systematic use and updating. The above-mentioned knowledge collection, segmentation, extraction to generate a knowledge graph, node set division and summary generation can be implemented by the knowledge graph builder of the knowledge graph retrieval generation system, or by coordinating different modules. The specific settings can be made according to the needs, and this disclosure does not impose any restrictions on this.

[0059] In a possible manner, determining a target knowledge graph node that matches a keyword in a target knowledge graph includes: determining the semantic relevance between the node data corresponding to each knowledge graph node in the target knowledge graph and the keyword; determining a first knowledge graph node from the target knowledge graph based on the semantic relevance between the node data corresponding to each knowledge graph node and the keyword, wherein the semantic relevance between the node data corresponding to the first knowledge graph node and the keyword is greater than the semantic relevance between the node data corresponding to other knowledge graph nodes in the target knowledge graph except the first knowledge graph node and the keyword, and the target knowledge graph node includes the first knowledge graph node.

[0060] For example, Figure 5 As shown, the input question can be understood, rewritten and analyzed through the question-answering big model to extract the input question entities and relationships, namely keywords, and then perform semantic understanding of the keywords. Based on the results of the semantic understanding, semantic matching is performed on the node data corresponding to each knowledge node in the target knowledge graph. The knowledge graph nodes whose semantic similarity with the keywords is greater than the preset similarity threshold can be screened out as the first knowledge graph nodes, or the knowledge graph nodes can be arranged in order of semantic similarity with the keywords from large to small, and the first preset number of knowledge graph nodes can be screened out as the first knowledge graph nodes. The preset similarity threshold or preset number can be set according to demand, and the present disclosure does not impose any restrictions on this.

[0061] Based on the user's input question, entities and relationships related to the keywords are retrieved in the entire knowledge graph, and multiple knowledge graph nodes are obtained to generate a knowledge graph subgraph containing multiple triples for the large model to generate answers. This is suitable for scenarios where you need to understand related questions about a specific entity mentioned in a knowledge document, such as "What courses do you need to take for major xx?" Its main steps include entity retrieval, node extraction, node sorting, and answer generation, with high query efficiency.

[0062] In a possible manner, multiple knowledge graph nodes in the target knowledge graph are divided into multiple node sets, one node set corresponds to one set summary, and the correlation between knowledge graph nodes in the same node set is greater than the correlation between knowledge graph nodes in different node sets. Determining the target knowledge graph node that matches the keyword in the target knowledge graph includes: determining the semantic correlation between the set summary corresponding to each node set and the keyword, and determining the target node set with the highest semantic correlation with the keyword from multiple node sets; determining the semantic correlation between the node data corresponding to each knowledge graph node in the target node set and the keyword; determining a second knowledge graph node from the target node set based on the semantic correlation between the node data corresponding to each knowledge graph node in the target node set and the keyword, the semantic correlation between the node data corresponding to the second knowledge graph node and the keyword is greater than the semantic correlation between the node data corresponding to other knowledge graph nodes in the target node set except the second knowledge graph node and the keyword, and the target knowledge graph node includes the second knowledge graph node.

[0063] For example, continue to refer to Figure 5 , and then perform semantic understanding on the keywords, and perform semantic matching on the set summaries corresponding to each node set in the target knowledge graph based on the results of semantic understanding, and screen out the target node set with the highest semantic similarity with the keywords. Then continue to perform knowledge mining in the target node set, for example, screen out the knowledge graph nodes whose semantic similarity with the keywords is greater than a preset similarity threshold as the second knowledge graph node, or screen out a preset number of knowledge graph nodes as the second knowledge graph node after arranging them in descending order of semantic similarity with the keywords. The preset similarity threshold or the preset number can be set according to demand, and the present disclosure does not impose any restrictions on this.

[0064] Based on the user's input question, the node set related to the keyword is first determined in the entire knowledge graph, and then the entities and relationships related to the keyword are retrieved from the node set, and then a knowledge graph subgraph is generated for the large model to generate answers. This not only narrows the scope of node matching and speeds up knowledge query efficiency, but can also be used to answer scenarios that summarize a certain knowledge document, such as "What is discussed in the kk document?"

[0065] In a possible manner, determining the semantic relevance between the set summary corresponding to each node set and the keyword includes: for the set summary corresponding to each node set, dividing the set summary into blocks according to a first preset scale to obtain multiple text blocks, semantically matching the keyword with each text block to obtain the semantic relevance between each text block and the keyword, and determining the semantic relevance between the set summary and the keyword based on the semantic relevance between each text block and the keyword.

[0066] For example, in the process of semantically matching the set summary corresponding to the node set based on the keyword, the set summary can be divided into text blocks of a preset size, and then the keyword is semantically matched with each text block to obtain the semantic relevance between each text block and the keyword, that is, the semantic similarity between each text block and the keyword, and then filter out the text blocks whose semantic similarity with the keyword is greater than a preset similarity threshold. Alternatively, the text blocks can be arranged in descending order of semantic similarity with the keyword and then a preset number of text blocks are filtered out. The preset similarity threshold or the preset number can be set according to demand, and the present disclosure does not impose any restrictions on this. This can improve the accuracy of determining the semantic relevance between the set summary of the node set and the keyword, thereby improving the efficiency and accuracy of knowledge recall, and thereby improving the efficiency and accuracy of answer generation.

[0067] Then, the semantic relevance between the set summary and the keyword is determined based on the filtered text blocks. For example, the semantic relevance between the set summary and the keyword is calculated by summing the semantic similarities corresponding to the text blocks. The specific setting can be made according to the needs, and the present disclosure does not limit this. In addition, since the set summary includes the description content of different nodes in the set, the second knowledge graph node that matches the keyword can also be determined based on the node corresponding to the filtered text block. The specific setting can be made according to the needs, and the present disclosure does not limit this.

[0068] It should be noted that the information of the cluster summary can be combined in the retrieval process of the entire knowledge graph to balance the accuracy and breadth of the retrieval. The specific settings can be made according to needs, and this disclosure does not impose any restrictions on this.

[0069] In a possible manner, a target knowledge graph node that matches a keyword is determined in a target knowledge graph, including: performing scene matching in at least one preset scene based on the keyword to obtain a target preset scene, where one preset scene corresponds to at least two knowledge graph nodes with a connection relationship in the target knowledge graph; and determining the knowledge graph node corresponding to the target preset scene as the target knowledge graph node.

[0070] For example, Figure 5 As shown, a preset scenario can be set in advance according to the business scenario, for example, the preset scenario "F, G", where F and G correspond to two knowledge graph nodes with a connection relationship in the target knowledge graph. When the user inputs a question including the keywords "F" and "G", the preset scenario "F, G" is directly determined based on the keywords, and then the corresponding knowledge graph node is obtained. The preset scenario can be the full path, shortest path, and longest path between entities, etc., which can be set according to needs, and this disclosure does not impose any restrictions on this. This can improve the efficiency of knowledge retrieval and thus improve the efficiency of generating answers.

[0071] In a possible manner, the target subgraph is determined at least based on the target knowledge graph node, including: determining a fourth knowledge graph node in the target knowledge graph that is associated with the target knowledge graph node and matches the keyword; determining the target subgraph based on the target knowledge graph node, the fourth knowledge graph node, and the connection relationship between the target knowledge graph node and the fourth knowledge graph node.

[0072] For example, knowledge recall of one-hop or multi-hop relationships can be performed in the target knowledge graph based on the knowledge graph nodes that match the keywords. The specific settings can be made according to the needs, and the present disclosure does not limit this. For example, the associated knowledge graph nodes can be directly recalled, or the knowledge graph nodes with connection relationships can be re-matched based on the keywords, and the knowledge graph nodes with high semantic relevance to the keywords can be recalled. The specific settings can be made according to the needs, and the present disclosure does not limit this. This can improve the depth of knowledge retrieval and the accuracy of knowledge recall, thereby improving the efficiency and accuracy of generating answers.

[0073] That is to say, this embodiment can directly determine the recalled knowledge graph subgraph based on the knowledge graph node matching the keyword and the connection relationship between the knowledge graph nodes, or it can determine the recalled knowledge graph subgraph based on the knowledge graph node matching the keyword, the knowledge graph node having a connection relationship with the knowledge graph node, and the connection relationship between the knowledge graph nodes. The specific settings can be made according to needs, and this disclosure does not impose any restrictions on this.

[0074] In a possible embodiment, the intelligent agent question-answering method further includes: performing a knowledge search within a knowledge database based at least on a keyword to obtain a target knowledge fragment, wherein the target knowledge graph is a structured graph model corresponding to the knowledge database. Generating an answer corresponding to the target question based at least on the target question and the target subgraph by the question-answering macromodel includes: generating an answer corresponding to the target question based on the target question, the target knowledge fragment, and the target subgraph by the question-answering macromodel.

[0075] For example, continue to refer to Figure 5 , you can also directly perform knowledge retrieval in the knowledge database corresponding to the target knowledge graph based on keywords to obtain target knowledge fragments. The knowledge database is used to store the data block vectors corresponding to the knowledge data blocks after segmentation in the above knowledge acquisition process. Therefore, you can recall knowledge in the knowledge database based on the vector representation corresponding to the keyword, thereby enriching the richness of knowledge recall and providing more data support for the generation of answers by the question-answering model.

[0076] In a possible manner, knowledge retrieval is performed in the knowledge database at least based on keywords to obtain a target knowledge fragment, including: performing knowledge retrieval in the knowledge database based on node data corresponding to the knowledge graph node in the target subgraph to obtain a first knowledge fragment that matches the node data corresponding to the knowledge graph node in the target subgraph; performing knowledge retrieval in the knowledge database based on keywords to obtain a second knowledge fragment that matches the keywords; and determining the target knowledge fragment based on the first knowledge fragment and the second knowledge fragment.

[0077] For example, knowledge recall can also be performed in the knowledge database in combination with node data corresponding to knowledge graph nodes recalled in the target knowledge graph based on keywords to improve the coverage of knowledge recall.

[0078] It is worth noting that the above-mentioned knowledge retrieval process can be implemented through the retriever of the knowledge graph retrieval generation system, which can be specifically set according to needs and is not limited in this disclosure.

[0079] Furthermore, continue to refer to Figure 5 , based on the recalled knowledge, including the node data corresponding to the knowledge graph nodes recalled based on the above-mentioned set summary, the node data corresponding to the knowledge graph nodes recalled based on the entire knowledge graph, the node data corresponding to the knowledge graph nodes recalled based on preset scenarios, and one or more of the knowledge fragments recalled based on the knowledge database, perform knowledge fusion, reasoning and understanding, and after determining the prompt words based on the fused knowledge and the input question, input the question and answer big model to generate the corresponding answer, ensuring that the big model can not only refer to static knowledge, but also reason based on the relationship in the knowledge graph.

[0080] The process of generating corresponding answers from the aforementioned large question-and-answer model can be implemented based on the generator and graph reasoning module in the knowledge graph retrieval and generation system. Based on the large model, the generator can not only generate answers based on recalled knowledge, but also refer to the structured information contained in the knowledge graph for more complex reasoning and generation. The generator can use the nodes and relationships in the knowledge graph as input to help generate reasoned and logical answers. The graph reasoning module can dynamically infer relationships in the knowledge graph during the answer generation process and can deduce relevant conclusions along the paths in the knowledge graph based on the details of the input question, thereby generating more accurate and logical answers.

[0081] By adopting the above method and introducing the knowledge graph, the question-answering model can utilize multi-level and structured information in the answering process, which improves the reasoning ability of the question-answering model for complex questions, can handle questions involving complex relationships and multi-step reasoning, and provide more comprehensive and accurate answers. Figure 6As shown, when displaying answers, the recalled knowledge fragments and knowledge graph subgraphs can also be displayed, providing an additional chain of evidence for the generated answers through the structured nature of the knowledge graph. In other words, by introducing the knowledge graph, the generated answers are more transparent and more explainable, and users can trace back to specific entities and relationships in the knowledge graph, thus gaining a deeper understanding of the generated answers.

[0082] Based on the same concept, the embodiment of the present disclosure provides an intelligent question-answering device based on knowledge graph recall, such as Figure 7 As shown, the intelligent agent question-answering device 700 includes: Acquisition module 701 is used to acquire a target question input by a user on an intelligent interaction page and extract keywords from the target question. The intelligent interaction page is connected to an agent, and the agent is associated with a question-answering model. The question-answering model is used to generate an answer based on the input question and a knowledge graph recalled based on the input question. A determination module 702 is configured to determine a target knowledge graph node that matches the keyword in a target knowledge graph, and determine a target subgraph based at least on the target knowledge graph node, wherein the target knowledge graph includes a plurality of knowledge graph nodes; The generation module 703 is used to generate an answer corresponding to the target question based on at least the target question and the target subgraph through the question-answering model.

[0083] Optionally, the determining module 702 is configured to: Determine the semantic relevance between the node data corresponding to each knowledge graph node in the target knowledge graph and the keyword; Based on the semantic relevance between the node data corresponding to each knowledge graph node and the keyword, a first knowledge graph node is determined from the target knowledge graph, wherein the semantic relevance between the node data corresponding to the first knowledge graph node and the keyword is greater than the semantic relevance between the node data corresponding to other knowledge graph nodes of the target knowledge graph except the first knowledge graph node and the keyword, and the target knowledge graph node includes the first knowledge graph node.

[0084] Optionally, the multiple knowledge graph nodes in the target knowledge graph are divided into multiple node sets, one node set corresponds to one set summary, and the correlation between the knowledge graph nodes in the same node set is greater than the correlation between the knowledge graph nodes in different node sets; The determining module 702 is used to: Determining the semantic relevance between the set summary corresponding to each node set and the keyword, and determining a target node set having the highest semantic relevance to the keyword from the multiple node sets; Determine the semantic relevance between the node data corresponding to each knowledge graph node in the target node set and the keyword; Based on the semantic relevance between the node data corresponding to each knowledge graph node in the target node set and the keyword, a second knowledge graph node is determined from the target node set, the semantic relevance between the node data corresponding to the second knowledge graph node and the keyword is greater than the semantic relevance between the node data corresponding to other knowledge graph nodes in the target node set except the second knowledge graph node and the keyword, and the target knowledge graph node includes the second knowledge graph node.

[0085] Optionally, the determining module 702 is configured to: For the set summary corresponding to each of the node sets, the set summary is divided into blocks according to a first preset scale to obtain multiple text blocks, the keyword is semantically matched with each text block to obtain the semantic relevance between each text block and the keyword, and the semantic relevance between the set summary and the keyword is determined based on the semantic relevance between each text block and the keyword.

[0086] Optionally, the set digest corresponding to the node set is determined in the following manner: Determine the knowledge graph node with the largest number of associated nodes from the node set as the third knowledge graph node; Performing semantic induction on the node data corresponding to each knowledge graph node in the node set to obtain a set summary corresponding to the node set; Among them, the content used to describe the third knowledge graph node accounts for the largest proportion in the set summary corresponding to the node set.

[0087] Optionally, the determining module 702 is configured to: Perform scene matching in at least one preset scene based on the keyword to obtain a target preset scene, wherein the preset scene corresponds to at least two knowledge graph nodes with a connection relationship in the target knowledge graph; The knowledge graph node corresponding to the target preset scenario is determined as the target knowledge graph node.

[0088] Optionally, the intelligent agent question-answering device 700 further includes: a retrieval module, configured to perform knowledge retrieval in a knowledge database based at least on the keyword to obtain a target knowledge fragment, wherein the target knowledge graph is a structured graph model corresponding to the knowledge database; The generating module 703 is used to: The question-answering model generates an answer corresponding to the target question based on the target question, the target knowledge fragment and the target subgraph.

[0089] Optionally, the retrieval module is used to: Performing knowledge retrieval in the knowledge database based on the node data corresponding to the knowledge graph node in the target subgraph, and obtaining a first knowledge fragment that matches the node data corresponding to the knowledge graph node in the target subgraph; Performing a knowledge search in the knowledge database based on the keyword to obtain a second knowledge fragment matching the keyword; The target knowledge segment is determined based on the first knowledge segment and the second knowledge segment.

[0090] Optionally, the determining module 702 is configured to: Determining, in the target knowledge graph, a fourth knowledge graph node that is associated with the target knowledge graph node and matches the keyword; The target subgraph is determined based on the target knowledge graph node, the fourth knowledge graph node, and the connection relationship between the target knowledge graph node and the fourth knowledge graph node.

[0091] Optionally, the intelligent agent question-answering device 700 further includes a construction module, wherein the construction module is configured to: Acquiring initial knowledge data, where the initial knowledge data includes structured knowledge data and / or unstructured knowledge data; The initial knowledge data is divided into blocks according to a second preset scale to obtain a plurality of knowledge data blocks; Performing knowledge extraction on each knowledge data block to obtain a triple, wherein the triple includes a first entity, a second entity, and a relationship between the first entity and the second entity, or the triple includes a third entity, an attribute corresponding to the third entity, and a relationship between the third entity and the attribute; The target knowledge graph is obtained based on the triples corresponding to each of the knowledge data blocks.

[0092] Optionally, the building block is used to: Rendering a graph based on the triples corresponding to each of the knowledge data blocks to obtain a preview knowledge graph, wherein an entity or attribute in the triple corresponds to a knowledge graph node in the preview knowledge graph, and a relationship in the triple corresponds to an edge between two knowledge graph nodes in the preview knowledge graph; In response to a confirmation operation on the preview knowledge graph, performing node matching in a historical knowledge graph based on the preview knowledge graph; If there is no fifth knowledge graph node matching the preview knowledge graph node in the historical knowledge graph, merging the preview knowledge graph with the historical knowledge graph to obtain the target knowledge graph; When there is a fifth knowledge graph node in the historical knowledge graph that matches the preview knowledge graph node, the knowledge graph node in the preview knowledge graph is fused with the fifth knowledge graph node in the historical knowledge graph to obtain the target knowledge graph.

[0093] Based on the same concept, an embodiment of the present disclosure also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processing device, the steps of the above-mentioned intelligent agent question-answering method based on knowledge graph recall are implemented.

[0094] Based on the same concept, an embodiment of the present disclosure further provides an electronic device, which may include: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned intelligent question-answering method based on knowledge graph recall.

[0095] Based on the same concept, an embodiment of the present disclosure also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned intelligent agent question-answering method based on knowledge graph recall.

[0096] Reference below Figure 8 , which shows a schematic structural diagram of an electronic device 800 suitable for implementing an embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0097] like Figure 8 As shown, electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 802 or programs loaded from a storage device 808 into a random access memory (RAM) 803. RAM 803 also stores various programs and data required for the operation of electronic device 800. Processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to bus 804.

[0098] Typically, the following devices may be connected to the I / O interface 805: an input device 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 808 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0099] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0100] It should be noted that the computer-readable medium described above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. Computer-readable storage media may include, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wire, optical cable, RF (radio frequency), or any suitable combination thereof.

[0101] In some embodiments, communications may be conducted using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.

[0102] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0103] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is enabled to: obtain the target question input by the user on the intelligent interaction page, and extract keywords in the target question, the intelligent interaction page is connected to an intelligent agent, and the intelligent agent is associated with a question-and-answer big model, and the question-and-answer big model is at least used to generate an answer based on the input question and the knowledge graph recalled based on the input question; determine the target knowledge graph node that matches the keyword in the target knowledge graph, and determine the target subgraph at least based on the target knowledge graph node, and the target knowledge graph includes multiple knowledge graph nodes; generate an answer corresponding to the target question through the question-and-answer big model at least based on the target question and the target subgraph.

[0104] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0106] The modules involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module does not necessarily limit the module itself.

[0107] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0108] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fibers, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0109] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the present disclosure is not limited to technical solutions formed by specific combinations of the aforementioned technical features. It also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents, without departing from the scope of the above disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0110] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0111] Although the subject matter has been described using language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the apparatus in the above-described embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method and will not be elaborated upon here.

Claims

1. An intelligent agent question answering method based on knowledge graph recall, characterized in that: The intelligent agent question answering method comprises: Obtaining a target question input by a user on an intelligent interaction page and extracting keywords from the target question, wherein the intelligent interaction page is connected to an intelligent agent, and the intelligent agent is associated with a question-answering model, wherein the question-answering model is used to generate an answer based on the input question and a knowledge graph recalled based on the input question; Determine a target knowledge graph node that matches the keyword in a target knowledge graph, and determine a target subgraph based at least on the target knowledge graph node, wherein the target knowledge graph includes a plurality of knowledge graph nodes; The question-answering model generates an answer corresponding to the target question based at least on the target question and the target subgraph.

2. The intelligent agent question answering method based on knowledge graph recall according to claim 1 is characterized in that: The determining of a target knowledge graph node matching the keyword in the target knowledge graph includes: Determine the semantic relevance between the node data corresponding to each knowledge graph node in the target knowledge graph and the keyword; Based on the semantic relevance between the node data corresponding to each knowledge graph node and the keyword, a first knowledge graph node is determined from the target knowledge graph, wherein the semantic relevance between the node data corresponding to the first knowledge graph node and the keyword is greater than the semantic relevance between the node data corresponding to other knowledge graph nodes of the target knowledge graph except the first knowledge graph node and the keyword, and the target knowledge graph node includes the first knowledge graph node.

3. The intelligent agent question answering method based on knowledge graph recall according to claim 1 is characterized in that: The multiple knowledge graph nodes in the target knowledge graph are divided into multiple node sets, one node set corresponds to one set summary, and the correlation between the knowledge graph nodes in the same node set is greater than the correlation between the knowledge graph nodes in different node sets; The determining of a target knowledge graph node matching the keyword in the target knowledge graph includes: Determining the semantic relevance between the set summary corresponding to each node set and the keyword, and determining a target node set having the highest semantic relevance to the keyword from the multiple node sets; Determine the semantic relevance between the node data corresponding to each knowledge graph node in the target node set and the keyword; Based on the semantic relevance between the node data corresponding to each knowledge graph node in the target node set and the keyword, a second knowledge graph node is determined from the target node set, the semantic relevance between the node data corresponding to the second knowledge graph node and the keyword is greater than the semantic relevance between the node data corresponding to other knowledge graph nodes in the target node set except the second knowledge graph node and the keyword, and the target knowledge graph node includes the second knowledge graph node.

4. The intelligent agent question answering method based on knowledge graph recall according to claim 3 is characterized in that: The determining of the semantic relevance between the set summary corresponding to each node set and the keyword includes: For the set summary corresponding to each of the node sets, the set summary is divided into blocks according to a first preset scale to obtain multiple text blocks, the keyword is semantically matched with each text block to obtain the semantic relevance between each text block and the keyword, and the semantic relevance between the set summary and the keyword is determined based on the semantic relevance between each text block and the keyword.

5. The intelligent agent question answering method based on knowledge graph recall according to claim 3 is characterized in that: The set digest corresponding to the node set is determined as follows: Determine the knowledge graph node with the largest number of associated nodes from the node set as the third knowledge graph node; Performing semantic induction on the node data corresponding to each knowledge graph node in the node set to obtain a set summary corresponding to the node set; Among them, the content used to describe the third knowledge graph node accounts for the largest proportion in the set summary corresponding to the node set.

6. The intelligent agent question answering method based on knowledge graph recall according to any one of claims 1 to 5, characterized in that: The determining of a target knowledge graph node matching the keyword in the target knowledge graph includes: Perform scene matching in at least one preset scene based on the keyword to obtain a target preset scene, wherein the preset scene corresponds to at least two knowledge graph nodes with a connection relationship in the target knowledge graph; The knowledge graph node corresponding to the target preset scenario is determined as the target knowledge graph node.

7. The intelligent agent question answering method based on knowledge graph recall according to any one of claims 1 to 5, characterized in that: The intelligent agent question answering method further includes: Performing knowledge retrieval in a knowledge database based at least on the keyword to obtain a target knowledge fragment, wherein the target knowledge graph is a structured graph model corresponding to the knowledge database; Generating an answer corresponding to the target question based on at least the target question and the target subgraph by the question-answering large model includes: The question-answering model generates an answer corresponding to the target question based on the target question, the target knowledge fragment and the target subgraph.

8. The intelligent agent question answering method based on knowledge graph recall according to claim 7 is characterized in that: The step of performing knowledge retrieval in a knowledge database based at least on the keyword to obtain a target knowledge fragment includes: Performing knowledge retrieval in the knowledge database based on the node data corresponding to the knowledge graph node in the target subgraph, and obtaining a first knowledge fragment that matches the node data corresponding to the knowledge graph node in the target subgraph; Performing a knowledge search in the knowledge database based on the keyword to obtain a second knowledge fragment matching the keyword; The target knowledge segment is determined based on the first knowledge segment and the second knowledge segment.

9. The intelligent agent question answering method based on knowledge graph recall according to any one of claims 1 to 5, characterized in that: The determining of the target subgraph based at least on the target knowledge graph node includes: Determining, in the target knowledge graph, a fourth knowledge graph node that is associated with the target knowledge graph node and matches the keyword; The target subgraph is determined based on the target knowledge graph node, the fourth knowledge graph node, and the connection relationship between the target knowledge graph node and the fourth knowledge graph node.

10. The intelligent agent question answering method based on knowledge graph recall according to any one of claims 1 to 5, characterized in that: The target knowledge graph is constructed as follows: Acquiring initial knowledge data, where the initial knowledge data includes structured knowledge data and / or unstructured knowledge data; The initial knowledge data is divided into blocks according to a second preset scale to obtain a plurality of knowledge data blocks; Performing knowledge extraction on each knowledge data block to obtain a triple, wherein the triple includes a first entity, a second entity, and a relationship between the first entity and the second entity, or the triple includes a third entity, an attribute corresponding to the third entity, and a relationship between the third entity and the attribute; The target knowledge graph is obtained based on the triples corresponding to each of the knowledge data blocks.

11. The intelligent agent question answering method based on knowledge graph recall according to claim 10, characterized in that: The step of obtaining the target knowledge graph based on the triples corresponding to the knowledge data blocks includes: Rendering a graph based on the triples corresponding to each of the knowledge data blocks to obtain a preview knowledge graph, wherein an entity or attribute in the triple corresponds to a knowledge graph node in the preview knowledge graph, and a relationship in the triple corresponds to an edge between two knowledge graph nodes in the preview knowledge graph; In response to a confirmation operation on the preview knowledge graph, performing node matching in a historical knowledge graph based on the preview knowledge graph; If there is no fifth knowledge graph node matching the preview knowledge graph node in the historical knowledge graph, merging the preview knowledge graph with the historical knowledge graph to obtain the target knowledge graph; When there is a fifth knowledge graph node in the historical knowledge graph that matches the preview knowledge graph node, the knowledge graph node in the preview knowledge graph is fused with the fifth knowledge graph node in the historical knowledge graph to obtain the target knowledge graph.

12. An intelligent question-answering device based on knowledge graph recall, characterized in that: The intelligent agent question-answering device comprises: An acquisition module is configured to acquire a target question input by a user on an intelligent interaction page and extract keywords from the target question. The intelligent interaction page is connected to an agent, and the agent is associated with a question-answering model. The question-answering model is configured to generate an answer based on the input question and a knowledge graph retrieved based on the input question. a determination module, configured to determine a target knowledge graph node that matches the keyword in a target knowledge graph, and to determine a target subgraph based at least on the target knowledge graph node, wherein the target knowledge graph includes a plurality of knowledge graph nodes; A generation module is used to generate an answer corresponding to the target question based on at least the target question and the target subgraph through the question-answering model.

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

14. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 11.

15. A computer program product comprising a computer program, 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 11 are implemented.

Citation Information

Patent Citations

  • Automobile knowledge question-answering method and device, electronic device and storage medium

    CN117891911A

  • RAG question and answer method and system based on knowledge graph and medium

    CN118673126A

  • Response enhancement method and device based on RAG technology

    CN119005330A

  • Knowledge graph open domain construction and RAG question and answer method and device and storage medium

    CN119416882A

  • Intelligent question answering system and method based on question decomposition and community semantic search

    CN119537539A

Cited By

  • Method, device and equipment for processing agent data based on knowledge graph

    CN120975116A

  • Methods, apparatus, and equipment for processing intelligent agent data based on knowledge graphs

    CN120975116B

  • Rail transit maintenance knowledge graph construction method, terminal equipment and medium

    CN121257671A

  • Data accurate recall method, device and system based on large model and map

    CN121327194A

  • Dam safety knowledge intelligent question and answer method based on knowledge graph and AI large model

    CN121579624A