Complex knowledge base question answering method and system based on deep semantic parsing

By using a question-answering method based on deep semantic parsing for complex knowledge bases, this paper addresses the problem of insufficient logical reasoning in complex sentence parsing in knowledge graph question-answering systems, and achieves efficient question-answering for single-entity, multi-attribute, multi-condition constraint, and multi-hop questions.

CN116186228BActive Publication Date: 2026-06-19南京云问网络技术有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
南京云问网络技术有限公司
Filing Date
2023-03-10
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing knowledge graph question answering systems lack logical reasoning ability when dealing with complex sentences, making it difficult to effectively parse single entity with multiple attributes, conditional constraints, comparison types, and multi-hop problems.

Method used

A complex knowledge base question answering method based on deep semantic parsing is adopted. Through entity recognition, query target and condition recognition, multi-hop path recognition and question type discrimination, graph query statements are generated and executed on the graph database to output the answer.

🎯Benefits of technology

It improves the semantic parsing performance of complex sentences, reduces model inference time, improves automatic extraction efficiency, and achieves effective question answering for single-entity multi-attribute, multi-condition constraint, comparative reasoning, and multi-hop questions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116186228B_ABST
    Figure CN116186228B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for question answering complex knowledge bases based on deep semantic parsing. The method includes: entity recognition of user-input questions to obtain entities; query target and query conditions identification to obtain query target, query conditions, and query condition values; multi-hop path identification to obtain multi-hop paths; question type determination of the obtained entities, query target, query conditions, query condition values, and multi-hop paths; generation of a graph query statement through a graph query statement module based on the determination results; execution of the graph query statement on a graph database; parsing the query results to generate an answer; and outputting the answer in Jason format. This invention's method identifies entities, query targets, conditions, and condition values ​​in questions through a classification model, avoiding the disambiguation chain problem present in extraction models, and effectively solving question answering problems involving single entities with multiple attributes, multiple condition constraints, comparative reasoning, and multi-hop complexities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and more specifically to a question-answering method and system for complex knowledge bases based on deep semantic parsing. Background Technology

[0002] Existing knowledge graph question answering systems generate structured query statements by semantically parsing user input queries, and then select several entities or attribute values ​​from a given knowledge base as the answer to the question. Current knowledge graph question answering systems have achieved relatively good results on simple sentences (single entity, single attribute). However, their logical reasoning ability needs to be improved for constrained sentences (conditional constraints, time constraints), inference-type questions (comparison sentences, maximum / minimum value sentences, yes / no questions), and complex sentences with intersection, union, and negation.

[0003] To improve the semantic parsing performance of knowledge graph question answering systems for complex sentences, this invention proposes a complex knowledge base question answering method based on deep semantic parsing—ComplexKBQA (Complex Knowledge Graph Intelligent Question Answering Method). This method is used to parse single-entity multi-attribute questions, conditional constraint questions (currently only supporting conditional equality), comparison questions (comparing size, consistency), extremum questions, and multi-hop questions, generate graph query statements, execute the statements, and return the answers. Summary of the Invention

[0004] The purpose of this invention is to provide a complex knowledge base question answering method based on deep semantic parsing. It is a complex KBQA method based on deep semantic parsing, used to parse complex sentence questions, generate graph query statements, execute the statements and return the answers, thereby improving the semantic parsing performance of complex sentences.

[0005] According to a first aspect of the present invention, a question-answering method for complex knowledge bases based on deep semantic parsing is proposed, comprising:

[0006] Step 1: Perform entity recognition on the user's query to obtain the entities;

[0007] Step 2: Identify the query target and query conditions for the question to obtain the query target, query conditions, and query condition values;

[0008] Step 3: Perform multi-hop path identification on the problem to obtain the multi-hop path;

[0009] Step 4: Determine the problem type of the obtained entity, query target, query conditions, query condition values, and multi-hop paths, and generate a graph query statement through the graph query statement module based on the determination result;

[0010] Step 5: Execute the graph query statement on the graph database, parse the query results to generate an answer, and output it in Jason format.

[0011] Preferably, in step 1 above, entity recognition of the user-input question includes:

[0012] The entity extraction model is used to extract synonyms of entities. If the extracted synonyms are directly matched in the thesaurus, the entity is selected.

