Dialogue intention recognition method, device, storage medium and intelligent device

By extracting the semantic features and designated features of the dialogue intention recognition model, and combining multiple rounds of dialogue evaluation information for model training, the problem of low accuracy of intention recognition in the prior art is solved, and the efficiency and accuracy of dialogue intention recognition are improved.

CN114970560BActive Publication Date: 2024-12-20UBTECH ROBOTICS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210545067.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2024-12-20
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

Existing conversational intent recognition models rely on a large amount of contextual data in multiple rounds of conversations, resulting in low accuracy in intent recognition and inability to meet the needs.

Method used

By obtaining the user statements of the current round of conversations and their specified features, extracting semantic features and using them as input to the trained intent recognition model, reducing dependence on context data, and retraining the model using the evaluation information of multiple rounds of conversations , improve the accuracy of intention recognition.

Benefits of technology

While reducing dependence on a large amount of contextual data, it improves the understanding efficiency of user statements and the accuracy of intent recognition, reduces the labor cost of model training data acquisition and labeling, and enhances the effect of intent recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970560B_ABST
    Figure CN114970560B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of artificial intelligence technology, and provides a method, apparatus, storage medium and intelligent device for identifying conversation intentions, including: obtaining user statements of the current round of conversation, and specified features of the user statements, wherein the types of the specified features are predefined; extracting semantic features of words in the user statements; using the semantic features and the specified features as inputs of a trained intention recognition model, and obtaining intention recognition results output by the intention recognition model. The present application can reduce the dependence of intention recognition on a large amount of contextual data, and improve the efficiency of understanding user statements and the accuracy of intention recognition under the condition of a small amount of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, storage medium and intelligent device for recognizing conversation intention. Background Art

[0002] In recent years, with the development of deep learning technology and the improvement of computer computing power, people have begun to apply deep learning technology to human-computer dialogue systems. Dialogue intent recognition is a way to determine the artificially specified state and intention in conversation management. However, the current representative model for processing the task of intent recognition based on multi-round conversations relies on a large amount of contextual data for training, and the accuracy of intent recognition is not high, which cannot meet people's needs. Summary of the invention

[0003] The embodiments of the present application provide a method, apparatus, storage medium and intelligent device for recognizing conversation intent, which can reduce the reliance on a large amount of contextual data, improve the efficiency of understanding user sentences and the accuracy of intent recognition.

[0004] In a first aspect, an embodiment of the present application provides a method for identifying a conversation intention, comprising:

[0005] Obtaining a user statement of the current round of dialogue and a specified feature of the user statement, where the type of the specified feature is predefined;

[0006] Extracting semantic features of words in the user sentence;

[0007] The semantic features and the designated features are used as inputs of a trained intent recognition model to obtain an intent recognition result output by the intent recognition model.

[0008] In a possible implementation manner of the first aspect, obtaining the specified feature of the user sentence includes:

[0009] Get the conversation type of the current conversation round;

[0010] Determine whether the user sentence contains the same words as the system feedback sentence in the previous round of dialogue, and obtain a word determination result;

[0011] Obtaining a correlation degree between the user statement and a dialogue database associated with the current dialogue round;

[0012] The specified features of the user sentence are determined according to the dialogue type, the word determination result and the degree of association.

[0013] In a possible implementation manner of the first aspect, the conversation intention recognition method further includes:

[0014] After the multiple rounds of dialogue are completed, obtaining the user's evaluation information on the multiple rounds of dialogue;

[0015] Based on the evaluation information, storing the conversation history information of multiple rounds of conversations into a designated data set;

[0016] The intent recognition model is retrained using the specified data set.

[0017] In a possible implementation manner of the first aspect, storing the dialogue history information of the multiple rounds of dialogues into a designated data set based on the evaluation information includes:

[0018] If the evaluation information is a positive evaluation, directly storing the conversation history information of the multiple rounds of conversations into the designated data set;

[0019] If the evaluation information is a non-positive evaluation, storing the conversation history information of the multiple rounds of conversations into a backup data set;

[0020] Obtaining correction information for the conversation history information in the backup data set;

[0021] Based on the correction information, correct the conversation history information in the backup data set;

[0022] The corrected conversation history information in the backup data set is transferred to the designated data set.

[0023] In a possible implementation manner of the first aspect, the retraining the intent recognition model by using the specified data set includes:

[0024] Extracting rules according to the conversation history information in the specified data set, and updating the model training parameters of the intent recognition model according to the extracted rules;

[0025] The intent recognition model is retrained according to the conversation history information in the specified data set and the model training parameters.

