A knowledge query method and device, computer equipment and a storage medium
By performing entity retrieval and selection on a local subset of the mapping relationship set, the problem of low efficiency in the global knowledge base is solved, and efficient and accurate knowledge query is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-06-19
AI Technical Summary
In existing technologies, knowledge query methods traverse all entities in the global knowledge base, resulting in low efficiency. Furthermore, the uniform text similarity threshold leads to the omission or redundancy of entities, affecting query accuracy.
By performing entity retrieval on the N first subsets of the mapping relationship set, a clue entity set is obtained, and K second subsets are selected from the M second subsets to generate query results. The answer is then generated using a large language model.
It improves entity retrieval efficiency and query accuracy, avoids omissions or redundant entities, and enables flexible activation of knowledge queries as needed.
Smart Images

Figure CN122240817A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a knowledge retrieval method, apparatus, computer device, and storage medium. Background Technology
[0002] With the continuous development of technology, artificial intelligence models can be deployed in more and more terminal devices to provide diverse question-and-answer functions.
[0003] To enable AI models to answer questions based on facts, a global knowledge base can be introduced into the AI models, allowing them to generate answers based on entities retrieved from the global knowledge base, thus avoiding anomalies such as fabricated answers when answering questions.
[0004] Taking the Retrieval-Augmented Generation (RAG) model as an example, it can combine knowledge query with text generation. Before answering a question, it first performs entity retrieval from the global knowledge base, and then generates the answer to the question based on the retrieval results.
[0005] In related technologies, knowledge retrieval methods typically involve retrieving entities from a unified global knowledge base whose text similarity to the query question is higher than a text similarity threshold for each query question, in order to generate query results for the query question.
[0006] However, on the one hand, since the global knowledge base contains a large number of entities, and each knowledge query process requires traversing all entities in the global knowledge base, the query efficiency for each query question is severely affected. Consequently, when answering multi-hop questions, the answering efficiency is severely affected.
[0007] On the other hand, since a uniform text similarity threshold is used to query entities for different query questions, it is easy to miss entities or retrieve too many redundant entities during knowledge retrieval, thus affecting the accuracy of knowledge retrieval.
[0008] It is evident that the knowledge retrieval process based on relevant technologies has significant limitations. Summary of the Invention
[0009] This application provides a knowledge query method, apparatus, computer device, and storage medium to address the significant limitations of knowledge query processes in related technologies.
[0010] Firstly, a knowledge retrieval method is provided, including: For the query question, based on the query question, entity retrieval is performed on N first subsets of the mapping relationship set to obtain a clue entity set; the mapping relationship set includes: multiple entities representing knowledge content, and various associations between the multiple entities; each first subset includes: a portion of the mapping relationships in the mapping relationship set; the clue entity set includes multiple clue entities, and the multiple clue entities include: entities retrieved from the N first subsets; Based on the set of clue entities, K second subsets are selected from the M second subsets of the mapping relationship set; each second subset contains: a portion of the mapping relationships in the mapping relationship set; the second subsets and the first subsets are subsets extracted in different ways; Based on the set of clue entities and the K second subsets, the query results for the query question are generated.
[0011] Secondly, a knowledge retrieval device is provided, comprising: Processing module: For a query question, based on the query question, performs entity retrieval on N first subsets of the mapping relationship set to obtain a clue entity set; the mapping relationship set includes: multiple entities representing knowledge content, and various associations between the multiple entities; each first subset includes: a portion of the mapping relationships in the mapping relationship set; the clue entity set includes multiple clue entities, and the multiple clue entities include: entities retrieved from the N first subsets; Acquisition module: used to select K second subsets from M second subsets of the mapping relationship set based on the clue entity set; each second subset contains: a portion of the mapping relationships in the mapping relationship set; the second subset and the first subset are subsets extracted in different ways; The processing module is further configured to: generate query results for the query question based on the set of clue entities and the K second subsets.
[0012] Optionally, the M second subsets are extracted using the following method, and the acquisition module is further configured to: Initialize multiple cluster centers; Based on the multiple cluster centers, multiple rounds of clustering are performed on the multiple entities to obtain cluster subsets corresponding to each of the multiple cluster centers; wherein each cluster subset contains at least one entity; in the cluster subset, the semantic membership degree between each entity and the cluster center satisfies a preset semantic clustering condition; Based on each cluster subset, M second subsets are extracted from the set of mapping relationships.
[0013] Optionally, in each round of clustering, the acquisition module is specifically used to perform the following operations: Obtain each cluster center to be updated; wherein, in the first round of clustering, each cluster center to be updated is the cluster center obtained during initialization; in other rounds of clustering, each cluster center to be updated is the updated cluster center obtained in the previous round of clustering; For each cluster center to be updated, the semantic membership degree between each of the multiple entities and the cluster center to be updated is determined, and the cluster center to be updated is adjusted based on the semantic membership degree of each entity that satisfies the preset semantic clustering conditions, so as to obtain the updated cluster center. Based on each updated cluster center, if it is determined that the clustering target has not been reached, the next round of clustering is initiated until it is determined that the clustering target has been reached, at which point the cluster subsets corresponding to each of the multiple cluster centers are generated.
[0014] Optionally, the acquisition module is specifically used for: For each cluster subset, count the number of entities contained in the cluster subset to obtain the first number corresponding to the cluster subset; For the cluster subset whose first number reaches the lower limit of the number of entities, extract the association relationships corresponding to the cluster subset from the mapping relationship set to obtain a second subset.
[0015] Optionally, the N first subsets are extracted using the following method, and the acquisition module is further configured to: Obtain at least one evaluation condition; wherein each evaluation condition is: a semantic evaluation condition, a relational evaluation condition, or a hybrid evaluation condition; the semantic evaluation condition is used to: evaluate the semantic topological degree of the knowledge content semantics of each entity in the mapping relation set; the relational evaluation condition is used to: evaluate the relational topological degree of each mapping relation involved in each entity in the mapping relation set; the hybrid evaluation condition is used to: evaluate the comprehensive topological degree of each entity in the case of a mixture of knowledge content semantics and the mapping relations involved. For each evaluation condition, extract the mapping relationships that satisfy the evaluation condition from the set of mapping relationships to obtain a first subset.
[0016] Optionally, when the evaluation condition is the semantic evaluation condition, the acquisition module is specifically used for: Based on the knowledge semantic features extracted from each of the multiple entities, the semantic center feature of the mapping relationship set is determined; From the plurality of entities, the entity whose feature similarity between the knowledge semantic features and the semantic center features satisfies the semantic evaluation conditions is selected as the semantic hub entity; From the set of mapping relationships, extract the mapping relationships between each semantic hub entity to obtain a first subset.
[0017] Optionally, when the evaluation condition is the relationship evaluation condition, the acquisition module is specifically used for: For each of the plurality of entities, the following steps are performed: Obtain every pair of other entities (excluding the entity itself); for each other entity pair, in the mapping relationship set, obtain each mapping relationship involved in mapping from one other entity to another, thus obtaining the mapping relationship group corresponding to the other entity pair; and from each mapping relationship group, select the mapping relationship group containing the entity as path data, thus obtaining each path data corresponding to the entity; and based on each path data corresponding to the entity, determine the relational hub degree of the entity. From the plurality of entities, select the entity whose relationship hub degree satisfies the relationship evaluation condition as the relationship hub entity; From the set of mapping relationships, extract the mapping relationships between each relationship hub entity to obtain a first subset.
[0018] Optionally, the acquisition module is specifically used for: For each of the plurality of entities, perform the following operations: Entities that have a mapping relationship with the entity are taken as neighboring entities corresponding to the entity. The number of each neighboring entity corresponding to the entity is counted to obtain the second number corresponding to the entity. Count the number of data points for each path corresponding to the entity to obtain the third quantity corresponding to the entity; By combining the second and third quantities corresponding to the entity, the relational pivot degree of the entity is obtained.
[0019] Optionally, when the evaluation conditions are mixed evaluation conditions, the acquisition module is specifically used for: From the plurality of entities, select the entity that does not exist in the second subset of M as the hybrid hub entity; From the set of mapping relationships, extract the mapping relationships between each hybrid hub entity to obtain a first subset.
[0020] Optionally, the processing module is specifically used for: For each of the first subsets, based on the semantic similarity between the query question and each of the plurality of entities, entities whose semantic similarity satisfies the semantic hub condition are retrieved from the first subsets and designated as hub entities; For each hub entity, retrieve an entity that has a mapping relationship with the hub entity from the mapping relationship set, and use it as an extended entity; Each of the hub entities and each of the extended entities is used as a clue entity to obtain a clue entity set.
[0021] Optionally, the acquisition module is specifically used for: For each of the second subsets, determine the knowledge relevance between the set of clue entities and the second subset; From the M second subsets, select the second subsets whose knowledge relevance satisfies the subset activation condition to obtain K second subsets.
[0022] Optionally, the acquisition module is specifically used for: For each of the second subsets, the number of entities that match between the clue entity set and the second subset is counted to obtain the fourth number corresponding to the second subset; By merging the fourth quantities corresponding to each of the M second subsets, a comprehensive quantity is obtained; For each of the second subsets, the knowledge relevance between the set of clue entities and the second subset is determined based on the comprehensive quantity and the fourth quantity corresponding to the second subset.
[0023] Optionally, the processing module is specifically used for: For each of the K second subsets, based on the semantic similarity between the query question and each of the plurality of entities, retrieve entities from the second subset whose semantic similarity satisfies the semantic expert condition, and use them as expert entities to obtain an expert entity set; Take the second subsets other than the K second subsets in the M second subsets as other subsets, and for each other subset, count the number of entities that match between the other subset and the expert entity set to obtain the fifth number corresponding to the other subset; For other subsets where the fifth number reaches the lower limit of the number of cross-experts, retrieve entities whose semantic similarity satisfies the semantic expert condition, and update the expert entity set as expert entities; Based on the set of clue entities and the updated set of expert entities, the query results for the query question are generated.
[0024] Optionally, each entity is extracted from at least one text block; the processing module is specifically used for: From the mapping relationship set, obtain the mapping relationship of each of the multiple clue entities in the clue entity set as a reference relationship, and obtain the mapping relationship of each of the multiple expert entities in the updated expert entity set as a reference relationship; Obtain the text blocks to which each of the multiple clue entities in the clue entity set belongs, as reference text; and obtain the text blocks to which each of the multiple expert entities in the updated expert entity set belongs, as reference text, to obtain the reference text corresponding to each of the reference relationships. Each of the reference relationships and its corresponding reference texts are taken as reference knowledge. Based on the feature similarity between the knowledge features of each of the reference knowledge and the question features of the query question, reference knowledge whose feature similarity satisfies the feature similarity condition is selected from each reference knowledge and used as context content. Using a pre-defined reasoning model, query results are generated based on the context and the query question.
[0025] Optionally, the query question is obtained using the following method, and the processing module is further used for: In response to a query operation targeting a target question, a large language model is used to decompose the target question into a sequence of sub-questions; wherein, the sequence of sub-questions contains multiple sub-questions, and there is a reasoning relationship between every two adjacent sub-questions in the sequence of sub-questions; For each subproblem, the following steps are performed: If the subproblem is the first subproblem in the subproblem sequence, then the subproblem is used as the query problem; if the subproblem is located in another position in the subproblem sequence, then the subproblem that is adjacent to and precedes the subproblem in the subproblem sequence is used as the adjacent subproblem, the query result of the adjacent subproblem is obtained, and the query result of the adjacent subproblem and the subproblem are concatenated to obtain the query problem.
[0026] Optionally, the processing module is further configured to: After obtaining the query results of each of the multiple sub-problems contained in the sub-problem sequence, each sub-problem and its query results are arranged sequentially to generate a reasoning trajectory; Using a large language model, the target answer to the target question is generated based on the target question and the reasoning trajectory.
[0027] Optionally, the mapping relationship set is obtained using the following method, and the processing module is further used for: Based on the preset segmentation granularity, each corpus in the preset corpus is segmented to obtain each text block; Based on a preset entity recognition strategy, entities in each text block are identified, and an entity set corresponding to the preset corpus is established. For each corpus in the preset corpus, based on a preset semantic extraction strategy, the association relationship between each pair of at least two entities involved in the corpus is extracted from the corpus; Based on the entity set and each association, a mapping relationship set is generated.
[0028] Thirdly, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0029] Fourthly, a computer device is provided, comprising: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the method described in the first aspect according to the obtained computer program.
[0030] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program for causing a computer to perform the method as described in the first aspect.
[0031] In this embodiment, entity retrieval is performed only on N local first subsets within the global mapping relationship set, resulting in less data processing involved in each entity retrieval and improving retrieval efficiency. Furthermore, the set of clue entities retrieved from the N first subsets serves as the basis for selecting K second subsets. In other words, the N first subsets act as the foundational anchor points of the mapping relationship set, carrying high-frequency, general, or fundamental knowledge content, or covering core, key, or basic knowledge content. Therefore, for each query, clue entities can be retrieved in parallel from each first subset, effectively ensuring global knowledge coverage during entity retrieval.
[0032] Building upon this foundation, based on the set of clue entities, K subsets are selected from the M subsets. This ensures that the knowledge query process for a given query only activates a portion of the subsets. In other words, the M subsets serve as precise containers for different experts, forming M specialized experts with high knowledge density. Therefore, for each query, only a portion of the subsets can be activated, enabling flexible activation on demand without traversing every subset. This allows for flexible adjustment of the query scope, reducing the amount of data that needs to be traversed while ensuring comprehensive coverage of expert knowledge, thus effectively improving the efficiency of knowledge query.
[0033] Furthermore, by combining the first and second subsets, a knowledge query process is implemented that progresses from shallow to deep, from global roaming to precise local positioning. By selecting K second subsets, in some cases, niche professional knowledge content and low-frequency professional knowledge content in the mapping relationship set are not ignored, or are not overwhelmed by high-frequency knowledge content or mainstream knowledge content with a large number of mapping relationships in the mapping relationship set. This effectively avoids situations such as missing entities or retrieving too many redundant entities, thus helping to improve query accuracy.
[0034] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0035] Figure 1A A schematic diagram of a knowledge query method provided in an embodiment of this application; Figure 1B This is one application scenario of the knowledge query method provided in the embodiments of this application; Figure 2 A flowchart illustrating a knowledge query method provided in an embodiment of this application; Figure 3A A schematic diagram illustrating the principle of the knowledge query method provided in this application embodiment; Figure 3B A schematic diagram of the principle of the knowledge query method provided in the embodiments of this application. Figure 2 ; Figure 4A A schematic diagram three illustrating the principle of the knowledge query method provided in this application embodiment; Figure 4B A schematic diagram four illustrating the principle of the knowledge query method provided in this application embodiment; Figure 5A A schematic diagram five illustrating the principle of the knowledge query method provided in this application embodiment; Figure 5B A schematic diagram six illustrating the principle of the knowledge query method provided in this application embodiment; Figure 6A A schematic diagram seven illustrating the principle of the knowledge query method provided in the embodiments of this application; Figure 6B A schematic diagram of the principle of the knowledge query method provided in the embodiments of this application. Figure 8 ; Figure 6C A schematic diagram of the principle of the knowledge query method provided in the embodiments of this application. Figure 9 ; Figure 7A A schematic diagram ten illustrating the principle of the knowledge query method provided in this application embodiment; Figure 7B 11. A schematic diagram illustrating the principle of the knowledge query method provided in this application embodiment; Figure 7C A schematic diagram twelve illustrating the principle of the knowledge query method provided in this application embodiment; Figure 7D A schematic diagram thirteen illustrating the principle of the knowledge query method provided in this application embodiment; Figure 8 A schematic diagram of the structure of a knowledge query device provided in the embodiments of this application; Figure 9 A schematic diagram of the structure of the knowledge query device provided in the embodiments of this application. Figure 2 . Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0037] The following explanations of some terms used in the embodiments of this application are provided to facilitate understanding by those skilled in the art.
[0038] (1) Graph Retrieval-Augmented Generation (GraphRAG) model: The GraphRAG model is a large model enhancement framework that integrates knowledge graphs and Retrieval-Augmented Generation (RAG) technologies. It can transform unstructured text into a graph structure of entities and relationships, enabling large models to reason based on relationships rather than relying solely on text similarity retrieval. This can significantly improve the accuracy of complex question answering, multi-hop reasoning, and fact-finding.
[0039] (2) Knowledge Graph: A knowledge graph is a knowledge base that uses a graph structure to represent and store knowledge. A knowledge graph consists of entities and edges, and can refine scattered and messy information into a network structure connected by points and lines.
[0040] An entity can represent something that exists in the real world or something that exists in the virtual world; an edge can represent a logical relationship between two entities. Entities can also be associated with attributes, which represent descriptive information about the entity.
[0041] (3) Large Language Model (LLM): LLM refers to a deep learning model trained on massive amounts of text data, containing an extremely large number of model parameters (typically ranging from billions to trillions). The core capability of LLM lies in understanding and generating natural language.
[0042] LLMs typically employ a Transformer architecture, using an attention mechanism to enable the model to dynamically focus on the importance of different parts of the input text based on the context.
[0043] (4) Fuzzy C-Means Clustering (FCM): FCM (Fixed Squared Clustering) is a soft clustering algorithm that allows a data point to belong to multiple clusters simultaneously with varying membership degrees. Each point has a membership degree between 0 and 1 for each cluster, and the sum of the membership degrees of all clusters is 1. The membership degree represents the degree to which the data point belongs to a particular cluster. The objective function of FCM is to minimize the weighted sum of squared distances, where the weights are the m-th power of the membership degree (m>1, usually 2), and the distances are the distances between the data point and the clusters. The goal is to minimize the distance between the data point within a cluster and the cluster center, while ensuring a reasonable distribution of membership degrees. This is achieved by alternately updating the membership degree matrix and cluster centers until convergence.
[0044] It should be noted that, in the embodiments of this application, operations involving query questions and query results, when applied to specific products or technologies, require user permission or consent, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0045] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0046] The application areas of the knowledge query method provided in the embodiments of this application will be briefly introduced below.
[0047] With the continuous development of technology, artificial intelligence models can be deployed in more and more terminal devices to provide diverse question-and-answer functions.
[0048] To enable AI models to answer questions based on facts, a global knowledge base can be introduced into the AI models, allowing them to generate answers based on entities queried from the global knowledge base, thus avoiding anomalies such as fabricated answers when answering questions.
[0049] Taking the Retrieval-Augmented Generation (RAG) model as an example, it can combine knowledge query with text generation. Before answering a question, it first performs entity retrieval from the global knowledge base, and then generates the answer to the question based on the retrieval results.
[0050] Please refer to Figure 1AAfter inputting a target question, "How long did A work at company B?" into the large language model, the answer is no longer solely based on knowledge learned during training. For example, if the large language model did not learn A's work experience during training, it might fabricate an answer, such as "A has never worked at company B." Instead, it first performs entity retrieval in an external knowledge base. For example, A's start date at company B is: xx / xx / 20xx; his departure date is: xx / xx / 20xx. Then, the retrieved entities are input into the large language model, which generates the final answer based on the target question and the entities, such as "A worked at company B for nearly 10 months."
[0051] The following section uses three knowledge query domains as examples to introduce the topic; other domains will not be listed here.
[0052] I. Enterprise Management Field
[0053] In enterprises, there are often problems such as documents being scattered across various storage devices, creating information silos; there are also problems such as not being able to find relevant information through keyword searches; and there are also problems such as business knowledge systems being difficult to understand and new employees not being able to quickly master them.
[0054] External knowledge bases can integrate diverse data such as enterprise technical manuals, meeting minutes, case studies, and employee training materials. By processing PDF documents with OCR, external corpora can be imported into external knowledge bases in batches to form self-organizing knowledge communities. It can also support the automatic association of newly added documents.
[0055] When inputting a target question, the system can perform a thorough search of enterprise knowledge in an external knowledge base to generate the final answer to the target question. This helps to quickly link document information stored on different storage devices, avoiding the problem of information silos and helping the technical support team to quickly resolve customer issues. It can also link multiple pieces of information in the context when answering the target question to ensure the accuracy of the answer. At the same time, it can effectively answer various questions in the business knowledge system, helping new employees to quickly master it.
[0056] II. Areas of Professional Knowledge
[0057] When dealing with documents involving professional knowledge, such as contracts, test questions, and medical reports, there may be problems such as difficulty in understanding, inability to quickly and comprehensively verify them, and inability to detect risks in a timely manner.
[0058] External knowledge bases can integrate data such as documents, books, and cases from various professional fields, such as complete contract templates and risk point documents; they can also integrate past exam questions and detailed explanations, as well as knowledge systems from professional books; and they can integrate publicly available information such as medical knowledge, medical reports, and medical papers.
[0059] When inputting a target question, users can conduct extensive professional knowledge searches in external knowledge bases to generate a final answer. For example, they can search for relevant regulations related to contract clauses, refer to relevant precedents, and analyze the risks inherent in the contract clauses; or they can search for past exam questions, refer to the knowledge system in professional books, and analyze key review content; or they can search for medical knowledge, refer to medical papers, and analyze the direction of medical development. This allows for more professional and specialized answers.
[0060] III. Multimedia Field
[0061] In multimedia platforms (such as e-commerce platforms, short video platforms, comic platforms, etc.), there is usually a lot of data on user viewing, purchasing, liking, and commenting. It is difficult for users to search for multimedia content that meets their needs, and it is also difficult for multimedia platforms to accurately recommend multimedia content to users.
[0062] External knowledge bases can be used to integrate data from authorized users across various multimedia platforms, such as shopping data from e-commerce platforms, likes data from short video platforms, and viewing data from comic platforms.
[0063] When inputting a target question, a thorough query of preference knowledge can be performed in an external knowledge base to generate the final answer to the target question. For example, when searching for a certain type of product on an e-commerce platform, user likes on short video platforms and viewing data on comic platforms can be queried to analyze user preferences for that type of product, thereby providing targeted product recommendations and reasons for the recommendations, avoiding situations where users cannot find satisfactory products for a long time.
[0064] The above are just a few examples of application areas. There are many other areas, such as risk management analysis in the financial field and equipment management analysis in the equipment management field. Multiple application areas can also be combined, but they will not be listed here.
[0065] In related technologies, knowledge retrieval methods typically involve retrieving entities from a unified global knowledge base whose text similarity to the query question is higher than a text similarity threshold for each query question, in order to generate query results for the query question.
[0066] However, on the one hand, since the global knowledge base contains a large number of entities, and each knowledge query process requires traversing all entities in the global knowledge base, the query efficiency for each query question is severely affected. Consequently, when answering multi-hop questions, the answering efficiency is severely affected.
[0067] On the other hand, since a uniform text similarity threshold is used to query entities for different query questions, it is easy to miss entities or find too many redundant entities when querying knowledge, thus affecting the accuracy of knowledge query.
[0068] It is evident that the knowledge retrieval process based on relevant technologies has significant limitations.
[0069] In view of this, in order to address the significant limitations of knowledge retrieval processes in related technologies, this application proposes a knowledge retrieval method. In this method, for each query question, firstly, based on the query question, entity retrieval is performed on each of the N first subsets of the mapping relationship set to obtain a clue entity set. The mapping relationship set contains: multiple entities representing knowledge content, and the various relationships between these entities; each first subset contains: a portion of the mapping relationships in the mapping relationship set; the clue entity set contains multiple clue entities, and each clue entity contains entities retrieved from the N first subsets.
[0070] Then, based on the clue entity set, K second subsets are selected from the M second subsets of the mapping relation set. Each second subset contains: a portion of the mapping relations in the mapping relation set; the second subset and the first subset are subsets extracted in different ways. Finally, based on the clue entity set and the K second subsets, query results for the query question are generated.
[0071] In this embodiment, entity retrieval is performed only on N local first subsets within the global mapping relationship set, resulting in less data processing involved in each entity retrieval and improving retrieval efficiency. Furthermore, the set of clue entities retrieved from the N first subsets serves as the basis for selecting K second subsets. In other words, the N first subsets act as the foundational anchor points of the mapping relationship set, carrying high-frequency, general, or fundamental knowledge content, or covering core, key, or basic knowledge content. Therefore, for each query, clue entities can be retrieved in parallel from each first subset, effectively ensuring global knowledge coverage during entity retrieval.
[0072] Building upon this foundation, based on the set of clue entities, K subsets are selected from the M subsets. This ensures that the knowledge query process for a given query only activates a portion of the subsets. In other words, the M subsets serve as precise containers for different experts, forming M specialized experts with high knowledge density. Therefore, for each query, only a portion of the subsets can be activated, enabling flexible activation on demand without traversing every subset. This allows for flexible adjustment of the query scope, reducing the amount of data that needs to be traversed while ensuring comprehensive coverage of expert knowledge, thus effectively improving the efficiency of knowledge query.
[0073] Furthermore, by combining the first and second subsets, a knowledge query process is implemented that progresses from shallow to deep, from global roaming to precise local positioning. By selecting K second subsets, in some cases, niche professional knowledge content and low-frequency professional knowledge content in the mapping relationship set are not ignored, or are not overwhelmed by high-frequency knowledge content or mainstream knowledge content with a large number of mapping relationships in the mapping relationship set. This effectively avoids situations such as missing entities or retrieving too many redundant entities, thus helping to improve query accuracy.
[0074] The application scenarios of the knowledge query method provided in this application are described below.
[0075] Please refer to Figure 1B This is a schematic diagram illustrating an application scenario of the knowledge query method provided in this application. The application scenario includes a server 101 and a client 102. The server 101 and client 102 can communicate with each other. The communication method can be wired, such as through a network cable or serial cable; or wireless, such as through Bluetooth or Wi-Fi. No specific limitation is imposed.
[0076] Client 102 generally refers to devices that can trigger the generation of query questions, display query results or answers, such as terminal devices, third-party applications accessible by terminal devices, or web pages accessible by terminal devices. Server 101 generally refers to devices with knowledge query capabilities, such as terminal devices or servers.
[0077] Terminal devices include, but are not limited to, mobile phones, computers, smart medical devices, smart home appliances, vehicle terminals, or aircraft. Servers include, but are not limited to, cloud servers, local servers, or associated third-party servers. Both server 101 and client 102 can use cloud computing to reduce the use of local computing resources; similarly, they can also use cloud storage to reduce the use of local storage resources.
[0078] As one embodiment, the server 101 and the client 102 can be the same device or different components of the same device, or they can be different devices, or they can be different devices with some modules shared, etc., and there are no specific restrictions.
[0079] Before knowledge retrieval, server 101 pre-extracts M second subsets and N first subsets from the mapping relationship set.
[0080] During knowledge retrieval, client 102 responds to the answer operation triggered by the target question by sending the target question to server 101. Server 101 breaks down the target question into multiple sub-questions, forming a sequence of sub-questions; according to the order of each sub-question in the sequence, it sequentially combines the query results of each sub-question with the previous sub-question as the query question to perform knowledge retrieval and obtain the query results for the query question.
[0081] Whenever a query is received, server 101 first performs entity retrieval on N first subsets to obtain a set of clue entities. Then, based on the set of clue entities, it selects K second subsets from M second subsets and performs entity retrieval on each to obtain a set of expert entities. Server 101 then generates the query results for the query based on the set of clue entities and the set of expert entities.
[0082] Server 101 generates the target answer to the target question based on the target question, the sub-questions in the sub-question sequence, and their respective query results. Server 101 returns the target answer to client 102. Client 102 receives and presents the target answer sent by server 101, thus completing the knowledge query process for the target question.
[0083] The following is based on Figure 1B The knowledge query method provided in the embodiments of this application will be described in detail.
[0084] It should be noted that, for the knowledge query method provided in the embodiments of this application, the executing entity can be a computer device, and the specific form of the computer device can be as follows: Figure 1B The application does not restrict the server 101 or client 102 shown.
[0085] Please refer to Figure 2 This is a flowchart illustrating a knowledge query method provided in an embodiment of this application.
[0086] S201, For the query problem, based on the query problem, perform entity retrieval on the N first subsets of the mapping relationship set to obtain the clue entity set.
[0087] Before starting a knowledge query on a set of mapping relationships, you can first extract N first subsets and M second subsets from the set of mapping relationships for use in the subsequent knowledge query process.
[0088] The following sections will introduce the mapping relationship set, the second subset, and the first subset respectively.
[0089] Set of mapping relationships: The mapping set contains a large number of mappings, each representing two entities and the relationships between them. Entities represent knowledge content. In other words, the mapping set contains multiple entities representing knowledge content, and the various relationships between these entities.
[0090] An entity can represent a thing, such as an event, place, time, topic, object, person, equipment, company, theory, phenomenon, concept, indicator, clause, symptom, part, etc., which will not be listed here. There are many types of relationships, such as causal relationship, adversative relationship, subordinate relationship, spatiotemporal relationship, social relationship, transaction relationship, action relationship, etc., which will not be listed here.
[0091] For example, in the field of knowledge encyclopedia, a mapping relationship can represent the association between person A and place B, indicating that person A was born in place B. In the financial field, a mapping relationship can represent the association between company C and company D, indicating that company C acts as a guarantor for company D's loan. In the medical field, a mapping relationship can represent the association between disease E and symptom F, indicating that a complication of disease E is symptom F. In the legal field, a judgment document G and legal provision H represent the association that judgment document G is based on legal provision H. In the industrial manufacturing field, a mechanical structure I and mechanical structure J represent the association that mechanical structure I contains mechanical structure J. In the education field, a homeroom teacher K and student L represent the association that student L belongs to the class taught by homeroom teacher K. In the e-commerce field, a user M and product N represent the association that user M has added product N to their cart.
[0092] Each mapping relationship can also include attribute information for each entity. For example, when the entity is a person, the attribute information may include name, date of birth, height, weight, and contact information. Similarly, when the entity is equipment, the attribute information may include equipment number, equipment name, equipment status, and remarks. For example, when the entity is a company, the attribute information may include establishment date, company type, number of employees, and contact information. For example, when the entity is a financial account, the attribute information may include account type, account opening date, risk level, and account status. For example, when the entity is a disease, the attribute information may include disease number, severity, cure rate, treatment period, and infectivity. For example, when the entity is a commodity, the attribute information may include commodity price, commodity material, shelf life, and inventory. For example, when the entity is an event, the attribute information may include the time of occurrence, location of occurrence, and number of people involved. Attribute information can also be vectors, semantic features, evaluation values, etc., which are not listed here.
[0093] The mapping relationship set can be represented in the form of a knowledge graph, a data table, a key-value pair, a combination of entity tables and relationship tables, or a tree structure, etc., without any specific limitation. In this embodiment, a mapping relationship set in the form of a knowledge graph will be used as an example.
[0094] Please refer to Figure 3A Let be a set of mapping relationships in the form of a knowledge graph, where each entity node represents an entity and each edge represents an association. For the target question "What kind of fruit might a plant suitable for growing in a sunny environment produce?", by querying the set of mapping relationships, we can obtain the triples (mapping relationships) "rose - suitable for growth - sunny environment" and "sunflower - produces - sunflower seeds". Based on this, we can derive the target answer: "The plant suitable for growing in a sunny environment is the sunflower, which produces edible sunflower seeds."
[0095] The mapping relationship set can be downloaded from online resources, extracted from external corpora, or integrated based on a large number of entities and their relationships, etc., without any specific restrictions.
[0096] External corpora can contain a large amount of data, such as documents like PDF manuals, Word reports, PPTs, papers, novels, and contract texts; web pages like encyclopedia pages, news releases, industry news, and blog posts; structured text types like table data converted to text and descriptive text exported from databases; authorized records, historical dialogue logs, and device operation logs; professional field materials like medical literature, regulatory documents, industry standards, and product manuals; custom knowledge bases; and so on, not all of which are listed here.
[0097] When the query results are obtained using a large language model, the external corpus refers to the text dataset that the large language model does not internalize and needs to be imported. It serves as an external source of knowledge for the large language model, rather than the parameterized internal knowledge learned by the model's parameters. Therefore, even if the large language model did not learn certain knowledge during training, it can obtain it by importing the external corpus, thus avoiding anomalies such as fabricated answers and improving question-answering accuracy. Furthermore, the corpus in the external corpus can be updated at any time (e.g., added, deleted, modified) without retraining the large language model, ensuring the timeliness of the knowledge.
[0098] The set of mapping relationships extracted from external corpora can ensure that each entity and mapping relationship can be located in the original corpus (e.g., original documents, original logs, etc.), which helps to generate interpretable and verifiable target answers for the target question, improves the accuracy of question answering, and avoids large language models or agents from fabricating or guessing answers.
[0099] The following example illustrates the process of extracting a set of mapping relations from an external corpus. Please refer to [link / reference]. Figure 3B .
[0100] S201-1, based on the preset segmentation granularity, segments each corpus in the preset corpus to obtain each text block.
[0101] Considering that large language models or intelligent agent models have a maximum input length (e.g., 4,000 tokens, 8,000 tokens, or 32,000 tokens), a preset segmentation granularity can be set based on the maximum input length. Based on this preset granularity, each corpus in the preset corpus is segmented to obtain text blocks. By segmenting corpora containing many or long sentences, text blocks can be the smallest semantically complete text units, without exceeding the maximum input length. A text block can be an atomic declarative sentence, used to describe a fact, event, or topic.
[0102] The preset segmentation granularity can describe a segmentation strategy, such as segmenting according to punctuation marks; segmenting according to syntactic integrity; segmenting according to semantic integrity; segmenting according to the range of character counts; segmenting according to chapter titles, paragraphs, etc.; and so on, without any specific restrictions.
[0103] Each corpus is divided into multiple text blocks, which can avoid omissions when extracting entities and mapping relationships. At the same time, processing text blocks with smaller data volumes can also improve extraction efficiency. Figure 3B The text uses three text blocks from the field of artificial intelligence technology as examples for demonstration. Text block 1 is "DiT model is a diffusion model based on Transformer architecture, mainly used for image generation and video editing tasks, and can capture fine-grained features of images"; text block 2 is "CLIP model is a multimodal pre-trained model that can achieve cross-modal matching of images and text, and is often used as a feature extractor"; and text block 3 is "GraphRAG model is an enhanced architecture that combines knowledge graph and RAG technology".
[0104] Before segmentation, the corpus in the preset corpus can be preprocessed. For example, deduplication can be performed to keep only one corpus for multiple corpora with semantic repetition; format conversion can be performed to convert corpora in various data formats (images, audio, animation, gestures) into text format to reduce the difficulty of data processing; and filtering can be performed to remove interfering information (such as advertisements, HTML tags, special symbols, etc.) from the corpus to ensure the semantic coherence of the corpus.
[0105] After segmentation, a block identifier can be generated for each text block to uniquely represent each text block. This helps to establish the correspondence between entities and text blocks, which can then serve as the basis for reasoning to arrive at the target answer.
[0106] S201-2, based on a preset entity recognition strategy, identifies entities in each text block and establishes an entity set corresponding to a preset corpus.
[0107] Taking knowledge graphs as an example, a multi-stage prompting-driven LLM extraction pipeline can be used to transform unstructured text blocks into structured triples. Through few-shot or CoT (Cooperation of Thought) prompts, the large model (e.g., GPT-4o, Qwen 2 72B, Llama 3 70B, etc.) is explicitly informed of the entity types (such as people, places, organizations, works, concepts, events, etc.) to be identified, and a format example is provided. The large model can then scan the text blocks sentence by sentence, locate all entities that match the type definition, and label their types.
[0108] Next, the same entity that appears repeatedly within the same text block is merged, and the large model outputs a confidence score (e.g., between 0 and 1) for each entity, filtering out suspected noise entities with low confidence scores (e.g., values < 0.7). Simultaneously, for entities with polysemous meanings, the semantic orientation of the entity is preliminarily determined by combining the contextual information in the text block and the entity type.
[0109] For example, given the text block "Actor A starred in movie B, and the story in the movie takes place in location C", LLM can identify multiple entities, including "Actor A", "Movie B", and "Location C".
[0110] Figure 3B In the text block, multiple entities are identified from three text blocks. Entities such as "DiT model", "Transformer architecture", "diffusion model", "image generation task", and "video editing task" are identified from text block 1. Entities such as "CLIP model", "multimodal pre-trained model", "cross-modal matching", and "feature extractor" are identified from text block 2. Entities such as "GraphRAG model", "knowledge graph", and "RAG technology" are identified from text block 3.
[0111] S201-3, for each corpus in the preset corpus, based on the preset semantic extraction strategy, extract the relationship between each pair of entities in at least two entities involved in the corpus.
[0112] When extracting relationships, they can be extracted from the corpus or from text blocks; there are no specific restrictions.
[0113] For example, based on the identified entities (entity sets), large models can pair semantically related entity pairs in text blocks, extract the corresponding relationships, and generate triples in the format of (head entity, relationship, tail entity), thus obtaining the mapping relationship between every two entities. Large models can also output a confidence score for each triple, reflecting the explicitness of the relationship in the text block.
[0114] The same entity can exist in multiple mapping relationships. For example, actor A can be associated with the lead actor in movie B, and actor A can also be associated with the birthplace of location D.
[0115] For example, for the text block "Actor A starred in movie B, and the story in the movie takes place in location C", LLM can extract the association between "Actor A" and "movie B" as "starring", and extract the association between "movie B" and "location C" as "story takes place".
[0116] Extracting relationships based on entity sets avoids extracting relationships without corresponding entities, thus improving extraction accuracy.
[0117] Figure 3B In the text block, multiple relationships were identified from three text blocks. From text block 1, the relationships between "DiT model" and "diffusion model" were identified as "a kind of", "DiT model" and "Transformer architecture" were identified as "based on", "DiT model" and "image generation task" were identified as "applied to", and "DiT model" and "video editing task" were identified as "applied to". From text block 2, the relationships between "CLIP model" and "multimodal pre-trained model" were identified as "a kind of", "CLIP model" and "cross-modal matching" were identified as "implementation", and "CLIP model" and "feature extractor" were identified as "applied to". From text block 3, the relationships between "GraphRAG model" and "knowledge graph" were identified as "integrated", and "GraphRAG model" and "RAG technology" were identified as "integrated".
[0118] S201-4, Based on the entity set and each association relationship, generate a set of mapping relationships.
[0119] When the mapping relationship set is in the form of a knowledge graph, triples can be created based on entity sets and each association relationship to generate the mapping relationship set.
[0120] For example, after obtaining the association between "Actor A" and "Movie B" as "lead actor" and the association between "Movie B" and "Location C" as "story location", a triple (Actor A, Lead actor, Movie B) can be established as a mapping relationship, and a triple (Movie B, Story location, Location C) can also be established as a mapping relationship.
[0121] Continue with Figure 3B For example, using the identified entities as nodes and the identified relationships as edges, a set of triples is established to obtain a knowledge graph as a set of mapping relationships (not shown in the figure).
[0122] Optionally, after generating the mapping relationship set, a correspondence set between entities and text blocks can also be established. Thus, each entity or each mapping relationship can be traced back to the original corpus, which is convenient for verification, interpretation, etc. In subsequent knowledge queries, all text blocks containing a certain entity can be quickly recalled to supplement the contextual evidence when generating the final answer.
[0123] The mapping relationship set can be stored in a graph database to support efficient subgraph queries, path traversal, and neighborhood expansion; it can also be stored in triples to adapt to lightweight knowledge query scenarios.
[0124] Continue with Figure 3B For example, please refer to Table 1, which is a set of correspondences. In the entity column, each cell can contain either an entity identifier or the content of an entity; in the text block column, each cell can contain either a text block identifier or the content of a text block.
[0125] Table 1
[0126] Optionally, after obtaining the set of mapping relationships, the knowledge semantic features of each entity and the relational semantic features of each mapping relationship can be extracted for use in subsequent knowledge queries. Obtaining the set of mapping relationships, the knowledge semantic features of each entity, and the relational semantic features of each mapping relationship in advance before knowledge query is equivalent to preparing for the query offline, without occupying the computing resources of online knowledge query. This allows the knowledge to be obtained directly during the knowledge query process (i.e., in the online query state), which helps to ensure the efficiency of knowledge query.
[0127] Feature extraction can be achieved using trained feature extraction models, such as text embedding models, such as BGE-M3, E5-v7, Contriever, etc.; or graph-aware embedding models; and so on, without any specific restrictions.
[0128] Knowledge semantic features and relational semantic features can be generated according to fixed feature dimensions to reduce the processing difficulty during subsequent feature processing. Fixed feature dimensions are, for example, 768 dimensions or 1024 dimensions.
[0129] The knowledge semantic features of an entity are used to describe the semantics expressed by the entity. The knowledge semantic features of an entity can be extracted from the text block in which the entity is located; they can also be extracted from neighboring entities that have a mapping relationship with the entity; they can also be extracted from the entity's attribute information; or they can be extracted by combining multiple pieces of information associated with the entity; and so on, without any specific restrictions.
[0130] For example, graph neural networks (such as GNN, GAT, and GraphSAGE models) can be used to aggregate the embedding vectors of an entity's first- or second-order neighboring entities to obtain structure-aware entity vectors. Specifically, this can involve first calculating the embedding vector for each entity based on text blocks or attribute information; then, for each entity, collecting the embedding vectors of its first- or second-order neighboring entities; and finally, using a GNN model to weight and fuse the entity's embedding vector with the embedding vectors of its neighboring entities to obtain the entity's knowledge-based semantic features. The weights can be determined based on the entity's confidence level or the weights assigned to each relationship, etc., without specific limitations.
[0131] The semantic features of mapping relationships are used to describe the semantics expressed by the mapping relationship. Extracting these semantic features can be done based on the text block containing the mapping relationship, the attribute information of the two entities involved, or a weighted fusion of the knowledge semantic features of the two entities and the semantic features of the association relationships, etc. There are no specific restrictions. The weights can be determined based on the confidence level of the entities or the weights assigned to each association relationship, etc., and there are no specific restrictions.
[0132] The semantic features of an entity’s knowledge and the semantic features of its mapping relationships can be stored in a feature database or as attribute information in a mapping relationship set, without any specific restrictions.
[0133] Continue with Figure 3BFor example, the knowledge semantic features of the entity "DiT model" can be [0.123, 0.456, 0.789, 0.234, 0.567, ...] (a total of 768-dimensional embedding vectors); the knowledge semantic features of the entity "CLIP model" can be [0.345, 0.678, 0.901, 0.345, 0.678, ...] (a total of 768-dimensional embedding vectors), etc.
[0134] The relational semantic features of triples can be determined by fusing the knowledge semantic features of the head entity, the data semantic features of the association, and the knowledge semantic features of the tail entity, such as weighted summation, dot product, attention mechanism, etc., without any specific restrictions.
[0135] By transforming unstructured corpora into reasonable topological networks, a foundation can be provided for subsequent multi-hop relational reasoning.
[0136] Second Subset: Each second subset is a local subset of mappings extracted from the global set of mappings, and each second subset contains multiple mappings.
[0137] Each second subset represents a subject knowledge scope, or a professional knowledge scope, hereinafter collectively referred to as the expert knowledge scope. Therefore, the entities included in each mapping relationship within the same second subset belong to an expert knowledge scope. An expert knowledge scope represents the knowledge coverage of an expert; entities belonging to an expert knowledge scope fall within that expert's knowledge coverage and are associated with that expert. The second subset is equivalent to an expert who understands all the professional knowledge content in that expert's domain.
[0138] The same entity can exist in different second subsets; that is, an entity can belong to multiple second subsets simultaneously. For example, a multimedia account can be associated with a sports expert as well as an education expert.
[0139] The second subset can have the same form as the mapping relation set, such as both being in the form of a knowledge graph; or it can have a different form than the mapping relation set, such as the second subset being in the form of a knowledge graph and the mapping relation set being in the form of a data table; and so on, with no specific restrictions.
[0140] There are several methods to extract M second subsets from a set of mapping relationships. Two of them are introduced below as examples. Other extraction methods will not be listed here.
[0141] Extraction Method 1: Considering that semantically related entities have higher feature similarity in the feature space, they can be identified as belonging to the same second subset. Therefore, fuzzy clustering can be used to first identify the entities belonging to a second subset, and then extract the mapping relationships of these entities from the mapping relationship set to obtain a second subset, continuing the process... Figure 3B For example, please refer to Figure 4A .
[0142] S201-A, initialize multiple cluster centers.
[0143] Multiple cluster centers can be initialized according to a preset number, for example, K. Considering that the experts are unknown at the beginning of clustering, the preset number K can be set to a relatively large value, i.e., K is not less than the number of second subsets to be extracted. For example, if the number of second subsets to be extracted is 8-15, then K can be set to 20, 30, or 40, etc., so that subsequent second subsets that meet the requirements can be obtained by eliminating cluster centers and their corresponding cluster subsets.
[0144] A cluster center represents a location in the feature space. For example, a cluster center can be a semantic feature, an embedding vector, etc., without any specific restrictions.
[0145] Figure 4A In the example, if the preset number K is set to 8, then 8 cluster centers are initialized. Based on the subdivision requirements of the topic, it is expected that 3 to 4 first mapping subgraphs will be retained in the end. Therefore, K=8 is much larger than the expected number of retentions, leaving sufficient space for cluster optimization.
[0146] The objective function is defined as: minimizing the Euclidean distance between the knowledge semantic features of entities within the same cluster subset, and maximizing the Euclidean distance between the knowledge semantic features of entities in different cluster subsets. A fuzzy coefficient m=2 is set to allow an entity to belong to multiple cluster subsets.
[0147] S201-B, based on multiple cluster centers, performs multiple rounds of clustering on multiple entities contained in the mapping relationship set to obtain cluster subsets corresponding to each of the multiple cluster centers.
[0148] After obtaining multiple cluster centers, multiple rounds of clustering can be performed on the entities contained in the mapping relationship set based on these centers to obtain cluster subsets corresponding to each of the multiple cluster centers. The clustering goal of multi-round clustering is to make entities within the same cluster subset more compact in the feature space, while entities between different cluster subsets are more sparse in the feature space. Therefore, in each round of clustering, the cluster centers can be adjusted according to the compactness of each entity with each current cluster center in the feature space, and the next round of clustering can proceed based on the adjusted cluster centers.
[0149] Each cluster subset contains at least one entity. During multiple rounds of clustering, if a cluster center does not contain any entities that are compact with it in the feature space, then that cluster center can be automatically eliminated.
[0150] For each cluster subset obtained in the final clustering subset, the semantic membership degree between each entity in the cluster subset and the cluster center satisfies the preset semantic clustering conditions.
[0151] Taking fuzzy C-means clustering as an example, each entity can belong to different cluster centers with different semantic membership degrees. In other words, each entity can belong to different cluster centers with different probabilities. For instance, an entity might have a semantic membership degree of 0.78 with cluster center A, 0.18 with cluster center B, and almost 0 with other cluster centers. Through multiple rounds of clustering, the semantic membership degree of an entity belonging to a particular cluster center can be made much greater than its semantic membership degree to any other cluster center; the difference in semantic membership degrees between entities belonging to multiple cluster centers can be kept below a threshold; and so on. This allows for the creation of second subsets with varying degrees of overlap to suit different application scenarios.
[0152] The following provides examples of each round of clustering.
[0153] After entering a clustering process, the first step is to obtain the cluster centers to be updated. In the first round of clustering, the cluster centers to be updated are the cluster centers obtained during initialization; in other rounds of clustering, the cluster centers to be updated are the cluster centers updated in the previous round of clustering.
[0154] Then, for each cluster center to be updated, the semantic membership degree between each entity in the mapping relationship set and the cluster center to be updated is determined.
[0155] Semantic membership represents the degree of compactness, distance, or feature similarity between an entity and the cluster center to be updated in the feature space. For example, after obtaining the knowledge semantic features of each entity based on the above introduction, the feature similarity (e.g., Euclidean distance, cosine similarity, attention mechanism, etc.) between the knowledge semantic features of each entity and the cluster center to be updated can be calculated as semantic membership.
[0156] Therefore, a semantic membership vector can be obtained for each entity, where each vector element represents the semantic membership between the entity and a cluster center to be updated. If each cluster center to be updated has been eliminated in multiple rounds of clustering, its corresponding vector element can be set to zero.
[0157] The sum of all vector elements in the semantic membership vector can be 1 or any other value; there are no specific restrictions.
[0158] Next, for each cluster center to be updated, the cluster centers to be updated are adjusted based on the semantic membership degree of each entity that satisfies the preset semantic clustering conditions, so as to obtain the updated cluster centers.
[0159] Semantic clustering conditions can represent that the semantic membership degree between an entity and a cluster center to be updated is greater than the semantic membership degree between the entity and any other cluster center to be updated; they can also represent that the semantic membership degree between an entity and a cluster center to be updated is greater than a preset membership degree threshold; they can also represent that the semantic membership degree between an entity and a cluster center to be updated ranks higher than a preset ranking among all semantic membership degrees between entities and this cluster center to be updated; and so on, without any specific restrictions.
[0160] Entities whose semantic membership satisfies the preset semantic clustering conditions are considered to belong to the cluster center to be updated in this round of clustering. Based on the knowledge semantic features of these entities, the cluster center to be updated can be adjusted so that these entities and the updated cluster center are more compact in the feature space. This makes the entities more compact in the feature space, thus quickly satisfying the clustering objective and obtaining each cluster subset.
[0161] For example, when a semantic membership vector is obtained for each entity, the vector elements that satisfy the semantic clustering conditions can be determined for each semantic membership vector, thereby determining the cluster center to which the entity belongs and participating in the adjustment of the cluster center to be updated.
[0162] If there is a cluster center to be updated, and no entity whose semantic membership degree meets the preset semantic clustering conditions is selected among the entities, then the cluster center to be updated can be automatically eliminated, which helps to automatically select a second subset that is meaningful, has a clear theme, and has high density.
[0163] Finally, based on each updated cluster center, if the clustering goal is not achieved, proceed to the next round of clustering until the clustering goal is achieved, generating multiple cluster subsets corresponding to each cluster center.
[0164] Each cluster subset contains at least one entity, which is equivalent to an entity subset.
[0165] The clustering objective can be the number of clustering rounds or the convergence of the objective function, etc., and there are no specific restrictions. After obtaining the updated cluster centers in each round of clustering, it can be determined whether the clustering objective has been achieved. If the clustering objective has not been achieved, then the next round of clustering is carried out based on the updated cluster centers obtained in this round; if the clustering objective has been achieved, then multiple cluster subsets corresponding to each cluster center are generated based on the entities covered by each updated cluster center obtained in this round.
[0166] Optionally, after obtaining each cluster subset, further entity filtering can be performed on each cluster subset to ensure the professionalism of the extracted second subset. Therefore, for each cluster subset, entities whose semantic membership does not meet the preset membership constraints are filtered to obtain an updated cluster subset.
[0167] Membership constraints can be lower bounds of membership degree, lower bounds of semantic membership degree of each entity in the cluster subset sorted from largest to smallest, or upper bounds of differences in semantic membership degree between the entity and other entities in the cluster subset, etc. There are no specific restrictions.
[0168] Entities whose semantic membership does not meet the preset membership constraints can be deleted from the cluster subset to update the cluster subset.
[0169] Figure 4AIn this study, the semantic features of 8 entities randomly selected from 12 entities are used as the initial 8 cluster centers. After the first round of clustering, the semantic features of the "DiT model" are closer to those of the "diffusion model," and the semantic features of the "diffusion model" are closer to those of the "image generation task." Therefore, the "DiT model" and the "image generation task" are assigned to cluster center 1 (both with a semantic membership degree of 0.6). At the same time, since the semantic features of the "DiT model" are closer to those of the "Transformer architecture," the "DiT model" is also assigned to cluster center 2 (with a semantic membership degree of 0.3).
[0170] The semantic features of the "CLIP model" are closer to the semantic features of the "multimodal pre-trained model," and the semantic features of the "CLIP model" are closer to the semantic features of the "feature extractor." Therefore, the "multimodal pre-trained model" and the "feature extractor" are assigned to candidate expert 3 (semantic membership of 0.7); and so on, not listed here.
[0171] Based on the Euclidean distance (or converted to semantic membership degree) between the knowledge semantic features of each entity and each cluster center, the semantic membership degree vector of each entity is obtained. For example, the semantic membership degree vector of the "DiT model" is [0, 0.3, 0.6, ...], and the sum of all vector elements in the semantic membership degree vector is 1.
[0172] For each cluster center, adjustments are made. The mean of the knowledge semantic features of each entity whose semantic membership degree satisfies the semantic clustering conditions is used as the updated cluster center, and then the second round of clustering is carried out, and so on.
[0173] After 10 iterations (reaching the convergence condition), the knowledge semantic features of entities within the same cluster subset are tightly clustered. For example, in the DiT model, diffusion model, and image generation task within cluster subset 1, the Euclidean distance between the knowledge semantic features of any two entities is less than 0.3 (distance threshold), while the Euclidean distance between the knowledge semantic features of the DiT model within different cluster subset 1 and the CLIP model within cluster subset 3 is greater than 0.8. Thus, 3-4 second subsets can be obtained.
[0174] S201-C extracts M second subsets from the mapping relationship set based on each cluster subset.
[0175] After obtaining each cluster subset, for each cluster subset, the mapping relationships involving each entity in the cluster subset can be extracted from the mapping relationship set to obtain a second subset; alternatively, for each cluster subset, only the entities with confidence scores higher than the confidence score threshold can be extracted from the mapping relationship set to obtain a second subset; and so on, without any specific restrictions.
[0176] The same entities can exist between different second subsets. This overlapping structure naturally conforms to the multi-domain, multi-role, and multi-semantic characteristics of entities in the real world, which helps to improve the accuracy of knowledge retrieval.
[0177] Optionally, after obtaining each cluster subset, subset filtering can be performed to eliminate cluster subsets containing too few entities. Different experts can set different subset filtering conditions to avoid mistakenly eliminating niche experts and improve clustering accuracy. Each expert's knowledge scope can be associated with a lower limit of knowledge quantity, representing the minimum number of entities belonging to that expert's knowledge scope; this lower limit is the subset filtering condition set for that expert.
[0178] For each cluster subset, count the number of entities contained in the cluster subset to obtain the first count corresponding to the cluster subset.
[0179] If, within each cluster subset, there exists a cluster subset whose first number of entities does not reach the lower limit of the number of knowledge entities, it indicates that the number of entities contained in that cluster subset is too small, and there is no need to specifically designate an expert for it. Therefore, that cluster subset can be automatically eliminated.
[0180] If there exists a cluster subset whose first quantity has reached the lower limit of knowledge quantity, it indicates that the number of entities in the cluster subset is not too small, and it is necessary to set it as an expert. Therefore, for the updated cluster subset whose first quantity has reached the lower limit of knowledge quantity, the associations corresponding to the updated cluster subset can be extracted from the mapping relationship set to obtain a second subset.
[0181] Extraction Method Two: Initialize multiple Gaussian distributions that can form the feature space through mixing. Use a Gaussian Mixture Model (GMM) to determine the probability of each entity in the mapping relationship set belonging to each Gaussian distribution. For each Gaussian distribution, select entities with a probability greater than a preset threshold and extract a second subset from the mapping relationship set.
[0182] The process of extracting the second subset is completed offline before the query question is obtained. Therefore, after the query question is obtained, the online knowledge query process can be carried out directly. From each second subset, the second subset that needs to be activated is selected. It is not necessary for all second subsets to participate in the query. Moreover, the online knowledge query process can be carried out directly whenever a query question is obtained for this mapping relationship set, which effectively ensures query efficiency.
[0183] First Subset: Each first subset is a local subset of mappings extracted from the global set of mappings, and each first subset contains multiple mappings.
[0184] Each first subset represents a scope of important knowledge. Therefore, the entities contained in each mapping relation within the same first subset belong to a specific scope of important knowledge. An important scope of knowledge represents the coverage of knowledge under an importance assessment dimension. Entities belonging to a specific scope of important knowledge fall within the coverage of that importance assessment dimension. In other words, under this importance assessment dimension, these entities are important entities, or pivotal entities, in the set of mapping relations. The first subset is essentially a kind of basic, general knowledge, providing a structural bridge for the knowledge query process and ensuring uninterrupted multi-hop reasoning. N first subsets represent N importance assessment dimensions, thus providing a global safety net, preventing the omission of niche or infrequently used entities, and helping to improve the accuracy of knowledge queries.
[0185] The same entity can exist in different first subsets; that is, an entity can belong to multiple first subsets at the same time.
[0186] The first subset can have the same form as the mapping relation set, such as both being in the form of a knowledge graph; or it can have a different form from the mapping relation set, such as the first subset being in the form of a knowledge graph and the mapping relation set being in the form of a data table; and so on, with no specific restrictions.
[0187] Importance assessment dimensions can be semantic importance dimensions, which semantically cover general and core mapping relationships; they can also be structural importance dimensions, which are formed by groups of mapping relationships that can be directly mapped and those that can be indirectly mapped, which structurally cover general and core mapping relationships; they can also be comprehensiveness dimensions, which cover general and core mapping relationships not covered by the second subset; and so on, which will not be listed here.
[0188] The process of extracting the first subset from the mapping set is described below.
[0189] First, obtain at least one pre-defined assessment condition. This at least one assessment condition could be an assessment condition associated with at least one important knowledge area, etc.
[0190] Each evaluation condition can be a semantic evaluation condition, a relational evaluation condition, or a hybrid evaluation condition; other evaluation conditions are also possible and are not limited here. This application's embodiments use semantic evaluation conditions, relational evaluation conditions, and hybrid evaluation conditions as examples. Please refer to [link / reference]. Figure 4B First subset 1 is extracted based on semantic evaluation conditions, first subset 2 is extracted based on relation evaluation conditions, and first subset 3 is extracted based on mixed evaluation conditions.
[0191] The semantic evaluation criteria are used to evaluate the semantic topological degree (or importance) of the knowledge content semantics of each entity in the set of mapping relations.
[0192] If an entity is semantically related to more other entities, then the semantic topology of the entity's semantics is higher, meaning the entity is more important; if an entity is semantically related to fewer other entities, then the semantic topology of the entity's semantics is lower, meaning the entity is less important.
[0193] Therefore, by using semantic evaluation criteria, we can filter out more general, common, core and broader entities from the mapping relationship set, ensuring the comprehensiveness of the query from a semantic perspective during the knowledge query process.
[0194] The relation evaluation criteria are used to evaluate the relational topology (or importance) of each entity's various mapping relations within the set of mapping relations.
[0195] If an entity has more direct or indirect mapping relationships with other entities, it indicates a higher degree of relational topology in the entity's connections, meaning the mapping relationship is more important. Conversely, if an entity has fewer direct or indirect mapping relationships with other entities, it indicates a lower degree of relational topology in the entity's connections, meaning the mapping relationship is less important.
[0196] Therefore, by using relation evaluation conditions, we can select more critical, frequently queried, and core entities from the mapping relation set, ensuring the comprehensiveness of the query from the perspective of connection structure during the knowledge query process, which helps to improve the reasoning connectivity and reasoning stability in complex reasoning processes.
[0197] Hybrid evaluation conditions are used to assess the importance of each entity in the context of hybrid knowledge content semantics and the various mapping relationships involved.
[0198] The more indispensable an entity is in the set of mapping relations, the more important it is in various situations such as mixed entity semantics and connection structures. In this case, the higher the comprehensive topological degree of the entity in the mixed entity semantics and the various mapping relations involved, that is, the higher the importance of the entity.
[0199] If an entity is more likely to be discarded in a set of mapping relations, it means that the entity is less important in various cases such as mixed entity semantics and connection structures. In this case, the overall topological degree of the entity is lower in the case of mixed entity semantics and various mapping relations involved, that is, the importance of the entity is lower.
[0200] Therefore, by using mixed evaluation conditions, it is possible to filter out a wider range of entities from the set of mapping relationships, which are more cross-boundary and more niche, avoiding blind spots in the query and ensuring the comprehensiveness of the query from a mixed perspective during the knowledge query process.
[0201] Then, for each evaluation condition, the first subset that satisfies the evaluation condition is extracted from the mapping set.
[0202] Since each first subset participates in the knowledge query process, the comprehensiveness of the query across at least one importance assessment dimension can be guaranteed. An entity can simultaneously satisfy multiple assessment conditions, reflecting the multi-layered importance of knowledge in the real world. An entity can also exist in both the second and first subsets, demonstrating the multi-level affiliation of entities. Therefore, based on each first subset, regardless of how uncommon the query question is, it can provide basic common sense support. Furthermore, combining each second and first subset provides a deep and stable query process, improving query efficiency while ensuring accuracy.
[0203] There are multiple processes for extracting the first subset of each of the semantic evaluation condition, relation evaluation condition, and mixed evaluation condition. Two of these processes will be introduced below as examples.
[0204] One evaluation condition is a semantic evaluation condition: Extraction Method 1: First, based on the knowledge semantic features extracted from each entity in the mapping relation set, the semantic center feature of the mapping relation set is determined. The semantic center feature describes the overall semantic center of the mapping relation set and therefore can serve as a reference for evaluating entity semantics. Methods for determining the semantic center feature include calculating the mean of each knowledge semantic feature, weighted summation, or convolution operations, etc., with no specific limitations.
[0205] Then, determine the feature similarity between the knowledge semantic features and the semantic center features of each entity, such as cosine similarity, L2 distance, etc., without any specific restrictions.
[0206] Next, from the entities included in the mapping relationship set, entities whose feature similarity between knowledge semantic features and semantic center features meets the semantic evaluation conditions are selected as semantic hub entities.
[0207] The closer an entity's semantics is to the overall semantic center, the higher its semantic hub status within the mapping set; conversely, the further an entity's semantics is from the overall semantic center, the lower its semantic hub status within the mapping set. Therefore, semantic evaluation criteria can be a lower similarity limit, a specified ranking based on feature similarity sorted from highest to lowest, or other specific conditions.
[0208] The selected semantic hub entities are the most general, common, core, and widely covered entities in the mapping relationship set.
[0209] Finally, from the set of mapping relationships, the mapping relationships between the semantic hub entities are extracted to obtain a first subset.
[0210] From the set of mapping relationships, we can extract the mapping relationships involving each semantic hub entity to obtain a first subset; we can also extract the mapping relationships of each semantic hub entity with a confidence level higher than the confidence level threshold to obtain a first subset; and so on, without any specific restrictions.
[0211] When the set of mapping relationships is a knowledge graph, the semantic hub entity can serve as a semantic hub node in the set of mapping relationships, extracting the semantic hub graph from the knowledge graph of the set of mapping relationships, and providing basic semantic support for the subsequent knowledge query process.
[0212] Please refer to Figure 5A Taking six entities as an example, the knowledge semantic features of the "DiT model" are [0.123, 0.456, 0.789, 0.234, 0.567]; the knowledge semantic features of the "CLIP model" are [0.345, 0.678, 0.901, 0.345, 0.678]; and the knowledge semantic features of the "GraphRAG model" are [0.456, 0.789, 0.123, 0.567]. [0.890]; the knowledge semantic features of "cross-modal matching" are [0.567, 0.890, 0.123, 0.456, 0.789]; the knowledge semantic features of "diffusion model" are [0.135, 0.468, 0.791, 0.246, 0.579]; the knowledge semantic features of "multimodal pre-trained model" are [0.357, 0.680, 0.912, 0.357, 0.689].
[0213] First, the mean values of the knowledge semantic features of each of the six entities are calculated as semantic center features, namely [0.330, 0.657, 0.623, 0.367, 0.669]. As the semantic center, the semantic center features can objectively and comprehensively represent the core semantics of the entire knowledge graph, avoiding the dominance of semantic features by a single entity or a few entities, and ensuring the universality of the semantic center features.
[0214] Then, the cosine similarity between the knowledge semantic features and the semantic center features of each entity is determined as the feature similarity. For example, the feature similarity of the "DiT model" is 0.892; the feature similarity of the "CLIP model" is 0.915; the feature similarity of "GraphRAG" is 0.876; the feature similarity of "cross-modal matching" is 0.723; the feature similarity of the "diffusion model" is 0.888; and the feature similarity of the "multimodal pre-trained model" is 0.903.
[0215] Cosine similarity measures the consistency of the directions of two vectors by calculating the cosine of the angle between them. The closer the vectors are in direction and the smaller the angle, the higher the cosine similarity, indicating that the semantics of the entity is more in line with the general core concept of the semantic center; otherwise, it is biased towards a niche expert or special entity.
[0216] Next, the four entities with the highest feature similarity are selected as semantic hub entities, namely "DiT model", "CLIP model", "diffusion model" and "multimodal pre-trained model". From the mapping relationship set, the triples containing these four entities are extracted to obtain a first subset.
[0217] Extraction Method Two: Based on the knowledge semantic features extracted from each entity in the mapping relation set, the feature similarity between every two knowledge semantic features is determined. For each entity, the number of other entities with a feature similarity greater than a similarity threshold is determined as the number of semantic associations corresponding to that entity. Entities with a number of semantic associations reaching a preset value are designated as semantic hub entities. Based on each semantic hub entity, a first subset is extracted from the mapping relation set.
[0218] One evaluation criterion is the relationship evaluation criterion: Extraction Method 1: First, for each entity in the mapping relationship set, obtain every other entity pair consisting of every two other entities in the mapping relationship set, excluding that entity.
[0219] In other words, among the entities included in the mapping relationship set, all entities other than the specified entity are considered as "other entities," and every two of these other entities can form an "other entity pair." These other entity pairs do not contain the specified entity; that is, each entity will correspond to multiple other entity pairs.
[0220] Then, each of the multiple other entity pairs corresponding to each entity is processed. For the two other entities contained in the other entity pair, the mapping relationships involved in mapping from one other entity to another are obtained from the mapping relationship set, thus obtaining the mapping relationship group corresponding to the other entity pair.
[0221] If there exists a mapping relationship A in the set of mapping relationships that involves two entities that are the two other entities in another entity pair, then each mapping relationship that involves mapping from one other entity to another other entity is that mapping relationship A.
[0222] If there is no mapping relationship A in the set of mapping relationships that involves two entities that are the two other entities in another entity pair, but there are multiple mapping relationships that can establish a mapping between the two other entities in another entity pair, for example, there are three mapping relationships, including mapping relationship B, mapping relationship C and mapping relationship D. Mapping relationship B is a mapping relationship between one other entity and entity 1, mapping relationship C is a mapping relationship between entity 1 and entity 2, and mapping relationship D is a mapping relationship between entity 2 and another other entity. Then, these three mapping relationships establish a mapping between the two other entities in another entity pair. The mapping relationships involved in mapping from one other entity to another other entity are mapping relationships B, mapping relationship C and mapping relationship D.
[0223] The mapping relationships involved in mapping from one entity to another represent the shortest paths from one entity to another. For example, in a knowledge graph, this can represent the shortest path from one node to another.
[0224] Next, for each entity, from the mapping relationship groups of multiple other entity pairs corresponding to the entity, select the mapping relationship group containing the entity as the path data to obtain the path data corresponding to the entity.
[0225] If, among multiple pairs of other entities corresponding to an entity, there exists a mapping relationship group of another entity pair that includes the entity, it means that the entity can serve as a mapping bridge from one other entity to another other entity in that other entity pair. In this case, the mapping relationship group of the other entity pair can be used as path data, thereby obtaining all path data corresponding to the entity.
[0226] Next, for each entity, the relational pivot degree of the entity is determined based on the path data corresponding to that entity.
[0227] Relationship pivotality describes the importance of each mapping relationship involved with an entity within the set of mapping relationships. A higher relationship pivotality indicates that the entity is more likely to be a necessary step in the knowledge retrieval process, and therefore, the importance of each mapping relationship involved with that entity within the set of mapping relationships is higher. Conversely, a lower relationship pivotality indicates that the entity is less likely to be a necessary step in the knowledge retrieval process, and therefore, the lower the importance of each mapping relationship involved with that entity within the set of mapping relationships is.
[0228] For example, based on betweenness centrality, the number of data points for each path corresponding to the entity is counted, which is used as the relational hub degree of the entity.
[0229] Next, after obtaining the pivot degree of each entity, entities whose pivot degree satisfies the relationship evaluation conditions can be selected from the entities included in the mapping relationship set as pivot entities.
[0230] These relation hub entities are the more important entities in the connection structure of the mapping relation set. When the mapping relation set is a knowledge graph, the relation hub entities can serve as structural hub nodes in the mapping relation set, extracting the structural hub graph from the knowledge graph of the mapping relation set, and providing reasoning coherence support for the subsequent knowledge query process.
[0231] The evaluation criteria for relationships can be a lower limit of importance; or a specified ranking after sorting relationships by importance from largest to smallest; etc., there are no specific restrictions.
[0232] Finally, extract the mapping relationships between the hub entities from the mapping relationship set to obtain a first subset.
[0233] From the set of mapping relationships, we can extract the mapping relationships involving each relation hub entity to obtain a first subset; we can also extract the mapping relationships of each relation hub entity with a confidence level higher than the confidence level threshold to obtain a first subset; and so on, without any specific restrictions.
[0234] Extraction Method Two: First, for each entity in the mapping relationship set, the entity that has a mapping relationship with the entity is taken as the neighbor entity corresponding to the entity. The number of each neighbor entity corresponding to the entity is counted to obtain the second number corresponding to the entity.
[0235] An entity (denoted as entity B) that has a mapping relationship with an entity (denoted as entity A) means that the two entities (i.e., entity A and entity B) are involved in a mapping relationship. In other words, there exists a mapping relationship involving the two entities (i.e., entity A and entity B).
[0236] The second quantity can represent degree centrality. The larger the second quantity, the more central the entity is in the set of mapping relations, the more extensive the connections, and the higher the importance of the entity in each mapping relation involved in the set of mapping relations. The smaller the second quantity, the more peripheral the entity is in the set of mapping relations, the more limited the connections, and the lower the importance of the entity in each mapping relation involved in the set of mapping relations.
[0237] Then, the second quantity can be used as the relation hub degree of the entity. From the entities included in the mapping relation set, entities whose relation hub degree meets the relation evaluation conditions can be selected as relation hub entities.
[0238] Finally, extract the mapping relationships between the hub entities from the mapping relationship set to obtain a first subset. For details, please refer to the previous introduction, which will not be repeated here.
[0239] Optionally, multiple extraction methods can be combined. For example, after counting the number of data points for each path corresponding to an entity using extraction method one, a third quantity for each entity can be obtained. Then, by merging the second and third quantities, the relational hub degree of the entity can be obtained. From the entities included in the mapping relation set, entities whose relational hub degree satisfies the relation evaluation criteria are selected as relational hub entities. Based on each relational hub entity, a first subset is extracted from the mapping relation set.
[0240] The fusion of the second and third quantities can be achieved through weighted summation, multiplication, or other methods, without specific restrictions. The weights of the second and third quantities can be set using a preset method; they can also be determined based on the number of mapping relationships in the mapping relationship set. For example, the larger the number of mapping relationships in the mapping relationship set, the greater the weight of the second quantity; the smaller the number of mapping relationships in the mapping relationship set, the greater the weight of the third quantity; or they can be determined based on the number of second subsets. For example, the larger the number of second subsets, the greater the weight of the third quantity; the smaller the number of second subsets, the greater the weight of the second quantity; and so on, without specific restrictions.
[0241] It should be noted that the second and third quantities can be quantities that have undergone normalization or standardization, and there are no specific restrictions.
[0242] Please refer to Figure 5BFor example, the neighboring entities of the "DiT model" are the four entities "diffusion model", "Transformer architecture", "image generation task", and "video editing task"; the neighboring entities of the "CLIP model" are the two entities "multimodal pre-trained model" and "feature extractor"; the neighboring entities of the "GraphRAG model" are the two entities "knowledge graph" and "RAG technology"; and so on.
[0243] First, calculate separately Figure 4A The degree centrality and betweenness centrality of the 12 entities shown are both standardized (range 0-1) to ensure the rationality of subsequent weighted summation. Therefore, the degree centrality value (second quantifier) of the "DiT model" is 0.364; the degree centrality value (second quantifier) of the "CLIP model" is 0.182; and so on.
[0244] The total number of shortest paths between the 12 entities is 66. By counting the number of times each entity acts as the unique bridge in these shortest paths, we can obtain the betweenness centrality value (third number) of the "DiT model" as 0.273; the betweenness centrality value (third number) of the "CLIP model" as 0.212; and so on.
[0245] Therefore, the degree centrality and betweenness centrality of each entity can be weighted and summed to obtain the relation hub degree of each entity.
[0246] Degree centrality accurately quantifies the breadth of direct associations of entities, while betweenness centrality accurately quantifies the bridging role of entities. The two indicators complement each other, comprehensively reflecting the structural importance of entities in the graph topology and avoiding judgment bias caused by a single indicator.
[0247] One type of assessment condition is a mixed assessment condition: Extraction Method 1: From the entities contained in the mapping relation set, select entities that do not exist in the M second subsets as hybrid entities. Extract the mapping relations between the hybrid entities from the mapping relation set to obtain a first subset.
[0248] In other words, entities that do not fall within the knowledge scope of any expert are selected from the entities included in the mapping relationship set and treated as hybrid entities. Thus, the first subset extracted based on each hybrid entity can serve as a fallback strategy for knowledge querying, avoiding situations where sparse or long-tailed entities are missed in the query.
[0249] In all second subsets, entities with semantic membership degrees below the threshold do not belong to any expert, do not focus on any domain, are semantically sparse, and have ambiguous domains. However, these entities may still play a key role in knowledge queries. Therefore, extracting the mapping relationships involving each hybrid entity from the mapping relationship set to obtain the first subset can ensure robustness to broad, cross-domain, and niche knowledge query processes.
[0250] Extraction Method Two: From the entities included in the mapping relation set, select entities that are selected according to both semantic evaluation criteria and relation evaluation criteria as hybrid entities. Simultaneously, select entities that are not selected according to either semantic evaluation criteria or relation evaluation criteria, also as hybrid entities. Based on the obtained hybrid entities, extract a first subset from the mapping relation set.
[0251] Each second subset and each first subset can overlap with each other, thus truly reflecting the multidimensional relationships and multiple importance characteristics of knowledge, forming a stable and efficient query space.
[0252] The previous section introduced the offline preparation stage; now, we will move on to the online query stage.
[0253] During the online query phase, query questions will be continuously obtained. For example, after the user inputs a target question, a large model or intelligent agent is used to break down the target question into multiple sub-questions, and a query question is generated based on each sub-question, which then enters the knowledge query process. Alternatively, whenever a target question is received, it is treated as a query question and entered into the knowledge query process. Or, whenever a target question is received, the complexity of the answer to the target question is first determined. If the answer complexity is higher than a complexity threshold, the target question is broken down into multiple sub-questions, and a query question is generated based on each sub-question, which then enters the knowledge query process. If the answer complexity is not higher than the complexity threshold, the target question is treated as a query question and entered into the knowledge query process. And so on, with no specific restrictions.
[0254] The following example illustrates the process of obtaining the query question by breaking down the target question into multiple sub-questions.
[0255] In response to a query operation targeting a target question, a large language model is used to decompose the target question into a sequence of sub-questions. Each sub-question sequence contains multiple sub-questions, and there is a reasoning relationship between any two adjacent sub-questions in the sub-question sequence.
[0256] Inference relationships indicate that there is a certain logical connection between two subproblems. For example, the query result of the previous subproblem can be used as the subject, predicate, or object in the next subproblem; or the query result of the previous subproblem can be used to perform calculations with the query result of the next subproblem; and so on. There are no specific restrictions.
[0257] For each subproblem in the subproblem sequence, the following steps are performed: If the subproblem is the first subproblem in the subproblem sequence, it is treated as the query question; if the subproblem is located in another position in the subproblem sequence, the subproblem that is adjacent to and precedes the subproblem is taken as the adjacent subproblem, the query results of the adjacent subproblem are obtained, and the query results of the adjacent subproblem and the subproblem are concatenated to obtain the query question.
[0258] Optionally, after obtaining the query results of each of the multiple sub-problems contained in the sub-problem sequence, each sub-problem and its query results can be arranged sequentially to generate a reasoning trajectory.
[0259] If the context of each sub-problem is also obtained (which will be explained in detail later), then each sub-problem, its query results, and context can be arranged sequentially to generate a reasoning trajectory.
[0260] Next, a large language model (or intelligent agent) is used to generate the target answer to the target question based on the target question and reasoning trajectory.
[0261] Therefore, the target answer obtained can intuitively demonstrate the complete reasoning process and reasoning basis for arriving at the final answer, avoiding the problem of low accuracy in the answer due to fabrication or illusion.
[0262] Please refer to Figure 6A The target problem is broken down into two subproblems, subproblem 1 and subproblem 2. Iteratively, knowledge queries are performed for each subproblem. First, subproblem 1 is used as the query question for knowledge querying, obtaining contextual content 1. A large language model is then used to generate sub-answer 1 as the query result for subproblem 1 based on subproblem 1 and contextual content 1. Then, the query result for subproblem 1 and subproblem 2 are concatenated and used as the query question for knowledge querying, obtaining contextual content 2 for subproblem 2. A large language model is then used to generate sub-answer 2 as the query result for subproblem 2 based on subproblem 2 and contextual content 2.
[0263] Please refer to Figure 6B The target question is "What specific impact do the differences in feature extraction capabilities between the CLIP model and the VAE model have on the performance of image generation tasks?" Two progressive reasoning requirements can be identified: first, "clarify the core differences in feature extraction capabilities between the CLIP model and the VAE model"; second, "analyze the specific impact of these feature extraction differences on the performance of image generation tasks." The second step depends on the query results of the first step.
[0264] The target problem is broken down into a sequence of sub-problems, including two sub-problems: Sub-problem 1, "What are the core differences between the CLIP model and the VAE model in terms of feature extraction capabilities?", and Sub-problem 2, "What are the specific impacts of these feature extraction differences in the query results of Sub-problem 1 on the performance of the image generation task?"
[0265] For example, through knowledge query, the query result for sub-question 1 is: "The CLIP model, as a multimodal pre-trained model, focuses on cross-modal semantic features of images and text in feature extraction. The extraction dimension is more biased towards global semantic matching, with medium accuracy, but it is suitable for multimodal scenarios; the VAE model, as a generative model, focuses on fine-grained pixel-level features of images in feature extraction, with higher extraction accuracy and the ability to capture the detailed texture of images, but it is only suitable for single image modalities and does not have cross-modal feature extraction capabilities. The core differences between the two are reflected in three aspects: extraction modality, feature dimension, and accuracy."
[0266] Adding the query results of sub-question 1 to sub-question 2, we obtain the updated sub-question 2. Then, through knowledge query, the query result for sub-question 2 is: "Based on the differences in feature extraction between the two, the impact on image generation tasks is mainly reflected in three aspects: 1. The CLIP model can support text-guided image generation (cross-modal semantic matching), and the generated images are more closely aligned with the text description, but the details and textures are not clear enough; the VAE model can only support single image generation (such as image reconstruction, style transfer), and cannot adapt to text-guided scenarios, but the generated images have more delicate details and higher accuracy. 2. The CLIP model has a moderate feature extraction dimension, faster inference speed, and shorter image generation time; the VAE model's fine-grained feature extraction requires more computational resources, and the generation time is relatively longer. 3. The advantage of the CLIP model's global semantic feature extraction makes the generated image more consistent with the input semantics (such as text prompts); the VAE model focuses on pixel-level features, which easily leads to the problem of 'details meeting the standard but semantic deviation.'"
[0267] Continue with Figure 6B For example, please refer to Figure 6CAfter the initial knowledge search, the query results for sub-question 1 were obtained. The context of this query is as follows: 1. The CLIP model (Contrastive Language-Image Pre-training) documentation states that it uses multimodal contrastive learning for training, focusing feature extraction on cross-modal semantic alignment between images and text, outputting 768-dimensional global semantic features with an accuracy of approximately 85%, supporting multimodal scenarios such as image-text retrieval and text-guided generation. 2. The VAE model (Variational Autoencoder) technical paper, "Auto-Encoding XXXX," states that it extracts pixel-level fine-grained features from images through an encoder, outputting 1024-dimensional detail features with an accuracy of over 92%, but is only used for single-image reconstruction and generation and does not support cross-modal interaction. 3. The General XXX Technical Manual states that the differences in feature extraction between multimodal models and single-modal generation models are mainly reflected in three core dimensions: modal adaptability, feature dimension, and accuracy.
[0268] After the second step of knowledge query, the query results were obtained for sub-question 2. The context of sub-question 2 is as follows: "1. Experimental report on 'Multimodal XX Comparison': The CLIP model's advantage in cross-modal semantic features enables it to achieve 88% semantic consistency between the generated image and the text prompt in the text-guided image generation task. However, due to its moderate feature accuracy, the detail texture clarity score is only 75 points. The VAE model, due to its pixel-level feature extraction advantage, achieves an image detail clarity score of 90 points, but it cannot adapt to text-guided scenarios and can only complete single-image reconstruction. 2. AI Model XXX Manual: The CLIP model's 768-dimensional feature encoding takes approximately 0.05 seconds per image, while the VAE model's 1024-dimensional feature encoding takes approximately 0.12 seconds per image. The difference in feature extraction time directly affects the overall efficiency of image generation. 3. Image generation quality evaluation criteria: The generation effect is mainly evaluated based on four core indicators: modal adaptability, detail accuracy, semantic consistency, and generation efficiency, all of which are directly related to feature extraction capabilities."
[0269] Then, for each sub-question, its query result, and context content, a reasoning trajectory is generated.
[0270] Optionally, the online query phase can be implemented using a completely non-parametric topology-aware router. The topology-aware router does not contain any trainable parameters and relies only on information such as the graph topology structure and entity affiliation of the mapping relationship set to make query decisions. This allows the knowledge query process to obtain accurate query results without training or fine-tuning or relying on model scoring mechanisms, which helps to reduce the complexity and deployment difficulty of knowledge query.
[0271] A topology-aware router can be a purely logical decision-making component, without trainable parameters, neural network layers, or weight matrices. It can include a query encoding and embedding module, which converts the user's query target question into a vector embedding for subsequent knowledge retrieval. It can also include a hub graph query module, used to retrieve entities from each first subset. Furthermore, it can include an expert coverage statistics module, used to calculate whether each second subset satisfies the subset activation condition. Finally, it can include an expert graph activation module, used to determine which second subsets are activated.
[0272] When given a query, the following describes the process of entity retrieval for the N first subsets.
[0273] After obtaining the query question, entity retrieval can be performed in each first subset to obtain entities similar to the query question as clue entities, thereby establishing a clue entity set.
[0274] Similarity to the query question can be determined through semantic similarity. Based on the semantic similarity between the query question and each entity in the set of multiple entities contained in the mapping relationship, entities whose semantic similarity satisfies the semantic hub condition are retrieved from the first subset as clue entities.
[0275] The semantic similarity between an entity and a query represents the degree of semantic relevance or similarity between the two. It can be calculated by the distance between the entity and the query in the feature space, or by the difference in their distribution in the frequency domain, etc., without any specific limitation. In this embodiment, the distance in the feature space is used as an example for illustration.
[0276] For example, features can be extracted from the query question to obtain its features. These features describe the semantics of the query question; for example, they can be embedding vectors, feature matrices, etc. Feature extraction from the query question can be implemented using a large language model or an encoder, etc., without specific limitations. Based on the distance between the question features and the entity's semantic features (e.g., cosine similarity or dot product), the semantic similarity between the entity and the query question is determined.
[0277] The semantic hub condition can be a lower bound of semantic similarity; or it can be a range of numbers ordered from largest to smallest semantic similarity, such as the K largest semantic similarities; etc., there are no specific restrictions.
[0278] When the first subset is in the form of a knowledge graph, the entity and its mapping relationship are the entity and its triple.
[0279] The clue entity set represents the most stable, general, and core entities related to the query question within the mapping set. Therefore, based on this, we can select K second subsets from the M second subsets that need to be activated. Activation indicates that these second subsets need to participate in the knowledge query process for the current query question; other inactive second subsets do not need to participate. This effectively reduces the amount of data that needs to be traversed in the knowledge query process, thus improving the efficiency of knowledge query.
[0280] Optionally, when selecting hub knowledge, it is not limited to entities that are semantically directly similar to the query question. That is, it is not limited to entities whose semantic similarity meets the preset semantic hub conditions. It can also be extended to neighboring entities of entities that are semantically directly similar to the query question to ensure query accuracy.
[0281] Therefore, from the first subset, entities whose semantic similarity satisfies the semantic hub condition can be initially identified as hub entities. Further, for each hub entity, entities with a mapping relationship to that hub entity are retrieved from the mapping relationship set and identified as extended entities. Then, each hub entity and each extended entity are considered as clue entities, establishing a clue entity set. Thus, each hub entity and its neighboring entities can be used as the basis for activating the second subset.
[0282] S202, based on the set of clue entities, select K second subsets from the M second subsets of the mapping relationship set.
[0283] After obtaining the set of clue entities, you can select K second subsets that need to be activated for this knowledge query from the M second subsets of the mapping relationship set.
[0284] There are various selection methods, such as selection based on the knowledge relevance between the clue entity set and the second subset; or selection based on the difference between the mean of the knowledge semantic features of each clue entity in the clue entity set and the mean of the knowledge semantic features of each entity in the second subset; etc. There are no specific limitations. In this embodiment, selection based on knowledge relevance will be used as an example.
[0285] Knowledge relevance represents the number of entities that match between the clue entity set and the second subset. The more entities that match between the clue entity set and the second subset, the greater the knowledge relevance; the fewer entities that match between the clue entity set and the second subset, the smaller the knowledge relevance.
[0286] Matching can mean that an entity in the clue entity set is the same as an entity in the second subset; it can also mean that the entity semantics of an entity in the clue entity set are similar to the entity semantics of an entity in the second subset, such as when the feature similarity between the knowledge semantic features of the two entities reaches a preset matching threshold; and so on, without any specific restrictions.
[0287] For each second subset, after determining the knowledge relevance between the set of clue entities and the second subset, select the second subsets whose knowledge relevance satisfies the subset activation condition from the M second subsets to obtain K second subsets.
[0288] The subset activation condition can be a lower bound of relevance; or it can be a ranking range after sorting knowledge relevance from largest to smallest, such as the K knowledge relevances; etc., there are no specific restrictions.
[0289] If there exists a second subset whose knowledge relevance meets the preset subset activation conditions, then that second subset can be activated for entity retrieval.
[0290] The following section provides a detailed introduction to one method for determining the knowledge relevance between the set of clue entities and the second subset.
[0291] For each second subset, count the number of entities that match between the clue entity set and the second subset to obtain the fourth quantity corresponding to the second subset.
[0292] For example, the fourth quantity of the second subset can be used as its knowledge relevance; or the fourth quantity of the second subset can be normalized or standardized before being used as its knowledge relevance; or a preset mapping function can be obtained, the fourth quantity of the second subset can be used as the input of the preset mapping function, and the output of the preset mapping function can be used as the knowledge relevance of the second subset; and so on, without any specific restrictions.
[0293] Taking one calculation method as an example, the fourth quantity corresponding to each of the M second subsets is merged to obtain the comprehensive quantity. For example, the fourth quantity corresponding to each of the M second subsets is summed to obtain the total number of matching entities as the comprehensive quantity. For each second subset, based on the comprehensive quantity and the fourth quantity corresponding to the second subset, the knowledge relevance between the clue entity set and the second subset is determined. For example, the ratio of the fourth quantity corresponding to each second subset to the total quantity is calculated as the knowledge relevance.
[0294] A higher knowledge relevance indicates a stronger topological association between the second subset and the query question; a lower knowledge relevance indicates a sparser topological association between the second subset and the query question. Therefore, the second subset to be activated can be accurately selected based on knowledge relevance.
[0295] S203, based on the set of clue entities and K second subsets, generate query results for the query question.
[0296] After obtaining the set of clue entities and K second subsets, a pre-defined reasoning model can be used to generate query results based on the set of clue entities and K second subsets, combined with the query question.
[0297] To further improve query accuracy, for each of the K second subsets, based on the semantic similarity between the query question and each entity in the mapping relationship set, entities whose semantic similarity satisfies the semantic expert condition are retrieved from the second subset and designated as expert entities, thus obtaining an expert entity set. Therefore, based on the clue entity set and the expert entity set, query results for the query question are generated. For example, using a pre-defined inference model, query results for the query question are generated based on the clue entity set and the expert entity set, combined with the query question.
[0298] The semantic topic condition can be a lower bound of semantic similarity; it can also be a range of numbers ordered from largest to smallest semantic similarity, such as the K most similar terms; etc., there are no specific restrictions. The semantic topic condition can be the same as or different from the semantic hub condition, there are no specific restrictions.
[0299] The process of selecting entities whose semantic similarity meets the preset semantic topic conditions is similar to the process of selecting entities whose semantic similarity meets the preset semantic hub conditions as described above, and will not be repeated here.
[0300] If there is no second subset whose knowledge relevance satisfies the subset activation condition, it means there is no second subset that needs to be activated. In this case, the process of obtaining the expert entity set is not executed, and the query results of the query question are directly generated based on the clue entity set.
[0301] Please refer to Figure 7A This is a schematic diagram illustrating the principle of obtaining an expert entity set. A clue entity set is obtained by performing entity retrieval on N first subsets. The clue entity set is then matched with each of the M second subsets to obtain the knowledge relevance of each of the M second subsets. Based on these knowledge relevances, K second subsets are selected from the M second subsets. An expert entity set is then obtained by performing entity retrieval on the K second subsets.
[0302] Optionally, the K second subsets are only the second subsets obtained in one round of activation. To ensure the accuracy of the query, it can be further determined whether a second round of activation is needed.
[0303] Each expert knowledge scope can also be associated with a cross-expert number lower bound, which represents the minimum number of entities belonging to other expert knowledge scopes.
[0304] After performing one round of activation and obtaining the expert entity set, the second subsets other than the K second subsets in the M second subsets can be taken as other subsets. For each other subset, the number of entities that match between the other subset and the expert entity set is counted to obtain the fifth number corresponding to the other subset.
[0305] If the fifth number reaches the lower limit for the number of cross-expert entities, it means that the obtained expert entity set contains a large number of expert entities belonging to other subsets. In this case, a second round of activation is needed to avoid missing entities in other subsets that can serve as expert entities. Therefore, for other subsets where the fifth number reaches the lower limit for the number of cross-expert entities, entities whose semantic similarity meets the semantic expert condition are added to the expert entity set as expert entities to obtain an updated expert entity set.
[0306] If the fifth number does not reach the lower limit of the number of cross-experts, it means that the expert entity set contains few or no entities belonging to other subsets, so there is no need to perform a second round of activation.
[0307] Thus, the second round of activation enables cross-topic and cross-domain query processes. Each time an entity is queried, only a small amount of data needs to be traversed, avoiding the situation of low query efficiency when answering multi-hop questions.
[0308] Please refer to Figure 7B Taking the first subset obtained under the three dimensions of semantics, relation, and hybridity, and the M second subsets as examples, when performing knowledge queries for each query question, for the three first subsets that are in a long-term active state, only 24% of the knowledge graph (the set of mapping relations) needs to be traversed; among the M second subsets, only 2 second subsets are activated in this knowledge query, requiring traversal of 6% and 4% of the knowledge graph respectively, while the other second subsets are not activated and do not participate in the traversal. It can be seen that each knowledge query can reduce the amount of data traversed by at least 50% compared to a full knowledge graph query, effectively improving the efficiency of knowledge query.
[0309] After obtaining the set of clue entities and the updated set of expert entities, query results for the query question can be generated based on these two sets. If the updated set of expert entities is not obtained, query results for the query question can be generated based on the set of clue entities; if the set of expert entities is not updated, query results for the query question can be generated based on both the set of clue entities and the set of expert entities. This embodiment of the application will use the generation of query results for the query question based on the set of clue entities and the updated set of expert entities as an example.
[0310] When generating query results, you can use every clue entity in the clue entity set, or you can use only the hub entity in the clue entity set without using the extended entities, with the extended entities serving only as a basis for activating the second subset; and so on, without any specific restrictions.
[0311] For example, the set of clue entities and the updated set of expert entities can be used as the query results for the query question; another example is to sort the entities in the set of clue entities and the updated set of expert entities based on the semantic similarity between the entities and the query question from largest to smallest, and select a preset number of entities as the query results for the query question; and so on, without any specific restrictions.
[0312] The mapping relationships between the clue entity set and the updated expert entity set in the mapping relationship set explicitly reveal the logical connections between entities. For multi-hop problems, this provides structured facts that the model can understand, helping to improve question-answering accuracy. Within the mapping relationships between the clue entity set and the updated expert entity set in the mapping relationship set, there can be one entity from either the clue entity set or the updated expert entity set; or both entities from either the clue entity set or the updated expert entity set; and so on, without specific restrictions.
[0313] Optionally, if each entity is extracted from at least one text block, then when generating query results, the text blocks can be combined to restore structured entities to natural language text, improve the semantic integrity and entity background information of the query results, etc. At the same time, the text blocks can serve as evidence data, which helps to obtain a reasonable and well-founded reasoning process for multi-hop problems, and can improve the interpretability and verifiability of question answering.
[0314] Therefore, from the mapping relationship set, we obtain the mapping relationships of each clue entity within the clue entity set as reference relationships, and also obtain the mapping relationships of each expert entity within the updated expert entity set as reference relationships. Simultaneously, we obtain the text blocks to which each clue entity within the clue entity set belongs as reference text, and also obtain the text blocks to which each expert entity within the updated expert entity set belongs as reference text. Thus, we can obtain the reference text corresponding to each reference relationship.
[0315] Each reference relationship and its corresponding reference text are taken as reference knowledge. Based on the feature similarity between the knowledge features of each reference knowledge and the question features of the query question, reference knowledge that meets the feature similarity condition is selected from all reference knowledge and used as context content.
[0316] The feature similarity condition can be a lower limit of similarity; or it can be the top K features sorted from largest to smallest in terms of feature similarity; etc. There are no specific restrictions.
[0317] By integrating the features of text blocks and mapping relationships, i.e. knowledge features, feature similarity calculations are performed on each reference knowledge and then filtered to select compact, clean, and low-noise reference knowledge, which helps to improve the question-answering efficiency of multi-hop questions.
[0318] The context can be the reference knowledge itself, or it can be obtained by combining the reference knowledge and the corresponding entity, or it can be obtained by rewriting the reference knowledge and the corresponding entity into a piece of text, etc. There are no specific restrictions.
[0319] Therefore, query results can be generated based on the context and the query question. For example, the context can be used as the query results; another example is to use a pre-defined inference model to generate query results based on the context and the query question; and so on, with no specific limitations. The pre-defined inference model is a model with reasoning capabilities, which can be a large language model or an intelligent agent, etc., with no specific limitations.
[0320] The following example uses a knowledge graph-style mapping relationship set to illustrate the knowledge query method provided in this application. Please refer to [link / reference]. Figure 7C and Figure 7D .
[0321] Extracting the second subset (expert graph): Entities and relations are extracted from an external corpus to construct a full knowledge graph. Fuzzy clustering is then used to split the full knowledge graph into multiple expert-specific subgraphs, which serve as expert graphs. An entity can belong to multiple expert graphs simultaneously, resolving the knowledge fragmentation problem of hard clustering.
[0322] Extract the first subset (hub graph): By analyzing the semantic centers of the entire knowledge graph, the most general and core entities are selected as semantic hubs. Through a weighted analysis of degree centrality and betweenness centrality, entities with the most core topological connections are selected as structural hubs. Long-tail entities are integrated as hybrid knowledge hubs to supplement general knowledge. Based on this, each knowledge subgraph can be extracted as a hub graph to store general core knowledge.
[0323] Query the hub map: The query first performs entity retrieval in each hub graph to quickly locate the core entities related to the query as clue entities for subsequent activation of the expert graph.
[0324] Activate expert chart: Based on the topological associations of clue entities in the full knowledge graph, sparse activation is achieved by activating only the expert graphs relevant to the current query question, thereby reducing the retrieval space from the root and filtering out noise.
[0325] Additional activation between experts: If an activated expert graph contains entities that are associated with other expert graphs, the relevant expert graphs can be activated in conjunction to supplement cross-domain knowledge and avoid knowledge omissions.
[0326] Knowledge Query: The complex target problem is broken down into sequentially dependent subqueries for knowledge retrieval. For sub-problem 1, a knowledge query is performed to obtain the query result, i.e., sub-answer 1, and context content 1. Sub-answer 1 is concatenated to the header of sub-query 2 to generate an enhanced sub-query 2 for knowledge retrieval; this process is iterated. Finally, all sub-answers and context content are integrated to generate a complete reasoning trajectory, outputting the final target answer.
[0327] In this embodiment, the retrieval space is shrunk from the entire graph to the union of the hub graph entity set and the small number of activated expert graph entity sets through a two-layer structure of hub graph constant retrieval and expert graph sparse activation.
[0328] Since the hub graph contains only about 20% of the global core entities, and the number of activated expert graphs K is typically set to less than 5, and each expert graph is a semantically cohesive subgraph with a size much smaller than the entire graph, the retrieval space is compressed by orders of magnitude. More importantly, through a conditional activation mechanism, it is ensured that retrieval operations are strictly limited to the evidence subspace most closely related to the query topology. Although entities in the expert graph that are irrelevant to the current query physically exist in the knowledge graph, they are fundamentally excluded from the retrieval scope because their respective expert graphs are not activated, achieving source suppression of noise rather than post-processing filtering in traditional methods.
[0329] The knowledge query process is completely non-parametric. Its decision-making process relies only on the graph topology (the coverage count of clue entities in the expert graph) and the pre-computed entity attribution matrix. It can be directly deployed on any RAG system with a built knowledge graph and is suitable for cold start scenarios with zero labeled resources and rapid cross-domain migration scenarios.
[0330] By employing explicit domain encapsulation and conditional activation mechanisms within the expert graph, a dedicated retrieval channel is established for long-tail, sparse, but topic-focused professional knowledge, isolating it from interference from mainstream knowledge. When a query involves a specific expert domain (such as "rare gene mutation"), the corresponding expert subgraph can be precisely activated based on the coverage count of entities in that domain's expert graph within the hub graph retrieval results. Within this expert subgraph, long-tail entities and high-frequency entities are on an equal footing in retrieval competition, no longer affected by the siphoning effect of dense connections to external mainstream knowledge.
[0331] In this embodiment, the retrieval path is inherently interpretable. Each expert activation decision can be traced back to the specific route activation clue entity and its affiliation in the expert graph, providing a clear intervention entry point for error case analysis, knowledge graph quality diagnosis, and expert graph boundary adjustment.
[0332] Based on the same inventive concept, embodiments of this application provide a knowledge query device capable of realizing the functions corresponding to the aforementioned knowledge query method. Please refer to... Figure 8 The device includes an acquisition module 801 and a processing module 802, wherein: Processing module 802: For a query question, based on the query question, it performs entity retrieval on each of the N first subsets of the mapping relationship set to obtain a clue entity set; the mapping relationship set contains: multiple entities representing knowledge content, and various relationships between multiple entities; each first subset contains: a portion of the mapping relationships in the mapping relationship set; the clue entity set contains multiple clue entities, and the multiple clue entities contain: entities retrieved from the N first subsets; Acquisition module 801: Used to select K second subsets from M second subsets of the mapping relationship set based on the clue entity set; each second subset contains: a portion of the mapping relationships in the mapping relationship set; the second subset and the first subset are subsets extracted in different ways; Processing module 802 is also used to generate query results for the query question based on the set of clue entities and K second subsets.
[0333] Optionally, the M second subsets are extracted in the following manner, and module 801 is also used for: Initialize multiple cluster centers; Based on multiple cluster centers, multiple entities are clustered in multiple rounds to obtain cluster subsets corresponding to each cluster center; each cluster subset contains at least one entity; in the cluster subset, the semantic membership degree between each entity and the cluster center satisfies the preset semantic clustering conditions; Based on each cluster subset, extract M second subsets from the mapping relation set.
[0334] Optionally, in each round of clustering, the acquisition module 801 is specifically used to perform the following operations: Obtain each cluster center to be updated; in the first round of clustering, each cluster center to be updated is the cluster center obtained during initialization; in other rounds of clustering, each cluster center to be updated is the updated cluster center obtained in the previous round of clustering. For each cluster center to be updated, determine the semantic membership degree between each entity and the cluster center to be updated, and adjust the cluster center to be updated based on the semantic membership degree of each entity that satisfies the preset semantic clustering conditions to obtain the updated cluster center. Based on each updated cluster center, if it is determined that the clustering goal has not been achieved, the next round of clustering is initiated until it is determined that the clustering goal has been achieved, at which point multiple cluster subsets corresponding to each cluster center are generated.
[0335] Optionally, module 801 is specifically used for: For each cluster subset, count the number of entities contained in the cluster subset to obtain the first count corresponding to the cluster subset; For the first subset of clusters whose number reaches the lower limit of the number of entities, extract the corresponding associations of the cluster subset from the mapping relationship set to obtain a second subset.
[0336] Optionally, the N first subsets are extracted in the following manner, and module 801 is also used for: Obtain at least one evaluation condition; wherein each evaluation condition is: a semantic evaluation condition, a relational evaluation condition, or a hybrid evaluation condition; the semantic evaluation condition is used to: evaluate the semantic topology of the knowledge content semantics of each entity in the set of mapping relations; the relational evaluation condition is used to: evaluate the relational topology of each mapping relation involved in each entity in the set of mapping relations; the hybrid evaluation condition is used to: evaluate the comprehensive topology of each entity in the case of a mixture of knowledge content semantics and the mapping relations involved. For each evaluation condition, extract the mapping relationships that satisfy the evaluation condition from the mapping relationship set to obtain a first subset.
[0337] Optionally, when the evaluation condition is a semantic evaluation condition, the acquisition module 801 is specifically used for: Based on the knowledge semantic features extracted from each entity among multiple entities, the semantic center features of the mapping relationship set are determined; From multiple entities, select entities whose feature similarity between knowledge semantic features and semantic center features satisfies the semantic evaluation conditions as semantic hub entities; Extract the mapping relationships between semantic hub entities from the mapping relationship set to obtain a first subset.
[0338] Optionally, when the evaluation condition is a relationship evaluation condition, module 801 is specifically used for: For each entity among multiple entities, perform the following: obtain every pair of other entities that are not the entity itself; for each other entity pair, in the mapping relationship set, obtain the mapping relationships involved in mapping from one other entity to another other entity, and obtain the mapping relationship group corresponding to the other entity pair; from each mapping relationship group, select the mapping relationship group containing the entity as the path data, and obtain the path data corresponding to the entity; and based on the path data corresponding to the entity, determine the relational hub degree of the entity. From multiple entities, select the entity whose relationship hub degree meets the relationship evaluation criteria as the relationship hub entity; Extract the mapping relationships between the hub entities from the mapping relationship set to obtain a first subset.
[0339] Optionally, module 801 is specifically used for: For each of the multiple entities, perform the following operations: Entities that have a mapping relationship with an entity are considered as neighboring entities of the entity. The number of each neighboring entity corresponding to the entity is counted to obtain the second quantity corresponding to the entity. Count the number of data points for each path corresponding to an entity to obtain the third quantity corresponding to the entity; By merging the second and third quantities corresponding to the entity, the relational pivot degree of the entity is obtained.
[0340] Optionally, when the evaluation conditions are mixed evaluation conditions, module 801 is specifically used for: From multiple entities, select the entity that does not exist in the second subset of M as the hybrid hub entity; Extract the mapping relationships between each hybrid hub entity from the mapping relationship set to obtain a first subset.
[0341] Optionally, the processing module 802 is specifically used for: For each first subset, based on the semantic similarity between the query question and each entity among the multiple entities, retrieve entities from the first subset whose semantic similarity satisfies the semantic hub condition and use them as hub entities; For each hub entity, retrieve the entity that has a mapping relationship with the hub entity from the mapping relationship set, and use it as the extended entity; Each hub entity and each extended entity are treated as a clue entity to obtain a set of clue entities.
[0342] Optionally, module 801 is specifically used for: For each second subset, determine the knowledge relevance between the set of clue entities and the second subset; From the M subsets, select the subsets whose knowledge relevance satisfies the subset activation condition to obtain K subsets.
[0343] Optionally, module 801 is specifically used for: For each second subset, count the number of entities that match between the clue entity set and the second subset to obtain the fourth quantity corresponding to the second subset; By merging the fourth quantities corresponding to each of the M second subsets, a comprehensive quantity is obtained; For each second subset, the knowledge relevance between the clue entity set and the second subset is determined based on the comprehensive quantity and the fourth quantity corresponding to the second subset.
[0344] Optionally, the processing module 802 is specifically used for: For each of the K second subsets, based on the semantic similarity between the query question and each entity among the multiple entities, retrieve entities from the second subset whose semantic similarity satisfies the semantic expert condition, and use them as expert entities to obtain a set of expert entities; Take the second subsets other than the K second subsets from the M second subsets as other subsets. For each other subset, count the number of entities that match between the other subset and the expert entity set to obtain the fifth number corresponding to the other subset. For other subsets where the fifth number reaches the lower limit of the number of cross-experts, retrieve entities whose semantic similarity meets the semantic expert condition, and update the expert entity set as expert entities; Based on the set of clue entities and the updated set of expert entities, query results for the query question are generated.
[0345] Optionally, each entity is extracted from at least one text block; the processing module 802 is specifically used for: From the mapping relationship set, obtain the mapping relationship of each of the multiple clue entities in the clue entity set as a reference relationship, and obtain the mapping relationship of each of the multiple expert entities in the updated expert entity set as a reference relationship; Get the text blocks to which each clue entity belongs within the clue entity set as reference text, and get the text blocks to which each expert entity belongs within the updated expert entity set as reference text, thus obtaining the reference text corresponding to each reference relationship; Each reference relationship and its corresponding reference text are taken as reference knowledge. Based on the feature similarity between the knowledge features of each reference knowledge and the question features of the query question, reference knowledge that meets the feature similarity condition is selected from each reference knowledge and used as context content. Using a pre-defined reasoning model, query results are generated based on the context and the query question.
[0346] Optionally, the query question is obtained using the following method, and the processing module 802 is also used for: In response to a query operation targeting a target question, a large language model is used to decompose the target question into a sequence of sub-questions; each sub-question sequence contains multiple sub-questions, and there is an inference relationship between every two adjacent sub-questions in the sub-question sequence. For each subproblem, the following steps are performed: If the subproblem is the first subproblem in the subproblem sequence, it is used as the query question; if the subproblem is located in another position in the subproblem sequence, the subproblems that are adjacent to and precede the subproblem in the subproblem sequence are taken as adjacent subproblems, the query results of the adjacent subproblems are obtained, and the query results of the adjacent subproblems and the subproblem are concatenated to obtain the query question.
[0347] Optionally, the processing module 802 is also used for: After obtaining the query results of each of the multiple sub-problems contained in the sub-problem sequence, each sub-problem and its query results are arranged in sequence to generate a reasoning trajectory; Using a large language model, based on the target question and reasoning trajectory, the target answer to the target question is generated.
[0348] Optionally, the mapping relationship set is obtained using the following method, and the processing module 802 is further used for: Based on the preset segmentation granularity, each corpus in the preset corpus is segmented to obtain each text block; Based on a preset entity recognition strategy, the entities in each text block are identified, and an entity set corresponding to the preset corpus is established. For each corpus in the preset corpus, based on the preset semantic extraction strategy, extract the association relationship between each pair of entities in at least two entities involved in the corpus; Based on the entity set and each association, a set of mapping relationships is generated.
[0349] Please refer to Figure 9 This is a computer device 900 provided in the embodiments of this application. The computer device 900 can, for example, be... Figure 1B The client 102 or server cluster 101 in the system. The current and historical versions of the data storage program and the application software corresponding to the data storage program can be installed on a computer device 900, which includes a processor 980 and a memory 920. In some embodiments, the computer device 900 may include a display unit 940, which includes a display panel 941 for displaying a user-interactive interface, etc.
[0350] In one possible embodiment, the display panel 941 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).
[0351] The processor 980 is used to read a computer program and then execute the methods defined by the computer program. For example, the processor 980 reads a data storage program or file, thereby running the data storage program on the computer device 900 and displaying the corresponding interface on the display unit 940. The processor 980 may include one or more general-purpose processors, and may also include one or more digital signal processors (DSPs) for performing related operations to implement the technical solutions provided in the embodiments of this application.
[0352] The memory 920 generally includes main memory and secondary storage. Main memory can be random access memory (RAM), read-only memory (ROM), and cache, etc. Secondary storage can be a hard disk, optical disk, USB flash drive, floppy disk, or tape drive, etc. The memory 920 is used to store computer programs and other data. The computer programs include applications corresponding to each client, and other data may include data generated after the operating system or applications are run, including system data (e.g., operating system configuration parameters) and user data. In this embodiment, the computer program is stored in the memory 920, and the processor 980 executes the computer program in the memory 920 to implement any of the methods described in the preceding figures.
[0353] The aforementioned display unit 940 is used to receive input digital information, character information, or contact touch operations / non-contact gestures, and to generate signal inputs related to user settings and function control of the computer device 900. Specifically, in this embodiment, the display unit 940 may include a display panel 941. The display panel 941, for example, is a touch screen, which can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or on the display panel 941), and drive corresponding connection devices according to a pre-set program.
[0354] In one possible embodiment, the display panel 941 may include two parts: a touch detection device and a touch controller. The touch detection device detects the player's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 980. It can also receive and execute commands from the processor 980.
[0355] The display panel 941 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 940, in some embodiments, the computer device 900 may also include an input unit 930. The input unit 930 may include an image input device 931 and other input devices 932, wherein the other input devices may include, but are not limited to, one or more of the following: a physical keyboard, function keys (such as volume control buttons, power buttons, etc.), a trackball, a mouse, and a joystick.
[0356] In addition to the above, the computer device 900 may also include a power supply 990 for powering other modules, an audio circuit 960, a near-field communication module 970, and an RF circuit 910. The computer device 900 may also include one or more sensors 950, such as an accelerometer, a light sensor, and a pressure sensor. The audio circuit 960 specifically includes a speaker 961 and a microphone 962, for example, the computer device 900 can use the microphone 962 to collect the user's voice and perform corresponding operations.
[0357] As one embodiment, the number of processors 980 can be one or more, and the processors 980 and the memory 920 can be coupled together or relatively independent.
[0358] As one example, Figure 9 The processor 980 in the middle can be used to implement, for example Figure 8 The functions of the acquisition module 801 and the processing module 802 in the process.
[0359] As one example, Figure 9 The processor 980 in the text can be used to implement the functions of the server or terminal devices discussed above.
[0360] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by a computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the computer program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0361] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of software products, for example, through computer program products. These computer program products are stored in a storage medium and include computer programs used to cause a computer device to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
[0362] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method of knowledge query, characterized by, include: For the query question, based on the query question, entity retrieval is performed on the N first subsets of the mapping relationship set to obtain the clue entity set; The mapping relationship set includes: multiple entities representing knowledge content, and various associations between the multiple entities; each first subset includes: a portion of the mapping relationships in the mapping relationship set; the clue entity set includes multiple clue entities, and the multiple clue entities include: entities retrieved from the N first subsets; Based on the set of clue entities, select K second subsets from the M second subsets of the mapping relationship set; each second subset contains: a portion of the mapping relationships in the mapping relationship set; The second subset and the first subset are subsets extracted in different ways; Based on the set of clue entities and the K second subsets, the query results for the query question are generated.
2. The method of claim 1, wherein, The M second subsets are extracted using the following method: Initialize multiple cluster centers; Based on the multiple cluster centers, multiple rounds of clustering are performed on the multiple entities to obtain cluster subsets corresponding to each of the multiple cluster centers; wherein each cluster subset contains at least one entity; in the cluster subset, the semantic membership degree between each entity and the cluster center satisfies a preset semantic clustering condition; Based on each cluster subset, M second subsets are extracted from the set of mapping relationships.
3. The method of claim 2, wherein, In each round of clustering, perform the following operations: Obtain each cluster center to be updated; wherein, in the first round of clustering, each cluster center to be updated is the cluster center obtained during initialization; in other rounds of clustering, each cluster center to be updated is the updated cluster center obtained in the previous round of clustering; For each cluster center to be updated, the semantic membership degree between each of the multiple entities and the cluster center to be updated is determined, and the cluster center to be updated is adjusted based on the semantic membership degree of each entity that satisfies the preset semantic clustering conditions, so as to obtain the updated cluster center. Based on each updated cluster center, if it is determined that the clustering target has not been reached, the next round of clustering is initiated until it is determined that the clustering target has been reached, at which point the cluster subsets corresponding to each of the multiple cluster centers are generated.
4. The method of claim 2, wherein, The step of extracting M second subsets from the mapping relationship set based on each cluster subset includes: For each cluster subset, count the number of entities contained in the cluster subset to obtain the first number corresponding to the cluster subset; For the cluster subset whose first number reaches the lower limit of the number of entities, extract the association relationships corresponding to the cluster subset from the mapping relationship set to obtain a second subset.
5. The method of claim 1, wherein, The N first subsets are extracted in the following manner: Obtain at least one evaluation condition; wherein each evaluation condition is: a semantic evaluation condition, a relational evaluation condition, or a hybrid evaluation condition; the semantic evaluation condition is used to: evaluate the semantic topological degree of the knowledge content semantics of each entity in the mapping relation set; the relational evaluation condition is used to: evaluate the relational topological degree of each mapping relation involved in each entity in the mapping relation set; the hybrid evaluation condition is used to: evaluate the comprehensive topological degree of each entity in the case of a mixture of knowledge content semantics and the mapping relations involved. For each evaluation condition, extract the mapping relationships that satisfy the evaluation condition from the set of mapping relationships to obtain a first subset.
6. The method of claim 5, wherein, When the evaluation condition is the semantic evaluation condition, the step of extracting each mapping relation that satisfies the evaluation condition from the mapping relation set to obtain a first subset includes: Based on the knowledge semantic features extracted from each of the multiple entities, the semantic center feature of the mapping relationship set is determined; From the plurality of entities, the entity whose feature similarity between the knowledge semantic features and the semantic center features satisfies the semantic evaluation conditions is selected as the semantic hub entity; From the set of mapping relationships, extract the mapping relationships between each semantic hub entity to obtain a first subset.
7. The method of claim 5, wherein, When the evaluation condition is the relationship evaluation condition, the step of extracting each mapping relationship that satisfies the evaluation condition from the mapping relationship set to obtain a first subset includes: For each of the plurality of entities, the following steps are performed: Obtain every pair of other entities (excluding the entity itself); for each other entity pair, in the mapping relationship set, obtain each mapping relationship involved in mapping from one other entity to another, thus obtaining the mapping relationship group corresponding to the other entity pair; and from each mapping relationship group, select the mapping relationship group containing the entity as path data, thus obtaining each path data corresponding to the entity; and based on each path data corresponding to the entity, determine the relational hub degree of the entity. From the plurality of entities, select the entity whose relationship hub degree satisfies the relationship evaluation condition as the relationship hub entity; From the set of mapping relationships, extract the mapping relationships between each relationship hub entity to obtain a first subset.
8. The method of claim 7, wherein, The determination of the relational hub degree of the entity based on the path data corresponding to the entity includes: For each of the plurality of entities, perform the following operations: Entities that have a mapping relationship with the entity are taken as neighboring entities corresponding to the entity. The number of each neighboring entity corresponding to the entity is counted to obtain the second number corresponding to the entity. Count the number of data points for each path corresponding to the entity to obtain the third quantity corresponding to the entity; By combining the second and third quantities corresponding to the entity, the relational pivot degree of the entity is obtained.
9. The method of claim 5, wherein, When the evaluation condition is a mixed evaluation condition, the step of extracting each mapping relationship that satisfies the evaluation condition from the mapping relationship set to obtain a first subset includes: From the plurality of entities, select the entities that do not exist in the M second subsets as the hybrid hub entities; From the set of mapping relationships, extract the mapping relationships between each hybrid hub entity to obtain a first subset.
10. The method according to any one of claims 1 to 9, characterized in that, Based on the query question, entity retrieval is performed on each of the N first subsets of the mapping relationship set to obtain a clue entity set, including: For each of the first subsets, based on the semantic similarity between the query question and each of the plurality of entities, entities whose semantic similarity satisfies the semantic hub condition are retrieved from the first subsets and designated as hub entities; For each hub entity, retrieve an entity that has a mapping relationship with the hub entity from the mapping relationship set, and use it as an extended entity; Each of the hub entities and each of the extended entities are treated as clue entities to obtain a clue entity set.
11. The method according to any one of claims 1 to 9, characterized in that, The step of selecting K second subsets from the M second subsets of the mapping relationship set based on the clue entity set includes: For each of the second subsets, determine the knowledge relevance between the set of clue entities and the second subset; From the M second subsets, select the second subsets whose knowledge relevance satisfies the subset activation condition to obtain K second subsets.
12. The method of claim 11, wherein, The step of determining the knowledge relevance between the set of clue entities and the second subset for each second subset includes: For each of the second subsets, the number of entities that match between the clue entity set and the second subset is counted to obtain the fourth number corresponding to the second subset; By merging the fourth quantities corresponding to each of the M second subsets, a comprehensive quantity is obtained; For each of the second subsets, the knowledge relevance between the set of clue entities and the second subset is determined based on the comprehensive quantity and the fourth quantity corresponding to the second subset.
13. The method according to any one of claims 1 to 9, characterized in that, The step of generating query results for the query question based on the set of clue entities and the K second subsets includes: For each of the K second subsets, based on the semantic similarity between the query question and each of the plurality of entities, retrieve entities from the second subset whose semantic similarity satisfies the semantic expert condition, and use them as expert entities to obtain an expert entity set; Take the second subsets other than the K second subsets in the M second subsets as other subsets, and for each other subset, count the number of entities that match between the other subset and the expert entity set to obtain the fifth number corresponding to the other subset; For other subsets where the fifth number reaches the lower limit of the number of cross-experts, retrieve entities whose semantic similarity satisfies the semantic expert condition, and update the expert entity set as expert entities; Based on the set of clue entities and the updated set of expert entities, the query results for the query question are generated.
14. The method according to claim 13, characterized in that, Each entity is extracted from at least one text block; the query results for the query question are generated based on the set of clue entities and the updated set of expert entities, including: From the mapping relationship set, obtain the mapping relationship of each of the multiple clue entities in the clue entity set as a reference relationship, and obtain the mapping relationship of each of the multiple expert entities in the updated expert entity set as a reference relationship; Obtain the text blocks to which each of the multiple clue entities in the clue entity set belongs, as reference text; and obtain the text blocks to which each of the multiple expert entities in the updated expert entity set belongs, as reference text, to obtain the reference text corresponding to each of the reference relationships. Each of the reference relationships and its corresponding reference texts are taken as reference knowledge. Based on the feature similarity between the knowledge features of each of the reference knowledge and the question features of the query question, reference knowledge whose feature similarity satisfies the feature similarity condition is selected from each reference knowledge and used as context content. Using a pre-defined reasoning model, query results are generated based on the context and the query question.
15. The method according to any one of claims 1 to 9, characterized in that, The query was obtained using the following method: In response to a query operation targeting a target question, a large language model is used to decompose the target question into a sequence of sub-questions; wherein, the sequence of sub-questions contains multiple sub-questions, and there is a reasoning relationship between every two adjacent sub-questions in the sequence of sub-questions; For each subproblem, the following steps are performed: If the subproblem is the first subproblem in the subproblem sequence, then the subproblem is used as the query problem; if the subproblem is located in another position in the subproblem sequence, then the subproblem that is adjacent to and precedes the subproblem in the subproblem sequence is used as the adjacent subproblem, the query result of the adjacent subproblem is obtained, and the query result of the adjacent subproblem and the subproblem are concatenated to obtain the query problem.
16. The method according to claim 15, characterized in that, The method further includes: After obtaining the query results of each of the multiple sub-problems contained in the sub-problem sequence, each sub-problem and its query results are arranged sequentially to generate a reasoning trajectory; Using a large language model, the target answer to the target question is generated based on the target question and the reasoning trajectory.
17. A knowledge query device, characterized in that, include: Processing module: For a query question, based on the query question, performs entity retrieval on N first subsets of the mapping relationship set to obtain a clue entity set; the mapping relationship set includes: multiple entities representing knowledge content, and various associations between the multiple entities; each first subset includes: a portion of the mapping relationships in the mapping relationship set; the clue entity set includes multiple clue entities, and the multiple clue entities include: entities retrieved from the N first subsets; Acquisition module: used to select K second subsets from M second subsets of the mapping relationship set based on the clue entity set; each second subset contains: a portion of the mapping relationships in the mapping relationship set; the second subset and the first subset are subsets extracted in different ways; The processing module is further configured to: generate query results for the query question based on the set of clue entities and the K second subsets.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 16.
19. A computer device, characterized in that, include: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the method as described in any one of claims 1 to 16 according to the obtained computer program.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that causes a computer to perform the method as described in any one of claims 1 to 16.