Question and answer intention clarification method, device and equipment and medium

Through knowledge graph matching technology, the entities, attributes and classification keywords in user questions are identified, which solves the problem of wasted resource allocation in the intelligent customer service system, and improves the efficiency of question answering and system performance.

CN119202187AActive Publication Date: 2024-12-27CHINA CONSTRUCTION BANK +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411344810.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2024-12-27
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

When handling user questions, existing intelligent customer service systems need to configure semantic rules and policies for each question, resulting in waste of resources and inefficiency.

Method used

Knowledge graph matching technology is used to obtain questions entered by users, identify entities, attributes and classification keywords, match node information in the knowledge graph, determine target questions, and reduce the configuration requirements for each question.

Benefits of technology

It realizes precise matching of user questions, reduces resource usage, improves question-and-answer efficiency, and reduces the complexity of configuration and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202187A_ABST
    Figure CN119202187A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, in particular to a question and answer intention clarification method and device, equipment and a medium, and aims to solve the problem of resource waste caused by semantic rule strategy configuration and extension for each question in the prior art. According to the method, the node elements in the to-be-answered question input by the user are identified, and the corresponding node information is matched from the first knowledge graph, so that the target question and the target answer are determined, accurate matching of the user question can be realized only according to the first knowledge graph corresponding to the entity, the attribute and the classification, and the user experience is improved. A semantic rule strategy does not need to be configured for each question, resource occupation is reduced, and question and answer efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, equipment and medium for clarifying the intention of a question and answer. Background Art

[0002] With the rapid development of artificial intelligence technology, intelligent customer service systems are playing an increasingly important role in improving service efficiency and reducing labor costs. However, at present, when intelligent customer service systems process user questions, the question-answering technology in intelligent customer service systems mostly uses rule-based or statistical machine learning methods, but it is necessary to configure semantic rule strategies and expand questions for each question, which takes up a lot of computing resources and leads to resource waste. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, device and medium for clarifying the intention of a question and answer, so as to solve the problem in the prior art of configuring semantic rule strategies and expansion issues for each question, which leads to waste of resources.

[0004] In a first aspect, the present application provides a question-answer intention clarification method, which is applied to an electronic device, and the method includes:

[0005] Obtaining a question to be answered input by a user, and determining a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes;

[0006] According to the entity keywords and attribute keywords in the question to be answered, matching is performed in the first knowledge graph to determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords;

[0007] If the node set includes a target entity node and a target attribute node that are interconnected in the first knowledge graph, and the question to be answered contains classification information, then determining a target classification node based on the classification information and the classification node in the first knowledge graph that is connected to the target attribute node;

[0008] According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0009] Through the above method, by identifying the node elements in the user's question and matching the corresponding node information from the knowledge graph, the target question is determined. Therefore, it is only necessary to accurately match the user's question based on the first knowledge graph corresponding to the entity, attribute, and classification. There is no need to configure semantic rule strategies for each question, which reduces resource usage and improves question-answering efficiency.

[0010] In a possible implementation, determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes:

[0011] Determining whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered;

[0012] If so, the matched classification node is determined as the target classification node.

[0013] In a possible implementation, determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes:

[0014] If the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, obtain a classification directory tree corresponding to the first knowledge graph, and determine the distance between the question classification node and each classification node based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; based on the distance, determine the target classification node corresponding to the classification information.

[0015] In a possible implementation, determining the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree includes:

[0016] For each classification node connected to the target attribute node, determine the number of nodes from the first position information to the second position information based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node based on the number of nodes.

[0017] In a possible implementation, determining, according to the distance, a target classification node corresponding to the classification information includes:

[0018] For each classification node connected to the target attribute node, determine the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the greater the distance, the lower the similarity;

[0019] The classification node with the highest similarity to the question classification node is determined as the target classification node.

[0020] In a possible implementation, if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, determining the target entity node and the target attribute node includes:

[0021] Sending a first clarification request carrying a plurality of interconnected entity nodes and attribute nodes to be clarified to the user;

[0022] The interconnected entity nodes and attribute nodes selected by the user are determined as the target entity nodes and target attribute nodes.

[0023] In a possible implementation manner, if the question to be answered does not contain classification information, the method further includes:

[0024] sending, according to the classification node to be clarified connected to the target attribute node, a second clarification request carrying classification information of the classification node to be clarified to the user;

[0025] Determining the to-be-clarified classification node selected by the user as the target classification node;

[0026] According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0027] In a possible implementation, determining the first knowledge graph corresponding to the question to be answered includes:

[0028] Extracting entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determining, for each standard question in the question knowledge base, mutually connected entity nodes, attribute nodes and classification nodes corresponding to the standard question;

[0029] Matching the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base, and determining the similarity between the question to be answered and the standard questions;

[0030] According to the similarity between the question to be answered and each standard question, a candidate question list consisting of a preset number of target candidate questions with the highest similarity is obtained;

[0031] According to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, the attribute nodes corresponding to the same entity node are connected to the same entity node, and the classification nodes corresponding to the same entity node and attribute node are connected to the same attribute node to determine the first knowledge graph of the candidate question list.

[0032] In a second aspect, the present application provides a question-answer intention clarification device, the device comprising:

[0033] An acquisition module, configured to acquire a question to be answered input by a user, and determine a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes;

[0034] A first determination module is used to match the entity keywords and attribute keywords in the question to be answered in the first knowledge graph, and determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords;

[0035] A second determination module is configured to determine a target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph if there are target entity nodes and target attribute nodes connected to each other in the first knowledge graph in the node set and the question to be answered contains classification information;

[0036] The answer module is used to determine the target answer corresponding to the target classification node and the target attribute node according to the stored correspondence between the question and the node, and the correspondence between the question and the answer.

[0037] In a possible implementation, the second determination module is specifically configured to determine whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered; if so, determining the matching classification node as the target classification node.

[0038] In a possible implementation, the second determination module is specifically used to obtain a classification directory tree corresponding to the first knowledge graph if the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, and determine the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; and determine the target classification node corresponding to the classification information according to the distance.

[0039] In a possible implementation, the second determination module is specifically used to determine, for each classification node connected to the target attribute node, the number of nodes from the first position information to the second position information according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node according to the number of nodes.

[0040] In a possible implementation, the second determination module is specifically configured to determine, for each classification node connected to the target attribute node, the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the longer the distance, the lower the similarity; and the classification node with the highest similarity to the question classification node is determined as the target classification node.

[0041] In a possible implementation, the second determination module is specifically configured to, if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, send a first clarification request carrying multiple interconnected entity nodes and attribute nodes to be clarified to the user; and determine the interconnected entity nodes and attribute nodes selected by the user as the target entity nodes and target attribute nodes.

