Intent recognition method and device, question-answering method and system, equipment, and medium

Through the combination of the tree structure intention recognition method and text classification model, the problems of low intent recognition efficiency and insufficient accuracy in the intelligent question-and-answer system are solved, and fast and accurate intention recognition is achieved, improving the overall performance of the system.

CN116150303BActive Publication Date: 2025-08-12MASHANG CONSUMER FINANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211241252.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-11
Publication Date
2025-08-12
Estimated Expiration
2042-10-11

AI Technical Summary

Technical Problem

In the existing intelligent question and answer system, the intent recognition efficiency based on the text classification model is low, and the text to be recognized generated by the automatic speech recognition module is incorrectly recognized, which affects the accuracy of intent recognition and the speed of the system question and answer.

Method used

The intent recognition method with a tree structure is adopted to first determine the matching of the keywords of the text to be identified and the alternative words of the candidate intent, and the intent is quickly determined through the matching of the root node and the leaf node step by step. When the perfect match cannot be fully matched, supplementary recognition is used using the text classification model.

Benefits of technology

The efficiency and accuracy of intention recognition are improved, and the average recognition time is reduced to 10ms, which improves the efficiency and accuracy of the intelligent question-and-answer system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150303B_ABST
    Figure CN116150303B_ABST
Patent Text Reader

Abstract

The present disclosure provides an intent recognition method and apparatus, a question-answering method and system, a device, and a medium. The method includes: determining whether multiple keywords in a text to be recognized fully match multiple alternative words in a candidate intent; wherein the multiple alternative words in the candidate intent are arranged in a tree structure, and the tree structure includes a root node and at least one leaf node; in the case where multiple keywords in the text to be recognized do not fully match multiple alternative words in the candidate intent, but there are keywords that match the alternative words corresponding to the root node, determining whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node; in the case where there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node, performing intent recognition on the text to be recognized using a text classification model to obtain the intent of the text to be recognized. This method can improve the efficiency and accuracy of intent recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of natural language processing technology, and in particular to an intent recognition method and apparatus, a question-answering method and system, equipment, and medium. Background Art

[0002] Intelligent question-answering systems can understand users' natural language questions, accurately capture their true intent, and provide concise and accurate answers. They are widely used in voice customer service systems for banks, telecom operators, and e-commerce stores, saving significant manpower and improving service efficiency. Common intelligent question-answering systems include task-oriented, question-answering (QA), and open-domain. Question-answering systems employ methods such as text classification and text matching to identify intent. After receiving a user's question, they can directly provide an answer. The accuracy of question recognition directly impacts the accuracy of the answer. Summary of the Invention

[0003] The present disclosure provides an intent recognition method and apparatus, a question-answering method and system, equipment, and media.

[0004] In a first aspect, the present disclosure provides an intent recognition method, the intent recognition method comprising: determining whether multiple keywords in a to-be-recognized text all match multiple candidate words in a candidate intent; wherein the multiple candidate words in the candidate intent are arranged in a tree structure, the tree structure including a root node and at least one leaf node, and the root node and the leaf node are respectively provided with one candidate word;

[0005] In the case where multiple keywords in the text to be recognized all match multiple candidate words in the candidate intent, determining the candidate intent as the intent of the text to be recognized;

[0006] In the case where the multiple keywords in the to-be-recognized text do not all match the multiple alternative words in the candidate intent, and there is a keyword that matches the alternative word corresponding to the root node, determining whether there is a keyword in the to-be-recognized text that matches the alternative word corresponding to the leaf node;

[0007] If there is no keyword in the to-be-recognized text that matches the candidate word corresponding to the leaf node, outputting an empty intent;

[0008] In the case that there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text to be recognized is subjected to intent recognition using a text classification model to obtain the intent of the text to be recognized.

[0009] In a second aspect, the present disclosure provides an intelligent question-answering method, which is applied to an agent side and includes:

[0010] Acquire speech recognition text; wherein the speech recognition text is text obtained by processing the user's question;

[0011] Performing the intention recognition method provided in the present disclosure on the speech recognition text to obtain the intention corresponding to the speech recognition text;

[0012] An answer corresponding to the speech recognition text is generated based on the intention corresponding to the speech recognition text, and the answer is output.

[0013] In a third aspect, the present disclosure provides an intention recognition device, comprising:

[0014] a judgment module, configured to judge whether multiple keywords in the to-be-recognized text all match multiple candidate words in the candidate intent; wherein the multiple candidate words in the candidate intent are arranged in a tree structure, the tree structure including a root node and at least one leaf node, and the root node and the leaf node are respectively provided with one candidate word;

[0015] a determination module, configured to determine the candidate intent as the intent of the text to be recognized if all of the multiple keywords in the text to be recognized match the multiple candidate words in the candidate intent;

[0016] The judgment module is further configured to judge whether there is a keyword in the to-be-recognized text that matches the alternative word corresponding to the leaf node, when the multiple keywords in the to-be-recognized text do not all match the multiple alternative words in the candidate intent, but there is a keyword that matches the alternative word corresponding to the root node;

[0017] The determination module is further configured to output an empty intent if there is no keyword in the to-be-recognized text that matches the candidate word corresponding to the leaf node;

[0018] The recognition module is used to use a text classification model to perform intent recognition on the text to be recognized when there is a keyword in the text to be recognized that matches the alternative word corresponding to the leaf node, so as to obtain the intent of the text to be recognized.

[0019] In a fourth aspect, the present disclosure provides an intelligent question-answering system, which is applied to an agent side and includes:

[0020] An acquisition module, configured to acquire a speech recognition text; wherein the speech recognition text is a text obtained by processing a user's question;

[0021] A recognition module, configured to process the speech recognition text using the above-mentioned intention recognition device to obtain the intention corresponding to the speech recognition text;

[0022] A generation module is used to generate an answer corresponding to the speech recognition text based on the intention and output the answer.

[0023] In a fifth aspect, the present disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and one or more of the computer programs are executed by the at least one processor to enable the at least one processor to execute the above-mentioned intention recognition method or intelligent question-answering method.

[0024] In a sixth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned intention recognition method or intelligent question-answering method when executed by a processor / processing core.

[0025] The intention recognition method provided by the present disclosure determines whether multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions all match. When multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions all match, the candidate intention is determined as the intention of the text to be recognized. Compared with other intention recognition methods, the comparison of keywords and alternative words can quickly and accurately determine the intention of the text to be recognized, and the average intention recognition time can be reduced to 10ms, thereby improving the efficiency of intention recognition. When multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions do not all match, but there are keywords that match the alternative words corresponding to the root node, it is determined whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node, and when there are no keywords in the text to be recognized that match the alternative words corresponding to the leaf node, an empty intention is output, and the intention recognition process is terminated in time, because the intention of the text to be recognized cannot be determined only by the alternative words corresponding to the root node. Continuing the recognition not only fails to obtain an accurate intention, but also wastes time and reduces the efficiency of intention recognition. In the case where there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text to be recognized is used to identify the intent of the text to be recognized using a text classification model to obtain the intent of the text to be recognized. Although the text classification model has low intent recognition efficiency, it is highly robust and is a supplement to the comparison and recognition method of keywords and alternative words. It can more accurately obtain the intent of the text to be recognized. Therefore, the embodiment of the present application can not only improve recognition accuracy, but also improve recognition efficiency.

[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the present disclosure and do not constitute a limitation of the present disclosure. The above and other features and advantages will become more apparent to those skilled in the art by describing detailed example embodiments with reference to the accompanying drawings. In the accompanying drawings:

[0028] Figure 1 This is an application scenario diagram of an embodiment of the present disclosure;

[0029] Figure 2 A flowchart of an intent recognition method provided in an embodiment of the present disclosure;

[0030] Figure 3 A schematic diagram of a tree structure provided in an embodiment of the present disclosure;

[0031] Figure 4 A schematic diagram of another tree structure provided in an embodiment of the present disclosure;

[0032] Figure 5 A schematic diagram of another tree structure provided in an embodiment of the present disclosure;

[0033] Figure 6 This is a flowchart of step S201 in an embodiment of the present disclosure;

[0034] Figure 7 This is a tree structure diagram of "paying back after receiving salary" in the embodiment of the present disclosure;

[0035] Figure 8 A flowchart of an intelligent question-answering method provided in an embodiment of the present disclosure;

[0036] Figure 9 A block diagram of an intention recognition device provided in an embodiment of the present disclosure;

[0037] Figure 10 A block diagram of an intelligent question-answering system provided in an embodiment of the present disclosure;

[0038] Figure 11 A block diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0039] To enable those skilled in the art to better understand the technical solutions of the present disclosure, exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0040] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.

[0041] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0042] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, features, wholes, steps, operations, elements and / or components are specified to exist, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof are not excluded. Similar words such as "connected" or "connected" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0043] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless expressly defined as such herein.

[0044] Identifying user intent is a key step in intelligent question-answering systems. Related technical fields employ text classification (matching) models to identify the intent of the text to be recognized based on the user's question, and then generate responses based on the intent recognition results. The text to be recognized is converted by the Automatic Speech Recognition (ASR) module. Due to inherent flaws in the ASR module, the resulting text to be recognized (also known as ASR text) contains a certain amount of misidentified data, i.e., high noise levels, and is also relatively long. This can lead to significant deviations in subsequent intent recognition, affecting the accuracy of intent recognition and, consequently, the accuracy of the responses generated by the intelligent question-answering system.

[0045] In addition, the recognition efficiency of intent based on text classification models is low, especially when there are many characters in the text to be recognized. The average recognition time is more than 50ms, which seriously affects the question-answering speed of the intelligent question-answering system.

[0046] Therefore, the embodiments of the present disclosure provide an intent recognition method for shortening the intent recognition time, improving the intent recognition efficiency, and improving the accuracy of intent recognition. Moreover, the embodiments of the present disclosure also provide an intelligent question-answering method for improving the efficiency and accuracy of intelligent question-answering.

[0047] The intent recognition method and intelligent question-answering method provided by the embodiments of the present disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be an in-vehicle device, user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in a memory. Alternatively, the method can be executed by a server.

[0048] Figure 1 This is an application scenario diagram of the embodiment of the present disclosure. Figure 1 As shown, after user terminal 10 obtains the user's voice data, it inputs the voice data into question-and-answer system 20. Conversion module 21 in question-and-answer system 20 converts the voice data into text to be recognized. The text to be recognized is then input into intent recognition module 22. Intent recognition module 22 determines the intent of the text to be recognized and inputs the intent recognition result into answer module 23. Answer module 23 determines an answer based on the intent recognition result and returns the answer to user terminal 10, which then presents the answer to the user. Data transmission between user terminal 10 and question-and-answer system 20 can be performed via a wired (wireless) network 30.

[0049] Figure 2 This is a flow chart of an intention recognition method provided by an embodiment of the present disclosure. Figure 2 , the intention recognition method provided by the embodiment of the present disclosure includes:

[0050] Step S201, determine whether multiple keywords in the text to be identified and multiple alternative words in the candidate intentions are all matched; wherein, the multiple alternative words in the candidate intentions are arranged according to a tree structure, and the tree structure includes a root node and at least one leaf node, and the root node and the leaf node are respectively set with an alternative word.

[0051] Among them, the text to be recognized is text obtained based on natural language. The natural language can be a user's question. By processing this question, the speech can be converted into text, thereby obtaining the text to be recognized.

[0052] The keywords of the text to be recognized can be words with real semantics in the text to be recognized. Modal particles and auxiliary words can be not used as keywords. By way of example, in the text to be recognized “repay the money after getting paid”, the keywords include “get”, “paid” and “repay the money”, and “after” can be not used as a keyword.

[0053] The candidate intent refers to an intent that can express the real intent. There can be one or more candidate intents. The alternative words in the candidate intent are words with real semantics in the candidate intent. Modal particles and auxiliary words can be not used as alternative words. By way of example, the candidate intents include “repay the money after getting paid”, “treat to dinner after getting paid” and “buy a car after getting paid”. Among them, the alternative words in “repay the money after getting paid” include “get”, “paid” and “repay the money”, the alternative words in “treat to dinner after getting paid” include “get”, “paid” and “treat to dinner”, the alternative words in “buy a car after getting paid” include “get”, “paid” and “buy a car”, while “after” and “then” are not used as alternative words.

[0054] In some embodiments, multiple alternative words in the candidate intent are set according to a tree structure. Among them, the tree structure includes a root node and at least one leaf node, and an alternative word is respectively set for the root node and the leaf node.

[0055] Figure 3 It is a schematic diagram of a tree structure provided for an embodiment of the present disclosure. As Figure 3 shown, the tree structure includes a root node 31 and at least one leaf node, such as the first leaf node 32a, the second leaf node 32b and the third leaf node 32c.

[0056] It should be noted that the number of leaf nodes in the tree structure can be set arbitrarily, and the embodiment of the present disclosure does not limit the number of leaf nodes.

[0057] As Figure 4 shown, the tree structure includes a root node 31 and a leaf node, such as the tree structure only includes the first leaf node 32a. As Figure 5 shown, the tree structure includes a root node 31 and two leaf nodes, such as the tree structure includes the first leaf node 32a and the second leaf node 32b.

[0058] In some embodiments, an alternative word is set corresponding to the root node. When the tree structure includes one leaf node, an alternative word is set corresponding to this leaf node. When the tree structure includes multiple leaf nodes, at least one of the multiple leaf nodes is set with an alternative word.

[0059] It should be noted that each tree structure corresponds to one intent, but each intent can correspond to multiple tree structures, that is, multiple tree structures can represent one intent. In actual application, multiple tree structures can be constructed to represent different intents.

[0060] In some embodiments, step S201, determining whether multiple keywords in the to-be-recognized text all match multiple candidate words in the candidate intent, includes:

[0061] Determine whether there are keywords in the text to be recognized that match the alternative words corresponding to the root node; if there are no keywords in the text to be recognized that match the alternative words corresponding to the root node, output an empty intent; if there are keywords in the text to be recognized that match the alternative words corresponding to the root node, determine whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node.

[0062] In some embodiments, it is first determined whether the alternative words corresponding to the root node in the candidate intent match the keywords in the text to be recognized, and then it is determined whether the alternative words corresponding to the leaf nodes match the keywords in the text to be recognized.

[0063] If the keywords in the text to be recognized cannot be matched with the alternative words corresponding to the root node, it is no longer determined whether the alternative words corresponding to the leaf nodes match the keywords in the text to be recognized. In some embodiments, if the alternative words corresponding to the root node cannot be matched with the keywords in the text to be recognized, it indicates that the intent of the text to be recognized cannot be determined, and an empty intent is output. When the alternative words corresponding to the root node can be matched with the keywords of the text to be recognized, it is determined whether there are any matches between the keywords in the text to be recognized and the alternative words corresponding to the leaf nodes.

[0064] If the alternative word corresponding to the root node cannot match the keyword in the text to be recognized, the alternative word corresponding to the leaf node will no longer be judged. This can save judgment time and thus improve the efficiency of intent matching.

[0065] In some embodiments, determining whether there are any keywords in the text to be recognized that match the alternative words corresponding to the leaf node includes: determining in sequence based on the sorting results whether there are any keywords in the text to be recognized that match the alternative words corresponding to the leaf node.

[0066] Among them, the sorting result is the result of sorting the alternative words corresponding to the leaf nodes according to the intention recognition degree, that is, sorting the alternative words corresponding to multiple leaf nodes according to the intention recognition degree, with the alternative words with high intention recognition degree sorted in the front and the alternative words with low intention recognition degree sorted in the back. In this way, when judging the matching of the keywords in the text to be recognized with the alternative words corresponding to the leaf nodes, the alternative words with high intention recognition degree are judged first, and then the alternative words with low intention recognition degree are judged.

[0067] Among them, the intention recognition degree is also called the intention discrimination degree. The higher the intention discrimination degree of the alternative word, the easier it is to recognize the intention of the text to be recognized.

[0068] Exemplarily, the tree structure with the candidate intention of "repay the money after getting the salary" is as Figure 7 shown. The alternative word corresponding to the root node is "salary", and it can also include the synonym "wage" of "salary". Comparing the alternative words "get" and "repay the money" corresponding to the leaf nodes, "get" is closer to "salary" and has a higher intention recognition degree. Therefore, the alternative word corresponding to the first leaf node is "get", and the alternative word corresponding to the second leaf node is "repay the money", that is, the sorting result of the alternative words is that "get" is ranked in the first position and "repay the money" is ranked in the second position.