[0013] If the extracted synonyms are not in the thesaurus, entity matching is performed. The top 30 candidate entity synonyms are selected by the K-nearest neighbor algorithm, and the matching model is used to perform matching calculations.

[0014] If the threshold of the matching results is greater than 0.5, a voting mechanism is used to select the entity with the most votes;

[0015] If the threshold of the matching results is less than 0.5, then the entity with the highest matching probability among the matching results is selected.

[0016] Preferably, in step 2 above, identifying the query target and query conditions includes:

[0017] The query target and query condition identification model is used to identify the problem and obtain the query target, query conditions and query condition values.

[0018] Preferably, in step 3 above, multi-hop path identification for the problem includes:

[0019] The problem is solved by using a predicate recognition model to calculate K-nearest neighbors, obtain candidate path hops, sort the paths, and obtain multi-hop paths.

[0020] Preferably, in step 4 above, the obtained entity, the query target, the query conditions, the query condition values, and the multi-hop path are judged for problem types, including single entity multi-attribute problems, condition constraint problems, comparison problems, maximum / minimum value problems, and multi-hop problems;

[0021] The problem of determining the single entity with multiple attributes includes:

[0022] If the result of the analysis in steps 1 and 2 above is only a single entity and the query target is determined to be a relation by the graph schema, then the problem is determined to be a query for relational entities, and a graph query statement is generated by the relation query graph query statement generation module.

[0023] If the result of the analysis in steps 1 and 2 above has ≥1 attribute and the query target is determined to be multi-attribute by the graph schema, then the problem is determined to be a multi-attribute query, and a graph query statement is generated by the multi-attribute graph query statement generation module.

[0024] Preferably, determining the multi-hop problem includes:

[0025] If the length of the multi-hop path in the results of the analysis in steps 1 and 2 above exceeds 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is ≥1, then the problem is determined to be a multi-hop problem, and a graph query statement is generated through the multi-hop problem graph query statement module.

[0026] If the length of the multi-hop path in the result of the analysis in steps 1 and 2 above does not exceed 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is less than 1, then other problem types are identified.

[0027] Preferably, determining the condition constraint problem includes:

[0028] If the results of the analysis in steps 1 and 2 above include entities, constraints, constraint values, and multi-hop paths, then the problem is determined to be a multi-constraint problem. By default, the constraints are equal and all apply to the entities at the end of the path. A graph query statement is generated through the constraint class graph query statement generation module.

[0029] If the problem does not contain entities, constraints, constraint values, or multi-hop paths after the analysis in steps 1 and 2, then the problem is classified as a comparison problem or an extremum problem.

[0030] Preferably, the determination of the comparison problem includes:

[0031] Based on a predefined comparison type dictionary, the similarity between the keys in the dictionary and the question is calculated. Based on the calculation results, the type with the highest similarity is selected as the type of the question, and a graph query statement is generated by the type graph query statement generation module.

[0032] Preferably, the problem of determining the extreme value includes:

[0033] A dictionary of Min and Max types is predefined, and a fuzzy matching algorithm based on a multi-layer sliding window is used to perform Min and Max constraint matching calculations on the problem.

[0034] If the matching result is a constraint on the condition, then the condition and condition value are updated, and a graph query statement is generated through the graph query statement generation module.

[0035] If the matching result is constrained on the query target, then the maximum / minimum value of the query target is filtered, and then the graph query statement is generated by the graph query statement generation module.

[0036] In a second aspect of the invention, a computer system is also proposed, comprising: one or more processors, and a memory; said memory is configured to store operable instructions, the instructions being executed such that the one or more computers perform an operation including the flow of the aforementioned deep semantic parsing-based complex knowledge base question answering method.

[0037] Compared with existing technologies, the beneficial effects of the complex knowledge base question answering method based on deep semantic parsing proposed in this invention are as follows:

[0038] The method of this invention identifies entities, query targets, conditions, and condition values ​​in a problem through a classification model, avoiding the disambiguation chain problem present in extraction models. At the same time, the query targets, conditions, and condition value classes adopt a joint modeling approach, which not only reduces error propagation between different tasks but also greatly reduces model inference time and improves automatic extraction efficiency. It effectively solves the question-answering problem of complex questions involving single entities with multiple attributes, multiple condition constraints, comparative reasoning, and multiple hops.

