Intention recognition method and device

By screening error-prone entity types in the intelligent customer service system, the problem of insufficient entity granularity in intent recognition is solved, the accuracy and user experience of intent recognition are improved, the intent recognition process is simplified, and the amount of calculation is reduced.

CN115129841BActive Publication Date: 2024-10-18SHENZHEN XUMI YUNTU SPACE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210741986.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2024-10-18
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In the intent recognition process of the existing intelligent customer service system, the entity granularity is not fine enough, resulting in low quality or domain deviation in the returned content of user questions in complex business scenarios. For example, when users consult "Meituan" related issues, the returned results may be different from those of "Meituan". "Are you hungry?" is related rather than "Meituan".

Method used

By obtaining the input text, its corresponding entity information and candidate intentions are determined. If the entity information belongs to a preset error-prone entity type, intent screening is performed to filter unmatched candidate intentions, thereby improving the precision and accuracy of intent recognition.

Benefits of technology

It improves the precision and accuracy of intent recognition results, improves user experience, reduces manual intervention, and solves online error problems through online editing of error-prone entity type collections, with low computational complexity and stable effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129841B_ABST
    Figure CN115129841B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and provides an intent recognition method and device. In the process of intent recognition of input text, the present disclosure can use the error-prone entity types in the preset error-prone entity type set and the entity information corresponding to the input text to filter the candidate intents corresponding to the input text whose entity information does not match, so as to improve the precision and accuracy of the intent recognition result of the input text, thereby improving the reply effect after intent recognition, and further improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an intent recognition method and device. Background Art

[0002] Existing intelligent customer service systems generally design many standard questions and standard answers to form a very large knowledge base, so that they can use the knowledge base to train models to identify the intent of user questions and improve the generalization ability of the model by continuously expanding knowledge, so as to better answer questions and meet user demands.

[0003] However, in the process of intent recognition of the chatbot (intelligent customer service), the entity granularity at the intent recognition level is not fine enough. In some complex business scenarios, the returned content for the questions entered by the user may be of low quality or have domain deviation. For example, when a user asks a question related to "Meituan", the returned result is an intent related to "Are you hungry?", not an intent related to "Meituan". Summary of the invention

[0004] In view of this, the embodiments of the present disclosure provide an intent recognition method, apparatus, computer device and computer-readable storage medium to improve the precision and accuracy of the intent recognition results of the input text, thereby improving the response effect after intent recognition and further improving the user experience.

[0005] A first aspect of the present disclosure provides an intention recognition method, the method comprising:

[0006] Get input text;

[0007] According to the input text, determining entity information and candidate intents corresponding to the input text;

[0008] If the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent is screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text.

[0009] According to a second aspect of the embodiments of the present disclosure, there is provided an intention recognition device, the device comprising:

[0010] The acquisition module is used to obtain the input text;

[0011] A determination module, used to determine entity information and candidate intents corresponding to the input text according to the input text;

[0012] The screening module is used to screen the candidate intent according to the entity information corresponding to the input text if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, so as to obtain the target intent corresponding to the input text.

[0013] According to a third aspect of an embodiment of the present disclosure, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0014] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0015] Compared with the prior art, the beneficial effect of the disclosed embodiment is that after obtaining the input text, the disclosed embodiment can first determine the entity information and candidate intents corresponding to the input text based on the input text; if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent can be screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. It can be seen that in the process of intent recognition of the input text, the present embodiment can use the error-prone entity types in the preset error-prone entity type set and the entity information corresponding to the input text to screen and filter the candidate intents whose entity information does not match in the candidate intents corresponding to the input text, so as to improve the precision and accuracy of the intent recognition results of the input text, thereby improving the response effect after intent recognition, and further improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0017] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;

[0018] Figure 2 is a flowchart of an intention recognition method provided by an embodiment of the present disclosure;

[0019] Figure 3 is a block diagram of an intention recognition device provided by an embodiment of the present disclosure;