[0069] In some embodiments, the alternative words corresponding to multiple leaf nodes can also be sorted in other ways, such as according to the length of the alternative words, etc.

[0070] In some embodiments, based on the sorting result, it is sequentially judged whether there are keywords in the keywords of the text to be recognized that match the alternative words corresponding to the leaf nodes, including: when the alternative words corresponding to the leaf nodes sorted in the front cannot match the keywords in the text to be recognized, it is determined that not all of the multiple keywords in the text to be recognized match the multiple alternative words in the candidate intention.

[0071] When the alternative words corresponding to the leaf nodes sorted in the front cannot match the keywords in the text to be recognized, it can already be determined that not all of the multiple keywords in the text to be recognized match the multiple alternative words in the candidate intention, and it is no longer necessary to judge whether the alternative words corresponding to the leaf nodes sorted in the back can match the keywords in the text to be recognized, which can save the judgment time and thus improve the intention recognition efficiency.

[0072] In some embodiments, the keywords in the text to be recognized are arranged in the order of the text of the text to be recognized, and then the keywords in the text to be recognized are partitioned. The number of partitions can be two regions, or three or more regions. Exemplarily, the keywords before the keywords that match the alternative word corresponding to the root node are the first region keywords, and the keywords after the keywords that match the alternative word corresponding to the root node are the second region keywords.

[0073] In some embodiments, successively determining whether there is a keyword in the keywords of the text to be recognized that matches the alternative word corresponding to the leaf node based on the sorting result includes: judging whether there is a keyword in the keywords of the first region that matches the alternative word corresponding to the leaf node according to the sorting result; in the case that there is no keyword in the keywords of the first region that matches the alternative word corresponding to the leaf node, judging whether there is a keyword in the keywords of the second region that matches the alternative word corresponding to the leaf node.

[0074] After partitioning the keywords of the text to be recognized, successively judging the keywords in different regions according to the sorting result. When the keywords in the first region match the alternative words corresponding to the leaf node, then judging whether the keywords in the second region match the alternative words corresponding to the leaf node, otherwise stopping the judgment can shorten the judgment time, thereby improving the efficiency of intent recognition.

[0075] Step S202, in the case that multiple keywords in the text to be recognized do not all match multiple alternative words in the candidate intent and there is a keyword that matches the alternative word corresponding to the root node, judging whether there is a keyword in the keywords of the text to be recognized that matches the alternative word corresponding to the leaf node.

[0076] In step S202, it is possible to first judge whether multiple keywords in the text to be recognized include the alternative word corresponding to the root node. If multiple keywords in the text to be recognized include the alternative word corresponding to the root node, then judge whether multiple keywords in the text to be recognized include the alternative word corresponding to the leaf node. If all alternative words corresponding to the leaf nodes can match the keywords in the text to be recognized, then it can be determined that the intent of the text to be recognized is the candidate intent. If any one of all alternative words corresponding to the leaf nodes cannot match the keywords in the text to be recognized, then judge that the keywords in the text to be recognized do not completely match the alternative words corresponding to the leaf nodes.

[0077] Exemplarily, the keywords of the text to be recognized include "get", "salary", and "repay money", the candidate intent is "repay money after getting the salary", and the sorting result is that the alternative word corresponding to the first leaf node is "get", and the alternative word corresponding to the second leaf node is "repay money". First, match the keyword "get" ranked first in the sorting result. If the match at the first position is unsuccessful, then an empty intent is output. If the match at the first leaf node of the candidate intent is successful, then match whether there is "repay money" in the text to be processed. If the second leaf node in a certain candidate intent is "repay money", then the match is successful, and thus it can be determined that the intent of the text to be recognized is "repay money after getting the salary".

[0078] In some embodiments, when there are multiple candidate intents, it is possible to sequentially determine whether multiple keywords in the text to be recognized all match the candidate words in the multiple candidate intents, or to use a parallel approach to determine whether multiple keywords in the text to be recognized all match the candidate words in the multiple candidate intents. It should be noted that the parallel approach can be for five, ten, or other numbers of candidate intents to be determined in parallel, or for all candidate intents to be determined in parallel.

[0079] Step S203: If there is no keyword in the text to be recognized that matches the alternative word corresponding to the leaf node, output an empty intent.

[0080] In some embodiments, when the alternative words corresponding to each leaf node cannot match the keywords in the text to be recognized, an empty intent is output; when the alternative words corresponding to some leaf nodes among the alternative words corresponding to multiple leaf nodes cannot match the keywords in the text to be recognized, step S204 is executed.

[0081] For example, the text to be recognized is "wait for salary to be paid before paying back the money", and the corresponding keywords include "pay", "salary" and "pay back the money". If the alternative word corresponding to the root node of the candidate intention is "salary", and the alternative words corresponding to the leaf node are "pay" and "treat", then the alternative word "salary" corresponding to the root node of the candidate intention can match the keyword "salary" in the text to be recognized, and the alternative word "pay" corresponding to the leaf node of the candidate intention can match the keyword "pay" in the text to be recognized, but the alternative word "treat" corresponding to the leaf node of the candidate intention cannot match the keyword "pay back" in the text to be recognized. Therefore, the intention of the text to be recognized "wait for salary to be paid before paying back the money" cannot be determined, and it is necessary to judge through step S204.

[0082] Step S204: When there are keywords in the text to be recognized that match the candidate words corresponding to the leaf nodes, the text classification model is used to perform intent recognition on the text to be recognized to obtain the intent of the text to be recognized.