[0026] In a possible implementation manner of the first aspect, after taking the semantic features and the designated features as inputs of the trained intent recognition model to obtain the intent recognition result output by the intent recognition model, the method further includes:

[0027] Get the identity information of the user in the current round of conversation;

[0028] Determining whether the user has the authority to mark the current round of conversation based on the identity information;

[0029] If the user has the permission, the user is prompted whether to mark the current round of conversation;

[0030] If a confirmation marking indication of the user feedback is detected, the current round of dialogue is marked based on the confirmation marking indication, and the marked current round of dialogue is collected into a designated data set.

[0031] In a possible implementation of the first aspect, the intent recognition model includes a feature extraction module, a bag-of-words topic attention module, an autoregressive module, a loss optimization module, and a classifier; wherein the bag-of-words topic attention module includes a bag-of-words model, a topic model, and an attention mechanism;

[0032] The method for identifying conversation intentions also includes:

[0033] In the training phase of the intention recognition model, user sample sentences and their specified sample features are obtained, and semantic sample features in the user sample sentences are extracted;

[0034] Inputting the semantic sample features and the specified sample features into a feature extraction module for quantization to obtain semantic vector features and the specified sample vector features;

[0035] Using the semantic vector feature as the input of the bag-of-words model, using the output of the bag-of-words model as the input of the topic model, using the specified sample vector feature as the input of the autoregressive module, and then using the output of the topic model, the output of the autoregressive module and the specified sample vector feature as the input of the attention mechanism;

[0036] The classifier performs intent recognition based on the output of the attention mechanism, outputs the result of sample intent recognition, and calculates the loss based on the output sample intent recognition result and the sample intent pre-annotated by the user sample sentence, and optimizes the parameters of the intent recognition model based on the calculated loss until the calculated loss is less than or equal to the preset loss threshold, at which time the model training ends.

[0037] In a second aspect, an embodiment of the present application provides a conversation intention recognition device, comprising:

[0038] A sentence feature acquisition unit, used to acquire the user sentence of the current round of dialogue, and the specified feature of the user sentence, where the type of the specified feature is predefined;

[0039] A semantic feature extraction unit, used to extract semantic features of words in the user sentence;

[0040] The intention recognition unit is used to use the semantic features and the specified features as inputs of a trained intention recognition model to obtain an intention recognition result output by the intention recognition model.

[0041] In a third aspect, an embodiment of the present application provides an intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect above is implemented.

[0043] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a smart device, enables the smart device to execute the method described in the first aspect above.

[0044] In an embodiment of the present application, by obtaining user sentences in the current round of conversation and specified features of the user sentences, and then extracting semantic features of words in the user sentences, the semantic features and the specified features are used as inputs of a trained intent recognition model to obtain intent recognition results output by the intent recognition model. This can reduce the dependence of intent recognition on a large amount of contextual data, and improve the efficiency of understanding user sentences and the accuracy of intent recognition under a small amount of data. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0046] Figure 1 is a flowchart of the implementation of the method for identifying conversation intentions provided in an embodiment of the present application;

[0047] Figure 2 This is a specific implementation flow chart of obtaining the specified features of the user sentence in the conversation intention recognition method provided in the embodiment of the present application;

[0048] Figure 3 It is a flow chart of an implementation method of a conversation intention recognition method for retraining an intention recognition model provided in an embodiment of the present application;

[0049] Figure 4 is a specific implementation flow chart of the conversation intention recognition method S205 provided in an embodiment of the present application;

[0050] Figure 5It is a specific implementation flowchart of retraining the intent recognition model using a specified data set in the conversation intent recognition method provided in the embodiment of the present application;

[0051] Figure 6 It is a specific implementation flow chart of annotating dialogues in the dialogue intention recognition method provided in the embodiment of the present application;

[0052] Figure 7 is a structural block diagram of a conversation intention recognition device provided in an embodiment of the present application;

[0053] Figure 8 It is a schematic diagram of a smart device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also 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 prevent unnecessary details from obstructing the description of the present application.

[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0056] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0057] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0058] Dialogue intent recognition is a way to determine artificially defined states and intentions in conversation management. In the process of multiple rounds of dialogue, since some information in the dialogue is omitted during natural language communication, the intention of the current dialogue is generally determined through information in the context. Existing dialogue systems generally need to rely on a large amount of contextual data to train the model. Otherwise, the relationship between some non-appearing words and the topic will be unclear, thereby affecting the efficiency and accuracy of the model in intent recognition.

[0059] In order to solve the above problems, the embodiments of the present application provide a method, apparatus and terminal device for recognizing conversation intentions, which are described below for details.

[0060] Figure 1 The implementation process of the method for identifying conversation intentions provided in the embodiment of the present application is shown, and the method process includes steps S101 to S103. The specific implementation principle of each step is as follows:

[0061] S101: Obtain user statements in the current round of dialogue and specified features of the user statements, where the type of the specified features is predefined.

[0062] In an embodiment of the present application, the sentence input by the user this time is received, that is, the user sentence of the current round of dialogue. The user sentence of the current round of dialogue is the object of this sentence recognition, that is, the purpose of this recognition is to identify the intention of the above user sentence. In order to reduce the dependence of the intention recognition model training on a large amount of context data, the types of features related to the user sentence are first predefined in an embodiment of the present application, which is conducive to accurately identifying the intention of the above user sentence. The above user sentence is a sentence input by the user, and the specified features of the above user sentence are features determined by the smart device according to the predefined feature types based on the above user sentence.

[0063] In a possible embodiment, the above-mentioned predefined type of specified features include but are not limited to the dialogue type of the current round of dialogue, whether the sentence input by the user has the same words as the sentence fed back by the system in the previous round, and the dialogue database associated with the sentence input by the user and the current round of dialogue. Figure 2 The specific implementation process of obtaining the specified features of the user sentence in the method for identifying the conversation intention provided in the embodiment of the present application is shown, and is described in detail as follows:

[0064] A1: Obtain the dialogue type of the current dialogue round. For example, the dialogue type includes task-based and chat-based. Specifically, the dialogue type can be determined based on the words in the user's sentence of the current dialogue round.

[0065] A2: Determine whether the user's statement contains the same words as the system feedback statement in the previous round of dialogue, and obtain a word determination result.

[0066] The above-mentioned system sentence refers to the sentence fed back by the smart device based on the user sentence in the previous round of dialogue. If there are words in the user sentence that are the same as the system feedback sentence in the previous round of dialogue, weighted processing is performed according to the part of speech of the same words, and the above-mentioned word determination result includes the weighted processing result of the same words. It should be noted that, in this embodiment, the words in the user sentence that are the same as the system feedback sentence include not only the same words, but also the same semantics.

[0067] A3: Obtaining the degree of association between the user statement and the dialogue database associated with the current round of dialogue.

[0068] In some implementations, the conversation database associated with the current conversation round can be a default conversation database initialized for the smart device. In other implementations, the smart device determines the conversation database associated with the current conversation round according to the conversation type of the current conversation round. The conversation database includes a knowledge base related to the conversation type. There can be more than one conversation database associated with the current conversation round.

[0069] In this embodiment, the degree of association between the user statement and the conversation database associated with the current conversation round can be determined based on the analysis of the user statement. The higher the degree of association, the more accurate the conversation database associated with the current conversation round is.

[0070] In a possible implementation, if the above correlation degree is less than a preset correlation degree threshold, the conversation database associated with the current round of conversation is updated to make the system feedback of the smart device more accurate and effective, further improving the accuracy of conversation intention recognition.

[0071] A4: Determine the specified feature of the user statement according to the dialogue type, the word determination result, and the degree of association. In a possible implementation, determine the specified feature of the user statement according to the dialogue type, the word determination result, the degree of association, and their respective corresponding weights.

[0072] In an embodiment of the present application, by predefining multiple types of specified features, after obtaining a user statement, the smart device determines the specified features of the predefined type based on the user statement, and identifies the user statement in combination with the specified features, thereby reducing dependence on context data.

[0073] S102: Extracting semantic features of words in the user's sentence.

[0074] In general, the word vector features in the user's sentence are used as the input of the intent recognition model. The word vector features themselves can only represent the information of a single word and cannot accurately represent the meaning of the user's sentence. In the embodiment of the present application, the semantic features of the words in the user's sentence are extracted to improve the accuracy of the user's sentence recognition.

[0075] In a possible implementation, word vector features corresponding to words in the user sentence are first extracted, the word vector features are linearly transformed, and then semantic features are obtained through statistical methods.

[0076] S103: Using the semantic features and the designated features as inputs of a trained intent recognition model to obtain intent recognition results output by the intent recognition model.

[0077] In an embodiment of the present application, an intent recognition model is pre-constructed and trained. The intent recognition model includes a feature extraction module, a bag-of-words topic attention module, an autoregressive module, a loss optimization module and a classifier. The feature extraction module is used to vectorize semantic features and specified features, and the bag-of-words topic attention module is used to extract the relationship between the frequency of vocabulary appearance and classification in a sentence. Among them, the bag-of-words topic attention module includes a bag-of-words model, a topic model and an attention mechanism. The autoregressive module is used to extract word order information in user sentences and bias the current state of the model according to the specified features in the user sentences. The loss optimization module is used to reduce the information loss of the bag-of-words topic model during dimensional compression. The classifier is used to predict and output the intent recognition result.

