Search

CN-121981265-A - Inference method, inference device, inference apparatus, inference medium, and inference program product

CN121981265ACN 121981265 ACN121981265 ACN 121981265ACN-121981265-A

Abstract

The application provides an inference method, an inference device, equipment, a medium and a program product, which relate to the field of data analysis and are characterized in that the method comprises the steps of receiving user query information, judging whether complex inference needs to be executed based on a fusion knowledge base, determining a context based on the user query information and the fusion knowledge base if the complex inference needs to be executed, carrying out path search based on the context to obtain an initial inference path, and carrying out multiple rounds of expanded inference based on the initial inference path to update an inference path set until a closed evidence chain corresponding to the user query information is obtained based on a target inference path set, and outputting an answer, an inference path and supporting evidence corresponding to the closed evidence chain. The application can improve the accuracy of the reasoning result of the complex problem.

Inventors

  • HAN WEI
  • ZHOU XIAOYANG
  • LIU YUANYUAN
  • CHEN YIMING
  • WANG CHENXI

Assignees

  • 中国移动紫金(江苏)创新研究院有限公司
  • 中国移动通信集团江苏有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260505
Application Date
20260119

Claims (10)

  1. 1. A method of reasoning, the method comprising: receiving user query information, and judging whether complex reasoning needs to be executed or not based on a fusion knowledge base; If the complex reasoning needs to be executed, determining a context based on the user query information and the fusion knowledge base; performing path search based on the context to obtain an initial reasoning path, and performing multi-round expansion reasoning based on the initial reasoning path to update a reasoning path set until a closed evidence chain corresponding to the user query information is obtained based on a target reasoning path set; And outputting answers, reasoning paths and supporting evidences corresponding to the closed evidence chain.
  2. 2. The method of claim 1, wherein the fused knowledge base is constructed by: obtaining structured data, semi-structured data and unstructured data; Obtaining a structured knowledge subgraph corresponding to the structured data, a semi-structured knowledge subgraph corresponding to the semi-structured data and an unstructured knowledge subgraph corresponding to the unstructured data; and forming the fusion knowledge base based on the structured knowledge subgraph, the semi-structured knowledge subgraph and the unstructured knowledge subgraph.
  3. 3. The method of claim 2, wherein the constructing the fused knowledge base based on the structured knowledge sub-graph, semi-structured knowledge sub-graph, and unstructured knowledge sub-graph comprises: Performing entity alignment and time stamp standardization processing on the structured knowledge subgraph, the semi-structured knowledge subgraph and the unstructured knowledge subgraph to obtain entity nodes after entity alignment and time information after standardization; Based on the relation information among the structured knowledge subgraph, the semi-structured knowledge subgraph and the unstructured knowledge subgraph, entity nodes after entity alignment and standardized time information are fused to generate a knowledge graph; Performing cross-modal vector embedding processing on the entities and the relations in the knowledge graph respectively to generate an entity vector library and a relation vector library; And respectively carrying out association storage on the topological structure of the knowledge graph and the entity vector library and the relation vector library to form the fusion knowledge library.
  4. 4. A method according to any one of claims 1 to 3, wherein said determining whether complex reasoning needs to be performed based on the fused knowledge base comprises: if the user query information accords with the first condition, determining that complex reasoning is needed; If the user query information does not meet the first condition, executing a single-step search operation, and acquiring an answer corresponding to the user query information from the fusion knowledge base through the single-step search operation and finishing the answer; The first condition includes: the user query information comprises a plurality of entities, and/or a triplet which directly corresponds to the user query information is not queried in the fusion knowledge base, wherein the triplet is a uniform format triplet formed by knowledge extraction, entity alignment and time stamp standardization based on structured, semi-structured and unstructured data.
  5. 5. A method according to any one of claims 1 to 3, wherein searching an initial inference path through the context-aware adaptive beam, performing multiple rounds of extended inference based on the initial inference path to update a set of inference paths until a closed evidence chain corresponding to the user query information is obtained based on a current set of inference paths, comprises: Obtaining a core entity from the user query information to generate a starting node set ; Based on the set of originating nodes by intelligent agents Initializing an initial physical bundle = And setting an initial beam width; performing iterative reasoning process until a new beam is detected The closed evidence chain corresponding to the user query information exists in the system, or the number of reasoning hops reaches a preset maximum number of hops, and the iterative reasoning flow is terminated; the performing iterative reasoning includes: At the t-th hop, the current beam is paired based on the evidence set acquired from the fusion knowledge base Each of the inference paths in (a) Performing a path expansion operation to expand one hop outwards from the end entity of each inference path, generating all possible new inference paths, forming the inference path set Wherein t is a positive integer; Based on composite scoring function to the reasoning path set Each new inference path in (a) Scoring to obtain a comprehensive score of each reasoning path; Based on the composite score, aggregating the inference paths Performing pruning screening operation to select the highest score New beam is formed by the reasoning paths ; Acquiring the new bundle Variance of all inferred path scores in (a) and dynamically adjusting the beam width of the next hop based on the variance 。
  6. 6. The method of claim 5, wherein the evidence set acquired in the fusion-based knowledge base is for a current bundle Each of the inference paths in (a) Before executing the path expansion operation, the method further comprises: The method comprises the steps of obtaining scheduling logic pre-constructed by the intelligent agent, wherein the scheduling logic comprises a scheduling mode based on a rule engine and/or a scheduling mode based on a reinforcement learning strategy network; In the reasoning process, the intelligent agent is used for acquiring a current reasoning state in real time, matching the reasoning state with the searching triggering rules and determining a target searching action, wherein the reasoning state comprises an accumulated evidence set, a current reasoning node type and unsatisfied requirements in the user query information; When a reinforcement learning strategy network scheduling mode is adopted, a strategy network model is built through the intelligent agent, current reasoning state parameters are input into the strategy network, optimal probability distribution of each search action is calculated and output through the model, and a target search action is selected based on the optimal probability distribution, wherein the reasoning state parameters comprise evidence set characteristic parameters, reasoning path progress parameters and query intention vectors; And synchronizing all new evidences acquired based on the target retrieval action to an evidence set, wherein the target retrieval action comprises a map neighbor extension action, a database query action, a text retrieval action and an external tool calling action.
  7. 7. An inference apparatus, comprising: The receiving module is used for receiving the user query information and judging whether complex reasoning needs to be executed or not based on the fusion knowledge base; the determining module is used for determining a context based on the user query information and the fusion knowledge base if the complex reasoning needs to be executed; the updating module is used for carrying out path search based on the context to obtain an initial reasoning path, and carrying out multi-round expansion reasoning based on the initial reasoning path to update a reasoning path set until a closed evidence chain corresponding to the user query information is obtained based on a target reasoning path set; and the output module is used for outputting the answer, the reasoning path and the supporting evidence corresponding to the closed evidence chain.
  8. 8. An electronic device comprising a processor, a memory and a program stored on the memory and executable on the processor, the program when executed by the processor implementing the steps of the inference method as claimed in any one of claims 1 to 6.
  9. 9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the reasoning method as claimed in any of the claims 1 to 6.
  10. 10. A computer program product comprising computer instructions which, when executed by a processor, implement the steps of the inference method as claimed in any one of claims 1 to 6.