[0083] The text classification model can be an existing deep learning model in related fields, such as the Text Convolutional Neural Network (TextCNN) model and the Fast Text Classification (FastText) model, or a fine-tuned model based on pre-training (BERT / Roberta). Specifically, the BERT / Roberta model is fine-tuned using the intended language text, and the fine-tuned BERT / Roberta model is used as the text classification model in the embodiments of the present disclosure. Alternatively, the embodiments of the present disclosure can directly use the training text to train the convolutional neural network to obtain the text classification model.

[0084] For natural language processing with high concurrency and real-time requirements, the TextCNN model is preferred as the text classification model. The embodiments of this disclosure do not limit the specific structure and acquisition method of the text classification model.

[0085] Step S205: When multiple keywords in the text to be recognized all match multiple candidate words in the candidate intent, the candidate intent is determined as the intent of the text to be recognized.

[0086] If the key words "send", "salary" and "repay money" in the text to be recognized "wait for salary to be paid and then pay back" can all match the alternative words in the candidate intent, the intent of the text to be recognized can be determined.

[0087] The intention recognition method provided by the embodiment of the present disclosure determines whether multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions all match. When multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions all match, the candidate intention is determined as the intention of the text to be recognized. Compared with other intention recognition methods, the comparison of keywords and alternative words can quickly and accurately determine the intention of the text to be recognized, and the average intention recognition time can be reduced to 10ms, thereby improving the efficiency of intention recognition. When multiple keywords in the text to be recognized and multiple alternative words in the candidate intentions do not all match, but there are keywords that match the alternative words corresponding to the root node, it is determined whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node, and when there are no keywords in the text to be recognized that match the alternative words corresponding to the leaf node, an empty intention is output, and the intention recognition process is terminated in time, because the intention of the text to be recognized cannot be determined only by the alternative words corresponding to the root node. Continuing the recognition not only fails to obtain an accurate intention, but also wastes time and reduces the efficiency of intention recognition. When there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text classification model is used to perform intent recognition on the text to be recognized to obtain the intent of the text to be recognized. Although the text classification model has low intent recognition efficiency, it is highly robust and complements the comparison and recognition method of keywords and alternative words. It can more accurately obtain the intent of the text to be recognized. Therefore, the embodiments of the present application can not only improve recognition accuracy, but also improve recognition efficiency.

[0088] The following is an explanation of the intent recognition method provided by the embodiments of the present disclosure.

[0089] In some embodiments, the alternative words in the candidate intent include primary alternative words and auxiliary alternative words; the alternative words of the candidate intent are arranged according to a tree structure, wherein the primary alternative words are the alternative words set at the root node, and the candidate intent is the alternative words set at the leaf node.

[0090] When constructing strong rules based on a tree structure, such as Figure 6 shown, in step S201, it is determined whether multiple keywords in the text to be recognized all match multiple alternative words in the candidate intent, including:

[0091] In step S601, whether the keyword in the text to be recognized matches the main alternative word.

[0092] Exemplarily, when the text to be recognized is "Wait until I get paid to pay back the money", the candidate intents include "Wait until I get paid to pay back the money" and "Wait until I get paid to treat", and the main alternative word corresponding to this candidate intent is "salary". Then, based on the keywords "get", "salary", and "pay back" in the text to be recognized, these three keywords can be obtained.

[0093] Exemplarily, Figure 7 shows a tree structure diagram of multiple candidate intents. As Figure 7 shown, the intent of (a) is "Get paid", the intent of (b) is "Owe money", the intent of (c) is "Complain", and the intent of (d) is "Turnover". When the text to be recognized is "Wait until I get paid to pay back the money", the intent corresponding to the root node "salary" can be matched according to the keyword "salary".

[0094] In step S602, when the keyword in the text to be recognized matches the main alternative word, match other keywords in the text to be recognized with the auxiliary alternative words.

[0095] Exemplarily, after the keyword "salary" in the text to be recognized is successfully matched, continue to match other keywords "get" and "pay back" in the text to be recognized in the candidate intents "Wait until I get paid to pay back the money" and "Wait until I get paid to treat", that is, determine whether the keywords "get" and "pay back" can match the auxiliary alternative words "get", "pay back", and "treat" in "Wait until I get paid to pay back the money" and "Wait until I get paid to treat".

[0096] In step S603, when other keywords in the text to be recognized can all match the auxiliary alternative words, output the intent recognition result of the text to be recognized.

[0097] Exemplarily, if other keywords "get" and "pay back" in the text to be recognized can match the auxiliary alternative words "get" and "pay back" in the candidate intent "Wait until I get paid to pay back the money", then output the intent recognition result of the text to be recognized as "Wait until I get paid to pay back the money".

[0098] In step S604, when other keywords in the text to be recognized cannot match the auxiliary alternative words, output an empty intent.

[0099] In the embodiment of the present disclosure, based on the tree structure, starting from the root node in the candidate intent, the intent of the text to be recognized is determined. A smaller range of candidate intents can be quickly locked from a large number of candidate intents, and then the intent of the text to be recognized is determined from the leaf nodes. This step-by-step narrowing of the scope of candidate intents can quickly determine the intent of the text to be processed, thereby improving the efficiency of intent recognition.

[0100] Below is Figure 3 Taking the tree structure shown in the figure as an example, the process of identifying the intent of the text to be identified is introduced. Figure 3 In the example, the tree structure consists of a root node and three leaf nodes. The candidate words corresponding to the root node and the leaf nodes are fixed. During the intent recognition process, the first step is to determine whether the keyword in the text to be recognized is contained in the "root node". If the root node cannot be matched, the process directly exits and returns an empty intent. If a match is found, the candidate word of the "first leaf node 32a" is matched.