[0078] In the training stage of the above-mentioned intention recognition model, user sample sentences and their designated sample features are obtained, semantic sample features of words in the user sample sentences are extracted, the semantic sample features and the designated sample features are input into the feature extraction module for quantization, and semantic vector features and designated sample vector features are obtained. The semantic vector features are used as the input of the above-mentioned bag-of-words model, the output of the above-mentioned bag-of-words model is used as the input of the above-mentioned topic model, the designated sample vector features are used as the input of the autoregressive module, and then the output of the above-mentioned topic model, the output of the above-mentioned autoregressive module and the above-mentioned designated sample vector features are used as the input of the above-mentioned attention mechanism. The above-mentioned classifier performs intent recognition according to the output of the above-mentioned attention mechanism, outputs the result of sample intent recognition, and calculates the loss according to the output sample intent recognition result and the sample intent pre-annotated by the user sample sentence. The parameters of the intention recognition model are optimized according to the calculated loss until the calculated loss is less than or equal to the preset loss threshold, and the model training is completed.

[0079] In this embodiment, user sentences with known intent will be input into the intent recognition model, and the output of the topic model will be used to calculate the autoencoder loss to ensure that the useful features for intent recognition in the bag-of-words model are represented as much as possible by the topic model. The preliminary prediction results obtained by the classifier will be compared with the known intent to obtain the prediction loss, and based on the loss, the implicit parameters of each module in the entire model will be optimized so that each module in the model can correctly perform its function. In the process of intent recognition prediction results, the model does not calculate the loss when a sentence with unknown intent is input. After obtaining the preliminary prediction results through the classifier, it is filtered using pre-set rules to obtain the final prediction results.

[0080] In one embodiment, the data in the word vector feature of a single word can only represent the information of a single word. At the same time, since this information is distributed in various dimensions, it is not possible to simply add it up for statistics. Therefore, it is necessary to first transform the word vector feature linearly and then obtain the semantic features of the word through statistical methods, so as to retain the information that is beneficial to the bag-of-words model and distinguish different categories of information in terms of dimensions. The algorithm for the above linear transformation can refer to the prior art.

[0081] For example, suppose the word library size of the bag-of-words model is 5, the data in the word library is ['A', 'B', 'C', 'D', 'E'], and the data in the single word vector feature after linear transformation is [[1, 0.1, 0], [0, 0.9, 0], [0.5, 0.5, 0], [0, 0, 1], [0, 0, 0.9]], then the original one-hot input of the bag-of-words model of the text "ABD" is [1, 1, 0, 1, 0], and the modified input is [1, 1, 1], and the text "ABE " can be similarly obtained as [1,1,0,0,1] and [1,1,0.9]. Assuming that "ABE" and "ABD" have almost the same semantics (for example, "I like kittens" and "I like orange cats"), the original one-hot vector expressions of "D" and "E" must be sufficiently trained to enable the model to understand their approximate meanings. Otherwise, random values ​​will be introduced, causing system instability. The semantic vector features obtained by the modified input are easier to understand the approximate meaning, and the final bag-of-words model output is also closer.

[0082] In the application stage of the above-mentioned intention recognition model, the user sentences of the current round of dialogue and the specified features of the user sentences are obtained, the semantic features of the words in the user sentences are extracted, the semantic features and the specified features are input into the feature extraction module for quantization, and the semantic vector features and the specified vector features are obtained. The semantic vector features are used as the input of the above-mentioned bag-of-words model, the output of the above-mentioned bag-of-words model is used as the input of the above-mentioned topic model, the specified vector features are used as the input of the autoregressive module, and then the output of the above-mentioned topic model, the output of the above-mentioned autoregressive module and the above-mentioned specified vector features are used as the input of the above-mentioned attention mechanism. The above-mentioned classifier performs intent recognition according to the output of the above-mentioned attention mechanism and outputs the result of intent recognition.

[0083] The above autoregressive module corresponds to the recurrent neural network and its variants in deep learning. The semantic vector features will be input into the network in sequence to simulate the process of human reading text. The specified vector features will be input into the autoregressive module as the offset of the initial latent vector, indicating the current biased dialogue state. The output of the autoregressive module is finally obtained based on the latent vector obtained by fitting, which is used to filter other information.