[0039] Meanwhile, the method proposed in this invention adopts a multi-class classification problem based on "span (inline element, inline tag of Hypertext Markup Language)" for both the condition and condition value classes. The label of the constraint attribute value contained in each "span" is the corresponding constraint attribute class name, which improves the reusability of the model representation part and realizes a one-to-one correspondence between constraint conditions and constraint condition values.

[0040] It should be understood that all combinations of the foregoing concepts and the additional concepts described in more detail below may be considered part of the inventive subject matter of this disclosure, provided that such concepts do not contradict each other. Furthermore, all combinations of the claimed subject matter are considered part of the inventive subject matter of this disclosure.

[0041] The foregoing and other aspects, embodiments, and features of the teachings of the present invention will be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the invention, such as features and / or beneficial effects of exemplary embodiments, will become apparent from the following description or may be learned through practice of specific embodiments according to the teachings of the present invention. Attached Figure Description

[0042] The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in the various figures may be denoted by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the invention will now be described by way of example and with reference to the accompanying drawings.

[0043] Figure 1 This is a flowchart illustrating a complex knowledge base question answering method based on deep semantic parsing provided in one embodiment of the present invention;

[0044] Figure 2 This is a schematic diagram of an entity recognition process provided in one embodiment of the present invention;

[0045] Figure 3 This is a schematic diagram illustrating the identification of the query target, query conditions, and query condition value model provided in one embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of the predicate recognition and path sorting model provided in one embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of the process for generating a single-entity, multi-attribute problem graph query statement according to one embodiment of the present invention;

[0048] Figure 6 This is a schematic diagram of the process for generating a condition constraint problem graph query statement in one embodiment of the present invention;

[0049] Figure 7 This is a schematic diagram of the process for generating graph query statements for comparison-type problems provided in one embodiment of the present invention;

[0050] Figure 8 This is a schematic diagram of the process for generating a graph query statement for an extremum problem provided in one embodiment of the present invention;

[0051] Figure 9 This is a schematic diagram of the process for generating a multi-hop problem graph query statement provided in one embodiment of the present invention. Detailed Implementation

[0052] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.

[0053] Various aspects of the invention are described in this disclosure with reference to the accompanying drawings, which illustrate numerous illustrative embodiments. The embodiments of this disclosure are not necessarily intended to encompass all aspects of the invention. It should be understood that the various concepts and embodiments described above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.

[0054] According to an embodiment of the present invention, in combination Figure 1 The flowchart shown illustrates a complex knowledge base question answering method based on deep semantic parsing, comprising:

[0055] Step 1: Perform entity recognition on the user's input question to obtain the entity;

[0056] Step 2: Identify the query target and query conditions for the question, and obtain the query target, query conditions, and query condition values;

[0057] Step 3: Identify multi-hop paths for the problem to obtain the multi-hop paths;

[0058] Step 4: Determine the problem type of the obtained entities, query targets, query conditions, query condition values, and multi-hop paths, and generate a graph query statement based on the determination results through the graph query statement module;

[0059] Step 5: Execute the graph query statement on the graph database, parse the query results to generate the answer, and output it in Jason format.

[0060] Therefore, the complex knowledge base question answering method (complex KBQA method) based on deep semantic parsing proposed in this invention identifies entities, query targets, conditions, and condition values ​​in the question through a classification model, avoiding the disambiguation chain index problem existing in the extraction model. At the same time, by combining query targets, conditions, and condition value classes and adopting a joint modeling approach, it not only reduces error propagation between different tasks, but also greatly reduces model inference time and improves automatic extraction efficiency, effectively solving the question answering problem of complex questions involving single entities with multiple attributes, multiple condition constraints, comparative reasoning, and multiple hops.

[0061] Meanwhile, in some implementations, a multi-class problem based on "span (inline element, inline tag of Hypertext Markup Language)" can be adopted for both the condition and condition value classes. The label of the constraint attribute value contained in each "span" is the corresponding constraint attribute class name, which improves the reusability of the model representation part and realizes a one-to-one correspondence between constraint conditions and constraint value.

[0062] The following is combined Figures 2-9 The flowchart shown, along with some preferred or optional examples of the invention, more specifically describes the implementation and / or effects of certain instances of the invention.

[0063] Entity recognition

[0064] Combination Figure 2 As shown, in step 1 above, entity recognition of the user-input question includes:

[0065] The entity extraction model is used to extract synonyms of entities. If the extracted synonyms are directly matched in the thesaurus, the entity is selected.

[0066] If the extracted synonyms are not in the thesaurus, entity matching is performed. The top 30 candidate entity synonyms are selected by the K-nearest neighbor algorithm, and the matching model is used to perform matching calculations.

[0067] If the threshold of the matching results is greater than 0.5, a voting mechanism is used to select the entity with the most votes;

[0068] If the threshold of the matching results is less than 0.5, then the entity with the highest matching probability among the matching results is selected.

[0069] [Identification of Query Target and Query Conditions]

[0070] Combination Figure 3 In step 2 above, identifying the query target and query conditions includes:

[0071] The query target and query condition identification model is used to identify the problem and obtain the query target, query conditions and query condition values;

[0072] Among them, the query target is identified by using a multi-label classification method (i.e. query target classification) to identify the attributes and relationships that need to be queried in the query (question).

[0073] Taking the scenario of a telecom operator as an example, for the query "Tell me how to activate the 7-day 5G video membership data package and how much it costs?", the query target can be identified as: [activation method, price] through multi-tag classification prediction of the query target.

[0074] Furthermore, the query conditions include constraint attribute categories, and the query condition values ​​include constraint attribute value extraction. Category constraints are extracted based on span, and the labels of the constraint attribute values ​​are constraint attribute category names, so that the query conditions and query condition values ​​correspond one-to-one.

[0075] Taking a telecom operator scenario as an example, for the query "Hello, my previous 2 yuan monthly personalized screen display service has expired and I would like to continue to subscribe", the query target and query condition identification model identifies and predicts that the query target is: [activation method], the query condition is: [price, sub-service], and the query condition value is: [2, monthly package].

[0076] It should also be noted that this embodiment uses BERT (a language representation model that uses large-scale unlabeled corpus to train and obtain text containing rich semantic information) model for joint training to obtain query target classification, constraint attribute classification and constraint attribute value extraction.

[0077] Preferably, the query target and query condition identification provided in this embodiment parses all constraints and replaces the traditional intent identification method with multi-classification of query targets. It should be noted that the drawback of traditional intent identification is that there are multiple intents, and the accuracy of intent classification and modeling are difficult. It is mostly classified and identified in a 0-1 classification manner. Therefore, this embodiment extracts classification constraints based on span (inline element, inline tag of Hypertext Markup Language), improves the classification tags, innovates tag categories, and reduces the defects of chaining and modeling.

[0078] Specifically, this embodiment uses span-based extraction of classification constraints for both the condition and condition value classes. The label of the constraint attribute value contained in each "span" is the corresponding constraint attribute category name, which improves the reusability of the model representation and realizes a one-to-one correspondence between constraint conditions and constraint value.

[0079] Multi-hop path recognition

[0080] Combination Figure 4 In step 3 above, multi-hop path identification for the problem includes:

[0081] The problem is solved by using a predicate recognition model to calculate K-nearest neighbors, obtain candidate path hops, sort the paths, and obtain multi-hop paths.

[0082] [Generate Graph Query Statements]

[0083] In step 4 above, the obtained entities, query targets, query conditions, query condition values, and multi-hop paths are identified by problem type. Problem types include single entity multi-attribute problems, condition constraint problems, comparison problems, maximum / minimum value problems, and multi-hop problems.

[0084] (1) Combination Figure 5 The problem of determining multiple attributes for a single entity includes:

[0085] If the result of the analysis in steps 1 and 2 above is only a single entity and the query target is determined to be a relation by the graph schema (which is equivalent to a data model in a domain, containing meaningful concept types in this domain and the attributes of that type), then the problem is determined to be a query for relational entities, and a graph query statement is generated by the relational query graph query statement generation module.

[0086] If the result of the analysis in steps 1 and 2 above has ≥1 attribute and the query target is determined to be multi-attribute by the graph schema, then the problem is determined to be a multi-attribute query, and a graph query statement is generated by the multi-attribute graph query statement generation module.

[0087] (2) Combination Figure 6Discriminant constraint problems include:

[0088] If the results of the analysis in steps 1 and 2 above include entities, constraints, constraint values, and multi-hop paths, then the problem is determined to be a multi-constraint problem. By default, the constraints are equal and all apply to the entities at the end of the path. A graph query statement is generated through the constraint class graph query statement generation module.