[0101] The alternative words in the "first leaf node 32a" can be verbs, nouns, pronouns, etc. The alternative words in the "first leaf node 32a" include the main alternative words in the "root node", so the matching range can be near the keyword corresponding to the "root node" in the text to be identified, such as the 5 characters before and after. If the 5 characters before and after do not include the alternative words in the "first leaf node 32a", it will jump out directly and return an empty intent; if it includes the alternative words in the "first leaf node 32a", it will continue to search for the alternative words of the "second leaf node 32b", and the matching range can be the character string before the keyword position corresponding to the "root node" in the text to be identified.

[0102] The candidate words in the "second leaf node 32b" can be pronouns, nouns, etc., and are usually the initiators of the verbs in the "first leaf node 32a." During the matching process, if the text to be recognized does not contain the keyword corresponding to the "second leaf node 32b," the search will be directly skipped and an empty intent will be returned. If it does, the search will continue to match the candidate words corresponding to the "third leaf node 32c," and the matching range is the string after the keyword position corresponding to the "root node" in the text.

[0103] The candidate word corresponding to the third leaf node 32c is typically a pronoun or noun, representing the target of the action. During the matching process, if the text to be recognized doesn't contain the candidate word corresponding to the third leaf node 32c, the search will be skipped and an empty intent will be returned. If it does, the intent of the text to be recognized will be returned.

[0104] It should be noted that based on Figure 4 and Figure 5 The tree structure shown in the figure is used to identify the text to be identified. Figure 3Similarly, the root node 31 is matched (searched) first. When the keywords in the text to be identified can be matched with the main alternative words corresponding to the root node 31, the leaf nodes are matched. Moreover, when there are multiple leaf nodes, other keywords in the text to be identified can be matched in the order of the leaf nodes.

[0105] It should be noted that the intention recognition method provided by this work card embodiment can be applied to intelligent question-answering systems and can also be used in other natural language processing systems to quickly obtain the intention of the question.

[0106] The disclosed embodiments also provide an intelligent question-answering method, which is applied to an agent side. This method can improve the efficiency of the intelligent question-answering system and can also improve the accuracy of answers.

[0107] Figure 8 This is a flow chart of an intelligent question-answering method provided by an embodiment of the present disclosure. Figure 8 As shown, the intelligent question answering method includes:

[0108] Step S801: Acquire speech recognition text.

[0109] The speech recognition text is a text obtained by processing the user's question. The present disclosure does not limit the method of processing the user's question to obtain the speech recognition text.

[0110] Step S802: Perform the intention recognition method provided by the embodiment of the present disclosure on the speech recognition text to obtain an intention recognition result.

[0111] The intention recognition method can refer to steps S201 to S203 and the corresponding detailed descriptions, which will not be repeated here.

[0112] Step S803: Generate an answer corresponding to the speech recognition text based on the intention recognition result, and output the answer.

[0113] The intelligent question-answering method provided by the embodiment of the present disclosure recognizes the intent of the text to be recognized based on strong rules, and outputs the intent recognition result when the intent can be recognized. If the intent of the text to be recognized cannot be recognized, the text classification model is used for recognition and the intent recognition result is output. The recognition time of the recognition method based on strong rules is shorter. Compared with the recognition based only on the text classification model, the intent recognition time can be greatly reduced. The average recognition time can be reduced to 10ms, thereby improving the efficiency of intent recognition. In the case that multiple keywords in the text to be recognized do not all match multiple alternative words in the candidate intent, but there are keywords that match the alternative words corresponding to the root node, it is determined whether there are keywords in the keywords to be recognized that match the alternative words corresponding to the leaf node, and if there are no keywords in the keywords to be recognized that match the alternative words corresponding to the leaf node, an empty intent is output, and the intent recognition process is terminated in time, because the intent of the text to be recognized cannot be determined only by the alternative words corresponding to the root node. Continuing the recognition not only fails to obtain an accurate intent, but also wastes time and reduces the efficiency of intent recognition. In the case where there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text to be recognized is used to identify the intent of the text to be recognized using a text classification model to obtain the intent of the text to be recognized. Although the text classification model has low intent recognition efficiency, it is highly robust and is a supplement to the comparison and recognition method of keywords and alternative words. It can more accurately obtain the intent of the text to be recognized. Therefore, the embodiment of the present application can not only improve recognition accuracy, but also improve recognition efficiency.

[0114] The present disclosure also provides an intention recognition device, such as Figure 9 As shown, the intention recognition device 900 includes:

[0115] Judgment module 901 is used to determine whether multiple keywords in the text to be identified are all matched with multiple alternative words in the candidate intentions; wherein, the multiple alternative words in the candidate intentions are arranged according to a tree structure, and the tree structure includes a root node and at least one leaf node, and the root node and the leaf node are respectively set with an alternative word.

[0116] The determination module 902 is configured to determine the candidate intent as the intent of the text to be recognized when all the keywords in the text to be recognized match the candidate intents.

[0117] The judgment module 901 is also used to judge whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf node when multiple keywords in the text to be recognized do not all match multiple alternative words in the candidate intentions, but there are keywords that match the alternative words corresponding to the root node.

[0118] The determination module 902 is further configured to output a null intent when there is no keyword in the text to be recognized that matches the alternative word corresponding to the leaf node.

