Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for user question supplementary information that can be closer to a user's request after the user question supplementary information.
In a first aspect, a method for providing supplemental information for a question of a user is provided, the method comprising:
taking a current user question as input of a first matching model to obtain a plurality of semantic nodes matched with the current user question, wherein the plurality of semantic nodes form a current matching node set, and the semantic nodes are semantic nodes in a pre-established business guide graph; the service guide graph comprises a plurality of semantic nodes organized according to a tree structure, wherein each semantic node corresponds to a standard semantic element, and a plurality of leaf nodes of the tree structure are loaded with a plurality of corresponding knowledge point titles;
when the current matching node set is matched with a plurality of links of the business guide graph, at least a plurality of candidate knowledge point titles mounted on the links, the current matching node set, the dialogue context and behavior state information of a user are used as inputs of a second matching model, and matching degrees of the candidate knowledge point titles and the current user question are obtained;
And determining standard semantic elements supplemented to the current user question according to the matching degree of each candidate knowledge point title and the current user question, and determining the knowledge point title matched with the current user question.
In one possible implementation, the dialog context includes at least one of:
a history matching node set, wherein the history matching node set comprises semantic nodes matched with each history question before the current user question;
knowledge point titles corresponding to historical question sentences of the previous sentence of the current user question sentence;
semantic nodes matched with knowledge points corresponding to a previous sentence of the current user question;
semantic nodes matched with knowledge points corresponding to each historical question in the session to which the current user question belongs.
In one possible implementation, the behavior state information of the user includes at least one of the following:
product information purchased or used by the user, browsing behavior information of the user, and operation failure information of the user.
In a possible implementation manner, the determining the standard semantic elements complementary to the current user question and the knowledge point titles matched with the current user question according to the matching degree of each candidate knowledge point title and the current user question includes:
Determining the maximum matching degree from the matching degree of each candidate knowledge point title and the current user question;
and when the maximum matching degree is larger than a first threshold value, determining that the knowledge point title matched with the current user question is a candidate knowledge point title corresponding to the maximum matching degree.
Further, the determining standard semantic elements for supplementing the current user question according to the matching degree of each candidate knowledge point title and the current user question, and the knowledge point titles matched with the current user question, further includes:
and when the maximum matching degree is larger than a second threshold value and smaller than or equal to the first threshold value, determining that the knowledge point titles matched with the current user question are ranked in a preset number of candidate knowledge point titles before the current user question is ranked according to the matching degree from large to small, wherein the first threshold value is larger than the second threshold value.
Further, the determining standard semantic elements for supplementing the current user question according to the matching degree of each candidate knowledge point title and the current user question, and the knowledge point titles matched with the current user question, further includes:
and outputting prompt information when the maximum matching degree is smaller than or equal to the second threshold value, wherein the prompt information is used for prompting the user for supplementary information.
In one possible implementation, the dialog context includes a history matching node set including semantic nodes matching each history question preceding the current user question; the second matching model is used for determining the titles of all candidate knowledge points to generate first probabilities of semantic nodes contained in the current matching node set and semantic nodes contained in the history matching node set;
and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability.
Further, the dialogue context further comprises a knowledge point title corresponding to a history question of a previous sentence of the current user question;
the second matching model is further used for determining a second probability from the knowledge point title corresponding to the previous sentence history question to each candidate knowledge point title;
and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability and the second probability.
Further, the second matching model is further used for determining third probabilities from behavior state information of the user to each candidate knowledge point title;
And the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability, the second probability and the third probability.
In a second aspect, there is provided an apparatus for providing supplemental information for a question of a user, the apparatus comprising:
the matching node determining unit is used for taking a current user question as the input of a first matching model to obtain a plurality of semantic nodes matched with the current user question, wherein the semantic nodes form a current matching node set, and the semantic nodes are semantic nodes in a pre-established business guide graph; the service guide graph comprises a plurality of semantic nodes organized according to a tree structure, wherein each semantic node corresponds to a standard semantic element, and a plurality of leaf nodes of the tree structure are loaded with a plurality of corresponding knowledge point titles;
the matching degree determining unit is used for taking at least a plurality of candidate knowledge point titles mounted on a plurality of links, the current matching node set, the dialogue context and behavior state information of a user as inputs of a second matching model when the current matching node set obtained by the matching node determining unit is matched with the links of the business guide graph, so as to obtain the matching degree of each candidate knowledge point title and the current user question;
And the supplementary information unit is used for determining standard semantic elements supplementary to the current user question and knowledge point titles matched with the current user question according to the matching degree of each candidate knowledge point title obtained by the matching degree determination unit and the current user question.
In a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first aspect.
In a fourth aspect, there is provided a computing device comprising a memory having executable code stored therein and a processor which, when executing the executable code, implements the method of the first aspect.
According to the method and the device provided by the embodiment of the specification, firstly, a current user question is used as input of a first matching model, a current matching node set formed by semantic nodes matched with the current user question in a pre-established business guide is obtained, then when the current matching node set is matched with a plurality of links of the business guide, at least a plurality of candidate knowledge point titles mounted on the links, the current matching node set, a dialogue context and behavior state information of a user are used as input of a second matching model, the matching degree of each candidate knowledge point title and the current user question is obtained, and finally, standard semantic elements supplemented for the current user question and knowledge point titles matched with the current user question are determined according to the matching degree of each candidate knowledge point title and the current user question. From the above, in the embodiment of the present disclosure, whether to supplement the information is not determined simply according to the smoothness of the user question after the supplement of the information, but based on the standard semantic elements corresponding to each semantic node in the service guide, firstly, which standard semantic elements are included in the user question is identified, and then, according to the dialogue context and the behavior state information of the user, the standard semantic elements missing in the user question are determined to be supplemented in the user question, so that the user requirement can be more similar to the user requirement after the supplement of the information of the user question.
Detailed Description
The following describes the scheme provided in the present specification with reference to the drawings.
Fig. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification. The implementation scenario involves supplementing information for a user question, specifically, based on a pre-established business guide, supplementing information for a user question. Typically, the question-answering robot answers user questions (i.e., user questions) using question (i.e., question-answer (i.e., knowledge point) pairs in a knowledge base. The knowledge base contains a large number of question-answer pairs, wherein the questions are called standard questions (called standard questions for short), the user question sentences are matched with the standard questions in the knowledge base, and if the matched standard questions are found, the corresponding answers are returned. In order to expand the generalization capability of standard question understanding, one standard question corresponds to a plurality of literally different expression modes, which are called question-asking question methods, and if a user question sentence is matched with a certain question method, the question-asking question method is equivalent to the matching of the user question sentence and the question corresponding to the question method. The correspondence between questions and questions is 1 to more, and the correspondence between questions and questions is 1 to 1.
And (3) sorting each question in the knowledge base into a group of standard semantic elements through business personnel, wherein the questions and the semantic elements are combined in one-to-one correspondence. And then, according to the service field division, combining the semantic elements corresponding to the identifiers to construct a tree taking the service elements as root nodes. The root node of each tree is a business element, the child nodes are semantic elements in the business subdivision field, such as operation, attribute and state, the lower layer is a semantic element in the subdivision field, such as sub-operation, sub-attribute and the like, the hierarchical subdivision field is a problem type semantic element, such as why, how, what and the like. All combinations of elements on each path from the root node to the leaf node correspond to a question within the knowledge base, which may also be referred to as a knowledge point title.
Referring to fig. 1, a traffic map 100 includes a plurality of nodes (e.g., node 11, node 12, node 13, node 14), which may also be referred to as "semantic nodes," organized into a tree hierarchy according to a traffic dimension. Each node corresponds to a standard semantic element, the standard semantic element has a keyword and an associated expression of the keyword, for example, the keyword corresponding to the node 11 is "balance treasures", and the node 11 corresponds to the semantic element of the service type; the keyword corresponding to the node 12 is refund, and the node 12 corresponds to the semantic element of the operation type; the keyword corresponding to the node 13 is 'query', and the semantic element of the sub-operation type corresponding to the node 13; the keyword corresponding to the node 14 is "how", and the node 14 corresponds to the semantic element of the question type. Wherein each keyword may have one or more associated expressions, including synonymous expressions, implication expressions, context words, etc., e.g., the keyword "how" may have associated expressions. Each semantic node can be configured with its associated expression, and the configuration of the keywords and their associated expressions is to identify matching keys to the node according to the user question. The root node of the traffic pattern represents a traffic with a specific traffic type, e.g. node 11 is the root node and represents a specific traffic "balance treasures". The leaf node of the service guide graph mounts knowledge points associated with the keywords of the leaf node, for example, the node 14 is a leaf node, the keywords of the leaf node are "how" and the leaf node mounts knowledge points 15 "how to query balance refunds" and answers, wherein each knowledge point corresponds to a knowledge point title, which is also called a standard question sentence, for example, the knowledge point title may be "how to query balance refunds".
The service guide diagram is a tree structure which is carded by operators, and each knowledge point of the knowledge base is organized in a hierarchical form. It can be seen that the root node of the tree is a service type, the leaf node of the tree is a knowledge point in the knowledge base after layer-by-layer branching, the structure of the guide graph and the node name can be modified and adjusted, and great convenience is provided for operators to edit and adjust the knowledge base.
By matching the user question to each "semantic node", the answer required by the user is deduced. And when the matching node set is matched with a plurality of links of the service guide graph, taking the knowledge point titles mounted on the leaf nodes of each link as candidate knowledge point titles. For example, semantic node 11 "balance treasures", semantic node 12 "refunds", semantic node 13 "queries", semantic node 14"how" forms a link of the business map, and the knowledge points of the knowledge points mounted by leaf nodes "how" of the link are entitled "how to query balance treasures refunds".
When there are multiple candidate knowledge point titles, additional information for the user question is needed to further clarify the user's request, so that knowledge point titles that ultimately match the user question are selected from the multiple candidate knowledge point titles.
In the embodiment of the specification, element recognition can be performed not only on a user question, namely, a semantic node matched with the user question is determined, but also on an information source for supplementary information, namely, a semantic node matched with the information source is determined, wherein the information source is from two aspects in general, one is a user context, such as a history question before a current user question, a knowledge point title matched with the history question, a knowledge point matched with the history question and the like; the other is user information, specifically behavior state information of the user, such as product information purchased or used by the user, browsing behavior information of the user, operation failure information of the user, and the like.
The user question after the supplementary information is obtained through element identification and element supplementation, and then the knowledge point title matched with the user question can be more in line with the user's requirement.
Fig. 2 illustrates a flow diagram of a method for user question supplemental information, which may be based on the business guide shown in fig. 1, in accordance with one embodiment. As shown in fig. 2, the method in this embodiment includes the steps of: step 21, taking a current user question as input of a first matching model to obtain a plurality of semantic nodes matched with the current user question, wherein the plurality of semantic nodes form a current matching node set, and the semantic nodes are semantic nodes in a pre-established business guide graph; the service guide graph comprises a plurality of semantic nodes organized according to a tree structure, wherein each semantic node corresponds to a standard semantic element, and a plurality of leaf nodes of the tree structure are loaded with a plurality of corresponding knowledge point titles; step 22, when the current matching node set is matched with a plurality of links of the business guide graph, at least using a plurality of candidate knowledge point titles mounted on the links, the dialogue context of the current matching node set and behavior state information of a user as inputs of a second matching model to obtain matching degrees of each candidate knowledge point title and the current user question; and step 23, determining standard semantic elements supplemented to the current user question and knowledge point titles matched with the current user question according to the matching degree of each candidate knowledge point title and the current user question. Specific implementations of the above steps are described below.
Firstly, in step 21, taking a current user question as input of a first matching model to obtain a plurality of semantic nodes matched with the current user question, wherein the plurality of semantic nodes form a current matching node set, and the semantic nodes are semantic nodes in a pre-established business guide graph; the business guide graph comprises a plurality of semantic nodes organized according to a tree structure, wherein each semantic node corresponds to a standard semantic element, and a plurality of leaf nodes of the tree structure are loaded with a plurality of corresponding knowledge point titles.
In the embodiment of the present disclosure, since each semantic node corresponds to a standard semantic element, the process of determining the current matching node set is actually also a process of element identification. Fig. 3 is a schematic diagram of key steps of a method for providing supplemental information for a question of a user according to an embodiment of the present disclosure, and referring to fig. 3, the method mainly includes two key processing steps: and outputting the user question after element supplementation to a question-answering (QA) engine aiming at element identification and element supplementation of the user question (query).
The purpose of element identification is to judge what is in the question of the user and what is lacking.
For general user questions, the method can be divided into two parts, namely a condition and a solution. Wherein the condition section indicates the state in which the current user is, what operation has been completed, what process has been applied, or some attribute of the account is in some state; the user is the center of the question, indicating what information the user wishes to obtain, or what to do.
The user's description can be further subdivided into: business/product, attributes, operations, and problem types. For complex services, the sub-attributes or sub-operations of the attributes are also included under the attributes, and the sub-attributes or sub-operations are also included under the operations. The question type indicates which aspect of the core attribute/operation the user wants to learn. Typically, the types of questions related to attributes include: what is, where, can be used, what is used, etc.; types of problems associated with operations include: what may be, why it may not be, what may be done, and so on. In addition, there are direct questions for the status. The key element in the user question may be a word or a phrase, and for the phrase, each component may appear continuously in the sentence, may be spaced in the middle, may appear sequentially or may appear in reverse order, provided that the components form a close dependency relationship in the dependency syntax analysis.
Fig. 4 is a flowchart of a method for performing element recognition on a user question according to an embodiment of the present disclosure, and referring to fig. 4, the element recognition is divided into the following steps:
a) And word segmentation is carried out on the user question.
b) And carrying out syntactic analysis on the segmentation result.
c) And identifying each basic element contained in the sentence and the modification relation among the basic elements according to the knowledge base guide diagram and the syntactic analysis result.
d) According to the synonym normalization, converting each basic element into a standard element; it will be appreciated that each semantic node in the business map has a keyword and a plurality of associated expressions, and the basic elements identified in step c) may be associated expressions, and the associated expressions are converted into keywords, i.e. the basic elements are converted into standard elements.
e) After the element identification is completed, the element identification is transmitted to a context storage system to provide context information for subsequent conversations; and on the other hand, the elements are input into the element supplementing module so as to supplement the elements.
Next, in step 22, when the current matching node set matches the links of the service guide graph, at least the candidate knowledge point titles mounted on the links, the dialogue context of the current matching node set, and the behavior state information of the user are used as inputs of a second matching model, so as to obtain the matching degree of each candidate knowledge point title and the current user question.
It is understood that in the embodiment of the present specification, the session context is specifically a session context. Optionally, the dialog context includes at least one of:
a history matching node set, wherein the history matching node set comprises semantic nodes matched with each history question before the current user question;
knowledge point titles corresponding to historical question sentences of the previous sentence of the current user question sentence;
semantic nodes matched with knowledge points corresponding to a previous sentence of the current user question;
semantic nodes matched with knowledge points corresponding to each historical question in the session to which the current user question belongs.
Optionally, the behavior state information of the user includes at least one of:
product information purchased or used by the user, browsing behavior information of the user, and operation failure information of the user.
In one example, the dialog context includes a history matching node set including semantic nodes that match each history question preceding the current user question; the second matching model is used for determining the titles of all candidate knowledge points to generate first probabilities of semantic nodes contained in the current matching node set and semantic nodes contained in the history matching node set; and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability.
In another example, the dialogue context further includes a knowledge point title corresponding to a history question of a previous sentence of the current user question; the second matching model is further used for determining a second probability from the knowledge point title corresponding to the previous sentence history question to each candidate knowledge point title; and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability and the second probability.
In another example, the second matching model is further for determining a third probability from behavioral state information of the user to each candidate knowledge point title; and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability, the second probability and the third probability.
In the embodiment of the present specification, the input information of the element supplementing section may mainly come from two aspects, namely, the dialogue context and the user information. Specifically, for example, all elements of the current user question of the previous element analysis module, all elements mentioned in the previous dialog provided by the context storage system, the previous sentence of the user question, and descriptions of the user status including products that the user has purchased or used, such as insurance, financing, loan, etc., and the status of these products, such as claim cases, interest cases, billing information, etc., and further including recent browsing behavior of the user, recent behavior of operation failure information, etc., and encountered obstacles, etc.
The element replenishment will process the information comprehensively, analyzing the possible solution of the user. The specific processing mode refers to the element supplementing schematic diagram shown in fig. 5.
The purpose of element replenishment is to clarify the user's request, and to understand the user's request when information is missing in the user's expression. In order to achieve the purpose, the element supplementing module extracts information from the requests of the previous questions, elements contained in the context, behavior states in the user information system and the like, comprehensively judges the most likely requests (questions) of the current user, and judges which information is supplemented into the current questions based on the requests. The calculation method of the user's (question) determination is given below in the form of a formula.
(kid*,contextKeywords*,keywords*,userStatus*)=argmax(f(kid,prekid,contextKeywords,keywords,userStatus))
Wherein, the liquid crystal display device comprises a liquid crystal display device,
kid is the final determined user's said solution (challenge identification (id));
contextKeywords is information that is supplemented from the context;
keywords is information extracted from a current question;
userStatus is information extracted from the user state;
kid is the bid id of all candidates;
prekid is the bid id of the previous sentence question of the user (or prekids-all/topN bid id candidates corresponding to the previous sentence question of the user);
contextkeywords= { ckey1, ckey2, …, ckeyn } is a key element stored in the context memory that appears in the previous dialog process;
keywords= { key1, key2, …, key } is all key elements identified from the current user question;
userstatus= { us1, us2, …, usk } is the entire state and behavior information of the current user.
f is a function of the measure of the degree of matching of kid to other parameters.
The function f for measuring the matching degree of kid and other parameters in the above scheme is key, and can be defined according to service requirements or certain standards, and a sample function is given herein for reference:
f=f1(kid,prekid)*f2(kid,contextKeywords,keywords)*f3(kid,userStatus)
wherein the method comprises the steps of
f1 (kid, prekid) is the transition probability from prekid to kid, i.e., p (kid|prekid); if the prekid set prekids is used, f1 can also be defined as sigma (p (kid|prekidi) ×p (prekidi)).
f2 (kid, contextkeys, keys) is the probability that the key represents the question to generate the previous keyword and the current keyword; here, since the current keyword keywords lacks elements, the keywords in the contextKeywords may be used for word filling, and different combinations may be selected based on the elements in the keywords and the contextKeywords, where the different combinations represent the currently possible observations (different observations with different emphasis points). f2 is in fact the probability of estimating different kids given several possible observations;
The combination mode is as follows: { business |product=k1, attribute |operation=k2, [ sub-attribute |sub-operation=k3 ], question type=k4, … … }, all combinations may require reference to all question patterns in the guide.
f3 (kid, userStatus) is the probability that kid appears given a user state, and when the number of variables describing the user state is selected to be small, the user state can be described by a combination of these variables, and when the number of variables describing the user state is selected to be large, f3 can be further decomposed into f3=p (us1|kid) p (us2|kid) … p (usk|kid) for the convenience of calculation
The above parameters are generally derived from statistics of the real dataset, and since the maximum value (argmax) is found, very comprehensive statistics are not necessarily required in the real system, and missing values can be replaced by default parameters.
In order to embody certain operation rules and simplify the calculation, certain parameters may be forced to preset fixed values. For example, assuming that questions related to non-checkout are related only to operations that the user has currently performed, the probability of occurrence of related questions for unrelated services may be forced to zero.
Finally, in step 23, according to the matching degree of each candidate knowledge point title and the current user question, determining the standard semantic elements supplemented to the current user question and the knowledge point titles matched with the current user question.
In one example, determining a maximum degree of matching from the degree of matching of each candidate knowledge point title with the current user question; and when the maximum matching degree is larger than a first threshold value, determining that the knowledge point title matched with the current user question is a candidate knowledge point title corresponding to the maximum matching degree.
Further, the method may further include:
and when the maximum matching degree is larger than a second threshold value and smaller than or equal to the first threshold value, determining that the knowledge point titles matched with the current user question are ranked in a preset number of candidate knowledge point titles before the current user question is ranked according to the matching degree from large to small, wherein the first threshold value is larger than the second threshold value.
Further, the method may further include:
and outputting prompt information when the maximum matching degree is smaller than or equal to the second threshold value, wherein the prompt information is used for prompting the user for supplementary information.
In a specific example, the matching degree of the titles of the multiple candidate knowledge points and the current user question is calculated by solving the formula, so that the most suitable standard problem with the current user question is found, and meanwhile, missing information in the user question is complemented. If the obtained kid finally enables the corresponding f function value to exceed the preset threshold A, the kid is used as a user request to be transmitted to a follow-up question-answering engine; if the finally obtained kid enables the corresponding f function value not to exceed the preset threshold A but to exceed the preset threshold B, topN kid is selected as a possible user to be transmitted to a subsequent question-answering engine; and if the obtained kid finally causes the corresponding f function value not to exceed the preset threshold B, prompting the user to further definitely obtain the result, or prompting the user to supplement the specified information through a query.
The key point of the method provided by the embodiment of the specification is that what is in the question of the user is determined based on the business guide diagram, and then what needs to be supplemented is determined according to the knowledge base. The source of element-supplemented information may include, but is not limited to, the user asking the elements mentioned in the foregoing, the former sentence asking and the user's status. Other sources of information may be added, such as elements in a sentence of answers on the robot, elements of all answers in the current session (session) of the robot, etc. The information of each information source in the element supplementing process can be processed simultaneously by a same person. The elements can be supplemented sequentially according to the priority, and when the information source with high priority cannot obtain a trusted result, the information source with low priority is considered to be used for element supplementation. Still further, different priorities may be set for the scenes. When elements are supplemented in order, only the information sources in the current order can be considered, and the combination of the previous high-priority information sources can also be considered.
The method provided by the embodiment of the description can obtain better effects than the usual method for supplementing information for a user question.
According to the general method, firstly, a scene code supplements words, if a user enters a customer service robot from a specific entrance related to a certain service, the corresponding service words are added into a question of the user, and missing service words in the question are supplemented; supplementing service words according to the scene codes, wherein the service words cannot be supplemented for users entering from a general portal such as my customer service; fuzzy questions for non-business word deletions are also not effectively addressed. That is, there is a disadvantage 1, and the non-specific business scenario cannot be complemented.
The information sources supplemented by the elements of the scheme comprise elements in the prior part of the user question, the question of the prior sentence question, the recent behavior of the user and the like. In the absence of business scenario information, element replenishment may still be performed.
In a general method II, context is used for word supplement, when a question of a user appears in the process of a dialogue rather than at the beginning of the dialogue, an algorithm extracts words which are mentioned by the user in the prior art and tries to be added into a current question sentence, so that the aim of information supplement is fulfilled. Extracting keywords from the context to supplement the user question, wherein the situation that a certain keyword is missing in the fuzzy question can be effectively dealt with, but the situation that a phrase is missing in the question, such as 'payment treasured binding' is not released, a 'bound bank card' system is busy, the situation cannot be considered, and all possible candidate words are traversed based on a context word supplementing algorithm, the sequence degree of sentences is judged through a language model, and necessary information is extracted from the text according to the missing information in a targeted manner; in addition, the situation that the first question information of the user is missing cannot be dealt with. That is, there is a disadvantage 2 that multiple words cannot be added.
According to the scheme, candidate elements are obtained from each information source, and which elements are supplemented is judged according to the adaptation degree of the current questioning element, the candidate supplement element and the element expression in the guide chart. A single element may be supplemented, or a plurality of elements may be supplemented.
In a third general method, the previous is spliced, when the questions of the user appear in the process of the dialogue, but not at the beginning of the dialogue, all the questions of the user in the previous are connected to the front of the current question, and the connected questions are taken as the questions of the user. The problem that only one word can be supplemented in the second method is solved to a certain extent, but a new problem is also introduced. The interference information in the spliced sentences is too much, so that the judgment of the algorithm on the real intention of the user is affected. In addition, in the case that the user omits other information sources such as information from the previous operation behavior of the user, text splicing by only relying on the previous text cannot be solved; if the user asks the answer, the problem of information missing cannot be solved. That is, there is a defect 3 that the interference information is too much
Firstly, in the scheme, element analysis is carried out on a user question (query), unnecessary interference information is filtered, elements are stored in the context, and a lot of unnecessary interference is removed. And secondly, the scheme is used for marking candidate questions according to elements in the user questions and the service guide chart, so that the search range is further reduced. And finally, sorting the candidate questions through matching degree calculation to complete disambiguation of the user intention, wherein the method is more direct to the original intention of the user than the original method.
In the embodiment of the specification, an information supplementing method of a fuzzy question of a customer service robot based on element analysis and knowledge graph is provided. Mainly comprises the following characteristics: first, it is identified which predefined elements of the derivative knowledge base are included in the user question. Secondly, according to the combination of the existing elements in the question and the elements in the guide chart, the most probable intention of the user is judged by combining the context of multiple information sources, and the elements need to be supplemented. Compared with the common method which can not see which information is contained in the current question and which information is contained in the knowledge base, the method can supplement information from various data sources blindly, more efficiently and accurately. Moreover, even if the user question is not within the coverage of the knowledge base, knowledge points close to the user's question can be given by supplementing elements through element analysis of the question.
According to an embodiment of another aspect, there is further provided an apparatus for supplementing information for a user question, which is configured to perform the method for supplementing information for a user question provided in the embodiment of the present specification. Fig. 6 shows a schematic block diagram of an apparatus for user question supplemental information according to one embodiment. As shown in fig. 6, the apparatus 600 includes:
A matching node determining unit 61, configured to obtain a plurality of semantic nodes matched with a current user question as input of a first matching model, where the plurality of semantic nodes form a current matching node set, and the semantic nodes are semantic nodes in a pre-established service guide graph; the service guide graph comprises a plurality of semantic nodes organized according to a tree structure, wherein each semantic node corresponds to a standard semantic element, and a plurality of leaf nodes of the tree structure are loaded with a plurality of corresponding knowledge point titles;
a matching degree determining unit 62, configured to, when the current matching node set obtained by the matching node determining unit 61 matches the multiple links of the service guide graph, obtain matching degrees of each candidate knowledge point title and the current user question by using at least multiple candidate knowledge point titles mounted on the multiple links, the current matching node set, the dialogue context, and behavior state information of the user as inputs of a second matching model;
and a supplementary information unit 63, configured to determine, according to the matching degree between each candidate knowledge point title obtained by the matching degree determining unit 62 and the current user question, standard semantic elements supplementary to the current user question, and knowledge point titles matched with the current user question.
Optionally, as an embodiment, the dialogue context adopted by the matching degree determining unit 62 includes at least one of the following:
a history matching node set, wherein the history matching node set comprises semantic nodes matched with each history question before the current user question;
knowledge point titles corresponding to historical question sentences of the previous sentence of the current user question sentence;
semantic nodes matched with knowledge points corresponding to a previous sentence of the current user question;
semantic nodes matched with knowledge points corresponding to each historical question in the session to which the current user question belongs.
Optionally, as an embodiment, the behavior state information of the user includes at least one of the following:
product information purchased or used by the user, browsing behavior information of the user, and operation failure information of the user.
Optionally, as an embodiment, the supplemental information unit 63 is specifically configured to:
determining the maximum matching degree from the matching degree of each candidate knowledge point title and the current user question;
and when the maximum matching degree is larger than a first threshold value, determining that the knowledge point title matched with the current user question is a candidate knowledge point title corresponding to the maximum matching degree.
Further, the supplementary information unit 63 is further configured to determine that, when the maximum matching degree is greater than a second threshold and less than or equal to the first threshold, knowledge point titles that match the current user question are ranked by a preset number of candidate knowledge point titles before the ranking according to the matching degree from high to low, where the first threshold is greater than the second threshold.
Further, the supplemental information unit 63 is further configured to output a prompt message when the maximum matching degree is less than or equal to the second threshold, where the prompt message is used to prompt the user for supplemental information.
Optionally, as an embodiment, the dialogue context includes a history matching node set, where the history matching node set includes semantic nodes matching each history question before the current user question; the second matching model adopted by the matching degree determining unit 62 is used for determining the first probability that each candidate knowledge point title generates the semantic node contained in the current matching node set and the semantic node contained in the history matching node set;
and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability.
Further, the dialogue context further comprises a knowledge point title corresponding to a history question of a previous sentence of the current user question;
the second matching model is further used for determining a second probability from the knowledge point title corresponding to the previous sentence history question to each candidate knowledge point title;
and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability and the second probability.
Further, the second matching model is further used for determining third probabilities from behavior state information of the user to each candidate knowledge point title;
and the second matching model determines the matching degree of each candidate knowledge point title and the current user question according to at least the first probability, the second probability and the third probability.
Through the device provided in this embodiment of the present disclosure, the matching node determining unit 61 first uses the current user question as the input of the first matching model to obtain a current matching node set formed by semantic nodes matched with the current user question in the pre-established service guide chart, then when the current matching node set is matched with multiple links of the service guide chart, the matching degree determining unit 62 uses at least multiple candidate knowledge point titles mounted on the multiple links, the current matching node set, the dialogue context and behavior state information of the user as the input of the second matching model to obtain the matching degree of each candidate knowledge point title and the current user question, and finally the supplementary information unit 63 determines standard semantic elements supplementary to the current user question and knowledge point titles matched with the current user question according to the matching degree of each candidate knowledge point title and the current user question. From the above, in the embodiment of the present disclosure, whether to supplement the information is not determined simply according to the smoothness of the user question after the supplement of the information, but based on the standard semantic elements corresponding to each semantic node in the service guide, firstly, which standard semantic elements are included in the user question is identified, and then, according to the dialogue context and the behavior state information of the user, the standard semantic elements missing in the user question are determined to be supplemented in the user question, so that the user requirement can be more similar to the user requirement after the supplement of the information of the user question.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 2 to 5.
According to an embodiment of yet another aspect, there is also provided a computing device including a memory having executable code stored therein and a processor that, when executing the executable code, implements the method described in connection with fig. 2-5.
Those skilled in the art will appreciate that in one or more of the examples described above, the functions described in the present invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, these functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention in further detail, and are not to be construed as limiting the scope of the invention, but are merely intended to cover any modifications, equivalents, improvements, etc. based on the teachings of the invention.