[0042] In a possible implementation, the second determination module is further configured to, if the question to be answered does not contain classification information, send a second clarification request carrying the classification information of the classification node to be clarified to the user based on the classification node to be clarified connected to the target attribute node; determine the classification node to be clarified selected by the user as the target classification node; and determine the target answer corresponding to the target classification node and the target attribute node based on the stored correspondence between the question and the node, and the correspondence between the question and the answer.

[0043] In a possible implementation, the acquisition module is specifically used to extract entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determine the interconnected entity nodes, attribute nodes and classification nodes corresponding to each standard question in the question knowledge base; match the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base to determine the similarity between the question to be answered and the standard questions; according to the similarity between the question to be answered and the standard questions, obtain a candidate question list consisting of a preset number of target candidate questions with the highest similarity; according to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, connect the attribute nodes corresponding to the same entity node with the same entity node, and connect the classification nodes corresponding to the same entity node and attribute node with the same attribute node to determine the first knowledge graph of the candidate question list.

[0044] In a third aspect, the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of any method described in the first aspect when executing a computer program stored in the memory.

[0045] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any method described in the first aspect.

[0046] In a fifth aspect, the present application provides a computer program product, comprising: a computer program code, when the computer program code is run on a computer, the computer executes the steps of any method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 A schematic diagram of a question-and-answer intention clarification process provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of a question graph provided in an embodiment of the present application;

[0050] Figure 3 A target classification tree diagram provided in an embodiment of the present application;

[0051] Figure 4 A schematic diagram of a classification node clarification process provided in an embodiment of the present application;

[0052] Figure 5 A schematic diagram of a first knowledge graph provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of an entity node and attribute node clarification process provided in an embodiment of the present application;

[0054] Figure 7 A schematic diagram of a question-and-answer intention clarification device provided in an embodiment of the present application;

[0055] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0057] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.

[0058] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0059] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0060] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0062] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description. It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, which should be considered as exemplary, and their purpose is only to illustrate the feasibility of the implementation of the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0063] In the technical solution of this application, the acquisition, transmission, storage, and use of data are in compliance with the requirements of relevant national laws and regulations.

[0064] Before introducing the question and answer intention clarification method provided in the embodiment of the present application, in order to facilitate understanding, the technical background of the embodiment of the present application is first introduced.

[0065] In related technologies, with the rapid development of artificial intelligence technology, intelligent customer service systems are playing an increasingly important role in improving service efficiency and reducing labor costs. However, at present, when intelligent customer service systems process user questions, the question-answering technology in intelligent customer service systems mostly adopts rule-based or statistical machine learning methods, but it is necessary to configure semantic rule strategies and expand questions for each question, which takes up a lot of computing resources and leads to resource waste.

[0066] In view of this, in order to reduce resource usage and improve question-answering efficiency, the embodiments of the present application propose a question-answering intention clarification method, device, equipment and medium.

[0067] Embodiment 1:

[0068] Figure 1 A schematic diagram of a question-and-answer intention clarification process provided in an embodiment of the present application, the process comprising:

[0069] S101: Obtain a question to be answered input by a user, and determine a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes.

[0070] The question and answer intention clarification method provided in the embodiment of the present application is applied to an electronic device, which may be a computer (Personal Computer, PC), a server, etc.

[0071] After the electronic device recognizes the question to be answered input by the user, it obtains the question to be answered and uses the keyword extraction technology in the natural language processing technology to extract the keywords contained in the question to be answered, wherein the extracted keywords include: entity keywords, attribute keywords and classification keywords. Among them, the keyword extraction technology in the natural language processing technology is an existing technology and will not be described in detail here.

[0072] For example, entity keywords may include credit card, debit card, financial management, fund, etc.

[0073] As another example, the attribute keywords may include bill installment, cash installment, consumption installment, etc.

[0074] As another example, the classification keywords may include definition, operation, fee, benefit, condition, process, deadline, case, etc.

[0075] Taking the classification keyword extraction process as an example, the classification keywords contained in the question to be answered are extracted using the keyword extraction technology in the natural language processing technology according to the classification keyword extraction rules. The classification keyword extraction rules may include: if the question is "definition of XX", "business introduction of XX", "explanation of XX", then the classification keyword of the question is determined to be definition; if the question is "I want to apply for XX", "I want to handle XX", "how to handle XX", then the classification keyword of the question is determined to be handling; if the question is "how much is the handling fee of XX", then the classification keyword of the question is determined to be fee; if the question is "how is the income of XX", then the classification keyword of the question is determined to be income; if the question is "what are the conditions for applying for XX", "requirements for handling XX", "can I handle XX", then the classification keyword of the question is determined to be condition; if the question is "how many steps are there in the process of querying XX", "what is the process of applying for XX", then the classification keyword of the question is determined to be process; if the question is "how long is the business hours of XX", "how long is the term of XX", "when can I handle XX", then the classification keyword of the question is determined to be term.

[0076] In a possible implementation, a general knowledge graph is stored in the electronic device. After obtaining the question to be answered input by the user, the general knowledge graph stored in the electronic device is determined as the first knowledge graph corresponding to the question to be answered.

[0077] In another possible implementation, after obtaining the entity keywords, attribute keywords and classification keywords corresponding to the question to be answered, the entity keywords, attribute keywords and classification keywords corresponding to the question to be answered are matched with the standard question in the question knowledge base stored in the electronic device to determine the first knowledge graph corresponding to the question to be answered. The question knowledge base stores the correspondence between the standard question, entity nodes, attribute nodes and classification nodes; the first knowledge graph corresponding to the question to be answered contains entity nodes, attribute nodes and classification nodes, and the entity nodes are connected to the attribute nodes, and the attribute nodes are connected to the classification nodes.

[0078] For example, entity keywords, attribute keywords, and classification keywords corresponding to the question to be answered are matched with standard questions in a question knowledge base stored in an electronic device, multiple standard questions with the highest similarity to the question to be answered are determined, knowledge graphs corresponding to the multiple standard questions are determined, and the knowledge graphs corresponding to the multiple standard questions are determined as the first knowledge graph corresponding to the question to be answered.

[0079] S102: Matching is performed in the first knowledge graph according to the entity keywords and attribute keywords in the question to be answered, and a set of nodes in the first knowledge graph that matches the entity keywords and attribute keywords is determined.

[0080] In one possible implementation, after obtaining the first knowledge graph corresponding to the question to be answered, the question entity nodes and question attribute nodes corresponding to the question to be answered are matched with the first knowledge graph according to the entity keywords and attribute keywords in the question to be answered, and a node set in the first knowledge graph that matches the question entity nodes and question attribute nodes corresponding to the question to be answered is determined.

[0081] When matching, the entity keywords, attribute keywords and classification keywords obtained from the question to be answered are mapped to the corresponding question entity nodes, question attribute nodes and question classification nodes respectively. Among them, mapping the entity keywords to the question entity nodes, mapping the attribute keywords to the question attribute nodes, and mapping the classification keywords to the question classification nodes are all existing technologies and will not be repeated here.