[0084] In the embodiment of the present application, the above-mentioned specified vector features are used together with the output of the topic model and the output of the autoregressive module as the input of the attention mechanism to assist the attention mechanism to correctly notice the effective part of the features provided by the topic model. The essence of the attention mechanism is that there are three parts of input data, Q used as a query, K used as the queried, and V for storing information. The attention weight can be obtained by calculating the relationship between Q and K (generally calculating cosine similarity, etc.), and the attention weight can be used to filter V, and the filtered information is used as output. In the embodiment of the present application, Q comes from the autoregressive module and the specified features, and K and V come from the topic model.

[0085] In this implementation, the specified features of the user's sentences are added to the input of the autoregressive module in order to extract useful vocabulary sequence information in the current dialogue state, while the specified vector features are added to the input of the attention mechanism in order to extract useful information in the current dialogue state in the topic model, so that the specified vector features passed into the autoregressive module focus on extracting vocabulary sequence information.

[0086] In an embodiment of the present application, by obtaining user sentences in the current round of conversation and specified features of the user sentences, and then extracting semantic features of words in the user sentences, the semantic features and the specified features are used as inputs of a trained intent recognition model to obtain intent recognition results output by the intent recognition model. This can reduce the dependence of intent recognition on a large amount of contextual data, and improve the efficiency of understanding user sentences and the accuracy of intent recognition under a small amount of data.

[0087] As a possible implementation of this application, Figure 3 A method for identifying conversation intentions by retraining an intention recognition model provided by an embodiment of the present application is shown, and is described in detail as follows:

[0088] S201: Obtain user statements in the current round of dialogue and specified features of the user statements, where the type of the specified features is predefined.

[0089] S202: Extracting semantic features of words in the user's sentence.

[0090] S203: The semantic features and the designated features are used as inputs of a trained intent recognition model to obtain an intent recognition result output by the intent recognition model.

[0091] In this embodiment, the specific steps of step S201 to step S203 refer to step S101 to step S103 in the above embodiment, which will not be repeated here.

[0092] S204: After the multiple rounds of dialogue are completed, obtaining the user's evaluation information on the multiple rounds of dialogue.

[0093] In this embodiment, after the round of dialogue ends, if no user statement is detected within the set time length, or if the user statement in the round of dialogue contains an end instruction, it can be determined that the multi-round dialogue has ended. After the multi-round dialogue ends, the smart device continues to monitor and obtain the user's evaluation information on the multi-round dialogue. In some embodiments, after the round of dialogue ends, the smart device sends an evaluation invitation, which is used to prompt the user to feedback the evaluation information of the multi-round dialogue. The above evaluation information includes the user's positive evaluation and negative evaluation of the multi-round dialogue.

[0094] The positive evaluation mark indicates that the user's satisfaction with the multi-round dialogue is higher than the preset satisfaction threshold. The non-positive evaluation mark indicates that the user's satisfaction with this round of dialogue does not reach the preset satisfaction threshold. Optionally, the non-positive evaluation mark also includes a null value for evaluation information, that is, the user does not provide any feedback on the evaluation information.

[0095] S205: Based on the evaluation information, the conversation history information of multiple rounds of conversations is stored in a designated data set. As an embodiment of the present application, Figure 4 As shown, the above step S205 can be specifically performed as follows:

[0096] B1: If the evaluation information is a positive evaluation, the conversation history information of the multiple rounds of conversations is directly stored in the designated data set.

[0097] The above-mentioned designated data set is used to store conversation history information that can be used for intent recognition model training. The conversation history information includes user sentences and their annotations in multiple rounds of conversations, and the annotations include intent recognition results corresponding to user sentences. In this embodiment, the conversation history information corresponding to the positive evaluation is the effective data for accurate conversation intent recognition, which can be directly stored in the designated data set.

[0098] B2: If the evaluation information is a non-positive evaluation, the conversation history information of the multiple rounds of conversations is stored in a spare data set.

[0099] The above-mentioned backup data set is used to store the conversation history information that the user has not evaluated, and the conversation history information that the user evaluation does not reach the preset satisfaction threshold. The data in the above-mentioned backup data set cannot be directly used for the training of the intent recognition model.

[0100] B3: Obtaining correction information for the conversation history information in the backup data set. The correction information may be provided by annotators.

[0101] B4: Based on the correction information, the conversation history information in the backup data set is corrected. Specifically, based on the correction information, the annotations of the user sentences in the conversation history information in the backup data set are corrected, and the intention recognition results corresponding to the user sentences are corrected to be accurate.

[0102] B5: Transferring the corrected conversation history information in the standby data set to the designated data set. The corrected conversation history information is effective data for accurate conversation intent recognition, so the corrected conversation history information in the standby data set is transferred to the designated data set for intent recognition model training.

[0103] S206: Retrain the intent recognition model using the specified data set.