[0119] The recognition module 903 is used to use the text classification model to perform intent recognition on the text to be recognized when there is a keyword in the text to be recognized that matches the alternative word corresponding to the leaf node, so as to obtain the intent of the text to be recognized.

[0120] The judgment module 901 is further configured to judge whether there is a keyword in the keywords of the text to be recognized that matches the candidate word corresponding to the root node.

[0121] The determination module 902 is further configured to output a null intent when there is no keyword matching the candidate word corresponding to the root node among the keywords of the text to be recognized.

[0122] The judgment module 901 is further configured to judge whether there is a keyword matching an alternative word corresponding to a leaf node among the keywords of the text to be recognized, if there is a keyword matching an alternative word corresponding to the root node among the keywords of the text to be recognized.

[0123] The judgment module 901 is also used to judge in sequence whether there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes based on the sorting results; wherein the sorting results are the results of sorting the alternative words corresponding to the leaf nodes according to the intention recognition degree.

[0124] The judgment module 901 is also used to determine that multiple keywords in the text to be recognized do not all match multiple alternative words in the candidate intent when the alternative words corresponding to the leaf nodes ranked first cannot match the keywords in the text to be recognized.

[0125] In some embodiments, the keywords in the text to be recognized are arranged in the order of the text to be recognized; the keywords before the keywords matching the candidate words corresponding to the root node are the first region keywords, and the keywords after the keywords matching the candidate words corresponding to the root node are the second region keywords;

[0126] The judgment module 901 is further configured to determine, based on the sorting results, whether there are any keywords in the first region keywords that match the candidate words corresponding to the leaf nodes. If there are no keywords in the first region keywords that match the candidate words corresponding to the leaf nodes, the judgment module 901 is further configured to determine whether there are any keywords in the second region keywords that match the candidate words corresponding to the leaf nodes.

[0127] The embodiments of the present disclosure also provide an intelligent question-answering system, which is applied to the agent side and can improve the question-answering efficiency and accuracy of the intelligent question-answering system.

[0128] like Figure 10As shown, the intelligent question answering system 1000 includes:

[0129] The acquisition module 1001 is used to acquire speech recognition text; wherein the speech recognition text is text obtained by processing the user's question.

[0130] The recognition module 1002 is used to process the speech recognition text using the intention recognition device provided by the embodiment of the present disclosure to obtain the intention corresponding to the speech recognition text.

[0131] The generation module 1003 is used to generate an answer corresponding to the speech recognition text based on the intention and output the answer.

[0132] In the intelligent question-answering system provided by the embodiment of the present disclosure, after the acquisition module obtains the speech recognition text, the recognition time of the recognition module based on the strong rule recognition method is shorter. Compared with the recognition based only on the text classification model, the intention recognition time can be greatly reduced, and the average recognition time can be reduced to 10ms, thereby improving the efficiency of intention recognition. In the case that the multiple keywords in the text to be recognized do not all match the multiple alternative words in the candidate intention, but there are keywords that match the alternative words corresponding to the root node, it is judged whether there are keywords in the keywords in the text to be recognized that match the alternative words corresponding to the leaf node, and in the case that there are no keywords in the text to be recognized that match the alternative words corresponding to the leaf node, an empty intention is output, and the intention recognition process is terminated in time, because the intention of the text to be recognized cannot be determined only by the alternative words corresponding to the root node. Continuing the recognition not only fails to obtain the accurate intention, but also wastes time and reduces the efficiency of intention recognition. In the case where there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text to be recognized is used to identify the intent of the text to be recognized using a text classification model to obtain the intent of the text to be recognized. Although the text classification model has low intent recognition efficiency, it is highly robust and is a supplement to the comparison and recognition method of keywords and alternative words. It can more accurately obtain the intent of the text to be recognized. Therefore, the embodiment of the present application can not only improve recognition accuracy, but also improve recognition efficiency.

[0133] It is understood that the above-mentioned various method embodiments mentioned in this disclosure can be combined with each other to form combined embodiments without violating the principle logic. Due to space limitations, this disclosure will not go into details. It is understood by those skilled in the art that in the above-mentioned methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0134] It should also be noted that the intention recognition device provided in the embodiments of the present disclosure can be used to implement any intention recognition method provided in the present disclosure, and the provided intelligent question and answer method can be used to implement any intelligent question and answer system provided in the present disclosure. The corresponding technical solutions and descriptions are referred to the corresponding records in the method part and will not be repeated here.

[0135] Figure 11 A block diagram of an electronic device provided in an embodiment of the present disclosure.

[0136] Reference Figure 11 An embodiment of the present disclosure provides an electronic device, which includes: at least one processor 1101; at least one memory 1102, and one or more I / O interfaces 1103, connected between the processor 1101 and the memory 1102; wherein the memory 1102 stores one or more computer programs that can be executed by the at least one processor 1101, and the one or more computer programs are executed by the at least one processor 1101 to enable the at least one processor 1101 to execute the above-mentioned intention recognition method and intelligent question-answering method.

[0137] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor / processing core, implements the above-described intent recognition method and intelligent question-answering method. The computer-readable storage medium may be volatile or non-volatile computer-readable storage medium.

[0138] Those skilled in the art will appreciate that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or transient medium).

[0139] As is known to those skilled in the art, the term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technology, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and that can be accessed by a computer. Furthermore, as is known to those skilled in the art, communication media typically embodies computer-readable program instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0140] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.

[0141] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, the state information of the computer-readable program instructions is used to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), so that the electronic circuit can execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.