[0082] In addition, after obtaining the question entity node, question attribute node and question classification node corresponding to the question to be answered, the question entity node can be connected to the question attribute node, and the question attribute node can be connected to the question classification node to form a question graph. For example, the question to be answered "credit card bill installment description" is identified and keywords are extracted, and the question entity node of the question to be answered (i.e., the question entity node corresponding to the credit card) is connected to the question attribute node (i.e., the question attribute node corresponding to the bill installment), and the question attribute node is connected to the question classification node (i.e., the question classification node corresponding to the definition), which is expressed as follows: Figure 2 The question graph is shown.

[0083] After obtaining the question graph corresponding to the question to be answered, matching can be performed in the first knowledge graph based on the question entity nodes and question attribute nodes that are interconnected in the question graph to determine a node set in the first knowledge graph that matches the question entity nodes and question attribute nodes.

[0084] In addition, it is understandable that if there are no entity nodes and attribute nodes matching the entity keywords and attribute keywords in the question to be answered in the first knowledge graph, it is determined that the node set is empty, and the electronic device can output the default recommended answer saved by itself to the user. For example, the default recommended answer can be "Sorry, please rephrase your question."

[0085] S103: If the node set contains a target entity node and a target attribute node that are interconnected in the first knowledge graph, and the question to be answered contains classification information, then the target classification node is determined based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph.

[0086] Determine whether there are target entity nodes and target attribute nodes connected to each other in the first knowledge graph in the node set. If so, and the question to be answered contains classification information, match the classification node connected to the target attribute node in the first knowledge graph with the classification information contained in the question to be answered to determine the target classification node.

[0087] It can be understood that there may be one or more pairs of target entity nodes and target attribute nodes that are interconnected in the first knowledge graph in the node set.

[0088] If there is only one pair of target entity nodes and target attribute nodes that are connected to each other in the first knowledge graph in the node set, the connected target entity node and target attribute node are directly determined as the target entity node and target attribute node corresponding to the question to be answered.

[0089] If there are multiple pairs of target entity nodes and target attribute nodes that are interconnected in the first knowledge graph in the node set, a pair of target entity nodes and target attribute nodes that are interconnected in the first knowledge graph can be randomly selected as the target entity node and target attribute node corresponding to the question to be answered; or a pair of target entity nodes and target attribute nodes that are interconnected in the first knowledge graph with the highest question and answer frequency can be used as the target entity node and target attribute node corresponding to the question to be answered.

[0090] S104: Determine the target answer corresponding to the target classification node and the target attribute node according to the stored correspondence between the question and the node, and the correspondence between the question and the answer.

[0091] After determining the target entity node, target attribute node and target classification node corresponding to the question to be answered, based on the saved correspondence between the question and the node, the specific correspondence between the question and the node is the correspondence between the question and the entity node, the attribute node and the classification node. The target question corresponding to the target entity node, the target classification node and the target attribute node is determined, that is, the target question that matches the question to be answered is determined.

[0092] According to the correspondence between the saved questions and answers, the target answer corresponding to the target question is determined, and the target answer is output to the user.

[0093] In one possible implementation, after determining the target question and before determining the target answer, in order to improve the accuracy of user question matching, the target question can be output to the user in advance, and the user can be used to determine whether the target question is the user's intention. If a confirmation message input by the user is received, the subsequent steps of determining the target answer corresponding to the target question based on the saved correspondence between the question and the answer are continued.

[0094] In an embodiment of the present application, the target question is determined by identifying the node elements in the user's question and matching the corresponding node information from the knowledge graph. Therefore, accurate matching of the user's question can be achieved only based on the first knowledge graph corresponding to the entity, attribute, and classification. There is no need to configure semantic rule strategies for each question, thereby reducing resource usage and improving question-answering efficiency.

[0095] Embodiment 2:

[0096] In order to improve the accuracy of user question matching, based on the above embodiment, in the embodiment of the present application, based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph, the target classification node is determined, including:

[0097] Determine whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered;

[0098] If so, the matching classification node is determined as the target classification node.

[0099] In an embodiment of the present application, after determining the classification node connected to the target attribute node in the first knowledge graph, determine the similarity between the classification information contained in each classification node connected to the target attribute node in the first knowledge graph and the classification information contained in the question to be answered, and use the classification node with the highest similarity to the classification information contained in the question to be answered as a candidate classification node; and determine whether the similarity between the classification information contained in the candidate classification node and the classification information contained in the question to be answered is greater than a preset similarity threshold. If so, determine that the classification node matches the classification information contained in the question to be answered, and determine the classification node as the target classification node.

[0100] For each classification node connected to the target attribute node in the first knowledge graph, the text similarity can be determined as the similarity between the classification information contained in the classification node and the classification information contained in the question to be answered by calculating the text similarity between the classification keywords corresponding to the classification information contained in the classification node and the classification information contained in the question to be answered. The process of calculating the text similarity is a prior art and will not be described in detail here.

[0101] In an embodiment of the present application, a target classification node that matches the classification information contained in the question to be answered is determined, so that based on the target classification node and the correspondence between the question and the node, the target question can be determined more accurately, thereby improving the accuracy of user question matching.

[0102] Embodiment 3:

[0103] In order to further improve the accuracy of user question matching, based on the above embodiments, in the embodiment of the present application, based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph, the target classification node is determined, including:

[0104] If the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, obtain the classification directory tree corresponding to the first knowledge graph, and determine the distance between the question classification node and each classification node based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; based on the distance, determine the target classification node corresponding to the classification information.

[0105] If the classification information contained in the classification node connected to the target attribute node in the first knowledge graph does not match the classification information contained in the question to be answered, a target classification tree corresponding to the first knowledge graph is obtained. The classification nodes contained in the target classification tree corresponding to the first knowledge graph are the same as the classification nodes contained in the first knowledge graph, and the multiple classification nodes contained are arranged according to a preset directory hierarchy.

[0106] For example, Figure 3 The target classification tree diagram shown in the embodiment of the present application includes but is not limited to the first level, the second level, and the third level, and the scope of the first level is larger than that of the second level and larger than that of the third level. Figure 3 The first level shown includes operations, basic information, etc.; the content included in the operations is at the second level, specifically, the second level includes account operations, password operations, card operations, file operations, business operations, general operations, etc.; the content included in the basic information is at the second level, specifically, the second level includes concepts, scope, rules, processes, functions, comparison, time, cases, rates, packages, etc.; the content included in the general operations is at the third level, and the third level includes maintenance, query, creation, processing, etc.; the content included in the concepts is at the third level, and the third level includes definitions, goals, significance, characteristics, etc.; the content included in the rates is at the third level, and the third level includes rate standards, fees, interest rates, etc.; other third-level information included in the second level is not listed here one by one.