[0104] In an embodiment of the present application, after the end of multiple rounds of conversations, the user's evaluation information on the multiple rounds of conversations is obtained, and then based on the evaluation information, the conversation history information of the multiple rounds of conversations is stored in a specified data set, and then the designated data set is used to retrain the intent recognition model. This can solve the problem that the intent recognition model has unstable recognition effect on some intents when using less data. The valid data during the operation of the intent recognition model is used as training data to train the intent recognition model again, thereby reducing the labor cost of obtaining and labeling training data. At the same time, the effect of intent recognition is enhanced through further model training.

[0105] As an embodiment of the present application, Figure 5The specific implementation process of retraining the intention recognition model using the specified data set in the conversation intention recognition method provided in the embodiment of the present application is shown, and is detailed as follows:

[0106] C1: Extract rules based on the conversation history information in the specified data set, and update the model training parameters of the intent recognition model based on the extracted rules.

[0107] In the embodiment of the present application, the extraction rule is a rule for extracting user sentences in the conversation history information. For example, the extraction is performed based on statistical information such as sentences containing word A all belong to category A and word C does not exist in category B, and the model training parameters of the intent recognition model are updated based on the extracted rules.

[0108] C2: Retrain the intent recognition model based on the conversation history information in the specified data set and the model training parameters.

[0109] As an embodiment of the present application, Figure 6 As shown, the conversation intention recognition method provided in the embodiment of the present application also includes:

[0110] D1: Obtain the identity information of the user in the current round of dialogue. Specifically, before the end of multiple rounds of dialogue, obtain the identity information of the user in the current round of dialogue.

[0111] Before starting a human-computer dialogue, the user needs to log in to the account on the smart device. In the embodiment of the present application, the above user information includes the account information of the currently logged in smart device.

[0112] D2: Determine whether the user has the authority to mark the current round of conversation based on the identity information.

[0113] Different identity information indicates that different accounts may have different system permissions. For example, a normal user account only has the permission to talk. A test management account has the permission to talk, and also has the permission to test the system, annotate information, etc. In this embodiment, based on the user's identity information, it is determined whether the user has the permission to annotate the current round of conversation. The annotated information includes whether the intent recognition result is accurate.

[0114] D3: If the user has the authority, prompt the user whether to mark the current round of conversation. The user having the authority does not necessarily mean that the current round of conversation must be marked. To improve the effectiveness of the marking, after determining that the user has the above-mentioned marking authority, prompt the user whether to mark the current round of conversation. Prompts include screen information prompts, voice prompts, etc., which are not limited here.

[0115] D4: If a confirmation marking indication of the user feedback is detected, the current round of dialogue is marked based on the confirmation marking indication, and the marked current round of dialogue is collected into a designated data set.

[0116] In this embodiment, after receiving the above prompt sent by the smart device, the user feedbacks whether to confirm the marking instruction. If no feedback from the user is detected within the preset time length of sending the above prompt, or if the user confirmation of not marking is detected within the preset time length of sending the above prompt, it is determined not to mark the current round of dialogue. If a confirmation marking instruction fed back by the user is detected, the current round of dialogue is marked based on the confirmation marking instruction, and the marked current round of dialogue is collected into the designated data set.

[0117] In an embodiment of the present application, by automatically annotating and updating the conversation during the operation of the intent recognition model, the labor cost required to annotate the historical corpus is reduced, thereby reducing the cost of expanding the corpus in actual scenarios, while enhancing the effect of intent recognition.

[0118] 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 application.

[0119] Corresponding to the method described in the above embodiment, Figure 7 A structural block diagram of a conversation intention recognition device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0120] Reference Figure 7 The conversation intention recognition device comprises: a sentence feature acquisition unit 71, a semantic feature extraction unit 72, and an intention recognition unit 73, wherein:

[0121] A sentence feature acquisition unit 71 is used to acquire the user sentence of the current round of dialogue and the specified feature of the user sentence, where the type of the specified feature is predefined;

[0122] A semantic feature extraction unit 72, used to extract semantic features of words in the user's sentence;

[0123] The intention recognition unit 73 is used to use the semantic features and the specified features as inputs of a trained intention recognition model to obtain an intention recognition result output by the intention recognition model.

[0124] As a possible implementation of the present application, the sentence feature acquisition unit 71 includes:

[0125] A dialogue type acquisition module is used to obtain the dialogue type of the current dialogue round;

[0126] A vocabulary determination module is used to determine whether the user's sentence contains the same words as the system feedback sentence in the previous round of dialogue, and obtain a word determination result;

[0127] A correlation degree determination module, used to obtain the correlation degree between the user statement and the dialogue database associated with the current dialogue round;

[0128] The designated feature determination module is used to determine the designated features of the user sentence according to the dialogue type, the word determination result and the degree of association.