[0020] Figure 4is a schematic diagram of a computer device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0022] A method and device for identifying intent according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0023] The inventors have found through research that in the prior art, due to the insufficient granularity of entities at the intent recognition level, in some complex business scenarios, the returned content for the questions entered by the user will have problems of low quality or domain deviation. For example, a user asks "How do I refund a Meituan order?" According to intent recognition, intents related to refunding orders will be at the top of the matching list, such as "How do I refund a Meituan order?", "How do I refund an Ele.me order?", "How do I refund a JD.com order?", etc., but it is obvious that the entities in the latter few are inconsistent with the entities in the question. That is, the existing intent recognition is only responsible for semantic retrieval matching, so a more fine-grained entity alignment is needed to resolve entity inconsistencies.

[0024] In order to solve the above problems. The present invention provides an intent recognition method. In the method, after obtaining the input text, the entity information and candidate intents corresponding to the input text can be determined based on the input text; if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent can be screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. It can be seen that in the process of intent recognition of the input text, the present embodiment can use the error-prone entity types in the preset error-prone entity type set and the entity information corresponding to the input text to screen and filter the candidate intents whose entity information does not match in the candidate intents corresponding to the input text, so as to improve the precision and accuracy of the intent recognition results of the input text, thereby improving the response effect after intent recognition, and further improving the user experience.

[0025] For example, the embodiments of the present invention can be applied to Figure 1 The application scenario shown in FIG. 1 may include a terminal device 1 .

[0026] The terminal device 1 can be hardware or software. When the terminal device 1 is hardware, it can be various electronic devices that support data processing functions, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers; when the terminal device 1 is software, it can be installed in the above electronic devices. The terminal device 1 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Of course, the embodiments of the present invention can also be applied to servers.

[0027] Specifically, in Figure 1 In the application scenario shown, the user can input the input text through the terminal device 1, and the terminal device 1 can first determine the entity information and candidate intents corresponding to the input text. Then, the terminal device 1 can determine whether the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set. If the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the terminal device 1 can perform intent screening on the candidate intent according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. In this way, in the process of intent recognition of the input text, the error-prone entity type in the preset error-prone entity type set and the entity information corresponding to the input text can be used to screen and filter the candidate intents whose entity information does not match in the candidate intents corresponding to the input text, so as to improve the precision and accuracy of the intent recognition result of the input text, thereby improving the response effect after intent recognition, thereby improving the user experience.

[0028] It should be noted that the specific type, quantity and combination of the terminal devices 1 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.

[0029] It should be noted that the above application scenarios are only shown for the purpose of facilitating the understanding of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.

[0030] Figure 2 It is a flowchart of an intent recognition method provided by an embodiment of the present disclosure. Figure 2 An intent recognition method can be Figure 1 The terminal device (or server) executes. Figure 2 As shown, the intention recognition method includes:

[0031] S201: Obtain input text.

[0032] In this embodiment, the information to be queried or consulted input by the user through the terminal device can be referred to as input text. The input text may include several character strings, and the input text may be a character string including various types of characters such as Chinese characters, English characters, or numbers. For example, the input text may be "How to refund a Meituan order". In one implementation, after the user inputs a piece of information in an input dialogue interface (such as a customer service dialogue interface) through a physical keyboard, a virtual keyboard, or voice input, the information can be used as input text.

[0033] S202: Determine entity information and candidate intents corresponding to the input text based on the input text.

[0034] After obtaining the query statement, the entity information corresponding to the input text can be determined according to the content of the input text. Among them, the entity information corresponding to the input text can be understood as an entity with a specific meaning in the input text, for example, it can include nouns such as names of people, places, names of organizations, proper nouns, etc. As an example, after obtaining the input text, the input text can be first segmented to obtain several divided strings, and then the strings that meet the entity conditions (i.e., have a specific meaning) are used as the entity information corresponding to the input text; for example, assuming that the input text is "How to refund a Meituan order", the input text can be first segmented (i.e., the input text is divided into words) to obtain the strings "Meituan", "order", "how" and "refund". Since "Meituan" is an entity with a specific meaning, "Meituan" can be used as the entity information corresponding to the input text.