[0107] In an embodiment of the present application, the first position information of the question classification node corresponding to the classification information contained in the question to be answered in the classification directory tree is determined, and the second position information of each classification node connected to the target attribute node corresponding to the question to be answered in the first knowledge graph is determined in the classification directory tree.

[0108] According to the first position information of the question classification node in the directory classification tree and the second position information of each classification node in the classification directory tree, the distance between the question classification node and each classification node in the classification directory tree is determined.

[0109] According to the distance between the question classification node and each classification node in the classification directory tree, the classification node closest to the question classification node is determined as the target classification node.

[0110] In an embodiment of the present application, if the classification information contained in the classification node connected to the target attribute node in the first knowledge graph does not match the classification information contained in the question to be answered, the target classification node that is most similar to the question classification node is determined, so that the target question can be determined more accurately based on the target classification node and the correspondence between the question and the node, thereby further improving the accuracy of user question matching.

[0111] Embodiment 4:

[0112] On the basis of the above embodiments, in an embodiment of the present application, according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree, determining the distance between the question classification node and each classification node includes:

[0113] For each classification node connected to the target attribute node, determine the number of nodes from the first position information to the second position information based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; based on the number of nodes, determine the distance between the question classification node and the classification node.

[0114] For each classification node connected to the target attribute node in the first knowledge graph, according to the first position information of the question classification node in the classification directory tree and the second position information of the classification node in the classification directory tree, determine the path from the first position information to the second position information in the classification directory tree, and determine the number of nodes passed through in the path.

[0115] Take the question classification node as the operation, and the classification nodes connected to the target attribute node in the first knowledge graph are definition, handling, and fee as examples: Figure 3 As shown, in the classification directory tree, the path to the definition includes three classification nodes: basic information, concept, and definition, and the number of nodes in the path to the definition is determined to be 3; in the classification directory tree, the path to the processing includes two classification nodes: general operation and processing, and the number of nodes in the path to processing is determined to be 2; in the classification directory tree, the path to the fees includes three classification nodes: basic information, tariff, and fees, and the number of nodes in the path to the fees is determined to be 3.

[0116] For each classification node connected to the target attribute node in the first knowledge graph, the number of nodes in the path from the first position information where the question classification node is located to the second position information where the classification node is located in the classification directory tree is determined as the distance between the question classification node and the classification node.

[0117] Embodiment 5:

[0118] On the basis of the above embodiments, in the embodiment of the present application, determining the target classification node corresponding to the classification information according to the distance includes:

[0119] For each classification node connected to the target attribute node, determine the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the greater the distance, the lower the similarity;

[0120] The classification node with the highest similarity to the question classification node is determined as the target classification node.

[0121] For each classification node connected to the target attribute node in the first knowledge graph, the similarity between the question classification node and the classification node is determined according to the distance between the question classification node and the classification node; wherein, the greater the distance between the question classification node and the classification node, the lower the similarity between the question classification node and the classification node.

[0122] In a possible implementation, the reciprocal of the distance between the question classification node and the classification node is determined as the similarity between the question classification node and the classification node. Also taking the question classification node as an operation, and the classification nodes connected to the target attribute node in the first knowledge graph as an example, since the distance from the operation to the definition is 3, the similarity between the operation and the definition is determined to be 1 / 3; since the distance from the operation to the handling is 2, the similarity between the operation and the handling is determined to be 1 / 2; the distance from the operation to the fee is 3, the similarity between the operation and the fee is determined to be 1 / 3.

[0123] After obtaining the similarities between the question classification node and each classification node, the classification node with the highest similarity to the question classification node is determined as the target classification node.

[0124] For example, the question to be answered is how to pay for the credit card bill in installments, and the question classification node corresponding to the question to be answered is operation. In the first knowledge graph, the classification nodes connected to the target attribute node are definition, handling, and fees. Since the similarity between operation and definition is 1 / 3, the similarity between handling and fees is 1 / 2, the classification node with the highest similarity to operation, i.e., handling, is determined as the target classification node. After obtaining the target classification node with the highest similarity to the question classification node (i.e., handling), and determining the target question as "How to pay for the credit card bill in installments" based on the correspondence between the saved question and the node, the target question "How to pay for the credit card bill in installments" is fed back to the user as the feedback result.

[0125] Embodiment 6:

[0126] In order to further improve the accuracy of user question matching, based on the above embodiments, in an embodiment of the present application, if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, determining the target entity node and the target attribute node includes:

[0127] Sending a first clarification request carrying a plurality of interconnected entity nodes and attribute nodes to be clarified to a user;

[0128] The interconnected entity nodes and attribute nodes selected by the user are determined as target entity nodes and target attribute nodes.

[0129] Although current rule-based or statistical question-answering technologies perform well when processing structured data, they are often limited by the incompleteness of user question information when facing free-form questions from users. It is difficult to accurately understand the user's complete intentions and lacks effective guidance and clarification mechanisms. It is difficult to retrieve accurate answers from the knowledge base, which affects the user experience and the intelligence level of the customer service system.

[0130] Therefore, in an embodiment of the present application, if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, in order to effectively guide the user and enable the user to clarify, the electronic device will send to the user a first clarification request carrying multiple pairs of entity keywords corresponding to the interconnected entity nodes to be clarified and attribute keywords corresponding to the attribute nodes, guiding the user to select a pair of entity nodes and attribute nodes that are closest to the user's intention.

[0131] A first clarification reply returned by the user is received, wherein the first clarification reply includes entity keywords corresponding to the interconnected entity nodes and attribute keywords corresponding to the attribute nodes selected by the user, and the interconnected entity nodes and attribute nodes selected by the user are determined as target entity nodes and target attribute nodes, thereby improving the accuracy of user question matching and enhancing the user's consulting experience.

[0132] For example, if the question to be answered input by the user is "credit card installment", then based on the question to be answered, the corresponding interconnected entity nodes and attribute nodes of the question to be answered in the first knowledge graph are determined to be {credit card, bill installment}, {credit card, cash installment}, and {credit card, consumption installment} respectively; then a first clarification request carrying multiple pairs of entity keywords corresponding to the interconnected entity nodes to be clarified and attribute keywords corresponding to the attribute nodes (i.e. {credit card, bill installment}, {credit card, cash installment}, and {credit card, consumption installment}) is sent to the user, such as displaying to the user "We have found information related to credit card bill installment, credit card cash installment, and credit card consumption installment. What specific type do you want to inquire about?" for the user to clarify; if the user input "credit card bill installment" is received, the target entity node is determined to be the credit card, and the target attribute node is determined to be the bill installment.

[0133] In an embodiment of the present application, when it is determined that the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, a first clarification request carrying the multiple pairs of entity nodes and attribute nodes that are interconnected is sent to the user, guiding the user to select the target entity node and target attribute node that are closest to the user's intention, thereby further improving the accuracy of user question matching.

[0134] Embodiment 7:

[0135] In order to further improve the accuracy of user question matching, based on the above embodiments, in the embodiment of the present application, if the question to be answered does not contain classification information, the method further includes:

[0136] According to the classification node to be clarified connected to the target attribute node, sending a second clarification request carrying classification information of the classification node to be clarified to the user;

[0137] Determine the classification node to be clarified selected by the user as the target classification node;

[0138] According to the saved correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0139] In an embodiment of the present application, when the question to be answered input by the user is a shorter keyword and does not contain classification information, the classification node to be clarified connected to the target attribute node is determined in the first knowledge graph based on the interconnected target entity nodes and target attribute nodes corresponding to the question to be answered, and a second clarification request carrying the classification information of the classification node to be clarified is sent to the user, guiding the user to select a classification node to be clarified that is closest to the user's intention.

[0140] A second clarification reply returned by the user is received, wherein the second clarification reply includes classification information of the classification node to be clarified selected by the user, and the classification node to be clarified selected by the user is determined as the target classification node, thereby improving the accuracy of matching the user's question and enhancing the user's consulting experience.

[0141] For example, the question to be answered input by the user is "credit card installment". Since it has been determined that the target entity node corresponding to the question to be answered is credit card and the target attribute node is bill installment, the classification nodes to be clarified connected to the connected credit card and bill installment are determined in the first knowledge graph to be definition, processing, and fee; a second clarification request carrying classification information of multiple classification nodes to be clarified (i.e. definition, processing, and fee) is sent to the user, such as displaying "Please select the specific type you want to consult: definition, processing, and fee" to the user for clarification; if the user input "processing" is received, the target classification node is determined to be processing, and multiple rounds of clarification interactions with the user are completed.

[0142] In an embodiment of the present application, when it is determined that the question to be answered input by the user does not contain classification information, a second clarification request carrying classification information of multiple classification nodes to be clarified connected to the target attribute node is sent to the user, guiding the user to select the target classification node closest to the user's intention, thereby further improving the accuracy of user question matching.

[0143] The following is a specific example to illustrate the classification node clarification process. Figure 4 The schematic diagram of the classification node clarification process includes the following steps:

[0144] Step 1: determine whether the question to be answered contains classification information. If so, execute step 2; if not, execute step 4.

[0145] Step 2: Determine whether the classification information contained in the classification node connected to the target attribute node corresponding to the question to be answered in the first knowledge graph matches the classification information contained in the question to be answered. If so, execute step 3; if not, determine that the classification node does not match, and execute step 5.

[0146] Step three, determine the classification node that matches the classification information contained in the question to be answered as the target classification node, and execute step six.

[0147] Step 4: Determine multiple classification nodes connected to the target attribute node corresponding to the question to be answered in the first knowledge graph as classification nodes to be clarified, send a second clarification request carrying classification information of multiple classification nodes to be clarified to the user, determine the classification node to be clarified selected by the user as the target classification node, and execute step 6.

[0148] Step 5: Obtain a classification directory tree corresponding to the first knowledge graph, determine the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the question to be answered in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; determine the target classification node corresponding to the classification information according to the distance. Recommend the target answer to the user based on the target classification node, target entity node, target attribute node, the correspondence between the saved question and the node, and the correspondence between the question and the answer.

[0149] Step six, based on the correspondence between the saved questions and nodes, determine the target questions corresponding to the target entity nodes, target attribute nodes and target classification nodes; and based on the correspondence between the saved questions and answers, determine the target answers corresponding to the target questions.

[0150] Embodiment 8:

[0151] In order to further reduce resource usage, based on the above embodiments, in the embodiment of the present application, determining the first knowledge graph corresponding to the question to be answered includes:

[0152] Extracting entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determining the interconnected entity nodes, attribute nodes and classification nodes corresponding to each standard question in the question knowledge base;

[0153] Matching the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base to determine the similarity between the question to be answered and each standard question;

[0154] According to the similarity between the question to be answered and each standard question, a candidate question list consisting of a preset number of target candidate questions with the highest similarity is obtained;

[0155] According to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, the attribute nodes corresponding to the same entity node are connected to the same entity node, and the classification nodes corresponding to the same entity node and attribute node are connected to the same attribute node to determine the first knowledge graph of the candidate question list.

[0156] In the embodiment of the present application, a question knowledge base is stored in the electronic device, and the question knowledge base contains a plurality of standard questions. The keyword extraction technology in the natural language processing technology is used to extract entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base.

[0157] For each standard question, the entity keyword, attribute keyword and classification keyword of the standard question are mapped to corresponding entity nodes, attribute nodes and classification nodes respectively, and the interconnected entity nodes, attribute nodes and classification nodes corresponding to the standard question are determined. Specifically, the entity node of the standard question is connected to the attribute node, and the attribute node of the standard question is connected to the classification node.

[0158] After receiving the question to be answered input by the user, the entity keywords, attribute keywords and classification keywords in the question to be answered are matched with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base. For each standard question, the number of nodes (including entity nodes, attribute nodes and classification nodes) corresponding to the standard question that contain the entity keywords, attribute keywords or classification keywords in the question to be answered is determined; and the similarity between the standard question and the question to be answered is determined according to the number of entity keywords, attribute keywords and classification keywords in the question to be answered in the entity nodes, attribute nodes and classification nodes corresponding to the standard question. Among them, the more the number of included, the higher the similarity with the question to be answered, and it can be understood that the number of included is at most 3 and at least 0. For example, the number of entity keywords, attribute keywords and classification keywords in the question to be answered in the entity nodes, attribute nodes and classification nodes corresponding to the standard question is multiplied by 1 / 3, and the product value is determined as the similarity between the standard question and the question to be answered.

[0159] According to the similarity between the question to be answered and each standard question in the question knowledge base, the standard questions are sorted in order from high to low according to the similarity, a preset number of standard questions arranged in front are determined as target candidate questions, and a candidate question list consisting of a preset number of target candidate questions with high similarity is obtained.

[0160] The preset number is a positive integer, and by way of example, the preset number may be 50.

[0161] According to the interconnected entity nodes, attribute nodes and classification nodes corresponding to each target candidate question in the candidate question list, the attribute nodes corresponding to the same entity node are respectively connected to the same entity node, and the classification nodes corresponding to the same attribute node are respectively connected to the same attribute node, so as to determine the first knowledge graph corresponding to the candidate question list, that is, the first knowledge graph corresponding to the question to be answered.