[0129] As a possible implementation manner of the present application, the conversation intention recognition device further includes:

[0130] An evaluation information acquisition unit, used to acquire the user's evaluation information on the multiple rounds of dialogue after the multiple rounds of dialogue are completed;

[0131] An information collection unit, configured to store the conversation history information of multiple rounds of conversations into a designated data set based on the evaluation information;

[0132] A model training unit is used to retrain the intent recognition model using the specified data set.

[0133] As a possible implementation of the present application, the information collection unit specifically includes:

[0134] A first collection module, configured to directly store the conversation history information of the multiple rounds of conversations into the designated data set if the evaluation information is a positive evaluation;

[0135] A second collection module, configured to store the conversation history information of the multiple rounds of conversations into a spare data set if the evaluation information is a non-positive evaluation;

[0136] A correction information acquisition module, used to obtain correction information for the conversation history information in the backup data set;

[0137] A correction module, configured to correct the conversation history information in the backup data set based on the correction information;

[0138] The information transfer module is used to transfer the corrected conversation history information in the backup data set to the designated data set.

[0139] As a possible implementation of the present application, the model training unit includes:

[0140] A parameter acquisition module, used to extract rules according to the conversation history information in the specified data set, and update the model training parameters of the intent recognition model according to the extracted rules;

[0141] A model training module is used to retrain the intent recognition model based on the conversation history information in the specified data set and the model training parameters.

[0142] As a possible implementation manner of the present application, the conversation intention recognition device further includes:

[0143] A user identity information acquisition unit, used to acquire the identity information of the user in the current round of dialogue;

[0144] A conversation marking unit, used to determine whether the user has the authority to mark the conversation of the current round according to the identity information; if the user has the authority, prompt the user whether to mark the conversation of the current round;

[0145] The conversation collection unit is used to mark the conversation of the current round based on the confirmation marking indication if a confirmation marking indication of the user feedback is detected, and collect the marked conversation of the current round into a designated data set.

[0146] As a possible implementation of the present application, the intention recognition model includes a feature extraction module, a bag-of-words topic attention module, an autoregressive module, a loss optimization module, and a classifier; wherein the bag-of-words topic attention module includes a bag-of-words model, a topic model, and an attention mechanism; the conversation intention recognition device also includes:

[0147] A model training unit is used to obtain user sample sentences and their designated sample features during the training phase of the intent recognition model, and extract semantic sample features from the user sample sentences; input the semantic sample features and designated sample features into a feature extraction module for quantization to obtain semantic vector features and designated sample vector features; use the semantic vector features as the input of the bag-of-words model, use the output of the bag-of-words model as the input of the topic model, use the designated sample vector features as the input of the autoregressive module, and then use the output of the topic model, the output of the autoregressive module and the designated sample vector features as the input of the attention mechanism; the classifier performs intent recognition based on the output of the attention mechanism, outputs the result of sample intent recognition, and calculates the loss based on the output sample intent recognition result and the sample intent pre-annotated by the user sample sentence, and optimizes the parameters of the intent recognition model based on the calculated loss until the calculated loss is less than or equal to a preset loss threshold, at which time the model training ends.

[0148] In an embodiment of the present application, by obtaining user statements in the current round of conversation and specified features of the user statements, and then extracting semantic features of words in the user statements, and using the semantic features and the specified features as inputs to a trained intent recognition model, the intent recognition results output by the intent recognition model are obtained. This can reduce the dependence of intent recognition on a large amount of contextual data, and improve the efficiency of understanding user statements and the accuracy of intent recognition under a small amount of data.

[0149] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0150] The present application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, Figures 1 to 6 The steps of any method for identifying conversation intent are represented.

[0151] The embodiment of the present application also provides an intelligent device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, Figures 1 to 6 The steps of any method for identifying conversation intent are represented.

[0152] The present application also provides a computer program product, which, when executed on a server, enables the server to execute the following Figures 1 to 6 The steps of any method for identifying conversation intent are represented.

[0153] Figure 8 Schematic diagram of a smart device provided by an embodiment of the present application. Figure 8 As shown, the smart device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, the steps in the above-mentioned embodiments of the method for recognizing the intention of a conversation are implemented, for example Figure 1 Steps S101 to S103 shown, Figure 3 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 7 The functions of the units 71 to 73 are shown.

[0154] Exemplarily, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the smart device 8.

[0155] The smart device 8 may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of the smart device 8 and does not constitute a limitation of the smart device 8. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the smart device 8 may also include input and output devices, network access devices, buses, etc.

[0156] The processor 80 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 any conventional processor, etc.

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

[0158] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

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