[0035] After obtaining the query statement, the candidate intent corresponding to the input text can be determined according to the content of the input text. The candidate intent corresponding to the input text can be understood as the real intent that the input text may correspond to. As an example, a large number of candidate intents can be pre-stored. After obtaining the input text, the candidate intents whose similarity with the content of the input text meets the preset similarity threshold can be queried according to the content of the input text, and the candidate intents whose similarity with the content of the input text meets the preset similarity threshold can be used as the candidate intent corresponding to the input text. For example, after receiving the input text "How to refund a Meituan order", the candidate intents "How to refund a Meituan order?", "How to refund an Ele.me order?", "How to refund a JD order?" whose similarity with the content of the input text meets the preset similarity threshold can be queried according to the input text.

[0036] S203: If the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent is screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text.

[0037] In this embodiment, a set of error-prone entity types can be pre-set, and the preset set of error-prone entity types can include several error-prone entity types. It should be noted that the entity type can be understood as the category corresponding to the entity; for example, if the entity is "Semir" or "Anta", the entity type corresponding to "Semir" or "Anta" is "brand name entity"; for another example, if the entity is "water fee" or "electricity fee", the entity type corresponding to "water fee" or "electricity fee" is "life payment type entity"; for another example, if the entity is "Meituan" or "Are You Hungry", the entity type corresponding to "Meituan" or "Are You Hungry" is "takeaway platform entity". Error-prone entity types can be understood as entity types with a higher frequency of errors in a certain business field.

[0038] Therefore, after obtaining the entity information and candidate intentions corresponding to the input text, the entity type of the entity information corresponding to the input text can be determined according to the correspondence between the preset entity information and the candidate intentions. Then, the error-prone entity types in the preset error-prone entity type set can be used to determine the entity information corresponding to the input text with possible errors, that is, to determine that the entity type corresponding to the entity information corresponding to the input text is the error-prone entity type in the preset error-prone entity type set. At this time, it is explained that there are candidate intentions in the candidate intentions corresponding to the input text that do not match the entity information corresponding to the input text. Therefore, it is necessary to use the entity information corresponding to the input text to perform intention screening on the candidate intention to obtain the target intention corresponding to the input text, that is, in the candidate intentions corresponding to the input text, the candidate intentions that do not match the entity information corresponding to the input text are screened and filtered to ensure that the candidate intentions after screening and filtering are matched with the real intention of the input text and there is no error, thereby improving the precision and accuracy of the intention recognition result of the input text. It should be noted that in this embodiment, the candidate intentions after screening and filtering can be referred to as target intentions.

[0039] For example, assuming that the entity information corresponding to the input text is "Meituan", and the entity type corresponding to the entity information is "Platform Name", after comparing it with the error-prone entity types in the error-prone entity type set, it is found that "Platform Name" is an error-prone entity type, and alignment is required; at this time, the candidate intents corresponding to the input text can be traversed, that is, the preset entity attributes (that is, entity information) corresponding to each candidate intent can be checked. Specifically, the candidate intents Figure 1 How to cancel a Meituan order? Figure 1 The entity attribute is "Meituan", the candidate meaning Figure 2 For "How to return an Ele.me order?", and select the answer Figure 2 The entity attribute is "hungry", the candidate meaning Figure 3 How to return an order from JD.com? Figure 2 The entity attribute is "JD.com"; Figure 2 , 3 The entity attributes of the candidate meaning do not intersect with the entity information of the input text (i.e., they are not the same and do not match). Figure 2 , 3 Filter and finally leave the candidate Figure 1 , will be waiting for your attention Figure 1 As the target intent of the input text. Finally, the intent returned for the input text is "How to cancel a Meituan order?" It should be noted that in this embodiment, entity extraction can be performed on the candidate set (i.e., all candidate intents) in the knowledge base in advance, and the extracted entities can be stored in the index library (such as elasticsearch) as entity attributes of the candidate intents, where the type extracted from the entity attributes is an error-prone entity type.