[0162] For example, the target candidate questions included in the candidate question list are "credit card bill installment instructions", "credit card cash installment instructions", "credit card consumption installment instructions", "credit card bill installment handling fee", "credit card cash installment handling fee", "credit card consumption installment handling fee", "how to apply for credit card bill installment", "how to apply for credit card cash installment", "how to apply for credit card consumption installment". The target candidate question "credit card bill installment instructions" corresponds to the entity nodes, attribute nodes, and classification nodes of credit card, bill installment, and definition respectively; the target candidate question "credit card cash installment instructions" corresponds to the entity nodes, attribute nodes, and classification nodes of credit card, cash installment, and definition respectively; the target candidate question "credit card consumption installment instructions" corresponds to the entity nodes, attribute nodes, and classification nodes of credit card, consumption installment, and definition respectively; the target candidate question "credit card bill installment handling fee" corresponds to the entity nodes, attribute nodes, and classification nodes of credit card, bill installment, and fee respectively; the target candidate question "credit card cash installment handling fee" corresponds to the entity nodes, attribute nodes, and classification nodes of credit card, bill installment, and fee respectively. The nodes and classification nodes are credit card, cash installment, and fee respectively; the entity nodes, attribute nodes, and classification nodes corresponding to the target candidate question "Credit card consumption installment handling fee" are credit card, consumption installment, and fee respectively; the entity nodes, attribute nodes, and classification nodes corresponding to the target candidate question "How to handle credit card bill installment" are credit card, bill installment, and handling respectively; the entity nodes, attribute nodes, and classification nodes corresponding to the target candidate question "How to handle credit card cash installment" are credit card, cash installment, and handling respectively; the entity nodes, attribute nodes, and classification nodes corresponding to the target candidate question "How to handle credit card consumption installment" are credit card, consumption installment, and handling respectively. Then connect the attribute nodes corresponding to the same entity node to the same entity node, that is, connect bill installment, cash installment, and consumption installment to credit card respectively; connect the classification nodes corresponding to the same entity node and attribute node to the same attribute node, that is, connect definition, handling, and fee to bill installment respectively, connect definition, handling, and fee to cash installment respectively, and connect definition, handling, and fee to consumption installment respectively, and get the following Figure 5 The first knowledge graph corresponding to the question to be answered is shown.

[0163] The following is a specific example to illustrate the entity node and attribute node clarification process. Figure 6 The entity node and attribute node clarification process diagram includes the following steps:

[0164] Step 1: obtain the question to be answered input by the user, and extract entity keywords, attribute keywords and classification keywords in the question to be answered.

[0165] Step 2: Match the entity keywords, attribute keywords, and classification keywords in the question to be answered with the entity nodes, attribute nodes, and classification nodes corresponding to any standard question in the question knowledge base to determine the similarity between the question to be answered and each standard question. According to the similarity between the question to be answered and each standard question, a candidate question list consisting of a preset number of target candidate questions with the highest similarity is obtained. According to the entity nodes, attribute nodes, and classification nodes corresponding to each target candidate question in the candidate question list, the first knowledge graph corresponding to the candidate question list is determined.

[0166] Step 3: Match the entity keywords and attribute keywords in the question to be answered in the first knowledge graph to determine the node set that matches the entity keywords and attribute keywords in the first knowledge graph. Determine whether there are entity nodes and attribute nodes that are interconnected in the first knowledge graph in the node set. If so, execute step 4. If not, determine that there are no matching entity nodes and attribute nodes, and execute step 7.

[0167] Step 4, determine whether there is only one pair of entity nodes and attribute nodes that are interconnected in the first knowledge graph in the node set. If so, execute step 5; if not, execute step 6.

[0168] Step 5: determine the interconnected entity nodes and attribute nodes as target entity nodes and target attribute nodes corresponding to the question to be answered.

[0169] Step six: sending a first clarification request carrying a plurality of interconnected entity nodes and attribute nodes to be clarified to the user; determining the interconnected entity nodes and attribute nodes selected by the user as target entity nodes and target attribute nodes.

[0170] Step seven: output the default recommended answer saved by the user.

[0171] Embodiment 9:

[0172] Based on the same inventive concept, on the basis of the above embodiments, the present application provides a question and answer intention clarification device, see Figure 7 , Figure 7 A schematic diagram of a question-answer intention clarification device provided in some embodiments is shown, the device comprising:

[0173] The acquisition module 701 is used to acquire the question to be answered input by the user, and determine the first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes and classification nodes;

[0174] A first determination module 702 is used to match the entity keywords and attribute keywords in the question to be answered in the first knowledge graph, and determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords;

[0175] A second determination module 703 is configured to determine a target classification node based on the classification information and the classification nodes in the first knowledge graph connected to the target attribute node if there are target entity nodes and target attribute nodes in the node set that are interconnected in the first knowledge graph, and the question to be answered contains classification information;

[0176] The answer module 704 is used to determine the target answer corresponding to the target classification node and the target attribute node according to the stored correspondence between the question and the node, and the correspondence between the question and the answer.

[0177] In a possible implementation, the second determination module 703 is specifically configured to determine whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered; if so, determining the matching classification node as the target classification node.

[0178] In a possible implementation, the second determination module 703 is specifically used to obtain a classification directory tree corresponding to the first knowledge graph if the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, and determine the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; and determine the target classification node corresponding to the classification information according to the distance.

[0179] In a possible implementation, the second determination module 703 is specifically used to determine, for each classification node connected to the target attribute node, the number of nodes from the first position information to the second position information according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node according to the number of nodes.

[0180] In a possible implementation, the second determination module 703 is specifically configured to determine, for each classification node connected to the target attribute node, the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the longer the distance, the lower the similarity; and the classification node with the highest similarity to the question classification node is determined as the target classification node.

[0181] In a possible implementation, the second determination module 703 is specifically used to send a first clarification request carrying multiple interconnected entity nodes and attribute nodes to be clarified to the user if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph; and determine the interconnected entity nodes and attribute nodes selected by the user as the target entity nodes and target attribute nodes.

[0182] In a possible implementation, the second determination module 703 is further configured to, if the question to be answered does not contain classification information, send a second clarification request carrying the classification information of the classification node to be clarified to the user based on the classification node to be clarified connected to the target attribute node; determine the classification node to be clarified selected by the user as the target classification node; and determine the target answer corresponding to the target classification node and the target attribute node based on the stored correspondence between the question and the node, and the correspondence between the question and the answer.

[0183] In a possible implementation, the acquisition module 701 is specifically configured to extract entity keywords, attribute keywords, and classification keywords of each standard question in the question knowledge base, and determine, for each standard question in the question knowledge base, the interconnected entity nodes, attribute nodes, and classification nodes corresponding to the standard question; match the entity keywords, attribute keywords, and classification keywords in the question to be answered with the entity nodes, attribute nodes, and classification nodes corresponding to any standard question in the question knowledge base to determine the similarity between the question to be answered and the standard questions; obtain a candidate question list consisting of a preset number of target candidate questions with the highest similarity based on the similarity between the question to be answered and the standard questions; and connect the attribute nodes corresponding to the same entity node to the same entity node, and connect the classification nodes corresponding to the same entity node and attribute node to the same attribute node based on the entity nodes, attribute nodes, and classification nodes of each target candidate question in the candidate question list to determine a first knowledge graph of the candidate question list.

