User intention recognition method and device, terminal equipment and medium
By conducting adversarial training on the initial domain identification model, the target domain identification model is obtained, which solves the limitations of user intention recognition, improves the intent recognition accuracy and adaptability of the intelligent customer service system, and improves user experience and system performance.
Patent Information
- Application Number
- CN202411178291.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-12-13
AI Technical Summary
The prior art has limitations in user intention recognition, which leads to the inability to accurately identify user intentions, which reduces the overall effect and accuracy of the intelligent customer service system.
By using the feature extraction layer and domain recognition layer of the initial domain recognition model for adversarial training, the target domain recognition model is obtained, and the robustness of the model in domain transfer is enhanced, so that it performs more stably when facing data from different domains and improves intention recognition accuracy.
It improves the understanding and response ability of the intelligent customer service system to user needs, realizes personalized services, improves the accuracy and adaptability of the user experience and system, and solves the limitations of user intention recognition.
Smart Images

Figure CN119130670A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, terminal device and medium for identifying user intention. Background Art
[0002] With the improvement of the quality of life, many people choose to purchase various insurance products, including health insurance and car insurance, to protect their own interests. This trend puts insurance companies' agents under pressure to handle a large number of user inquiries and demands. Agents need to deal with an increasing number of user inquiries and handle complex inquiries and questions, which not only puts higher requirements on the work efficiency of agents, but also challenges the quality of customer service.
[0003] In related technologies, by introducing an intelligent customer service system, it is possible to recognize user statements and accurately understand the user's intentions. The intelligent customer service system generates corresponding response words based on the recognized user intentions and conducts conversations through intelligent customer service. This process can effectively filter invalid or low-quality lists, thereby improving work efficiency. However, the existing technology still has certain limitations in user intention recognition, which sometimes makes it impossible to accurately recognize user intentions, which may reduce the overall effect and accuracy of the system. Summary of the invention
[0004] The main purpose of the embodiments of the present invention is to provide a user intent recognition method, apparatus, terminal device and medium, aiming to solve the problem that there are still certain limitations in the related technology in terms of user intent recognition, which sometimes leads to the inability to accurately recognize user intent and thus reduces the overall effect and accuracy of the intelligent customer service system.
[0005] In a first aspect, an embodiment of the present invention provides a method for identifying user intention, comprising:
[0006] Using the feature extraction layer of the initial domain recognition model, feature extraction is performed on the initial text data corresponding to the initial user in the associated domain to obtain an initial feature vector corresponding to the initial text data;
[0007] Using the domain recognition layer of the initial domain recognition model to recognize the initial feature vector, obtain a first prediction domain;
[0008] According to the gradient reversal layer of the initial domain recognition model, the feature extraction layer and the domain recognition layer are confronted by using the first prediction domain and the associated domain to obtain a target domain recognition model;
[0009] Obtain target text data corresponding to a target user, and obtain a target feature vector corresponding to the target text data according to the target domain recognition model;
[0010] Intent recognition is performed using the target feature vector according to the intention recognition model to obtain the target intent corresponding to the target user.
[0011] In a second aspect, an embodiment of the present invention provides a user intention recognition device, comprising:
[0012] A feature extraction module, used to extract features from initial text data corresponding to the initial user in the associated field using the feature extraction layer of the initial field recognition model, and obtain an initial feature vector corresponding to the initial text data;
[0013] A data prediction module, configured to identify the initial feature vector using the domain recognition layer of the initial domain recognition model to obtain a first prediction domain;
[0014] A model acquisition module, configured to use the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model, so as to obtain a target domain recognition model;
[0015] A feature acquisition module, used to obtain target text data corresponding to a target user, and obtain a target feature vector corresponding to the target text data according to the target domain recognition model;
[0016] The intention recognition module is used to perform intention recognition using the target feature vector according to the intention recognition model to obtain the target intention corresponding to the target user.
[0017] In a third aspect, an embodiment of the present invention further provides a terminal device, comprising a processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of any one of the user intent recognition methods provided in the specification of the present invention are implemented.
[0018] In a fourth aspect, an embodiment of the present invention further provides a storage medium for computer-readable storage, characterized in that the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any user intent recognition method provided in the specification of the present invention.
[0019] The embodiment of the present invention provides a method, apparatus, terminal device and medium for identifying user intentions. The method includes: using the feature extraction layer of the initial domain recognition model to extract features from the initial text data corresponding to the initial user in the associated domain, obtaining the initial feature vector corresponding to the initial text data, and then using the domain recognition layer of the initial domain recognition model to identify the initial feature vector to obtain the first predicted domain, and then using the first predicted domain and the associated domain according to the gradient reversal layer of the initial domain recognition model to counter the feature extraction layer and the domain recognition layer to obtain the target domain recognition model, thereby enhancing the robustness of the target domain recognition model in domain transfer, making the target domain recognition model more stable when facing data from different domains, and improving the generalization ability of the model. After obtaining the target domain recognition model, it is possible to extract features from the target text data of the target user and obtain the target feature vector. This enables the model to adapt to new domains and accurately identify the features and intentions of the target text data. Therefore, using the target domain identification model to identify the intent of the target feature vector helps to accurately obtain the intention of the target user, thereby improving the intelligent customer service system's understanding and response capabilities to user needs. The intelligent customer service system can then accurately process data from different fields, thereby better understanding user needs, providing personalized services, improving user experience, and improving the accuracy and adaptability of the intelligent customer service system, thereby improving overall performance and user satisfaction. It also solves the problem that there are still certain limitations in related technologies in terms of user intent identification, which sometimes leads to the inability to accurately identify user intent, thereby reducing the overall effect and accuracy of the intelligent customer service system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A flowchart of a method for identifying user intention provided by an embodiment of the present invention;
[0022] Figure 2 A schematic diagram of the model structure of an initial domain recognition model provided by an embodiment of the present invention
[0023] Figure 3 for Figure 1 A flowchart of sub-step S103 of the method for identifying user intention in FIG.
[0024] Figure 4 A schematic diagram of a scenario for implementing the user intention recognition method provided in this embodiment;
[0025] Figure 5 A schematic diagram of the module structure of a user intention recognition device provided by an embodiment of the present invention;
[0026] Figure 6 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0029] It should be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0030] The embodiment of the present invention provides a method, apparatus, terminal device and medium for identifying user intention. The method for identifying user intention can be applied to a terminal device, which can be an electronic device such as a tablet computer, a laptop computer, a desktop computer, a personal digital assistant and a wearable device. The terminal device can be a server or a server cluster.
[0031] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0032] Please refer to Figure 1 , Figure 1 A flowchart of a method for identifying user intent provided by an embodiment of the present invention.
[0033] like Figure 1 As shown, the user intention recognition method includes steps S101 to S105.
[0034] Step S101 : extracting features from initial text data corresponding to an initial user in an associated field using a feature extraction layer of an initial field recognition model to obtain an initial feature vector corresponding to the initial text data.
[0035] Exemplarily, the associated fields are known fields and unknown fields. For example, the known fields include auto insurance, health insurance, etc., and the unknown fields include non-auto insurance, etc. Then the initial users are the first user corresponding to the known field and the second user corresponding to the unknown field, and then the first text data corresponding to the first user in the known field and the second text data corresponding to the second user in the unknown field are obtained, so that the initial text data is composed according to the first text data and the second text data.
[0036] Exemplarily, the feature extraction layer of the initial domain recognition model is used to extract features from the initial text data to obtain an initial feature vector corresponding to the initial text data.
[0037] For example, the initial text data is cleaned, including removing irrelevant characters and standardizing the text format, so that according to the requirements of the initial domain recognition model, the initial text data is segmented, a vocabulary is constructed, or it is converted into a digital sequence that the initial domain recognition model can understand, and then the processed digital sequence is input into the feature extraction layer of the initial domain recognition model, and the initial feature vector output by the feature extraction layer is obtained through forward propagation. These initial feature vectors capture the deep semantic information of the initial text data and contain rich information of the initial text data.
[0038] Exemplarily, the main function of the feature extraction layer is to extract the text features of the second user and confuse the feature information of the known domain and the unknown domain to the greatest extent possible, so that the learned feature information cannot distinguish the domain source, that is, to complete the learning of domain-invariant features.
[0039] Step S102: using the domain recognition layer of the initial domain recognition model to recognize the initial feature vector to obtain a first predicted domain.
[0040] Exemplarily, the initial feature vectors are preprocessed according to the initial domain recognition model, such as scaling, normalization or reshaping, to ensure that they are compatible with the input of the domain recognition layer, and the preprocessed initial feature vectors are input into the domain recognition layer to obtain prediction results. The prediction results are usually a probability distribution, indicating the possibility that the input initial feature vector belongs to various domains, so that the domain with the highest probability is selected as the first prediction domain.
[0041] Step S103 : According to the gradient reversal layer of the initial domain recognition model, the first predicted domain and the associated domain are used to counter the feature extraction layer and the domain recognition layer to obtain a target domain recognition model.
[0042] Exemplarily, the first predicted domain is a preliminary prediction obtained by the initial domain recognition model according to the initial feature vector, and the associated domain is the real domain corresponding to the initial text data corresponding to the initial feature vector.
[0043] Exemplarily, the structure of adversarial training is determined to include a feature extraction layer, a domain recognition layer, and a gradient reversal layer, wherein the gradient reversal layer is between the feature extraction layer and the domain recognition layer, such as Figure 2 As shown in Figure 2, the role of the gradient reversal layer is to reverse the gradient generated in the feature extraction layer to facilitate the adversarial training process.
[0044] Exemplarily, an adversarial loss function is designed, which can not only optimize the feature extraction layer and the domain recognition layer to improve the recognition accuracy of the first prediction domain, but also use the information of the associated domain to increase the robustness of the features extracted by the feature extraction layer, so that the initial text data is input into the domain recognition layer through the feature extraction layer, and the output and loss of the initial domain recognition model are calculated, and then in the back propagation process, the gradient reversal layer is used to reverse the gradient, so as to prompt the feature extraction layer to learn the ability to distinguish from the associated domain. Therefore, according to the loss target, the model parameters of the feature extraction layer and the domain recognition layer are updated. This process usually requires multiple rounds of iterations to gradually improve the performance of the initial domain recognition model in the associated domain, so as to obtain the target domain recognition model.
[0045] In one embodiment, the gradient reversal layer according to the initial domain recognition model uses the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer to obtain a target domain recognition model. Specifically, referring to Figure 3 , step S103 includes: sub-step S1031 to sub-step S1037.
[0046] Sub-step S1031: Determine a target loss value by using a loss function in combination with the first prediction field and the associated field.
[0047] Exemplarily, the cross entropy loss is used to evaluate the classification accuracy of the initial domain recognition model for the first predicted domain, so that the target loss value can be calculated by the difference between the predicted probability and the associated domain.
[0048] Sub-step S1032: adjusting the initial parameter information corresponding to the feature extraction layer using the target loss value according to the gradient reversal layer of the initial domain recognition model to obtain the adjusted initial parameter information.
[0049] Exemplarily, a gradient reversal layer is introduced between the feature extraction layer and the domain recognition layer, the purpose of which is to reverse the gradient of the domain recognition layer passed into the feature extraction layer, thereby achieving the effect of adversarial training between the domain recognition layer and the feature extraction layer. A comprehensive loss function is determined, which combines the target loss value and the adversarial loss.
[0050] Exemplarily, the initial text data is forward propagated through the feature extraction layer and the domain recognition layer to calculate the model's prediction results and target loss values. The gradient reversal layer reverses the gradient during forward propagation to prepare for the subsequent back-propagation process, and then calculates the gradient of the target loss value to the initial parameter information of the initial domain recognition model to obtain the adjusted initial parameter information. The gradient reversal layer plays an important role in this step: during the back-propagation process, the gradient reversal layer reverses the gradient of the feature extraction layer, so that when updating the parameters, the gradient direction of the feature extraction layer will be adjusted to achieve the adversarial goal.
[0051] Sub-step S1033: re-obtaining the adjusted initial feature vector corresponding to the initial text data according to the adjusted initial parameter information.
[0052] Exemplarily, the adjusted initial parameter information is set in the feature extraction layer. The feature extraction layer should be able to accept the preprocessed text data and generate a new feature representation according to the adjusted parameters, and then input the preprocessed initial text data into the feature extraction layer corresponding to the adjusted initial parameter information. The feature extraction layer will use the adjusted initial parameter information to process the preprocessed initial text data and calculate the adjusted initial feature vector.
[0053] Sub-step S1034: re-obtaining a second prediction domain corresponding to the adjusted initial feature vector according to the domain identification layer.
[0054] Exemplarily, the adjusted initial feature vectors are input as input data into the domain recognition layer. The domain recognition layer uses its weights and parameters to process these initial feature vectors and generate a domain prediction result, which is usually a probability distribution representing the prediction probability of different domains, so that the domain corresponding to the maximum prediction probability is determined as the second prediction domain.
[0055] Sub-step S1035: using the second prediction field and the associated field to update the target loss value, to obtain the updated target loss value.
[0056] Exemplarily, the cross entropy loss is used to evaluate the classification accuracy of the adjusted initial domain recognition model for the second prediction domain, so that the calculation result is updated to the target loss value by calculating the difference between the prediction probability corresponding to the second prediction domain and the associated domain.
[0057] Sub-step S1036: When the updated target loss value meets the preset conditions, the target domain recognition model is determined according to the adjusted initial parameter information.
[0058] Exemplarily, a standard or threshold is determined to determine whether the updated target loss value meets the preset conditions. This can be a specific numerical value, relative change or other relevant indicators, and then the target loss value is calculated during each training or update process. Thereby comparing the calculated target loss value with the preset conditions. If the target loss value meets the preset conditions (for example, below a certain threshold), it can be considered that the model has reached the desired performance level, and then the adjusted initial parameter information is used to determine the target domain recognition model. For example, the adjusted initial parameter information is saved for subsequent use or deployment.
[0059] Sub-step S1037: When the updated target loss value does not meet the preset condition, continue to use the gradient reversal layer to antagonize the feature extraction layer and the domain recognition layer until the target domain recognition model is obtained.
[0060] Exemplarily, when the updated target loss value does not meet the preset conditions, the gradient reversal layer continues to be used to antagonize the feature extraction layer and the domain recognition layer until the target domain recognition model is obtained.
[0061] For example, the target loss value is calculated and compared with the preset conditions. If the target loss value does not meet expectations (for example, it is still above a certain threshold), it is necessary to continue to adjust the parameters of the initial domain recognition model, continue to use the reversed gradient of the gradient reversal layer to guide the feature extraction layer and the domain recognition layer for adversarial training, and use the gradient reversal layer to reverse the gradient and pass it to the feature extraction layer. The purpose is to allow the feature extraction layer to learn more general features to improve the robustness of domain recognition. According to the target loss value of the domain recognition layer, update the parameters of the feature extraction layer and the domain recognition layer. The feature extraction layer will be adjusted according to the guidance of the gradient reversal layer during the back propagation process. After each training cycle, the updated target loss value is calculated and checked whether the preset conditions are met. If the target loss value still does not meet the preset standard, continue adversarial training.
[0062] Exemplarily, adversarial training is continued to update the parameters of the feature extraction layer and the domain recognition layer. In each iteration, the training process is adjusted according to the latest target loss value until the preset condition of the target loss value is reached. Once the target loss value meets the preset condition, the adversarial training is stopped. At this point, the parameters of the feature extraction layer and the domain recognition layer should have been optimized, and the target domain recognition model should be formed.
[0063] Specifically, by using the gradient reversal layer for adversarial training, the feature extraction layer and domain recognition layer of the initial domain recognition model will learn more robust feature representations. This adversarial training can reduce the model's over-reliance on domain-specific features, thereby improving the model's generalization ability and enabling it to perform better in unknown domains or new environments.
[0064] Step S104: obtaining target text data corresponding to the target user, and obtaining a target feature vector corresponding to the target text data according to the target domain recognition model.
[0065] Exemplarily, if the target user is a user who needs to consult about insurance issues, the target text data corresponding to the target user is obtained, and then the target text data is represented by features using the feature extraction layer of the target domain recognition model, thereby obtaining a target feature vector corresponding to the target text data.
[0066] In some embodiments, obtaining the target text data corresponding to the target user includes: obtaining voice information corresponding to the target user, and performing voice recognition on the voice information according to a voice recognition model to obtain a text recognition result; using an error correction algorithm to correct errors and omissions in the text recognition result to obtain the target text data corresponding to the target user.
[0067] For example, use a high-quality microphone or recording device to ensure the clarity and accuracy of the voice information. Start audio recording to obtain the voice information of the target user. Select and load a suitable speech recognition model. You can use a pre-trained model or fine-tune it according to the specific field of the target user. Thereby pre-processing the collected voice information, such as denoising, endpoint detection, sampling rate adjustment, etc., to improve recognition accuracy. Input the pre-processed audio into the speech recognition model to perform real-time or offline speech recognition. The model converts the audio signal into text and generates text recognition results.
[0068] Exemplarily, the text recognition results generated by speech recognition are checked using an error correction algorithm to identify potential errors and omissions. The text recognition results are corrected using the grammar, spelling, and semantic rules in the error correction algorithm. For example, a common grammar and spelling error database is used for comparison. Alternatively, a language model trained in the error correction algorithm (such as an n-gram model or a deep learning model) is used to evaluate the fluency of the generated text recognition results and correct the errors. Thus, after correction by the error correction algorithm, the final target text data is generated.
[0069] Specifically, by converting speech information into text through a speech recognition model, a relatively accurate preliminary text result can be obtained. Advanced speech recognition models usually have high recognition accuracy and can effectively convert clear speech information. Using error correction algorithms to correct errors and omissions in text recognition results can correct common errors in speech recognition, such as spelling errors, grammatical errors, or missing information, thereby ensuring that the final generated text data is more accurate and complete. This provides good support for subsequent accurate recognition of intent.
[0070] Step S105: perform intent recognition using the target feature vector according to the intent recognition model to obtain the target intent corresponding to the target user.
[0071] Exemplarily, determine the intent recognition model, such as a support vector machine (SVM), decision tree, random forest, or a more common deep learning model, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), or a transformer model (Transformer). The trained intent recognition model is then loaded into memory. If the model is trained using a deep learning framework such as TensorFlow or PyTorch, ensure that the relevant model files and weights are loaded correctly. Input the target feature vector into the intent recognition model. The feature vector should match the input requirements of the model, allowing the intent recognition model to perform inference and obtain the target intent corresponding to the target user.
[0072] In some embodiments, performing intent recognition using the target feature vector according to the intent recognition model to obtain the target intent corresponding to the target user includes: performing domain recognition on the target feature vector according to the target domain recognition model to obtain the target domain corresponding to the target text data; screening from an intent model set according to the target domain to obtain an intent recognition model corresponding to the target domain; performing intent recognition on the target feature vector using the intent recognizer of the intent recognition model to obtain the target intent corresponding to the target user.
[0073] Exemplarily, the target domain recognition model that has been trained is used to input the target feature vector into the domain recognition layer of the domain recognition model, thereby obtaining the target domain corresponding to the target text data, such as "medical", "finance" or "insurance".
[0074] Exemplarily, there is a set of intent recognition models trained for different domains. Each intent recognition model is trained specifically for intent recognition in a certain domain. According to the target domain obtained from the domain identification step, the intent recognition model that matches the target domain is filtered out from the set of intent models. Each domain has its own exclusive intent recognition model. For example, the intent recognition model in the medical field may handle different intent types than the model in the financial field, and the domain-specific model can better understand and handle the relevant intent.
[0075] Exemplarily, a model for processing the target feature vector is selected from the screened intent recognition models, and the target feature vector is then input into the selected intent recognition model. The intent recognition model analyzes the input feature vector and outputs an intent prediction result for the feature vector, thereby determining the target intent of the target user based on the intent prediction result.
[0076] It should be noted that in the present application, the target feature vector corresponding to the target text data in the intention recognition model is identified through the feature extraction layer of the target domain recognition model, that is, the feature extraction layer is shared by the target domain recognition model and the intention recognition model. Since the feature extraction layer and the domain recognition layer are adversarially trained in the target domain recognition model, the target feature vector extracted by the feature extraction layer is more robust. Therefore, when the intention recognition model performs intent recognition based on the target feature vector, it can effectively improve the recognition accuracy of the target user's target intention.
[0077] Specifically, by first identifying the target domain of the target text data and selecting the corresponding intent recognition model, it is possible to ensure that the model used is trained specifically for that domain, thereby improving the accuracy of recognition. Through the domain identification and intent model screening steps, the accuracy and relevance of intent recognition can be significantly improved, system performance can be optimized, user experience can be improved, and the flexibility and scalability of the system can be enhanced. These beneficial effects enable the system to understand and respond to user needs more effectively, provide higher quality services, and effectively improve the efficiency of agents in handling transactions and improve the contact efficiency of agents.
[0078] In some embodiments, before obtaining the intention recognition model, the method also includes: obtaining an initial recognition model corresponding to the associated field and obtaining text training data corresponding to the target field; performing incremental training on the initial recognition model according to the text training data to obtain the intention recognition model corresponding to the target field; and storing the correspondence between the intention recognition model and the target field in the intention model set.
[0079] Exemplarily, if the associated domain is a known domain, then an initial recognition model corresponding to the associated domain is obtained, and the initial recognition model is an intent recognition model corresponding to the known domain, then text training data corresponding to the target domain is obtained, and these text training data should contain user interactions, conversations or text instances related to the target domain. The collected text training data is preprocessed, such as removing noise, annotating data, etc., to ensure that the data quality is suitable for model training.
[0080] Exemplarily, the initial recognition model is loaded. The text training data of the target domain is integrated into the training process, so that the initial recognition model is further trained using the text training data to adapt it to the specific features and intents of the target domain, and then the incrementally trained model is verified to ensure that its performance in the target domain meets expectations, thereby obtaining the intent recognition model corresponding to the target domain.
[0081] Exemplarily, the correspondence between the incrementally trained intent recognition model and the target domain is recorded, and then the correspondence between the new intent recognition model and the target domain is stored in the intent model set. The intent model set is usually a database for managing intent recognition models in different fields and related information.
[0082] Specifically, through incremental training, the recognition model can better adapt to the characteristics of a specific domain and identify target intents related to the target domain. This targeted training can significantly improve the accuracy of the model, enabling it to respond to user requests more effectively in practical applications. Incremental training uses the existing initial recognition model as a basis, thus avoiding the time and resource consumption of retraining the model from scratch. This approach can quickly adapt to new domains and improve development efficiency. After training for specific target domains, the intent recognition model can provide more accurate and relevant responses. When users interact with the system, they will feel that their intent is better understood and satisfied, thereby improving user satisfaction.
[0083] In some embodiments, after obtaining the target intent corresponding to the target user, the method further includes: determining the response words corresponding to the target user according to the target intent; converting the response words into response voice, and establishing a user dialogue between the target user and the robot according to the response voice; updating the target intent corresponding to the target user according to the user dialogue to obtain the final intent corresponding to the target user.
[0084] For example, design appropriate response scripts based on the target intent. These scripts should be clear, concise, and able to effectively respond to user needs. For example, if a user asks about the shelf life of a certain insurance, the script may be "The shelf life of a certain insurance is lifetime." Select a suitable text-to-speech (TTS) system to convert the response script into speech. You can use a commercial TTS service or an internally developed speech synthesis system, and then input the designed response script into the speech synthesis system to generate the corresponding response speech. Adjust the tone, speed, and clarity of the response voice as needed to ensure that the voice is natural and easy to understand.
[0085] Exemplarily, when interacting with a target user, the generated response voice is played through the speech synthesis system, so that the target user's response or further questions can be identified, and the flow of the conversation can be managed to ensure that the system can properly process and respond based on the user's response and questions, and then determine the user conversation based on the target user's feedback and the content of the conversation.
[0086] For example, if the user's response indicates that their intent has changed or become more complex, the intent model is updated to reflect these changes. This may involve recording new intents or adjusting existing target intents, thereby updating the target intent corresponding to the target user and obtaining the final intent corresponding to the target user.
[0087] Specifically, by determining the response script based on the target intent, the system can provide highly targeted responses that meet the actual needs of users. Converting the response script into response speech allows the robot to have a natural voice conversation, which is more humane and natural than pure text interaction, improving the user's interactive experience. Through continuous analysis and updating of conversation data, the system can more accurately understand the user's actual intent. This dynamic adjustment capability helps the system adapt to the changing needs of users, thereby improving the accuracy of intent recognition.
[0088] In some implementations, after obtaining the final intent corresponding to the target user, the method further includes: screening the target users according to the final intent to obtain initial associated users; matching the business capabilities of the target agent with the final intent corresponding to the initial associated user to determine the target associated user corresponding to the target agent.
[0089] For example, the target users are screened according to the final intent, so that the users who need to communicate with the target agent are screened out, thereby determining the initial associated users. For example, when the final intent is insurance consultation, the user's problem has been solved during the user dialogue process, and there is no need to communicate with the agent, so that the agent and the user can have more efficient and accurate contact.
[0090] For example, understand the business capabilities and expertise of each target agent, including the types of intents they can handle, professional fields, and service capabilities. And ensure that the capabilities of the target agents are recorded in detail for reference during the matching process. Thus, the final intent of the initial associated user is compared with the business capabilities of the target agent. Ensure that the capabilities of the target agent can meet the final intent and needs of the user. Thus, according to the matching results, the target associated user corresponding to the target agent is determined from the initial associated users, thereby ensuring that the target user can receive appropriate services and support, while enabling the target agent to efficiently handle related user needs and improve service quality and efficiency.
[0091] Specifically, accurate user screening and capability matching reduce the possibility of assigning users to agents who do not have the processing capabilities, thereby avoiding the situation where service quality is reduced or user needs cannot be met. In addition, users are assigned to agents with corresponding business capabilities based on their final intentions, effectively utilizing agent resources and avoiding resource waste. Agents can focus on handling user requests related to their capabilities, improving overall efficiency.
[0092] Please refer to Figure 4 , Figure 4 A schematic diagram of a scenario for implementing the user intention recognition method provided in this embodiment, such as Figure 4As shown, the feature extraction layer of the initial domain recognition model is used to extract features from the initial text data corresponding to the initial user in the associated domain, and the initial feature vector corresponding to the initial text data is obtained; then the domain recognition layer of the initial domain recognition model is used to identify the initial feature vector to obtain the first predicted domain; then the feature extraction layer and the domain recognition layer are used to counter the first predicted domain and the associated domain according to the gradient inversion layer of the initial domain recognition model to obtain the target domain recognition model; then the voice information corresponding to the target user is obtained, and the voice information is subjected to voice recognition according to the voice recognition model to obtain the text recognition result; then the error correction algorithm is used to correct the text recognition result to obtain the target text data corresponding to the target user, and then the target feature vector corresponding to the target text data is obtained according to the target domain recognition model; then the target feature vector is subjected to domain recognition according to the target domain recognition model to obtain the target domain corresponding to the target text data; according to the target domain, the intent recognition model corresponding to the target domain is obtained by screening from the intent model set; finally, the intent recognizer of the intent recognition model is used to perform intent recognition on the target feature vector to obtain the target intent corresponding to the target user. Thus, the corresponding response words of the target user are determined according to the target intent; the response words are converted into response voices, and a user dialogue between the target user and the robot is established according to the response voice; the target intent corresponding to the target user is updated according to the user dialogue to obtain the final intent corresponding to the target user. Thus, the target user is screened according to the final intent to obtain the initial associated user; the business capabilities of the target agent are matched with the final intent corresponding to the initial associated user to determine the target associated user corresponding to the target agent. Thus, the intelligent customer service system's ability to understand and respond to user needs is improved, and then the intelligent customer service system can accurately process data from different fields, thereby better understanding user needs, realizing personalized services, improving user experience, and improving the accuracy and adaptability of the intelligent customer service system, thereby improving overall performance and user satisfaction, and solving the problem that there are still certain limitations in the relevant technology in terms of user intent recognition, which sometimes leads to the inability to accurately recognize user intent and thus reduces the overall effect and accuracy of the intelligent customer service system.
[0093] See also Figure 5 , Figure 5A user intention recognition device 200 is provided for an embodiment of the present application. The user intention recognition device 200 includes a feature extraction module 201, a data prediction module 202, a model acquisition module 203, a feature acquisition module 204, and an intention recognition module 205, wherein the feature extraction module 201 is used to use the feature extraction layer of the initial domain recognition model to extract features from the initial text data corresponding to the initial user in the associated domain, and obtain the initial feature vector corresponding to the initial text data; the data prediction module 202 is used to use the domain recognition layer of the initial domain recognition model to identify the initial feature vector to obtain a first predicted domain; the model acquisition module 203 is used to use the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model to obtain a target domain recognition model; the feature acquisition module 204 is used to obtain the target text data corresponding to the target user, and obtain the target feature vector corresponding to the target text data according to the target domain recognition model; the intention recognition module 205 is used to use the target feature vector to perform intention recognition according to the intention recognition model to obtain the target intention corresponding to the target user.
[0094] In some implementations, the model acquisition module 203 performs, in the process of obtaining the target domain recognition model by using the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model, the following steps:
[0095] Determine a target loss value by combining the first prediction field and the associated field using a loss function;
[0096] According to the gradient reversal layer of the initial domain recognition model, the initial parameter information corresponding to the feature extraction layer is adjusted using the target loss value to obtain the adjusted initial parameter information;
[0097] Re-obtaining the adjusted initial feature vector corresponding to the initial text data according to the adjusted initial parameter information;
[0098] Re-obtaining a second prediction domain corresponding to the adjusted initial feature vector according to the domain identification layer;
[0099] updating the target loss value by using the second prediction field and the associated field to obtain the updated target loss value;
[0100] When the updated target loss value meets the preset condition, the target domain recognition model is determined according to the adjusted initial parameter information;
[0101] When the updated target loss value does not meet the preset condition, the gradient reversal layer continues to be used to antagonize the feature extraction layer and the domain recognition layer until the target domain recognition model is obtained.
[0102] In some implementations, the feature acquisition module 204 performs, during the process of acquiring the target text data corresponding to the target user:
[0103] Acquire speech information corresponding to the target user, and perform speech recognition on the speech information according to a speech recognition model to obtain a text recognition result;
[0104] The text recognition result is corrected for errors and omissions using an error correction algorithm to obtain the target text data corresponding to the target user.
[0105] In some implementations, the intention recognition module 205 performs, during the process of performing intention recognition using the target feature vector according to the intention recognition model to obtain the target intention corresponding to the target user:
[0106] Performing domain recognition on the target feature vector according to the target domain recognition model to obtain the target domain corresponding to the target text data;
[0107] According to the target domain, filter from the intent model set to obtain an intent recognition model corresponding to the target domain;
[0108] The intention recognizer of the intention recognition model is used to perform intent recognition on the target feature vector to obtain the target intention corresponding to the target user.
[0109] In some implementations, the user intention recognition device 200 further performs the following steps before obtaining the intention recognition model:
[0110] Obtaining an initial recognition model corresponding to the associated field and obtaining text training data corresponding to the target field;
[0111] Incrementally training the initial recognition model according to the text training data to obtain the intent recognition model corresponding to the target domain;
[0112] The correspondence between the intention recognition model and the target domain is stored in the intention model set.
[0113] In some implementations, after obtaining the target intention corresponding to the target user, the intention identification module 205 further performs:
[0114] Determine the response words corresponding to the target user according to the target intention;
[0115] Converting the response speech into a response voice, and establishing a user dialogue between the target user and the robot according to the response voice;
[0116] The target intent corresponding to the target user is updated according to the user conversation to obtain a final intent corresponding to the target user.
[0117] In some implementations, after obtaining the final intention corresponding to the target user, the intention identification module 205 further performs:
[0118] Screening the target users according to the final intention to obtain initial associated users;
[0119] The business capability of the target agent is matched with the final intention corresponding to the initial associated user, and the target associated user corresponding to the target agent is determined.
[0120] In some implementations, the user intention recognition apparatus 200 may be applied to a terminal device.
[0121] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the user intention recognition device 200 described above can refer to the corresponding process in the aforementioned user intention recognition method embodiment, and will not be repeated here.
[0122] See also Figure 6 , Figure 6 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present invention.
[0123] like Figure 6 As shown, the terminal device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected via a bus 303, such as an I2C (Inter-integrated Circuit) bus.
[0124] Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (CPU), and the processor 301 can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0125] Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.
[0126] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal device to which the embodiment of the present invention is applied. The specific server may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0127] The processor is used to run a computer program stored in the memory, and implement any one of the user intention recognition methods provided by the embodiments of the present invention when executing the computer program.
[0128] In one embodiment, the processor is used to run a computer program stored in the memory, and implements the following steps when executing the computer program:
[0129] Using the feature extraction layer of the initial domain recognition model, feature extraction is performed on the initial text data corresponding to the initial user in the associated domain to obtain an initial feature vector corresponding to the initial text data;
[0130] Using the domain recognition layer of the initial domain recognition model to recognize the initial feature vector, obtain a first prediction domain;
[0131] According to the gradient reversal layer of the initial domain recognition model, the feature extraction layer and the domain recognition layer are confronted by using the first prediction domain and the associated domain to obtain a target domain recognition model;
[0132] Obtain target text data corresponding to a target user, and obtain a target feature vector corresponding to the target text data according to the target domain recognition model;
[0133] Intent recognition is performed using the target feature vector according to the intention recognition model to obtain the target intent corresponding to the target user.
[0134] In some implementations, the processor 301, in the process of using the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model to obtain the target domain recognition model, executes:
[0135] Determine a target loss value by combining the first prediction field and the associated field using a loss function;
[0136] According to the gradient reversal layer of the initial domain recognition model, the initial parameter information corresponding to the feature extraction layer is adjusted using the target loss value to obtain the adjusted initial parameter information;
[0137] Re-obtaining the adjusted initial feature vector corresponding to the initial text data according to the adjusted initial parameter information;
[0138] Re-obtaining a second prediction domain corresponding to the adjusted initial feature vector according to the domain identification layer;
[0139] updating the target loss value by using the second prediction field and the associated field to obtain the updated target loss value;
[0140] When the updated target loss value meets the preset condition, the target domain recognition model is determined according to the adjusted initial parameter information;
[0141] When the updated target loss value does not meet the preset condition, the gradient reversal layer continues to be used to antagonize the feature extraction layer and the domain recognition layer until the target domain recognition model is obtained.
[0142] In some implementations, during the process of obtaining the target text data corresponding to the target user, the processor 301 executes:
[0143] Acquire speech information corresponding to the target user, and perform speech recognition on the speech information according to a speech recognition model to obtain a text recognition result;
[0144] The text recognition result is corrected for errors and omissions using an error correction algorithm to obtain the target text data corresponding to the target user.
[0145] In some implementations, the processor 301, in the process of performing intent recognition using the target feature vector according to the intent recognition model to obtain the target intent corresponding to the target user, executes:
[0146] Performing domain recognition on the target feature vector according to the target domain recognition model to obtain the target domain corresponding to the target text data;
[0147] According to the target domain, filter from the intent model set to obtain an intent recognition model corresponding to the target domain;
[0148] The intention recognizer of the intention recognition model is used to perform intent recognition on the target feature vector to obtain the target intention corresponding to the target user.
[0149] In some implementations, the processor 301, before obtaining the intention recognition model, further executes:
[0150] Obtaining an initial recognition model corresponding to the associated field and obtaining text training data corresponding to the target field;
[0151] Incrementally training the initial recognition model according to the text training data to obtain the intent recognition model corresponding to the target domain;
[0152] The correspondence between the intention recognition model and the target domain is stored in the intention model set.
[0153] In some implementations, after obtaining the target intention corresponding to the target user, the processor 301 further executes:
[0154] Determine the response words corresponding to the target user according to the target intention;
[0155] Converting the response speech into a response voice, and establishing a user dialogue between the target user and the robot according to the response voice;
[0156] The target intent corresponding to the target user is updated according to the user conversation to obtain a final intent corresponding to the target user.
[0157] In some implementations, after obtaining the final intention corresponding to the target user, the processor 301 further executes:
[0158] Screening the target users according to the final intention to obtain initial associated users;
[0159] The business capability of the target agent is matched with the final intention corresponding to the initial associated user, and the target associated user corresponding to the target agent is determined.
[0160] It should be noted that technicians in the relevant field can clearly understand that for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned user intention recognition method embodiment, and will not be repeated here.
[0161] An embodiment of the present invention also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any user intent recognition method provided in the description of the embodiment of the present invention.
[0162] The storage medium may be an internal storage unit of the terminal device in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the terminal device.
[0163] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0164] It should be understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0165] The serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for identifying user intention, characterized in that: The method comprises: Using the feature extraction layer of the initial domain recognition model, feature extraction is performed on the initial text data corresponding to the initial user in the associated domain to obtain an initial feature vector corresponding to the initial text data; Using the domain recognition layer of the initial domain recognition model to recognize the initial feature vector, obtain a first prediction domain; According to the gradient reversal layer of the initial domain recognition model, the feature extraction layer and the domain recognition layer are confronted by using the first prediction domain and the associated domain to obtain a target domain recognition model; Obtain target text data corresponding to a target user, and obtain a target feature vector corresponding to the target text data according to the target domain recognition model; Intent recognition is performed using the target feature vector according to the intention recognition model to obtain the target intent corresponding to the target user.
2. The method according to claim 1, characterized in that The step of using the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model to obtain a target domain recognition model includes: Determine a target loss value by combining the first prediction field and the associated field using a loss function; According to the gradient reversal layer of the initial domain recognition model, the initial parameter information corresponding to the feature extraction layer is adjusted using the target loss value to obtain the adjusted initial parameter information; Re-obtaining the adjusted initial feature vector corresponding to the initial text data according to the adjusted initial parameter information; Re-obtaining a second prediction domain corresponding to the adjusted initial feature vector according to the domain identification layer; updating the target loss value by using the second prediction field and the associated field to obtain the updated target loss value; When the updated target loss value meets the preset condition, the target domain recognition model is determined according to the adjusted initial parameter information; When the updated target loss value does not meet the preset condition, the gradient reversal layer continues to be used to antagonize the feature extraction layer and the domain recognition layer until the target domain recognition model is obtained.
3. The method according to claim 1, characterized in that The step of obtaining target text data corresponding to the target user includes: Acquire speech information corresponding to the target user, and perform speech recognition on the speech information according to a speech recognition model to obtain a text recognition result; The text recognition result is corrected for errors and omissions using an error correction algorithm to obtain the target text data corresponding to the target user.
4. The method according to claim 1, characterized in that: The performing intent recognition using the target feature vector according to the intent recognition model to obtain the target intent corresponding to the target user includes: Performing domain recognition on the target feature vector according to the target domain recognition model to obtain the target domain corresponding to the target text data; According to the target domain, filter from the intent model set to obtain an intent recognition model corresponding to the target domain; The intention recognizer of the intention recognition model is used to perform intent recognition on the target feature vector to obtain the target intention corresponding to the target user.
5. The method according to claim 4, characterized in that Before obtaining the intention recognition model, the method further includes: Obtaining an initial recognition model corresponding to the associated field and obtaining text training data corresponding to the target field; Incrementally training the initial recognition model according to the text training data to obtain the intent recognition model corresponding to the target domain; The correspondence between the intention recognition model and the target domain is stored in the intention model set.
6. The method according to any one of claims 1 to 5, characterized in that After obtaining the target intention corresponding to the target user, the method further includes: Determine the response words corresponding to the target user according to the target intention; Converting the response speech into a response voice, and establishing a user dialogue between the target user and the robot according to the response voice; The target intent corresponding to the target user is updated according to the user conversation to obtain a final intent corresponding to the target user.
7. The method according to claim 6, characterized in that After obtaining the final intention corresponding to the target user, the method further includes: Screening the target users according to the final intention to obtain initial associated users; The business capability of the target agent is matched with the final intention corresponding to the initial associated user, and the target associated user corresponding to the target agent is determined.
8. A user intention recognition device, characterized in that: include: A feature extraction module, used to extract features from initial text data corresponding to the initial user in the associated field using the feature extraction layer of the initial field recognition model, and obtain an initial feature vector corresponding to the initial text data; A data prediction module, configured to identify the initial feature vector using the domain recognition layer of the initial domain recognition model to obtain a first prediction domain; A model acquisition module, configured to use the first predicted domain and the associated domain to counter the feature extraction layer and the domain recognition layer according to the gradient reversal layer of the initial domain recognition model, so as to obtain a target domain recognition model; A feature acquisition module, used to obtain target text data corresponding to a target user, and obtain a target feature vector corresponding to the target text data according to the target domain recognition model; The intention recognition module is used to perform intention recognition using the target feature vector according to the intention recognition model to obtain the target intention corresponding to the target user.
9. A terminal device, characterized in that: The terminal device includes at least one control processor and a memory for communicating with the at least one control processor; the memory stores instructions that can be executed by the at least one control processor, and the instructions are executed by the at least one control processor so that the at least one control processor can execute the user intention recognition method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the steps of the user intention recognition method according to any one of claims 1 to 7.
Citation Information
Cited By
Motion intention decoding method and system
CN119557715A