[0040] It can be seen that after the embodiment of the present disclosure obtains the input text, it can first determine the entity information and candidate intents corresponding to the input text based on the input text; if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent can be screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. It can be seen that in the process of intent recognition of the input text, the embodiment can use the error-prone entity types in the preset error-prone entity type set and the entity information corresponding to the input text to screen and filter the candidate intents whose entity information does not match the candidate intents corresponding to the input text, so as to improve the precision and accuracy of the intent recognition results of the input text, thereby improving the response effect after intent recognition, and further improving the user experience. That is to say, in the process of intent recognition reasoning, the embodiment can filter the candidate intents that do not match the entity information corresponding to the input text to improve the intent recognition effect. In addition, by using the error-prone entity type set to automatically mine error-prone entities, human intervention can be reduced and the recall rate of error-prone entities can be improved; and the error-prone entity types and error-prone entities in the error-prone entity type set can be edited online, which can easily solve online error problems; and this solution does not need to introduce new models in the intent recognition process, reducing the accumulation of model errors, thereby achieving a simple and effective intent recognition effect, while the computational complexity of the entire solution is low and the effect is stable.

[0041] Next, a specific implementation of S202, i.e., "determining entity information and candidate intents corresponding to the input text according to the input text", will be introduced. Specifically, in one implementation, S202 may include:

[0042] S202a: Perform named entity recognition on the input text to obtain entity information corresponding to the input text.

[0043] In one implementation of this embodiment, named entity recognition (NER) can be used to perform entity recognition on the input text, that is, the NER method is used to identify to which entity each word in the input text belongs, and the identified entity is used as the entity information corresponding to the input text, that is, the entity information corresponding to the input text is obtained.

[0044] S202b: Input the input text into the trained text encoding model to obtain candidate intents corresponding to the input text.

[0045] In this embodiment, the preset text encoding model can be obtained by training using all standard questions in the knowledge base and approximate questions corresponding to the standard questions, wherein the text encoding model includes but is not limited to BERT, roberta and other models. In this way, after obtaining the input text, the input text can be input into the text encoding model to obtain the candidate intent corresponding to the input text. It can be understood that the similarity between the candidate intent corresponding to the input text and the content of the input text meets the preset similarity threshold, but the candidate intent corresponding to the input text and the entity information of the input text may be matched or not matched. For example, after receiving the input text "How to refund a Meituan order", the candidate intent "How to refund a Meituan order?", "How to refund an Ele.me order?", "How to refund a Jdong order?" whose similarity with the content of the input text meets the preset similarity threshold can be queried according to the input text, but the candidate intent "How to refund a Meituan order?" matches the entity information "Meituan" of the input text "How to refund a Meituan order", while the candidate intent "How to refund an Ele.me order?", "How to refund a Jdong order?" does not match the entity information "Meituan" of the input text "How to refund a Meituan order".

[0046] Next, a specific implementation of S203 will be introduced, namely, "if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, then according to the entity information corresponding to the error-prone entity type in the error-prone entity type set, the candidate intent is screened to obtain the target intent corresponding to the input text". Specifically, in one implementation, S203 may include:

[0047] S203a: Determine the entity type corresponding to the entity information according to the entity information.

[0048] In this embodiment, the correspondence between multiple sets of entity information and candidate intents can be pre-set. In this way, after determining the entity information corresponding to the input text, the entity type corresponding to the entity information corresponding to the input text can be queried based on the preset correspondence between the multiple sets of entity information and candidate intents.

[0049] S203b: Determine whether the preset error-prone entity type set includes the entity type corresponding to the entity information.

[0050] S203c: If so, the candidate intent is screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text.

[0051] In this embodiment, after determining the entity type corresponding to the entity information of the input text, it is possible to first check whether the entity type corresponding to the entity information of the input text has an intersection with the error-prone entity types in the error-prone entity type set, that is, to determine whether the preset error-prone entity type set includes the entity type corresponding to the entity information.

[0052] If the preset set of error-prone entity types does not include the entity type corresponding to the entity information, it means that there is no candidate intention corresponding to the input text that does not match the entity information corresponding to the input text, that is, there is no need to screen and filter the candidate intentions corresponding to the input text, and the candidate intentions corresponding to the input text can be used as the target intention corresponding to the input text.