[0184] Embodiment 10:

[0185] Based on the same inventive concept, on the basis of the above embodiments, the present application embodiment further provides an electronic device, which can realize the function of the question and answer intention clarification device discussed above, please refer to Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in some embodiments is shown, the electronic device comprising: a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804;

[0186] The memory 803 stores a computer program. When the program is executed by the processor 801, the processor 801 performs the following steps:

[0187] Obtaining a question to be answered input by a user, and determining a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes;

[0188] According to the entity keywords and attribute keywords in the question to be answered, matching is performed in the first knowledge graph to determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords;

[0189] If the node set includes a target entity node and a target attribute node that are interconnected in the first knowledge graph, and the question to be answered contains classification information, then determining a target classification node based on the classification information and the classification node in the first knowledge graph that is connected to the target attribute node;

[0190] According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0191] In a possible implementation, the processor 801 is specifically configured to determine whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered; if so, determining the matching classification node as the target classification node.

[0192] In a possible implementation, the processor 801 is specifically used to obtain a classification directory tree corresponding to the first knowledge graph if the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, and determine the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; and determine the target classification node corresponding to the classification information according to the distance.

[0193] In a possible implementation, the processor 801 is specifically used to determine, for each classification node connected to the target attribute node, the number of nodes from the first position information to the second position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node based on the number of nodes.

[0194] In a possible implementation, the processor 801 is specifically configured to determine, for each classification node connected to the target attribute node, the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein, the longer the distance, the lower the similarity; and the classification node with the highest similarity to the question classification node is determined as the target classification node.

[0195] In a possible implementation, the processor 801 is specifically used to send a first clarification request carrying multiple interconnected entity nodes and attribute nodes to be clarified to the user if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph; and determine the interconnected entity nodes and attribute nodes selected by the user as the target entity nodes and target attribute nodes.

[0196] In a possible implementation, the processor 801 is further configured to, if the question to be answered does not contain classification information, send a second clarification request carrying classification information of the classification node to be clarified to the user based on the classification node to be clarified connected to the target attribute node; determine the classification node to be clarified selected by the user as the target classification node; and determine the target answer corresponding to the target classification node and the target attribute node based on the saved correspondence between the question and the node, and the correspondence between the question and the answer.

[0197] In a possible implementation, the processor 801 is specifically configured to extract entity keywords, attribute keywords, and classification keywords of each standard question in a question knowledge base, and determine, for each standard question in the question knowledge base, interconnected entity nodes, attribute nodes, and classification nodes corresponding to the standard question; match the entity keywords, attribute keywords, and classification keywords in the question to be answered with the entity nodes, attribute nodes, and classification nodes corresponding to any standard question in the question knowledge base, and determine the similarity between the question to be answered and the standard questions; obtain a candidate question list consisting of a preset number of target candidate questions with the highest similarity based on the similarity between the question to be answered and the standard questions; and connect the attribute nodes corresponding to the same entity node to the same entity node, and connect the classification nodes corresponding to the same entity node and attribute node to the same attribute node, based on the entity nodes, attribute nodes, and classification nodes of each target candidate question in the candidate question list, and determine a first knowledge graph of the candidate question list.

[0198] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0199] The communication interface 802 is used for communication between the above electronic device and other devices.

[0200] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0201] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (Network Processor, NP), etc.; it can also be a digital signal processing processor (Digital Signal Processing, DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0202] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the following steps:

[0203] Obtaining a question to be answered input by a user, and determining a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes;

[0204] According to the entity keywords and attribute keywords in the question to be answered, matching is performed in the first knowledge graph to determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords;

[0205] If the node set includes a target entity node and a target attribute node that are interconnected in the first knowledge graph, and the question to be answered contains classification information, then determining a target classification node based on the classification information and the classification node in the first knowledge graph that is connected to the target attribute node;

[0206] According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0207] In a possible implementation, determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes:

[0208] Determining whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered;

[0209] If so, the matched classification node is determined as the target classification node.

[0210] In a possible implementation, determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes:

[0211] If the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, obtain a classification directory tree corresponding to the first knowledge graph, and determine the distance between the question classification node and each classification node based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; based on the distance, determine the target classification node corresponding to the classification information.

[0212] In a possible implementation, determining the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree includes:

[0213] For each classification node connected to the target attribute node, determine the number of nodes from the first position information to the second position information based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node based on the number of nodes.

[0214] In a possible implementation, determining, according to the distance, a target classification node corresponding to the classification information includes:

[0215] For each classification node connected to the target attribute node, determine the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the greater the distance, the lower the similarity;

[0216] The classification node with the highest similarity to the question classification node is determined as the target classification node.

[0217] In a possible implementation, if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, determining the target entity node and the target attribute node includes:

[0218] Sending a first clarification request carrying a plurality of interconnected entity nodes and attribute nodes to be clarified to the user;

[0219] The interconnected entity nodes and attribute nodes selected by the user are determined as the target entity nodes and target attribute nodes.

[0220] In a possible implementation manner, if the question to be answered does not contain classification information, the method further includes:

[0221] sending, according to the classification node to be clarified connected to the target attribute node, a second clarification request carrying classification information of the classification node to be clarified to the user;

[0222] Determining the to-be-clarified classification node selected by the user as the target classification node;

[0223] According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

[0224] In a possible implementation, determining the first knowledge graph corresponding to the question to be answered includes:

[0225] Extracting entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determining, for each standard question in the question knowledge base, mutually connected entity nodes, attribute nodes and classification nodes corresponding to the standard question;

[0226] Matching the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base, and determining the similarity between the question to be answered and the standard questions;

[0227] According to the similarity between the question to be answered and each standard question, a candidate question list consisting of a preset number of target candidate questions with the highest similarity is obtained;

[0228] According to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, the attribute nodes corresponding to the same entity node are connected to the same entity node, and the classification nodes corresponding to the same entity node and attribute node are connected to the same attribute node to determine the first knowledge graph of the candidate question list.

[0229] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM.

[0230] Based on the same inventive concept, the embodiment of the present application also provides a computer program product, which includes: computer program code, when the computer program code is run on a computer, the computer executes any of the question and answer intention clarification methods discussed above. Since the principle of solving the problem by the above computer program product is similar to that of the question and answer intention clarification method, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be repeated.

[0231] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0232] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0233] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0234] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0235] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for clarifying the intention of a question and answer, characterized in that: The method comprises: Obtaining a question to be answered input by a user, and determining a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes; According to the entity keywords and attribute keywords in the question to be answered, matching is performed in the first knowledge graph to determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords; If the node set includes a target entity node and a target attribute node that are interconnected in the first knowledge graph, and the question to be answered contains classification information, then determining a target classification node based on the classification information and the classification node in the first knowledge graph that is connected to the target attribute node; According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