Description

Inference method, inference device, inference apparatus, inference medium, and inference program product Technical Field The present application relates to the field of data analysis, and in particular, to an inference method, apparatus, device, medium, and program product. Background In the new digital economic age, data elements have become a core strategic asset. However, efficient, trusted circulation of data elements presents significant challenges. Data tends to be distributed in heterogeneous forms among the private environments of different principals, often lacking trust among these principals. In the related art, even though multi-source data is primarily integrated, the multi-step reasoning capability of automation is still lacking for complex queries, so that the reasoning result of the complex problems is low in accuracy. Disclosure of Invention The embodiment of the application provides an reasoning method and device, which can solve the problem of low accuracy of a reasoning result. In order to solve the technical problems, the application is realized as follows: In a first aspect, an embodiment of the present application provides an inference method, including: receiving user query information, and judging whether complex reasoning needs to be executed or not based on a fusion knowledge base; If the complex reasoning needs to be executed, determining a context based on the user query information and the fusion knowledge base; performing path search based on the context to obtain an initial reasoning path, and performing multi-round expansion reasoning based on the initial reasoning path to update a reasoning path set until a closed evidence chain corresponding to the user query information is obtained based on a target reasoning path set; And outputting answers, reasoning paths and supporting evidences corresponding to the closed evidence chain. In a second aspect, an embodiment of the present application provides an inference apparatus, including: The receiving module is used for receiving the user query information and judging whether complex reasoning needs to be executed or not based on the fusion knowledge base; the determining module is used for determining a context based on the user query information and the fusion knowledge base if the complex reasoning needs to be executed; the updating module is used for carrying out path search based on the context to obtain an initial reasoning path, and carrying out multi-round expansion reasoning based on the initial reasoning path to update a reasoning path set until a closed evidence chain corresponding to the user query information is obtained based on a target reasoning path set; and the output module is used for outputting the answer, the reasoning path and the supporting evidence corresponding to the closed evidence chain. In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor implement the steps of the inference method as described in the first aspect. In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the inference method as described in the first aspect. In the embodiment of the application, user query information is received, whether complex reasoning needs to be executed is judged based on a fusion knowledge base, if the complex reasoning needs to be executed, context is determined based on the user query information and the fusion knowledge base, path searching is carried out based on the context to obtain an initial reasoning path, multiple rounds of expansion reasoning is carried out based on the initial reasoning path to update a reasoning path set until a closed evidence chain corresponding to the user query information is obtained based on a target reasoning path set, and an answer, a reasoning path and supporting evidence corresponding to the closed evidence chain are output. In this way, by receiving the user query and then adaptively judging the inference type based on the fusion knowledge base, carrying out path search and multiple rounds of expansion inference on the complex query depending on the context and the fusion knowledge base, finally forming a closed evidence chain with complete logic and full evidence and synchronously outputting answers, inference paths and supporting evidence, realizing the integrated utilization of multi-source heterogeneous data and automatic multi-step inference of the complex query, improving the accuracy of the complex problem inference result, Drawings FIG. 1 is a schematic flow chart of an inference method according to an embodiment of the present application; FIG. 2 is a schematic diagram of a workflow of knowledge fusion of an inference method provided by an embodiment of