A multi-intention recognition method and system integrating subject information
By standardizing user input text and extracting topic information, combined with pre-trained language models and neural network models, the accuracy problem of the intent recognition model in processing spoken expressions and multi-label intent recognition is solved, and the accuracy of intent recognition is improved. performance and robustness, reducing dependence on training data and annotations.
Patent Information
- Application Number
- CN202111465255.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-03
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-12-03
AI Technical Summary
Existing intent recognition models have low accuracy when dealing with users' spoken expressions and multi-label intent recognition, and rely too much on large amounts of training data and accurate annotation results, resulting in poor results in practical applications.
By obtaining the normalized processing of user input text, extracting the subject information of sentences and words, using probability ranking method and pre-trained language model to convert it into vector representation, and building a neural network model for intent recognition, combined with full sampling or random sampling fusion method Fusing topic information to improve model accuracy.
It improves the accuracy of intent recognition, especially in multi-intent recognition scenarios, reduces the dependence on the amount of training data and annotation accuracy, and enhances the robustness and adaptability of the model.
Smart Images

Figure CN114154492B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of natural language processing and deep learning technology, and specifically to a multi-intention recognition method and system integrating subject information. Background Art
[0002] Intent recognition has always been a crucial part of natural language understanding tasks. With the continuous development and application of artificial intelligence technology in the field of natural language, more and more researchers have begun to pay attention to the performance improvement of intent recognition modules. The definition of intent recognition is to enable machines to understand the user's intentions, help users complete specific tasks, and bring users a personalized service experience. In search engines, intent recognition is used to identify the search intent of the user's input content. The system then returns the results that the user wants based on the search intent. In this scenario, it is often a single intent recognition task. In automatic dialogue systems, intent recognition is used to identify the user's dialogue purpose. After understanding the user's intention, the dialogue system will match the corresponding sub-model for processing. In this scenario, users usually express multiple intentions. It is enough to see that the intent recognition module is an indispensable upstream task in various application scenarios. The accuracy of this upstream task directly affects the performance of subsequent tasks and even the entire system.
[0003] Early intent recognition tasks used a relatively simple word list exhaustive method, which obtained user intent by matching words in a sentence with a word list. However, this method requires a lot of manual work, has high requirements for word list capacity and update speed, and is difficult to achieve automated prediction. Secondly, a relatively simple method is called rule parsing, which uses rules to judge the intent of a sentence. This type of method has high requirements for the standardization of query statements and requires a lot of manual participation in the formulation of rules.
[0004] The statistical-based intent recognition method has alleviated the problem of traditional methods requiring more manual participation to a certain extent, but it has high requirements for the amount of data. The larger the amount of data, the better the prediction effect. The emergence of deep learning models has further improved the accuracy of intent recognition tasks, but deep learning models have high requirements for the accuracy of data annotation.
[0005] In summary, the existing intent recognition model has the following problems:
[0006] 1. Most intent recognition models have high requirements for the semantic standardization of training samples. However, in actual conversations, users’ expressions are often too colloquial, resulting in non-standard terms.
[0007] 2. Currently, the intent recognition models with better results are mostly used to identify single intents. When applied to multi-label intent recognition tasks, the effect will deteriorate.
[0008] 3. Most intent recognition models rely heavily on large amounts of training data and accurate labeling results. Once the training data is insufficient, the model effect will be significantly reduced. The accuracy of data labels also has a great impact on model training. Summary of the invention
[0009] In order to improve the accuracy of multi-intent recognition, the present application provides a multi-intent recognition method and system that integrates subject information.
[0010] The technical solution adopted by the present invention to solve the above problems is:
[0011] A multi-intent recognition method integrating subject information, comprising:
[0012] Step 1, obtaining the user's input text and normalizing it to obtain the processed text;
[0013] Step 2, obtaining sentence-based topic information and word-based topic information in the processed text;
[0014] Step 3, fusing the processed text with the sentence-based topic information;
[0015] Step 4: Convert the fused text and word-based topic information in step 3 into vector representations respectively;
[0016] Step 5: Build and train the intent recognition model;
[0017] Step 6: Input the vector representation obtained in step 4 into the intent recognition model to obtain the intent classification result.
[0018] Furthermore, the step 2 is specifically as follows:
[0019] Step 21: Build and train a topic model;
[0020] Step 22: Input the processed text into the trained topic model to obtain sentence-based topic information and word-based topic information.
[0021] Furthermore, the topic model uses a probability ranking method to select sentence-based topic information and word-based topic information.
[0022] Furthermore, the method adopted in step 3 to fuse the processed text with the sentence-based topic information is a full sampling fusion method or a random sampling fusion method.
[0023] Furthermore, the step 4 specifically involves using a pre-trained language model to convert the fused text and word-based topic information into vector representations respectively.
[0024] Furthermore, the pre-trained language model includes an autoregressive pre-trained language model with unidirectional feature representation, an autoencoding pre-trained language model with bidirectional feature representation, or an autoregressive pre-trained language model with bidirectional feature representation.
[0025] Furthermore, the step 5 of constructing the intent recognition model includes building a basic framework of a neural network and constructing a word-based topic information fusion network layer.
[0026] Furthermore, the step 5 also includes setting a loss function and iteratively updating the parameters of the intent recognition model when performing model training.
[0027] A multi-intention recognition system integrating subject information, comprising:
[0028] Text acquisition unit: used to acquire the user's input text and normalize the input text to obtain the processed text;
[0029] Theme acquisition unit: used for acquiring sentence-based theme information and word-based theme information according to the processed text;
[0030] Topic fusion unit: used to fuse the processed text with sentence-based topic information;
[0031] Vector conversion unit: used to convert the fused text and word-based topic information in the topic fusion unit into vector representations respectively;
[0032] Intent classification unit: used to obtain intent classification results based on the vector representation of the fused text and the vector representation of word-based topic information.
[0033] Compared with the prior art, the present invention has the following beneficial effects: before processing the input text, the input text is normalized, which solves the problem of overly colloquial user expressions in actual application scenarios and improves the accuracy of intent recognition; by introducing topic information to help the multi-label intent recognition model complete prediction, and using sentence-level topic distribution to influence the intent recognition model's judgment on the number of intents, the problem of low accuracy of most intent recognition models in the case of multi-intent recognition is solved; in addition, when the amount of added topic information data is small, the amount of corpus information can be enriched, and when the annotation results are inaccurate, the effect of annotation correction can be achieved, alleviating the problem that most intent recognition models are overly dependent on the scale of training data and the accuracy of data annotation. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 This is a flowchart of the multi-intention recognition method of this application;
[0035] Figure 2 This is the system structure diagram of the multi-intent recognition system. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0037] Example 1
[0038] like Figure 1 As shown, a multi-intent recognition method integrating subject information includes:
[0039] Step 1: Obtain the user input text and normalize it to obtain the processed text; the normalization process includes converting all words in the text to lowercase, correcting words and phrases in the text based on rules, deleting the deformed part of the word and restoring it to the root state, etc.
[0040] Step 2, obtain sentence-based topic information and word-based topic information in the processed text. In this embodiment, sentence-based topic information and word-based topic information are obtained through a topic model, and the topic model uses a latent semantic analysis (LSA) method based on singular value decomposition (SVD) or a latent Dirichlet allocation (LDA) method based on Gibbs sampling to obtain relevant topic distribution. In order to improve the accuracy of the topic model, the model needs to be trained before using it, including obtaining training corpus, preprocessing the text expected in the training, including removing punctuation, converting all words to lowercase, removing stop words, restoring the roots of all words, etc., and putting the preprocessed text into the topic model for training.
[0041] The method of inputting processed text into a topic model to obtain sentence-based topic information and word-based topic information includes: adopting a probability sorting method to select the sentence-based topic information and word-based topic information, specifically: inputting the text after normalization processing in step 1 into a trained topic model to obtain the topic distribution of the normalized text, selecting k topics with the largest probability in the topic distribution as sentence-based topics of the current text, selecting n words for each topic, and the selected k×n words are the sentence-based topic information of the current input text.
[0042] The method of selecting word-based topic information using a probability sorting method includes: inputting each word in the normalized text into a trained topic model in turn to obtain the topic distribution of each word, selecting m topics with the largest probability in the topic distribution as the word-based topics of the current text, selecting n words for each topic, and the selected m×n words are the word-based topic information of the current input text.
[0043] Step 3: Fusing the processed text with the sentence-based topic information, a full sampling fusion method or a random sampling fusion method may be used for the fusion.
[0044] The full sampling fusion method is: all the subject words in the sentence-based subject information are concatenated before the processed text to form a text that is fused with the sentence-based subject information.
[0045] The random sampling fusion method is: randomly sampling i (i≤k×n) topic words in the sentence-based topic information, and concatenating them before processing the text to form a text that is fused with the sentence-based topic information.
[0046] Step 4, convert the fused text and word-based topic information in step 3 into vector representations respectively; in this embodiment, a pre-trained language model is used for vector conversion, and the pre-trained language model includes: an autoregressive pre-trained language model with unidirectional feature representation, such a model extracts the features of the pre-trained corpus text in a unidirectional direction, such as the ELMO model and the ULMFiT model; an autoencoding pre-trained language model with bidirectional feature representation, mainly the BERT pre-trained language model, and its derivative models include the ERINE model, the RoBERTa model and the spanBERT model; the autoregressive pre-trained language model with bidirectional feature representation introduces a dual attention flow and a transformer mechanism, and the representative model is XLNet.
[0047] Step 5, constructing an intent recognition model and training it; constructing an intent recognition model specifically includes: building a neural network basic framework, and constructing a word-based topic information fusion network layer. Building a neural network basic framework includes: a deep learning model based on a recurrent neural network, or a deep learning model based on a convolutional neural network, or a deep learning model based on an adversarial neural network. Constructing a word-based topic information fusion network layer includes: adding a bidirectional long short-term memory neural network layer to the bottom layer of the neural network basic framework, and at each time step of the bidirectional long short-term memory neural network layer, the word-based topic information and the vector representation of the text fused in step 4 are fused through the factorization machine (FM) algorithm, and the fused vector representation is passed to the middle layer of the neural network basic framework.
[0048] Model training also includes: setting a loss function and iteratively updating the parameters of the intent recognition model.
[0049] The method for setting the loss function includes: using the maximum margin loss function to calculate the difference between the true value and the predicted value. The method for iteratively updating the parameters of the intent recognition model includes: using the Adam optimizer or the AdaGrad optimizer. The optimizer updates the model parameters again and again to see whether the difference between the true value and the predicted value calculated by the loss function has reached the minimum value. If it has not reached the minimum value, the parameters are updated again until the difference calculated by the loss function is the minimum value, so as to achieve the purpose of improving the accuracy of the model.
[0050] The training method of the intent recognition model includes obtaining training corpus data, normalizing the text in the corpus according to actual needs, passing the normalized text into a trained topic model to obtain sentence-based topic information and word-based topic information for each text, converting the normalized text and the topic information into vector representations, and putting the vector representations into the intent recognition model in batches for training.
[0051] Step 6: Input the fused text vector representation and the word-based topic information vector representation into the intent recognition model to obtain the intent classification result.
[0052] Example 2
[0053] like Figure 2 As shown, a multi-intention recognition system integrating subject information includes:
[0054] Text acquisition unit: used to acquire the user's input text and normalize the input text to obtain the processed text;
[0055] Theme acquisition unit: used for acquiring sentence-based theme information and word-based theme information according to the processed text;
[0056] Topic fusion unit: used to fuse the processed text with sentence-based topic information;
[0057] Vector conversion unit: used to convert the fused text and word-based topic information in the topic fusion unit into vector representations respectively;
[0058] Intent classification unit: used to obtain intent classification results based on the vector representation of the fused text and the vector representation of word-based topic information.
[0059] It should be noted that the various units in this embodiment are logical in nature. In a specific implementation process, one unit can be split into multiple units, and multiple units can also be combined into one unit.
[0060] This application introduces topic knowledge to enhance the prediction effect of multi-label classification tasks, uses sentence-level topic distribution to influence the judgment of the number of intents by the intent recognition model, adds word-level topic information to enrich the semantic representation of each word, increases the amount of corpus information, and alleviates the problem of traditional deep learning-based intent recognition methods being overly dependent on the accuracy of labeled data.
Claims
1. A multi-intention recognition method integrating subject information, characterized in that: include: Step 1: Obtain the user's input text and normalize it to obtain the processed text; Step 2: Obtain sentence-based topic information and word-based topic information in the processed text; specifically: Build and train a topic model; Input the normalized text into the trained topic model to obtain the topic distribution of the normalized text, select the k topics with the largest probability in the topic distribution as the sentence-based topics of the current text, select n words for each topic, and the selected k×n words are the sentence-based topic information of the current input text; Input each word in the normalized text into the trained topic model in turn to obtain the topic distribution of each word, select the m topics with the largest probability in the topic distribution as the word-based topics of the current text, select n words for each topic, and the selected m×n words are the word-based topic information of the current input text; Step 3, fusing the processed text with the sentence-based topic information; Step 4: Convert the fused text and word-based topic information in step 3 into vector representations respectively; Step 5: Build and train the intent recognition model. Specifically, building the intent recognition model includes: building a neural network basic framework and building a word-based topic information fusion network layer; Building a neural network basic framework includes: a deep learning model based on a recurrent neural network, a deep learning model based on a convolutional neural network, or a deep learning model based on an adversarial neural network; Constructing a word-based topic information fusion network layer includes: adding a bidirectional long short-term memory neural network layer at the bottom of the neural network basic framework, fusing the word-based topic information and the vector representation of the text fused in step 4 through a factorization machine algorithm at each time step of the bidirectional long short-term memory neural network layer, and passing the fused vector representation to the middle layer of the neural network basic framework; Step 6: Input the vector representation obtained in step 4 into the intent recognition model to obtain the intent classification result.
2. According to the multi-intention recognition method integrating subject information according to claim 1, it is characterized in that: The method adopted in step 3 to fuse the processed text with the sentence-based topic information is a full sampling fusion method or a random sampling fusion method.
3. According to the multi-intention recognition method integrating subject information as described in claim 1, it is characterized in that: The step 4 specifically involves using a pre-trained language model to convert the fused text and word-based topic information into vector representations respectively.
4. The multi-intention recognition method integrating subject information according to claim 3 is characterized in that: The pre-trained language model includes an autoregressive pre-trained language model with unidirectional feature representation, an autoencoding pre-trained language model with bidirectional feature representation, or an autoregressive pre-trained language model with bidirectional feature representation.
5. The multi-intention recognition method integrating subject information according to claim 1, characterized in that: The step 5 also includes setting a loss function and iteratively updating the parameters of the intent recognition model when performing model training.
6. A multi-intention recognition system integrating subject information, characterized in that: include: Text acquisition unit: used to acquire the user's input text and normalize the input text to obtain the processed text; Theme acquisition unit: used to acquire sentence-based theme information and word-based theme information according to the processed text, specifically: Build and train a topic model; Input the normalized text into the trained topic model to obtain the topic distribution of the normalized text, select the k topics with the largest probability in the topic distribution as the sentence-based topics of the current text, select n words for each topic, and the selected k×n words are the sentence-based topic information of the current input text; Input each word in the normalized text into the trained topic model in turn to obtain the topic distribution of each word, select the m topics with the largest probability in the topic distribution as the word-based topics of the current text, select n words for each topic, and the selected m×n words are the word-based topic information of the current input text; Topic fusion unit: used to fuse the processed text with sentence-based topic information; Vector conversion unit: used to convert the fused text and word-based topic information in the topic fusion unit into vector representations respectively; Intent classification unit: used to obtain intent classification results based on the vector representation of the fused text, the vector representation of word-based topic information, and the intent recognition model; The process of constructing the intent recognition model specifically includes: building a basic neural network framework and constructing a word-based topic information fusion network layer; Building a neural network basic framework includes: a deep learning model based on a recurrent neural network, a deep learning model based on a convolutional neural network, or a deep learning model based on an adversarial neural network; Constructing a word-based topic information fusion network layer includes: adding a bidirectional long short-term memory neural network layer at the bottom of the neural network basic framework, fusing the word-based topic information and the vector representation of the text fused in step 4 through a factorization machine algorithm at each time step of the bidirectional long short-term memory neural network layer, and passing the fused vector representation to the middle layer of the neural network basic framework.