2. The method according to claim 1, characterized in that The determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes: Determining whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered; If so, the matched classification node is determined as the target classification node.

3. The method according to claim 2, characterized in that The determining the target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph includes: If the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, obtain a classification directory tree corresponding to the first knowledge graph, and determine the distance between the question classification node and each classification node based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; based on the distance, determine the target classification node corresponding to the classification information.

4. The method according to claim 3, characterized in that The determining the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree comprises: For each classification node connected to the target attribute node, determine the number of nodes from the first position information to the second position information based on the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; and determine the distance between the question classification node and the classification node based on the number of nodes.

5. The method according to claim 3, characterized in that: The step of determining, according to the distance, a target classification node corresponding to the classification information includes: For each classification node connected to the target attribute node, determine the similarity between the question classification node and the classification node according to the distance between the question classification node and the classification node; wherein the greater the distance, the lower the similarity; The classification node with the highest similarity to the question classification node is determined as the target classification node.

6. The method according to claim 1, characterized in that If the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph, determining the target entity node and the target attribute node includes: Sending a first clarification request carrying a plurality of interconnected entity nodes and attribute nodes to be clarified to the user; The interconnected entity nodes and attribute nodes selected by the user are determined as the target entity nodes and target attribute nodes.

7. The method according to claim 1 or 6, characterized in that: If the question to be answered does not contain classification information, the method further includes: sending, according to the classification node to be clarified connected to the target attribute node, a second clarification request carrying classification information of the classification node to be clarified to the user; Determining the to-be-clarified classification node selected by the user as the target classification node; According to the stored correspondence between the question and the node, and the correspondence between the question and the answer, the target answer corresponding to the target classification node and the target attribute node is determined.

8. The method according to claim 1, characterized in that: The determining the first knowledge graph corresponding to the question to be answered includes: Extracting entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determining, for each standard question in the question knowledge base, mutually connected entity nodes, attribute nodes and classification nodes corresponding to the standard question; Matching the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base, and determining the similarity between the question to be answered and the standard questions; According to the similarity between the question to be answered and each standard question, a candidate question list consisting of a preset number of target candidate questions with the highest similarity is obtained; According to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, the attribute nodes corresponding to the same entity node are connected to the same entity node, and the classification nodes corresponding to the same entity node and attribute node are connected to the same attribute node to determine the first knowledge graph of the candidate question list.

9. A question-answer intention clarification device, characterized in that: The device comprises: An acquisition module, configured to acquire a question to be answered input by a user, and determine a first knowledge graph corresponding to the question to be answered, wherein the first knowledge graph includes entity nodes, attribute nodes, and classification nodes; A first determination module is used to match the entity keywords and attribute keywords in the question to be answered in the first knowledge graph, and determine a node set in the first knowledge graph that matches the entity keywords and attribute keywords; A second determination module is configured to determine a target classification node based on the classification information and the classification nodes connected to the target attribute node in the first knowledge graph if there are target entity nodes and target attribute nodes connected to each other in the first knowledge graph in the node set and the question to be answered contains classification information; The answer module is used to determine the target answer corresponding to the target classification node and the target attribute node according to the stored correspondence between the question and the node, and the correspondence between the question and the answer.

10. The device according to claim 9, characterized in that The second determination module is specifically used to determine whether the classification information contained in the classification node connected to the target attribute node matches the classification information contained in the question to be answered; if so, determine the matching classification node as the target classification node.

11. The device according to claim 10, characterized in that The second determination module is specifically configured to obtain a classification directory tree corresponding to the first knowledge graph if the classification information contained in the classification node connected to the target attribute node does not match the classification information contained in the question to be answered, and determine the distance between the question classification node and each classification node according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of each classification node connected to the target attribute node in the classification directory tree; According to the distance, a target classification node corresponding to the classification information is determined.

12. The device according to claim 11, characterized in that The second determination module is specifically configured to determine, for each classification node connected to the target attribute node, the number of nodes passed through from the first position information to the second position information according to the first position information of the question classification node corresponding to the classification information in the classification directory tree and the second position information of the classification node in the classification directory tree; According to the number of nodes, the distance between the question classification node and the classification node is determined.

13. The device according to claim 11, characterized in that The second determination module is specifically used to determine the similarity between the question classification node and the classification node for each classification node connected to the target attribute node according to the distance between the question classification node and the classification node; wherein, the longer the distance, the lower the similarity; and the classification node with the highest similarity to the question classification node is determined as the target classification node.

14. The device according to claim 9, characterized in that The second determination module is specifically used to send a first clarification request carrying multiple interconnected entity nodes and attribute nodes to be clarified to the user if the node set includes multiple pairs of entity nodes and attribute nodes that are interconnected in the first knowledge graph; and determine the interconnected entity nodes and attribute nodes selected by the user as the target entity nodes and target attribute nodes.

15. The device according to claim 9 or 14, characterized in that The second determination module is further used for sending a second clarification request carrying the classification information of the classification node to be clarified to the user according to the classification node to be clarified connected to the target attribute node if the question to be answered does not contain classification information; determining the classification node to be clarified selected by the user as the target classification node; and determining the target answer corresponding to the target classification node and the target attribute node according to the saved correspondence between the question and the node, and the correspondence between the question and the answer.

16. The device according to claim 9, characterized in that The acquisition module is specifically used to extract entity keywords, attribute keywords and classification keywords of each standard question in the question knowledge base, and determine the interconnected entity nodes, attribute nodes and classification nodes corresponding to each standard question in the question knowledge base; match the entity keywords, attribute keywords and classification keywords in the question to be answered with the entity nodes, attribute nodes and classification nodes corresponding to any standard question in the question knowledge base to determine the similarity between the question to be answered and the standard questions; according to the similarity between the question to be answered and the standard questions, obtain a candidate question list consisting of a preset number of target candidate questions with the highest similarity; according to the entity nodes, attribute nodes and classification nodes of each target candidate question in the candidate question list, connect the attribute nodes corresponding to the same entity node with the same entity node, and connect the classification nodes corresponding to the same entity node and attribute node with the same attribute node to determine the first knowledge graph of the candidate question list.

17. An electronic device, characterized in that: include: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps included in any one of the methods of claims 1-8 according to the obtained program instructions.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method according to any one of claims 1 to 8.

19. A computer program product, characterized in that The computer program product comprises: a computer program code, and when the computer program code is run on a computer, the computer is enabled to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Intelligent question and answer method and device and computer equipment

    CN112052324A

  • Method and device for determining answers to questions, computer equipment and storage medium

    CN112287095A

  • Knowledge graph question answering method based on question graph iterative retrieval

    CN113342952A

  • Question relation graph construction method for question answering system and question answering method and device

    CN114676213A

  • Question and answer search method, system and equipment based on knowledge graph and medium

    CN114911915A