[0053] If the preset set of error-prone entity types includes the entity type corresponding to the entity information, it means that there are candidate intents in the candidate intents corresponding to the input text that do not match the entity information corresponding to the input text. Then, the candidate intents can be screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. As an example, for each candidate intent in the candidate intents corresponding to the input text, the entity information corresponding to the entity type in the candidate intent can be determined according to the entity type corresponding to the entity information in the input text, that is, some candidate intents are selected, and the entity types corresponding to the entity information in these candidate intents are the same as the entity types corresponding to the entity information of the input text. Next, it can be determined whether the entity information in the input text is the same as the entity information in the candidate intent, that is, whether the entity information in the input text is the same as the entity information in the selected candidate intent; if so, it means that the candidate intent matches the entity information corresponding to the input text, that is, the candidate intent can reflect the true intent of the input text, and therefore, the candidate intent can be used as the target intent corresponding to the input text; if not, it means that the candidate intent does not match the entity information corresponding to the input text, that is, the candidate intent cannot reflect the true intent of the input text, and therefore, the candidate intent can be filtered and not retained.

[0054] For example, the entity information of the input text is "Meituan", and the entity information in the candidate intent is "Ele.me". Since the entity information in the input text is different from the entity information in the candidate intent, the candidate intent corresponding to "Ele.me" is removed from the list (that is, the candidate intent corresponding to the input text) to ensure that the final output result list (that is, the target intent corresponding to the input text) is aligned with the entity information in the input text, that is, it matches.

[0055] It should be noted that the entity information of the candidate intent can be understood as the entity attributes of the candidate intent, which can be pre-set. In one implementation, the candidate intent can be a coarse-grained matching list obtained through intent recognition, or a result list obtained by vector indexing using the output results of the text encoding model.

[0056] It should be noted that this embodiment does not limit the execution order of S202a and S202b. S202a may be executed first and then S202b, or S202b may be executed first and then S202a.

[0057] Next, the method for generating a set of error-prone entity types will be introduced. Specifically, in one implementation, before the step of obtaining the input text, the method further includes:

[0058] Step a: Based on a preset knowledge base, determine several groups of text information.

[0059] Each group of text information may include at least two main questions whose similarity meets a preset threshold and whose answers are different, for example, the main question "How to cancel a Meituan order?" and its corresponding answer "Call 10101010", and the main question "How to cancel an Ele.me order?" and its corresponding answer "Call 20202020". It should be noted that text information with high similarity between main questions but different answers can be understood as text information that is most likely to contain error-prone entities.

[0060] Step b: For each group of text information, perform named entity recognition on the main questions in the group of text information to obtain entity information corresponding to each main question; and, based on the entity information corresponding to each main question, determine the entity type corresponding to the group of text information.

[0061] It should be noted that, in this embodiment, the correspondence between multiple sets of entity information and entity types can be preset, so that after determining the entity information corresponding to the main question, the entity type corresponding to the main question can be determined based on the entity information corresponding to the main question. Then, the entity type corresponding to the group of text information can be determined based on the entity types corresponding to multiple main questions in a group of text information.

[0062] Suppose a group of text information includes the main question "How to cancel a Meituan order?" and the main question "How to cancel an Ele.me order?". Since the entity information corresponding to these two main questions is "Meituan" and "Are You Ele.me", and the entity types corresponding to "Meituan" and "Are You Ele.me" are "food delivery platform entities", the entity type corresponding to this group of text information is "food delivery platform entity".

[0063] Step c: Generate the preset set of error-prone entity types based on the entity types corresponding to the several groups of text information.

[0064] In this embodiment, the frequency of occurrence corresponding to each entity type can be determined based on the entity types corresponding to the several groups of text information; then, the entity types with an occurrence frequency greater than a preset frequency threshold can be used as the preset error-prone entity type set. In other words, entity types with a high frequency of occurrence can be used as error-prone entity types. It should be noted that the error-prone entity types in this embodiment are related to the business and can be changed at any time as the business changes. For example, the error-prone entity types corresponding to different businesses may be different. For example, the error-prone entity types corresponding to e-commerce businesses include food delivery platform entities and brand name entities, while the error-prone entity types corresponding to local life businesses include life payment type entities.

[0065] Specifically, in one implementation, after the step of determining the target intention corresponding to the input text, the method may further include:

[0066] Display the response text of the target intention corresponding to the input text.

[0067] For example, after determining that the target intent corresponding to the input text "How do I refund a Meituan order?" is "How do I refund a Meituan order?", the reply text (i.e., the answer) "Call 10101010" corresponding to "How do I refund a Meituan order?" can be displayed so that the user can take the next step based on the reply text.