[0089] If the problem does not contain entities, constraints, constraint values, or multi-hop paths after the analysis in steps 1 and 2, then the problem is classified as a comparison problem or an extremum problem.

[0090] (3) Combination Figure 7 Discriminant comparison problems include:

[0091] Based on a predefined comparison type dictionary, the similarity between the keys in the dictionary and the question is calculated. Based on the calculation results, the type with the highest similarity is selected as the type of the question, and a graph query statement is generated by the type graph query statement generation module.

[0092] Preferably, this embodiment supports three comparison types: "greater than", "less than", and "equal to". If the identified problem type is "greater than", then a graph query statement is generated through the "greater than" class graph query statement generation module.

[0093] If the identified problem type is "less than", then a graph query statement is generated through the "less than" class graph query statement generation module;

[0094] If the identified problem type is "equals", then the graph query statement is generated through the "equals" class graph query statement generation module.

[0095] (4) Combination Figure 8 Problems involving determining the maximum or minimum value include:

[0096] A dictionary of Min and Max types is predefined, and a fuzzy matching algorithm based on a multi-layer sliding window is used to perform Min and Max constraint matching calculations on the problem.

[0097] If the matching result is a constraint on the condition, then the condition and condition value are updated, and a graph query statement is generated through the graph query statement generation module.

[0098] If the matching result is constrained on the query target, then the maximum / minimum value of the query target is filtered, and then the graph query statement is generated by the graph query statement generation module.

[0099] (5) Combination Figure 9 Detecting multi-hop problems includes:

[0100] If the length of the multi-hop path in the results of the analysis in steps 1 and 2 above exceeds 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is ≥1, then the problem is determined to be a multi-hop problem, and a graph query statement is generated through the multi-hop problem graph query statement module.

[0101] If the length of the multi-hop path in the result of the analysis in steps 1 and 2 above does not exceed 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is less than 1, then other problem types are identified.

[0102] [Question Answer Generation]

[0103] Execute graph queries on a graph database, parse the query results to generate answers, and output them in Jason format.

[0104] Preferably, the method of the present invention identifies entities, query targets, conditions, and condition values ​​in a query by recognizing the model, effectively avoiding the disambiguation chain problem existing in entity extraction models. At the same time, the query targets, conditions, and condition value classes adopt a joint modeling approach, which not only reduces error propagation between different tasks, but also greatly reduces model inference time and improves automatic extraction efficiency. It effectively solves the question-answering problem of complex questions involving single entities with multiple attributes, multiple condition constraints, comparative reasoning, and multiple hops.

[0105] While the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.

Claims

1. A question-answering method for complex knowledge bases based on deep semantic parsing, characterized in that, include: Step 1: Perform entity recognition on the user's input question to obtain the entity; The entity recognition includes: extracting synonyms of an entity using an entity extraction model; if the extracted synonyms are directly matched in a preset synonym dictionary, the entity is selected; otherwise, the top 30 candidate entity synonyms are selected using the K-nearest neighbor algorithm and a matching model is used for matching calculation, and the entity is selected using a voting mechanism. Step 2: Identify the query target and query conditions for the question to obtain the query target, query conditions, and query condition values; Step 3: Perform multi-hop path identification on the problem to obtain multi-hop paths; the multi-hop path identification includes: using the predicate identification model to perform K-nearest neighbor calculation on the problem, obtaining candidate path hops, and sorting the paths to obtain multi-hop paths; Step 4: Determine the problem type of the obtained entity, query target, query conditions, query condition values, and multi-hop paths. Based on the determination result, generate a graph query statement using the graph query statement module. The problem type determination includes: (1) Determining single entity with multiple attributes: If the parsing result contains only a single entity and the query target is determined to be a relation by the graph schema, then it is determined to be a query for a relational entity; if the parsing result has ≥1 attributes and the query target is determined to be multiple attributes by the graph schema, then it is determined to be a query for multiple attributes; (2) Determining multi-hop problems: If the length of a multi-hop path exceeds 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is ≥1, then it is determined to be a multi-hop problem; (3) Determine if the solution contains entities, constraints, constraint values, and multi-hop paths. If the solution contains entities, constraints, constraint values, and multi-hop paths, then it is determined to be a multi-constraint problem. Step 5: Execute the graph query statement on the graph database, parse the query results to generate an answer, and output it in Jason format.