[0160] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and 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. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0161] 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.

[0162] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 application, and should all be included in the protection scope of the present application.

Claims

1. A method for identifying conversation intention, characterized in that: include: Obtaining a user statement of the current round of dialogue and a specified feature of the user statement, where the type of the specified feature is predefined; The obtaining of the specified feature of the user statement includes: Obtaining the dialogue type of the current round of dialogue; determining whether the user statement contains the same words as the system feedback statement in the previous round of dialogue, and obtaining a word determination result; obtaining the degree of association between the user statement and the dialogue database associated with the current round of dialogue; determining the specified features of the user statement according to the dialogue type, the word determination result and the degree of association; Extracting semantic features of words in the user sentence; The semantic features and the designated features are used as inputs of a trained intent recognition model to obtain an intent recognition result output by the intent recognition model.

2. The method according to claim 1, characterized in that The method for identifying conversation intentions also includes: After the multiple rounds of dialogue are completed, obtaining the user's evaluation information on the multiple rounds of dialogue; Based on the evaluation information, storing the conversation history information of multiple rounds of conversations into a designated data set; The intent recognition model is retrained using the specified data set.

3. The method according to claim 2, characterized in that Based on the evaluation information, storing the conversation history information of multiple rounds of conversations into a designated data set includes: If the evaluation information is a positive evaluation, directly storing the conversation history information of the multiple rounds of conversations into the designated data set; If the evaluation information is a non-positive evaluation, storing the conversation history information of the multiple rounds of conversations into a backup data set; Obtaining correction information for the conversation history information in the backup data set; Based on the correction information, correct the conversation history information in the backup data set; The corrected conversation history information in the backup data set is transferred to the designated data set.

4. The method according to claim 2, characterized in that: The retraining of the intent recognition model using the specified data set includes: Extracting rules according to the conversation history information in the specified data set, and updating the model training parameters of the intent recognition model according to the extracted rules; The intent recognition model is retrained according to the conversation history information in the specified data set and the model training parameters.

5. The method according to claim 1, characterized in that After taking the semantic features and the designated features as inputs of the trained intent recognition model to obtain the intent recognition result output by the intent recognition model, the method further includes: Get the identity information of the user in the current round of conversation; Determining whether the user has the authority to annotate the current round of conversation based on the identity information; If the user has the permission, prompt the user whether to mark the current round of conversation; If a confirmation marking indication of the user feedback is detected, the current round of dialogue is marked based on the confirmation marking indication, and the marked current round of dialogue is collected into a designated data set.

6. The method according to any one of claims 1 to 5, characterized in that: The intent recognition model includes a feature extraction module, a bag-of-words topic attention module, an autoregressive module, a loss optimization module and a classifier; wherein the bag-of-words topic attention module includes a bag-of-words model, a topic model and an attention mechanism; The method for identifying conversation intentions also includes: In the training phase of the intention recognition model, user sample sentences and their specified sample features are obtained, and semantic sample features in the user sample sentences are extracted; Inputting the semantic sample features and the specified sample features into a feature extraction module for quantization to obtain semantic vector features and the specified sample vector features; Using the semantic vector feature as the input of the bag-of-words model, using the output of the bag-of-words model as the input of the topic model, using the specified sample vector feature as the input of the autoregressive module, and then using the output of the topic model, the output of the autoregressive module and the specified sample vector feature as the input of the attention mechanism; The classifier performs intent recognition based on the output of the attention mechanism, outputs the result of sample intent recognition, and calculates the loss based on the output sample intent recognition result and the sample intent pre-annotated by the user sample sentence, and optimizes the parameters of the intent recognition model based on the calculated loss until the calculated loss is less than or equal to the preset loss threshold, at which time the model training ends.

7. A conversation intention recognition device, characterized in that: include: A sentence feature acquisition unit, used to acquire the user sentence of the current round of dialogue, and the specified feature of the user sentence, where the type of the specified feature is predefined; The sentence feature acquisition unit comprises: A dialogue type acquisition module is used to obtain the dialogue type of the current dialogue round; A vocabulary determination module is used to determine whether the user's sentence contains the same words as the system feedback sentence in the previous round of dialogue, and obtain a word determination result; A correlation degree determination module, used to obtain the correlation degree between the user statement and the dialogue database associated with the current dialogue round; A designated feature determination module, used to determine the designated feature of the user sentence according to the dialogue type, the word determination result and the correlation degree; A semantic feature extraction unit, used to extract semantic features of words in the user sentence; The intention recognition unit is used to use the semantic features and the specified features as inputs of a trained intention recognition model to obtain an intention recognition result output by the intention recognition model.

8. An intelligent device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.