[0068] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0069] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0070] Figure 3 Schematic diagram of the intention recognition device provided by the embodiment of the present disclosure. Figure 3 As shown, the intention recognition device includes:

[0071] An acquisition module 301 is used to acquire input text;

[0072] A determination module 302 is used to determine entity information and candidate intents corresponding to the input text according to the input text;

[0073] The screening module 303 is used to screen the candidate intent according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set.

[0074] Optionally, the determining module 302 is used to:

[0075] Perform named entity recognition on the input text to obtain entity information corresponding to the input text;

[0076] The input text is input into the trained text encoding model to obtain the candidate intent corresponding to the input text.

[0077] Optionally, the preset error-prone entity type set includes several error-prone entity types; the screening module 303 is used to:

[0078] According to the entity information, determining the entity type corresponding to the entity information;

[0079] Determine whether the preset error-prone entity type set includes the entity type corresponding to the entity information;

[0080] If so, the candidate intent is screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text.

[0081] Optionally, the screening module 303 is used to:

[0082] For each candidate intent, determine the entity information corresponding to the entity type in the candidate intent based on the entity type corresponding to the entity information in the input text; determine whether the entity information in the input text is the same as the entity information in the candidate intent; if so, take the candidate intent as the target intent corresponding to the input text.

[0083] Optionally, the device further includes a set generation module, which is used to:

[0084] Based on a preset knowledge base, determining a plurality of groups of text information, wherein each group of text information includes at least two main questions whose similarity meets a preset threshold and whose answers are different;

[0085] For each set of text information, performing named entity recognition on the main questions in the set of text information to obtain entity information corresponding to each main question; and determining the entity type corresponding to the set of text information according to the entity information corresponding to each main question;

[0086] The preset error-prone entity type set is generated according to the entity types corresponding to the plurality of groups of text information.

[0087] Optionally, the collection generation module is used to:

[0088] Determine the occurrence frequency of each entity type according to the entity types corresponding to the plurality of groups of text information;

[0089] The entity types whose occurrence frequency is greater than a preset frequency threshold are used as the preset error-prone entity type set.

[0090] Optionally, the device further comprises a display module, which is used for:

[0091] The reply text of the target intent corresponding to the input text is displayed. Compared with the prior art, the beneficial effect of the embodiment of the present disclosure is that: after obtaining the input text, the device of the embodiment of the present disclosure can first determine the entity information and candidate intents corresponding to the input text according to the input text; if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, the candidate intent can be screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text. It can be seen that in the process of intent recognition of the input text, the present embodiment can use the error-prone entity types in the preset error-prone entity type set and the entity information corresponding to the input text to screen and filter the candidate intents whose entity information does not match the candidate intents corresponding to the input text, so as to improve the precision and accuracy of the intent recognition result of the input text, thereby improving the reply effect after intent recognition, and further improving the user experience.

[0092] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0093] Figure 4 Schematic diagram of a computer device 4 provided in an embodiment of the present disclosure. Figure 4 As shown, the computer device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of each module / module in the above-mentioned device embodiments are implemented.

[0094] Exemplarily, the computer program 403 may be divided into one or more modules / modules, which are stored in the memory 402 and executed by the processor 401 to complete the present disclosure. The one or more modules / modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 403 in the computer device 4.

[0095] The computer device 4 may be a desktop computer, a notebook computer, a PDA, a cloud server, or other computer devices. The computer device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 It is only an example of computer device 4 and does not constitute a limitation of computer device 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0096] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0097] The memory 402 may be an internal storage module of the computer device 4, for example, a hard disk or memory of the computer device 4. The memory 402 may also be an external storage device of the computer device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 4. Further, the memory 402 may also include both an internal storage module and an external storage device of the computer device 4. The memory 402 is used to store computer programs and other programs and data required by the computer device. The memory 402 may also be used to temporarily store data that has been output or is to be output.

