Multi-turn dialogue intent recognition methods, devices, equipment, media and program products
By using text recognition and semantic recognition models to detect flags and rewrite sentences in user speech, and combining single intent recognition and noise recognition models, the problem of low accuracy in user intent recognition in intelligent customer service systems is solved, achieving more efficient intent recognition and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2026-05-26
Smart Images

Figure CN116955525B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of natural language processing technology, and in particular relates to a method, apparatus, device, computer storage medium and computer program product for multi-turn dialogue intent recognition. Background Technology
[0002] Intelligent customer service systems are a typical task-oriented multi-turn dialogue system, and accurately identifying the user's intent is crucial for completing the task-oriented dialogue. However, due to factors such as different user language habits, different expression habits, different business needs, and errors in speech-to-text conversion, accurately identifying the user's intent is quite difficult.
[0003] Currently, most related technologies involve training complex neural network models with large amounts of corpora to automatically generate dialogue flows by modeling contextual information, or drawing dialogue flow trees and configuring nodes and triggering conditions to complete the corresponding dialogue flow. However, both of these methods suffer from low recognition accuracy. Summary of the Invention
[0004] This application provides a method, apparatus, device, computer storage medium, and computer program product for recognizing multi-turn dialogue intent, which can improve the accuracy of user intent recognition.
[0005] In a first aspect, embodiments of this application provide a multi-turn dialogue intent recognition method, including:
[0006] Obtain the first-conversion text data, which is the data obtained by converting the user's current speech into text.
[0007] The first-transformed text data is subjected to flag detection using a pre-set text recognition model;
[0008] If the target flag is detected in the first converted text data, the first converted text data is rewritten according to the rewriting strategy corresponding to the target flag to obtain the first text data. The target flag includes a reply flag and an incomplete flag.
[0009] Intent recognition is performed on the first text data to obtain the intent recognition result.
[0010] In one optional implementation, after detecting the flag bits of the first-transformed text data using a preset text recognition model, the method further includes:
[0011] If a clarification flag is detected in the first converted text data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention.
[0012] In one optional implementation, after detecting the flag bits of the first-transformed text data using a preset text recognition model, the method further includes:
[0013] If the flag bit is not detected in the first round of text data, the first round of text data and the text data corresponding to the user's voice in the previous round are rewritten to obtain the second round of text data.
[0014] The semantic recognition model is used to perform completion detection on the second-transformed text data to determine whether the second-transformed text data needs to be completed.
[0015] If it is detected that the second-transformation text data does not need to be completed, update the second-transformation text data to the first-transformation text data;
[0016] The updated first-transformation text data is returned to the preset text recognition model to perform flag detection on the first-transformation text data.
[0017] In an optional implementation, after performing completion detection on the third-party text data using a semantic recognition model, the method further includes:
[0018] If the second round of translated text data needs to be completed, an incomplete flag is set in the third round of translated text data. The third round of translated text data is the translated text data of the next round of user speech corresponding to the current user speech.
[0019] In one optional implementation, intent recognition is performed on the first text data to obtain intent recognition results, including:
[0020] The first text data is ambiguously detected using a pre-defined single-intent recognition model.
[0021] If the first text data does not contain ambiguous data, the first intent recognition result corresponding to the first text data is obtained;
[0022] The first intent recognition result is used to detect duplicate intents by a single intent recognition model. Duplicate intents include the first intent recognition result being the same as the intent recognition result corresponding to the user's voice in the previous round.
[0023] If the first intent recognition result is not a duplicate intent, the first intent recognition result is subjected to sub-intent concatenation detection through a single intent recognition model. The sub-intent concatenation includes multiple preset intents corresponding to the first intent recognition result.
[0024] If the first intent recognition result does not include sub-intent concatenation, the first intent recognition result is determined as the intent recognition result.
[0025] In one optional implementation, the intention recognition process for the first text data to obtain the intention recognition result further includes:
[0026] If the first text data includes ambiguous data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention.
[0027] In one optional implementation, the intention recognition process for the first text data to obtain the intention recognition result further includes:
[0028] If the first intent recognition result is a duplicate intent, the system sends the response information corresponding to the previous round of user voice and the second prompt information to the user device. The second prompt information is used to prompt the customer to enter the human service.
[0029] In one optional implementation, the target flag is a response flag. The first text data is rewritten according to the rewriting strategy corresponding to the target flag to obtain the first text data, including:
[0030] The first text data is obtained by rewriting the first text data with the reply information corresponding to the user's voice in the previous round.
[0031] In one optional implementation, the target flag is an incomplete flag. The first text data is rewritten according to the rewriting strategy corresponding to the target flag to obtain the first text data, which includes:
[0032] The first text data is obtained by rewriting the first transcribed text data with the transcribed text data corresponding to the user's speech in the previous round.
[0033] In one optional implementation, obtaining the first converted text data corresponding to the current user's speech includes:
[0034] Retrieve the text-to-speech data corresponding to the current user's speech;
[0035] The converted text data is input into a preset noise recognition model, and the noise recognition model is used to identify noise in the converted text data.
[0036] The converted text data was identified as the first converted text data in the absence of noise.
[0037] Secondly, embodiments of this application provide a multi-turn dialogue intent recognition device, including:
[0038] The acquisition module is used to acquire the first-conversion text data, which is the data obtained by converting the user's current speech into text.
[0039] The detection module is used to detect flag bits in the first-transformed text data using a preset text recognition model;
[0040] The rewriting module is used to rewrite the first-transformed text data according to the rewriting strategy corresponding to the target flag when the target flag is detected in the first-transformed text data, so as to obtain the first text data. The target flag includes a reply flag and an incomplete flag.
[0041] The recognition module is used to perform intent recognition on the first text data and obtain the intent recognition result.
[0042] Thirdly, embodiments of this application provide a multi-turn dialogue intent recognition device, the device including: a processor and a memory storing computer program instructions;
[0043] When the processor executes computer program instructions, it implements a multi-turn dialogue intent recognition method as described in any optional embodiment of the first aspect of this application.
[0044] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement a multi-turn dialogue intent recognition method as described in any optional embodiment of the first aspect of this application.
[0045] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform a multi-turn dialogue intent recognition method as described in any optional embodiment of the first aspect of this application.
[0046] The multi-turn dialogue intent recognition method, apparatus, device, computer storage medium, and computer program product of this application can detect flag bits in the converted text data corresponding to user speech, and rewrite the converted text data according to the rewriting strategy corresponding to the flag bits in the converted text data to obtain text data. In this way, the obtained text data is closer to the user's true intent. Then, intent recognition is performed on the text data to obtain the intent recognition result. This makes the intent recognition result more consistent with the user's true intent, thereby improving the accuracy of user intent recognition. Attached Figure Description
[0047] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is a flowchart illustrating a multi-turn dialogue intent recognition method provided in one embodiment of this application;
[0049] Figure 2 This is a schematic diagram of the structure of a multi-turn dialogue intent recognition device provided in another embodiment of this application;
[0050] Figure 3 This is a schematic diagram of the structure of a multi-turn dialogue intent recognition device provided in another embodiment of this application. Detailed Implementation
[0051] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0052] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0053] As described in the background section, accurately identifying user intent is crucial for completing task-oriented dialogues.
[0054] Currently, most related technologies generate dialogue information through model-driven or rule-driven methods.
[0055] Among these approaches, model-driven approaches require training complex neural network models with large amounts of data to automatically generate dialogue flows based on contextual information. This model-driven approach places high demands on the quality and diversity of the data, and the generated results are unpredictable, limiting its application in practical industrial scenarios. Rule-driven approaches complete the dialogue flow by drawing a dialogue flow tree and configuring nodes and triggering conditions. This rule-driven approach struggles to solve complex semantic understanding problems, and the understanding of the context may be inaccurate or ambiguous.
[0056] Based on this, in order to further improve the accuracy of user intent recognition and reduce the difficulty of user intent recognition, the inventors, after in-depth thinking, ingeniously designed a multi-turn dialogue intent recognition method, device, equipment, computer storage medium, and computer program product.
[0057] The multi-turn dialogue intent recognition method provided in this application can be executed by a multi-turn dialogue intent recognition device or a portion of the multi-turn dialogue intent recognition device used to execute the multi-turn dialogue intent recognition method. This application uses the execution of the multi-turn dialogue intent recognition method by a multi-turn dialogue intent recognition device as an example to describe in detail the multi-turn dialogue intent recognition method provided in this application.
[0058] The multi-turn dialogue intent recognition method provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0059] Figure 1 A flowchart illustrating a multi-turn dialogue intent recognition method according to an embodiment of this application is shown. Figure 1 As shown, the multi-turn dialogue intent recognition method may specifically include the following steps S110 to S140.
[0060] S110, Obtain the first converted text data, which is the data obtained by converting the user's current speech into text.
[0061] S120 performs flag detection on the first-transformation text data using a preset text recognition model.
[0062] In step S120, the text recognition model can be trained using methods known in the art. The aforementioned flags can be, but are not limited to, flags determined based on pre-set keywords or process node identifiers corresponding to the current user's speech. These flags can be used to determine different response strategies.
[0063] S130, if the target flag is detected in the first converted text data, the first converted text data is rewritten according to the rewriting strategy corresponding to the target flag to obtain the first text data, wherein the target flag includes a reply flag and an incomplete flag.
[0064] Query rewriting can include vectorizing and / or rewriting the first-transformed text data. Vectorization can correct for potential "multiple descriptions" and "information redundancy" in the first-transformed text. Intent rewriting can clarify potential "attribute retrieval" and "broad intent" in the first-transformed text. Therefore, after query rewriting the first-transformed text data, we can obtain first-transformed text data that is beneficial for user intent recognition. The response flag can be a flag determined by the system flow response node configuration, and the incomplete flag can be a flag set in the current user's speech-related text data if the user's speech was determined to be incomplete in the previous round of dialogue.
[0065] S140, perform intent recognition on the first text data to obtain the intent recognition result.
[0066] In step S140, intent recognition of the first text data may include extracting keywords from the first text data, then recognizing the keywords to obtain the user intent corresponding to the keywords, or performing intent recognition of the first text data through a preset semantic recognition model, which is not limited here.
[0067] The multi-turn dialogue intent recognition method in this application can detect flag bits in the converted text data corresponding to user speech, and rewrite the converted text data according to the rewriting strategy corresponding to the flag bits in the converted text data to obtain text data. In this way, the obtained text data can be closer to the user's true intent. Then, intent recognition is performed on the text data to obtain the intent recognition result. This makes the intent recognition result more consistent with the user's true intent, thereby improving the accuracy of user intent recognition.
[0068] In one embodiment, after detecting the flag bits of the first-transformed text data using a preset text recognition model, the method may further include:
[0069] If a clarification flag is detected in the first converted text data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention.
[0070] The clarification flag can be a flag generated when ambiguity is detected in the first-transformation text data. The first prompt information can be a voice prompt.
[0071] In this way, even when the user's voice is ambiguous, it can prompt the user to clearly express their intent. This further improves the accuracy of user intent recognition, thereby enhancing the user experience.
[0072] In one embodiment, after detecting the flag bits of the first-transformed text data using a preset text recognition model, the method may further include:
[0073] If the flag bit is not detected in the first round of text data, the first round of text data is rewritten with the text data corresponding to the user's speech in the previous round to obtain the second round of text data.
[0074] The second-transformation text data is filled in using a semantic recognition model to determine whether the second-transformation text data needs to be filled in.
[0075] If it is detected that the second-transformation text data does not need to be completed, the second-transformation text data will be updated to the first-transformation text data.
[0076] The updated first-transformation text data is returned to the preset text recognition model to perform flag detection on the first-transformation text data.
[0077] In this embodiment, rewriting sentences using the first converted text data and the converted text data corresponding to the previous round of user speech may include: using the converted text data corresponding to the previous round of user speech for reference completion.
[0078] The aforementioned semantic recognition model can be constructed using methods well-known in the field. Specifically, the training process can be as follows:
[0079] Obtain multiple sample-to-text data and the first label of each sample-to-text data. The first label is used to indicate whether the corresponding sample-to-text data needs to be completed.
[0080] Each sample is converted into text data and its corresponding first label is used to create training samples.
[0081] The pre-created semantic recognition model is trained using multiple training samples until the training stopping condition is met, resulting in a well-trained semantic recognition model.
[0082] In this embodiment, the first converted text data and the converted text data corresponding to the previous round of user speech can be rewritten to obtain the second converted text data. This allows for the integration of the converted text data corresponding to the current user speech with the converted text data corresponding to the previous round of user speech. If the integrated converted text data does not require completion, a flag is detected on the integrated converted text data. This clarifies the user's intent, reduces unnecessary dialogue, and thus improves the efficiency of user intent recognition.
[0083] In one embodiment, after performing completion detection on the third-party text data using a semantic recognition model, the method may further include:
[0084] If the second round of translated text data needs to be completed, an incomplete flag is set in the third round of translated text data. The third round of translated text data is the translated text data of the next round of user speech corresponding to the current user speech.
[0085] In this way, even if the user's voice input is not complete, the converted text data corresponding to the subsequent voice input can be integrated with the converted text data corresponding to the current user's voice input, thereby improving the accuracy of user intent recognition.
[0086] To facilitate understanding, a concrete example illustrates one approach of setting an incomplete flag in the third round of converted text data when completion is detected in the second round of converted text data. For instance, a user says, "The ringtone package I just ordered." When the converted text data of the user's speech is integrated with the converted text data of the previous round of speech, and the sentence is rewritten, the resulting converted text data is clearly incomplete; that is, the user has not finished speaking. If the subsequent intent recognition process is directly applied to the user's converted text data, the user's intent is likely to be incorrectly identified as "ordering the ringtone package." However, by performing completion detection on the converted text data corresponding to the user's speech, it can be determined that the user has not finished speaking, and an incomplete flag can be set in the converted text data corresponding to the user's speech in the next round. In one embodiment, when it is determined that the user has not finished speaking, a prompt message can also be generated to remind the user to continue speaking. In this way, after obtaining the text data "cancel it" in the next round of user voice, the sentence can be rewritten by using reference completion to replace "cancel it" with "replace the ringback tone package" to get "cancel the ringback tone package", and finally the user's intent is determined to be "unsubscribe from value-added services" through intent recognition.
[0087] In one embodiment, performing intent recognition on the first text data to obtain the intent recognition result may include:
[0088] The first text data is ambiguously detected using a pre-defined single-intent recognition model.
[0089] If the first text data does not contain ambiguous data, the first intent recognition result corresponding to the first text data is obtained.
[0090] The single intent recognition model is used to detect duplicate intents in the first intent recognition result. Duplicate intents include the first intent recognition result being the same as the intent recognition result corresponding to the user's voice in the previous round.
[0091] If the first intent recognition result is not a duplicate intent, the first intent recognition result is subjected to sub-intent cascade detection through a single intent recognition model. The sub-intent cascade includes multiple preset intents corresponding to the first intent recognition result.
[0092] If the first intent recognition result does not include sub-intent concatenation, the first intent recognition result is determined as the intent recognition result.
[0093] The aforementioned pre-defined single-intent recognition model can be trained using methods known in the art. Specifically, the single-intent recognition model can be a model obtained by fusing multiple models, such as rule systems, deep semantic matching, and deep neural networks (which are beneficial for intent classification based on domain BERT).
[0094] The aforementioned ambiguity detection may include determining the confidence level of the first text data corresponding to multiple preset intents using a single-intent model. If there is a confidence level greater than a preset threshold, the first text data can be considered to not contain ambiguous data, and the intent corresponding to the highest confidence level can be taken as the first intent recognition result.
[0095] The aforementioned sub-intent cascading can include multiple preset intents corresponding to the first intent recognition result. As a specific example, the first intent recognition result is "order data package A", but the preset intents only include "order data package B" and "order data package C". In this case, the first intent recognition result may correspond to "order data package B" or "order data package C". In this case, it can be considered that the first intent recognition result has sub-intent cascading.
[0096] In this embodiment, the accuracy of user intent recognition can be further improved by using multiple detection methods to identify and verify user intent.
[0097] In one embodiment, when there are cascading sub-intents in the first intent recognition result, the first intent recognition result can be determined as the parent intent of the corresponding multiple preset intents, and the first intent recognition result can be recorded for optimization of the multi-round intent recognition process. As an example, if the first intent recognition result is "order data package A", but the preset intents only include "order data package B" and "order data package C", the first intent recognition result can be determined as "order data package".
[0098] In one embodiment, performing intent recognition on the first text data to obtain an intent recognition result may further include:
[0099] If the first text data includes ambiguous data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention.
[0100] As an example, if the first text data is "Why is my data usage always insufficient?", using a single intent recognition model to identify intents might reveal "query data usage" and "subscribe to a data package," but the confidence levels for both intents do not reach the preset threshold. In this case, it can be determined that the first text data contains ambiguous data. According to a preset clarification strategy, a voice prompt is generated. This voice prompt can be used to further ask the user whether they want to query data usage or subscribe to a data package, thus clarifying the user's intent.
[0101] In one embodiment, performing intent recognition on the first text data to obtain an intent recognition result may further include:
[0102] If the first intent recognition result is a duplicate intent, the system sends the response information corresponding to the previous round of user voice and the second prompt information to the user device. The second prompt information is used to prompt the customer to enter the human service.
[0103] Repeating intent can be the intent corresponding to the user's previous speech. Figure 1 The intent is determined by the user's voice input, "Can you check how many devices are logged into my Wi-Fi?". After text data conversion, flag detection, sentence rewriting, and ambiguity determination, the recognized intent is "query broadband." After customer service generates a broadband-related response, the next time the user voice inputs, "How many devices are currently using my Wi-Fi?", it is still recognized as "query broadband," consistent with the previous result. This is considered a duplicate intent, and a broadband-related response is sent to the user's device again. The customer service representative proactively asks if the user's request has been resolved and guides them to a human operator. If the user says, "My problem is still not solved," then they are directed to a human operator.
[0104] In one embodiment, the target flag is a response flag. The first text data is rewritten according to the rewriting strategy corresponding to the target flag, and may include:
[0105] The first text data is obtained by rewriting the first text data with the reply information corresponding to the user's voice in the previous round.
[0106] The target flag is the response flag, indicating the user's reply to a question from the customer service system. At this point, it's necessary to determine the user's intent based on the question. For example, the customer service system might ask: "We currently offer two data package options, A and B. Which one would you like to subscribe to?" This indicates the system has reached the response node in the process. Therefore, a response flag is set in the transcribed text data corresponding to the user's voice. If the user replies, "The second one," the system directly enters the rewriting strategy corresponding to the response flag. The transcribed text data of the user's voice and the transcribed text data generated by customer service are integrated and rewritten to obtain "Subscribe to service B," thus facilitating accurate identification of the user's intent.
[0107] In one embodiment, the target flag is an incomplete flag. The first text data is rewritten according to the rewriting strategy corresponding to the target flag, resulting in the first text data, which may include:
[0108] The first text data is obtained by rewriting the first transcribed text data with the transcribed text data corresponding to the user's speech in the previous round.
[0109] The target flag is an incomplete flag, indicating that the user's statement was incomplete in the previous round of dialogue. Therefore, the current user's speech can be considered a completion of the previous speech. In this case, the transcribed data of the current user's speech can be integrated with the transcribed data of the user's speech in the previous round of dialogue, and then the sentence can be rewritten to clarify the user's intent.
[0110] In one embodiment, obtaining the first converted text data corresponding to the current user's speech may include:
[0111] Retrieve the text-to-speech data corresponding to the current user's speech.
[0112] Input the converted text data into a preset noise recognition model, and use the noise recognition model to identify noise in the converted text data.
[0113] The converted text data was identified as the first converted text data in the absence of noise.
[0114] During speech-to-text transcription, transcription errors and environmental noise are introduced, affecting the accuracy of semantic recognition and consequently, the accuracy of user intent recognition. Therefore, it is necessary to identify noise beforehand to avoid impacting subsequent processes. The aforementioned noise recognition model can be obtained by training a binary classification model of a deep neural network. In one embodiment, upon detecting environmental noise, a prompt message can be output to the user, suggesting that they repeat their statement in a quieter environment.
[0115] For example, a user says, "Check my phone bill." The speech-to-text result is "Check my phone bill." Without noise recognition, the recognized intent is: "Check his phone bill," which clearly does not match the user's intent. However, by using a trained noise recognition model, and ensuring that the transcribed data is free of noise, intent recognition can be performed, further guaranteeing the accuracy of intent recognition.
[0116] To better describe the entire solution, based on the various implementation methods described above, a specific example will be used for illustration below.
[0117] Based on the same inventive concept, this application also provides a multi-turn dialogue intent recognition device 200.
[0118] like Figure 2 As shown, the multi-turn dialogue intent recognition device 200 may include an acquisition block 201, a detection module 202, a rewriting module 202, and a recognition module 204.
[0119] The acquisition module is used to acquire the first-conversion text data, which is the data obtained by converting the user's current speech into text.
[0120] The detection module is used to detect flag bits in the first-transformation text data using a preset text recognition model.
[0121] The rewriting module is used to rewrite the first-transformed text data according to the rewriting strategy corresponding to the target flag when the target flag is detected to be present in the first-transformed text data, so as to obtain the first text data. The target flag includes a reply flag and an incomplete flag.
[0122] The recognition module is used to perform intent recognition on the first text data and obtain the intent recognition result.
[0123] The multi-turn dialogue intent recognition device of this application embodiment can detect flag bits in the converted text data corresponding to user speech, and rewrite the converted text data according to the rewriting strategy corresponding to the flag bits in the converted text data to obtain text data. In this way, the obtained text data can be closer to the user's true intent. Then, intent recognition is performed on the text data to obtain the intent recognition result. In this way, the intent recognition result can be more consistent with the user's true intent, thereby improving the accuracy of user intent recognition.
[0124] In one embodiment, the apparatus may further include:
[0125] The generation module is used to generate a first prompt message according to a preset clarification strategy when the first converted text data is detected to include a clarification flag. The first prompt message is used to prompt the user to clarify the user's intention.
[0126] In one embodiment, the device may further include:
[0127] The rewriting module is used to rewrite the first-turned-text data and the turned-text data corresponding to the previous round of user speech when it is detected that the first-turned-text data does not include a flag bit, so as to obtain the second-turned-text data.
[0128] The detection module is used to perform completion detection on the second-transformed text data through a semantic recognition model to determine whether the second-transformed text data needs to be completed.
[0129] The update module is used to update the second-transformation text data to the first-transformation text data if it is detected that the second-transformation text data does not need to be completed.
[0130] The return module is used to return the updated first-transformation text data to the preset text recognition model for flag detection of the first-transformation text data.
[0131] In one embodiment, the apparatus may further include:
[0132] The setting module is used to set an incomplete flag in the third-round text data when it is detected that the second-round text data needs to be completed. The third-round text data is the text data of the next round of user speech corresponding to the current user speech.
[0133] In one embodiment, the recognition module is used to perform intent recognition on the first text data to obtain an intent recognition result, which may specifically include:
[0134] The detection module is used to perform ambiguity detection on the first text data using a preset single intent recognition model.
[0135] The processing module is used to obtain the first intent recognition result corresponding to the first text data when it is detected that the first text data does not contain ambiguous data.
[0136] The detection module is used to perform duplicate intent detection on the first intent recognition result data through a single intent recognition model. Duplicate intent includes the first intent recognition result being the same as the intent recognition result corresponding to the previous round of user speech.
[0137] The detection module is used to perform sub-intent cascade detection on the first intent recognition result through a single intent recognition model when the first intent recognition result is not a duplicate intent. The sub-intent cascade includes multiple preset intents corresponding to the first intent recognition result.
[0138] The determination module is used to determine the first intent recognition result as the intent recognition result when the first intent recognition result does not include the sub-intent concatenation.
[0139] In one embodiment, the recognition module is used to perform intent recognition on the first text data to obtain an intent recognition result, which may specifically include:
[0140] The generation module is used to generate a first prompt message according to a preset clarification strategy when the first text data includes ambiguous data. The first prompt message is used to prompt the user to clarify the user's intention.
[0141] In one embodiment, the recognition module is used to perform intent recognition on the first text data to obtain an intent recognition result, which may specifically include:
[0142] The sending module is used to send the response information corresponding to the previous round of user voice and the second prompt information to the user device when the first intent recognition result is a repeated intent. The second prompt information is used to prompt the customer to enter the human service.
[0143] In one embodiment, the target flag can be a response flag. The rewriting module is used to rewrite the first text data according to the rewriting strategy corresponding to the target flag, obtaining the first text data, which may include:
[0144] The rewriting module is used to rewrite the first converted text data and the reply information corresponding to the user's voice in the previous round to obtain the first text data.
[0145] In one embodiment, the target flag can be an incomplete flag. The rewriting module is used to rewrite the first text data according to the rewriting strategy corresponding to the target flag, obtaining the first text data, which may include:
[0146] The rewriting module is used to rewrite the first converted text data with the converted text data corresponding to the user's speech in the previous round to obtain the first text data.
[0147] In one embodiment, the acquisition module is used to acquire the first converted text data corresponding to the current user's speech, which may include:
[0148] The acquisition module is used to acquire the text-to-speech data corresponding to the current user's speech.
[0149] The input module is used to input the converted text data into a preset noise recognition model, and to perform noise recognition on the converted text data through the noise recognition model.
[0150] The determination module is used to identify the first converted text data when no noise is detected.
[0151] The multi-turn dialogue intent recognition device provided in this application embodiment can achieve... Figure 1The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0152] Figure 3 A schematic diagram of the hardware structure of a multi-turn dialogue intent recognition device provided in an embodiment of this application is shown.
[0153] The multi-turn dialogue intent recognition device may include a processor 301 and a memory 302 storing computer program instructions.
[0154] Specifically, the processor 301 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0155] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 302 is non-volatile solid-state memory.
[0156] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0157] The processor 301 reads and executes computer program instructions stored in the memory 302 to implement any of the multi-turn dialogue intent recognition methods in the above embodiments.
[0158] As an example, a multi-turn dialogue intent recognition device may also include a communication interface 303 and a bus 310. Wherein, such as Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0159] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0160] Bus 310 includes hardware, software, or both, that couples components of an online data traffic metering device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0161] This multi-turn dialogue intent recognition device can execute the multi-turn dialogue intent recognition method in the embodiments of this application, thereby achieving a combination of Figure 1 and Figure 2 The method and apparatus for multi-turn dialogue intent recognition are described.
[0162] Furthermore, in conjunction with the multi-turn dialogue intent recognition method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the multi-turn dialogue intent recognition methods in the above embodiments.
[0163] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0164] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0165] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0166] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0167] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A method for recognizing intent in multi-turn dialogues, characterized in that, include: Obtain the first converted text data, which is the data obtained by converting the user's current speech into text. The first converted text data is subjected to flag detection using a preset text recognition model; If a clarification flag is detected in the first converted text data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention. The clarification flag is a flag generated when ambiguity is detected in the first converted text data. If the target flag is detected in the first converted text data, the first converted text data is rewritten according to the rewriting strategy corresponding to the target flag to obtain the first text data. The target flag includes a reply flag and an incomplete flag. The reply flag is determined by the system process reply node configuration. The incomplete flag is a flag set in the first converted text data when the user's voice is judged to be incomplete in the previous round of dialogue. Intent recognition is performed on the first text data to obtain the intent recognition result.
2. The method according to claim 1, characterized in that, After detecting the flag bits of the first converted text data using a preset text recognition model, the method further includes: If the first converted text data does not contain a flag bit, the first converted text data and the converted text data corresponding to the previous round of user speech are rewritten to obtain the second converted text data. The second-transformed text data is subjected to completion detection by a semantic recognition model to determine whether the second-transformed text data needs to be completed. If it is detected that the second converted text data does not need to be completed, the second converted text data is updated to the first converted text data; The updated first-transformed text data is returned to the system where the first-transformed text data is subjected to flag detection using a preset text recognition model.
3. The method according to claim 2, characterized in that, After performing completion detection on the second-transformed text data using a semantic recognition model, the method further includes: If the second-transformed text data needs to be completed, an incomplete flag is set in the third-transformed text data, which is the text data of the next round of user speech corresponding to the current user speech.
4. The method according to claim 1, characterized in that, The process of performing intent recognition on the first text data to obtain the intent recognition result includes: The first text data is subjected to ambiguity detection using a pre-defined single intent recognition model. If the first text data is found to not contain ambiguous data, the first intent recognition result corresponding to the first text data is obtained; The single intent recognition model is used to perform duplicate intent detection on the first intent recognition result, and the duplicate intent includes the first intent recognition result being the same as the intent recognition result corresponding to the previous round of user speech. If the first intent recognition result is detected as not being a duplicate intent, the first intent recognition result is subjected to sub-intent concatenation detection through the single intent recognition model. The sub-intent concatenation includes multiple preset intents corresponding to the first intent recognition result. If the first intent recognition result does not include sub-intent concatenation, the first intent recognition result is determined as the intent recognition result.
5. The method according to claim 4, characterized in that, The step of performing intent recognition on the first text data to obtain the intent recognition result further includes: If the first text data includes ambiguous data, a first prompt message is generated according to a preset clarification strategy. The first prompt message is used to prompt the user to clarify the user's intention.
6. The method according to claim 4, characterized in that, The step of performing intent recognition on the first text data to obtain the intent recognition result further includes: If the first intent recognition result is a duplicate intent, the system sends the response information corresponding to the previous round of user voice and the second prompt information to the user device. The second prompt information is used to prompt the customer to enter the human service.
7. The method according to claim 1, characterized in that, The target flag is a response flag. The step of rewriting the first converted text data according to the rewriting strategy corresponding to the target flag to obtain the first text data includes: The first text data is obtained by rewriting the first converted text data with the reply information corresponding to the previous round of user voice.
8. The method according to claim 1, characterized in that, The target flag is an incomplete flag. The step of rewriting the first converted text data according to the rewriting strategy corresponding to the target flag to obtain the first text data includes: The first text data is obtained by rewriting the first text data with the text data corresponding to the previous round of user speech.
9. The method according to claim 1, characterized in that, Obtain the first-order text data corresponding to the current user's speech, including: Retrieve the text-to-speech data corresponding to the current user's speech; The converted text data is input into a preset noise recognition model, and noise is identified in the converted text data through the noise recognition model; The converted text data is identified as the first converted text data in the absence of noise.
10. A multi-turn dialogue intent recognition device, characterized in that, include: The acquisition module is used to acquire the first converted text data, which is the data obtained by converting the user's current speech into text. The detection module is used to detect the flag bits of the first converted text data using a preset text recognition model; The prompting module is used to generate a first prompt message according to a preset clarification strategy when the first converted text data includes a clarification flag. The first prompt message is used to prompt the user to clarify the user's intention. The clarification flag is a flag generated when the first converted text data is found to be ambiguous. The rewriting module is used to rewrite the first converted text data according to the rewriting strategy corresponding to the target flag when the target flag is detected to be included in the first converted text data, so as to obtain the first text data. The target flag includes a reply flag and an incomplete flag. The reply flag is determined by the system process reply node configuration. The incomplete flag is a flag set in the first converted text data when the user's voice is determined to be incomplete in the previous round of dialogue. The recognition module is used to perform intent recognition on the first text data and obtain the intent recognition result.
11. A multi-turn dialogue intent recognition device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the multi-turn dialogue intent recognition method as described in any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the multi-turn dialogue intent recognition method as described in any one of claims 1-9.
13. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the multi-turn dialogue intent recognition method as described in any one of claims 1-9.
Citation Information
Patent Citations
Intelligent voice dialogue method and device based on semantic enhancement, equipment and medium
CN113270103A
Multi-round dialogue processing method and device, computer equipment and storage medium
CN113918693A