2. The question-answering method for complex knowledge bases based on deep semantic parsing according to claim 1, characterized in that, In step 1 above, if the threshold of the matching result is greater than 0.5, a voting mechanism is used to select the entity with the most votes; If the threshold of the matching results is less than 0.5, then the entity with the highest matching probability among the matching results is selected.

3. The complex knowledge base question answering method based on deep semantic parsing according to claim 1, characterized in that, In step 4, the identification of comparison type questions includes: calculating the similarity between the keys in the predefined comparison type dictionary and the question, and selecting the type with the highest similarity as the question type.

4. The complex knowledge base question answering method based on deep semantic parsing according to claim 1, characterized in that, In step 4, the problem of determining the maximum / minimum value includes: Define Min and Max type dictionaries, and perform Min and Max constraint matching calculations on the problem based on a multi-level sliding window fuzzy matching algorithm; If the matching result is a constraint on the condition, then the condition and condition value are updated. If the matching result is constrained to the query target, then filter for the maximum or minimum value of the query target.

5. The complex knowledge base question answering method based on deep semantic parsing according to any one of claims 1 to 4, characterized in that, In step 4 above, the obtained entity, query target, query conditions, query condition values, and multi-hop path are judged for problem types. The problem types include single entity multi-attribute problems, condition constraint problems, comparison problems, maximum / minimum value problems, and multi-hop problems. The problem of determining the single entity with multiple attributes includes: If the result of the analysis in steps 1 and 2 above is only a single entity and the query target is determined to be a relation by the graph schema, then the problem is determined to be a query for relational entities, and a graph query statement is generated by the relation query graph query statement generation module. If the result of the analysis in steps 1 and 2 above has ≥1 attribute and the query target is determined to be multi-attribute by the graph schema, then the problem is determined to be a multi-attribute query, and a graph query statement is generated by the multi-attribute graph query statement generation module.

6. The question-answering method for complex knowledge bases based on deep semantic parsing according to claim 5, characterized in that, The multi-hop problem includes: If the length of the multi-hop path in the results of the analysis in steps 1 and 2 above exceeds 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is ≥1, then the problem is determined to be a multi-hop problem, and a graph query statement is generated through the multi-hop problem graph query statement module. If the length of the multi-hop path in the result of the analysis in steps 1 and 2 above does not exceed 2, and the number of attributes of the terminal relation node or the terminal node of the multi-hop path without conditional constraints is less than 1, then other problem types are identified.

7. The question-answering method for complex knowledge bases based on deep semantic parsing according to claim 5, characterized in that, The problem of determining the aforementioned constraints includes: If the results of the analysis in steps 1 and 2 above include entities, constraints, constraint values, and multi-hop paths, then the problem is determined to be a multi-constraint problem. By default, the constraints are equal and all apply to the entities at the end of the path. A graph query statement is generated through the constraint class graph query statement generation module. If the problem does not contain entities, constraints, constraint values, or multi-hop paths after the analysis in steps 1 and 2, then the problem is classified as a comparison problem or an extremum problem.

8. The question-answering method for complex knowledge bases based on deep semantic parsing according to claim 5, characterized in that, The comparison problems to be determined include: Based on a predefined comparison type dictionary, the similarity between the keys in the dictionary and the question is calculated. Based on the calculation results, the type with the highest similarity is selected as the type of the question, and a graph query statement is generated by the type graph query statement generation module.

9. The question-answering method for complex knowledge bases based on deep semantic parsing according to claim 5, characterized in that, The problems for determining the extreme values ​​include: A dictionary of Min and Max types is predefined, and a fuzzy matching algorithm based on a multi-layer sliding window is used to perform Min and Max constraint matching calculations on the problem. If the matching result is a constraint on the condition, then the condition and condition value are updated, and a graph query statement is generated through the graph query statement generation module. If the matching result is constrained on the query target, then the maximum / minimum value of the query target is filtered, and then the graph query statement is generated by the graph query statement generation module.

10. A computer system, characterized in that, include: One or more processors; A memory that stores operable instructions that, when executed, cause the one or more computers to perform operations, including the flow of the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Question answering method and device based on knowledge graph, storage medium and question answering robot

    CN114357137A

  • Intelligent question answering method, system and equipment based on aircraft knowledge graph and medium

    CN115599899A