[0098] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional modules and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional modules and modules as needed, that is, the internal structure of the device can be divided into different functional modules or modules to complete all or part of the functions described above. The functional modules and modules in the embodiment can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present disclosure. The specific working process of the modules and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0099] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0100] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0101] In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic, for example, the modules or the division of modules are only a logical function division, and there may be other division methods in actual implementation, multiple modules or components may be combined or may be integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of the apparatus or module, which may be electrical, mechanical or other forms.

[0102] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0103] In addition, each functional module in each embodiment of the present disclosure may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.

[0104] If the integrated module / module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0105] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.

Claims

1. A method for identifying intent, It is characterized in that The method comprises: Get input text; Determine entity information and candidate intents corresponding to the input text according to the input text; If the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set, then, according to the entity information corresponding to the input text, the candidate intents are screened to obtain a target intent corresponding to the input text; The step of screening the candidate intents according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text includes: For each candidate intent, determine the entity information corresponding to the entity type in the candidate intent according to the entity type corresponding to the entity information in the input text; determine whether the entity information in the input text is the same as the entity information in the candidate intent; if so, use the candidate intent as the target intent corresponding to the input text; Before the step of obtaining the input text, the method further includes: Based on a preset knowledge base, determining a plurality of groups of text information, wherein each group of text information includes at least two main questions whose similarity meets a preset threshold and whose answers are different; For each group of text information, performing named entity recognition on the main questions in the group of text information to obtain entity information corresponding to each main question; and determining the entity type corresponding to the group of text information according to the entity information corresponding to each main question; Generate the preset error-prone entity type set according to the entity types corresponding to the plurality of groups of text information; The generating the preset set of error-prone entity types according to the entity types corresponding to the plurality of groups of text information comprises: Determine the occurrence frequency of each entity type according to the entity types corresponding to the plurality of groups of text information; The entity types whose occurrence frequency is greater than a preset frequency threshold are used as the preset error-prone entity type set.

2. The method according to claim 1, It is characterized in that The determining, according to the input text, entity information and candidate intents corresponding to the input text includes: Performing named entity recognition on the input text to obtain entity information corresponding to the input text; The input text is input into a trained text encoding model to obtain candidate intents corresponding to the input text.

3. The method according to claim 1, It is characterized in that The preset error-prone entity type set includes several error-prone entity types; if the entity type corresponding to the entity information is an error-prone entity type in the preset error-prone entity type set, then according to the entity information corresponding to the error-prone entity type in the error-prone entity type set, the candidate intent is screened to obtain the target intent corresponding to the input text, including: Determine, according to the entity information, the entity type corresponding to the entity information; Determining whether the preset error-prone entity type set includes the entity type corresponding to the entity information; If so, the candidate intents are screened according to the entity information corresponding to the input text to obtain the target intent corresponding to the input text.

4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: The response text of the target intention corresponding to the input text is displayed.

5. An intention recognition device, It is characterized in that The device comprises: The acquisition module is used to obtain the input text; A determination module, used to determine entity information and candidate intents corresponding to the input text according to the input text; A screening module, for screening the candidate intents according to the entity information corresponding to the input text to obtain a target intent corresponding to the input text if the entity type corresponding to the entity information is an error-prone entity type in a preset error-prone entity type set; The screening module is used to: for each candidate intent, determine the entity information corresponding to the entity type in the candidate intent according to the entity type corresponding to the entity information in the input text; determine whether the entity information in the input text is the same as the entity information in the candidate intent; if so, use the candidate intent as the target intent corresponding to the input text; The device also includes a set generation module, which is used to: determine a number of groups of text information based on a preset knowledge base, wherein each group of text information includes at least two main questions whose similarity meets a preset threshold and whose answers are different; perform named entity recognition on the main questions in each group of text information to obtain entity information corresponding to each main question; and determine the entity type corresponding to the group of text information according to the entity information corresponding to each main question; and generate the preset error-prone entity type set according to the entity types corresponding to the several groups of text information; The set generation module is also used to: determine the occurrence frequency corresponding to each entity type according to the entity types corresponding to the several groups of text information; and use the entity types whose occurrence frequency is greater than a preset frequency threshold as the preset error-prone entity type set.

6. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Intention recognition result error correction method

    CN110598214A

  • Question and answer data processing method and device based on artificial intelligence and electronic equipment

    CN111209384A