[0142] The computer program product described herein may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0143] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0144] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0145] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0146] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and the part of the module, program segment or instruction contains one or more executable instructions for realizing the prescribed logical function. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the prescribed function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0147] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for purposes of limitation. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly indicated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims

1. A method for identifying intention, characterized in that: include: Determine whether multiple keywords in the text to be recognized all match multiple alternative words in the candidate intent; wherein the multiple alternative words in the candidate intent are arranged according to a tree structure, the tree structure includes a root node and at least one leaf node, and the root node and the leaf node are respectively corresponding to one of the alternative words; In the case where multiple keywords in the text to be recognized all match multiple candidate words in the candidate intent, determining the candidate intent as the intent of the text to be recognized; In the case where the multiple keywords in the to-be-recognized text do not all match the multiple alternative words in the candidate intent, and there is a keyword that matches the alternative word corresponding to the root node, determining whether there is a keyword in the to-be-recognized text that matches the alternative word corresponding to the leaf node; If there is no keyword in the to-be-recognized text that matches the candidate word corresponding to the leaf node, outputting an empty intent; In the case that there are keywords in the text to be recognized that match the alternative words corresponding to the leaf nodes, the text to be recognized is subjected to intent recognition using a text classification model to obtain the intent of the text to be recognized.

2. The method according to claim 1, characterized in that The step of determining whether all of the multiple keywords in the to-be-recognized text match the multiple candidate words in the candidate intent includes: Determining whether there is a keyword matching the candidate word corresponding to the root node among the keywords of the text to be recognized; If there is no keyword matching the candidate word corresponding to the root node among the keywords of the text to be recognized, outputting an empty intent; In the case that there are keywords in the to-be-recognized text that match the candidate words corresponding to the root node, it is determined whether there are keywords in the to-be-recognized text that match the candidate words corresponding to the leaf node.

3. The method according to claim 2, characterized in that The determining whether there is a match between the keywords of the text to be recognized and the candidate word corresponding to the leaf node includes: Based on the sorting result, it is determined in turn whether there are keywords in the keywords of the text to be recognized that match the alternative words corresponding to the leaf nodes; wherein the sorting result is the result of sorting the alternative words corresponding to the leaf nodes according to the intention recognition degree.

4. The method according to claim 3, characterized in that The step of sequentially judging whether there is a keyword matching the candidate word corresponding to the leaf node among the keywords of the text to be recognized based on the sorting result includes: When the candidate words corresponding to the leaf nodes ranked first cannot match the keywords in the text to be recognized, it is determined that the multiple keywords in the text to be recognized do not all match the multiple candidate words in the candidate intent.

5. The method according to claim 3, characterized in that The keywords in the text to be recognized are arranged in the order of the text to be recognized; the keywords before the keywords matching the candidate words corresponding to the root node are the first region keywords, and the keywords after the keywords matching the candidate words corresponding to the root node are the second region keywords; The step of sequentially judging whether there is a keyword matching the candidate word corresponding to the leaf node among the keywords of the text to be recognized based on the sorting result includes: According to the sorting result, determining whether there is a keyword in the first region keywords that matches the candidate word corresponding to the leaf node; When there is no keyword matching the candidate word corresponding to the leaf node in the first region keywords, it is determined whether there is a keyword matching the candidate word corresponding to the leaf node in the second region keywords.

6. An intelligent question-answering method, characterized in that: Applied to the agent side, including: Acquire speech recognition text; wherein the speech recognition text is text obtained by processing the user's question; Performing the intention recognition method according to any one of claims 1 to 5 on the speech recognition text to obtain the intention corresponding to the speech recognition text; An answer corresponding to the speech recognition text is generated based on the intention corresponding to the speech recognition text, and the answer is output.

7. An intention recognition device, characterized in that: include: a judgment module, configured to judge whether multiple keywords in the to-be-recognized text all match multiple candidate words in the candidate intent; wherein the multiple candidate words in the candidate intent are arranged in a tree structure, the tree structure including a root node and at least one leaf node, and the root node and the leaf node are respectively provided with one candidate word; a determination module, configured to determine the candidate intent as the intent of the text to be recognized if all of the multiple keywords in the text to be recognized match the multiple candidate words in the candidate intent; The judgment module is further configured to judge whether there is a keyword in the to-be-recognized text that matches the alternative word corresponding to the leaf node, when the multiple keywords in the to-be-recognized text do not all match the multiple alternative words in the candidate intent, but there is a keyword that matches the alternative word corresponding to the root node; The determination module is further configured to output an empty intent if there is no keyword in the to-be-recognized text that matches the candidate word corresponding to the leaf node; The recognition module is used to use a text classification model to perform intent recognition on the text to be recognized when there is a keyword in the text to be recognized that matches the alternative word corresponding to the leaf node, so as to obtain the intent of the text to be recognized.

8. An intelligent question-answering system, characterized in that: Applied to the agent side, including: An acquisition module, configured to acquire a speech recognition text; wherein the speech recognition text is a text obtained by processing a user's question; a recognition module, configured to process the speech recognition text using the intention recognition device according to claim 7 to obtain the intention corresponding to the speech recognition text; A generation module is used to generate an answer corresponding to the speech recognition text based on the intention and output the answer.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor so that the at least one processor can execute the intention recognition method as described in any one of claims 1 to 5, or the intelligent question and answer method as described in claim 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When executed by a processor, the computer program implements the intention recognition method as described in any one of claims 1 to 5, or the intelligent question-answering method as described in claim 6.

Citation Information

Patent Citations

  • Intelligent question and answer method and device and computer equipment

    CN112052324A

  • Intention identification method and device, computer equipment, and computer-readable storage medium

    CN113672696A