An intent recognition method and device

CN115169354BActive Publication Date: 2026-11-03BAIRONG RUICHENG INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210789038.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-06
Publication Date
2026-11-03
Estimated Expiration
2042-07-06

AI Technical Summary

Technical Problem

The accuracy of intent recognition in existing technologies is insufficient, resulting in a poor user experience when interacting with human-computer interaction systems.

Method used

By processing the text to be identified, a feature set corresponding to the text length is formed. The text vector determination model and the intent recognition model are used for recognition, including: the fusion of part-of-speech tagging, sentiment polarity information, word vectors, context feature vectors and character vectors. The word application uses a bidirectional recurrent neural network and attention mechanism model to form a rich feature set to improve the accuracy of intent recognition.

Benefits of technology

This improves the accuracy of intent recognition, thereby enhancing the user's interaction experience with the human-computer interaction system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115169354B_ABST
    Figure CN115169354B_ABST
Patent Text Reader

Abstract

The application discloses an intention recognition method and device, relates to the technical field of intention recognition, and mainly aims at improving the accuracy of intention recognition. The main technical scheme comprises the following steps: processing a text to be recognized, forming N feature sets corresponding to the length of the text, wherein each feature set comprises features required for determining a text vector of the text, N is an integer greater than or equal to 1; selecting a corresponding text vector determination model for each feature set, wherein the text vector model is used for determining the text vector of the text based on the corresponding feature set; processing the corresponding feature set by using each text vector determination model to obtain a text vector corresponding to each text vector determination model; and performing intention recognition processing on the obtained text vector by using an intention recognition model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intent recognition technology, and in particular to an intent recognition method and apparatus. Background Technology

[0002] Intent recognition is a fundamental and crucial component of human-computer interaction (HCI) systems. Only by correctly recognizing user intent can the HCI system accurately continue the question-and-answer session and perform the task represented by that intent. Poor intent recognition of user input not only fails to accurately respond to user questions but also results in a very poor user experience.

[0003] It is evident that the accuracy of intent recognition directly affects the user's interaction experience with the human-computer interaction system. Therefore, there is an urgent need for an intent recognition method to improve the accuracy of intent recognition. Summary of the Invention

[0004] In view of this, this application proposes an intent recognition method and apparatus, the main purpose of which is to improve the accuracy of intent recognition.

[0005] To achieve the above objectives, this application mainly provides the following technical solutions:

[0006] In a first aspect, this application provides an intent recognition method, the method comprising:

[0007] The text to be identified is processed to form N feature sets corresponding to the length of the text, wherein each feature set includes features required to determine the text vector of the text, and N is an integer greater than or equal to 1;

[0008] For each of the feature sets, a corresponding text vector is selected to determine the model, wherein the text vector model is used to determine the text vector of the text based on the corresponding feature set;

[0009] Each text vector is used to determine the corresponding feature set, thereby obtaining the text vector corresponding to each text vector determination model.

[0010] The obtained text vectors are processed for intent recognition using an intent recognition model.

[0011] In some embodiments, processing the text to be identified to form N feature sets corresponding to the length of the text includes: performing part-of-speech tagging on the text when the length of the text is not greater than the target length to obtain a part-of-speech tag set, wherein the part-of-speech tag set includes part-of-speech information of the words involved in the text; determining the sentiment polarity information corresponding to the text; and integrating the part-of-speech tag set, the sentiment polarity information, and the text into a first feature set.

[0012] In some embodiments, processing the text to be identified to form N feature sets corresponding to the length of the text includes: if the length of the text is greater than the target length, segmenting the text into a corresponding word set and character set; processing the word set to form a second feature set; and processing the character set to form a third feature set.

[0013] In some embodiments, processing the word set to form a second feature set includes: determining the word vector corresponding to each word segment in the word set; processing the determined word vector using a bidirectional recurrent neural network model to obtain the context feature vector corresponding to each word segment; and integrating the word vector and the context feature vector corresponding to each word segment into the second feature set.

[0014] In some embodiments, each of the text vector determination models processes the corresponding feature set to obtain the text vector corresponding to each text vector determination model, including: processing the context feature vectors included in the second feature set using a word-level attention mechanism model to obtain the weights corresponding to each word segmentation; and determining the text vector of the text based on the word vectors and weights corresponding to each word segmentation.

[0015] In some embodiments, processing the character set to form a third feature set includes: determining the character vector and position vector corresponding to each character in the character set, wherein the position vector is used to describe the position of the corresponding character in the text; for each character, fusing the character vector and position vector corresponding to the character to form a first target vector corresponding to the character; and integrating the first target vectors corresponding to each character to form the third feature set.

[0016] In some embodiments, the intent recognition model is used to perform intent recognition processing on the obtained text vector, including: fusing two text vectors corresponding to the text to obtain a second target vector, wherein one of the two text vectors is obtained by processing the second feature set by a text vector determination model corresponding to the second feature set, and the other text vector is obtained by processing the third feature set by a text vector determination model corresponding to the third feature set; and the intent recognition model is used to perform intent recognition processing on the second target vector.

[0017] Secondly, this application provides an intent recognition device, the device comprising:

[0018] The first processing unit is used to process the text to be identified and form N feature sets corresponding to the length of the text, wherein each feature set includes features required to determine the text vector of the text, and N is an integer greater than or equal to 1.

[0019] A selection unit is used to select a corresponding text vector to determine a model for each of the feature sets, wherein the text vector model is used to determine the text vector of the text based on the corresponding feature set;

[0020] The second processing unit is used to process the corresponding feature set using each of the text vector determination models to obtain the text vector corresponding to each of the text vector determination models.

[0021] The recognition unit is used to perform intent recognition processing on the obtained text vector using an intent recognition model.

[0022] Thirdly, this application provides a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the storage medium is located to execute the intent recognition method described in the first aspect.

[0023] Fourthly, this application provides a storage management device, the storage management device comprising: a memory for storing a program; and a processor coupled to the memory for running the program to perform the intent recognition method described in the first aspect.

[0024] By employing the above technical solution, the intent recognition method and apparatus provided in this application, when performing intent recognition on text to be recognized, firstly processes the text to be recognized to form N feature sets corresponding to the length of the text. Then, a corresponding text vector determination model is selected for each feature set, and each text vector determination model is used to process the corresponding feature set to obtain the text vector corresponding to each text vector determination model. Finally, the intent recognition model is used to perform intent recognition processing on the obtained text vectors. It can be seen that in the solution provided in this application, when performing intent recognition on text, the length of the text determines the richness of the features contained in the text. Therefore, in order to obtain richer features, the solution provided in this application forms feature sets based on the length of the text. Since the feature sets in the solution provided in this application are based on the length of the text, the resulting feature sets can compensate for the lack of features in the text. Therefore, when performing intent recognition based on the obtained feature sets, the accuracy of intent recognition can be improved.

[0025] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A flowchart of an intent recognition method provided in one embodiment of this application is shown;

[0028] Figures 2A-2B A flowchart of an intent recognition method provided in another embodiment of this application is shown;

[0029] Figure 3 This illustration shows a schematic diagram of the structure of an intent recognition device according to an embodiment of this application;

[0030] Figure 4 A schematic diagram of an intent recognition device provided in another embodiment of this application is shown. Detailed Implementation

[0031] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0032] Intent recognition is a fundamental and crucial aspect of human-computer interaction (HCI) systems. Correctly recognizing user intent is essential for the HCI system to accurately engage in question-and-answer sessions and execute the task represented by that intent. Poor intent recognition of user input not only fails to provide accurate answers but also creates a poor user experience. For example, in an HCI system used in credit transactions, when reminding a user to repay a loan, after the system has already informed the user of the outstanding amount and overdue period according to the repayment script and asked if they can repay today, the user might not answer the above question based on their own circumstances and instead ask, "My card is lost, what should I do?" In this case, the user's input text expresses the intent of "card lost" and how to repay the loan. However, if this intent is not correctly recognized, the HCI system cannot provide a solution corresponding to this intent, resulting in a poor user experience.

[0033] As described above, the accuracy of intent recognition directly affects the user's interaction experience with the human-computer interaction system. Therefore, to improve the accuracy of intent recognition and enhance the user's interaction experience, this application provides an intent recognition method and apparatus. In practical applications, the intent recognition method and apparatus provided in this application can be used in any business scenario requiring intent recognition. The intent recognition method and apparatus provided in this application will be described in detail below.

[0034] like Figure 1 As shown in the figure, this application provides an intent recognition method, which mainly includes:

[0035] 101. Process the text to be identified and form N feature sets corresponding to the length of the text. Each feature set includes the features required to determine the text vector, where N is an integer greater than or equal to 1.

[0036] In practical applications, the text to be identified is any text input by the user in a human-computer interaction system. This text needs to be identified so that the human-computer interaction system can perform the task represented by the intent or provide a text response in response to the intent.

[0037] The length of the text to be identified determines the richness of the information contained in the text, and the information contained in the text determines the result of the intent recognition. Therefore, after obtaining the text to be identified, it is necessary to process the text based on its length to form N feature sets corresponding to the length of the text.

[0038] The following describes the specific method for forming N feature sets corresponding to the length of the text to be processed for intent recognition. Based on different text lengths, the methods for forming feature sets include the following two:

[0039] The first method, which processes the text to be identified and forms N feature sets corresponding to the length of the text, includes the following steps 101A to 101C:

[0040] 101A. When the length of the text is not greater than the target length, perform part-of-speech tagging on the text to obtain a part-of-speech tag set, wherein the part-of-speech tag set includes the part-of-speech information of the words involved in the text.

[0041] The target length reflects the richness of information contained in the text. The target length is the number of characters, and its specific value can be set based on business requirements. For example, if the target length is set to 10, the text length will not exceed the target length if the number of characters contained in the text is no more than 10.

[0042] When the length of the text is no greater than the target length, it indicates that the text contains relatively little information and its features for intent recognition need to be enriched. One method to enrich the features of the text is step 101A, "performing part-of-speech tagging on the text to obtain a set of part-of-speech tags".

[0043] The specific process of obtaining a part-of-speech (POS) tag set by performing part-of-speech tagging on text is as follows: The POS tagging model is invoked and used to tag the text with POS. The POS tagging model used is a pre-trained model that can be directly invoked. Parts of speech are used to identify the characteristics of corresponding words in the text, such as nouns, verbs, and adjectives. Considering that word segments with parts of speech such as conjunctions and interjections are not very meaningful for intent recognition, these word segments are removed after POS tagging. Since word segments with parts of speech such as nouns and verbs have the strongest expressive power for intent recognition, word segments with parts of speech such as nouns and verbs are retained after POS tagging, and the retained word segments are organized into a POS tag set. The organized POS tag set includes the part-of-speech information of the word segments involved in the text.

[0044] 101B. Determine the emotional polarity information corresponding to the text.

[0045] Considering that a person's emotions can also help determine their intentions, another method to enrich text features is step 101B, "determining the sentiment polarity information corresponding to the text." The specific process for determining the sentiment polarity information corresponding to the text is as follows: A sentiment classification model is invoked to identify the sentiment polarity information corresponding to the text. The sentiment polarity information that the sentiment classification model can identify represents the emotional tendency of the user's input text, reflecting the emotional tendency the user had when inputting the text.

[0046] For example, a sentiment classification model can identify the user's sentiment polarity based on the content of the text. This sentiment polarity can be negative, positive, or neutral. For instance, if the text reads "Call me again, and I'll complain," the sentiment classification model will determine that the user's subjective meaning is "to complain," thus identifying the corresponding sentiment polarity as "negative." The sentiment classification model used to determine the sentiment polarity is a pre-trained model that can be directly invoked.

[0047] 101C. Integrate the part-of-speech tag set, sentiment polarity information, and text into a first feature set.

[0048] Given that the text length is not greater than the target length, and considering that the text is short and contains too little information, in order to enhance the text's feature information, the sentiment polarity information of the text, the text itself, and the part-of-speech tagging set including the part-of-speech information of the words involved in the text segmentation are integrated into a first feature set. This allows for the use of richer features when determining the text vector, thereby improving the accuracy of text vector determination.

[0049] The second method, which processes the text to be identified and forms N feature sets corresponding to the length of the text, includes the following steps 101D to 101F:

[0050] 101D. If the length of the text is greater than the target length, divide the text into the corresponding word set and character set.

[0051] When the text length exceeds the target length, it indicates that the text contains a lot of information. However, in order to more accurately identify the intent of the text, it is necessary to further mine the potential information contained in the text. The basic step in mining the potential information of text is to segment the text into corresponding word sets and character sets.

[0052] The steps to segment text into corresponding word sets are as follows: Use the Jieba segmentation method to segment the text into words, obtaining the corresponding word sets. The steps to segment text into corresponding character sets are as follows: Segment the text into individual characters; the resulting characters form the character sets.

[0053] 101E, Process the word set to form the second feature set.

[0054] The second feature set, formed by processing the word set, represents the potential information of the text to be further mined. The features in the second feature set describe the semantics of the text at the word level. The specific process of forming the second feature set by processing the word set includes the following steps one through three:

[0055] Step 1: Determine the word vector corresponding to each word segment in the word set.

[0056] When determining the word vectors corresponding to word segments in the word set, a word vector determination model is invoked. This model maps each word segment in the word set to a word vector. For example, the word vectors are fixed-size 200-dimensional vectors. The word vector determination model is a pre-trained model that can be directly invoked for word vector determination.

[0057] Step two: Use a bidirectional recurrent neural network model to process the determined word vectors to obtain the context feature vector corresponding to each word segmentation.

[0058] Different word segments contribute differently to understanding the semantics of text. Therefore, to clarify the contribution of each word segment to the semantics of the text, a bidirectional recurrent neural network (BiLSTM) model is used to process the determined word vectors and obtain the context feature vector corresponding to each word segment. The BiLSTM model is composed of a forward LSTM and a backward LSTM. Each word segment receives both its forward and backward information after passing through the BiLSTM model. Therefore, the BiLSTM model can capture the contextual information of the word segment in the text and represent this contextual information as the corresponding context feature vector. The BiLSTM model is a pre-trained model that can be directly called and used for determining the context feature vector.

[0059] Step 3: Integrate the word vector and context feature vector corresponding to each word segment into a second feature set.

[0060] The second feature set includes word vectors and context feature vectors corresponding to the segmented words involved in the text, which describe the semantic features of the text at the word level. The features in the second feature set are used to further mine the potential information contained in the text.

[0061] 101F, the set of processed words, forms the third feature set.

[0062] The third feature set, formed by processing the character set, represents the potential information of the text to be further mined. The features in the third feature set describe the semantics of the text at the character level. The specific process of forming the third feature set from the character set includes the following steps one through three:

[0063] Step 1: Determine the character vector and position vector corresponding to each character in the character set. The position vector is used to describe the position of the corresponding character in the text.

[0064] Character vectors are used to describe the meaning of characters. When determining the character vectors corresponding to characters in a character set, a character vector determination model is invoked. This model maps each character in the character set to a character vector. The character vector determination model is a pre-trained model that can be directly invoked for character vector determination.

[0065] Position vectors are used to describe the position of the corresponding character in the text. When determining the position vector of a character in a character set, a character position vector determination model is invoked. This model determines the position vector for each character in the character set. The character position vector determination model is a pre-trained model that can be directly invoked for character position vector determination.

[0066] Step two: For each character, merge the character vector and position vector corresponding to the character to form the first target vector corresponding to the character.

[0067] To better describe the contribution of a character to the semantics of the text, it is necessary to fuse the character vector and position vector corresponding to that character. When fusing these vectors, the following steps need to be performed on each character: fuse the character vector and position vector to form the first target vector for that character. This first target vector is used to describe the character's contribution to the semantics of the text.

[0068] The aforementioned fusion methods may include the following: First, concatenating character vectors and position vectors, where the character vector is positioned before or after the position vector based on specific business requirements; Second, using a target algorithm to perform operations on the character vectors and position vectors, where the target algorithm can be selected based on business requirements, for example, a hash algorithm.

[0069] Step 3: Integrate the first target vector corresponding to each character to form the third feature set.

[0070] The third feature set includes the first target vector corresponding to each character in the character set. The features in the third feature set describe the semantics of the text at the character level. The features in the third feature set are used to further mine the potential information contained in the text.

[0071] 102. Select the corresponding text vector for each feature set to determine the model. The text vector model is used to determine the text vector of the text based on the corresponding feature set.

[0072] When the length of the text is no greater than the target length, the feature set formed by processing the text is only the first feature set. The first feature set includes the part-of-speech information of the words involved in the text, the sentiment polarity information of the corresponding text, and the text itself.

[0073] The text vector determination model selected for the first feature set can determine the text vector based on three features: part-of-speech information of the words involved in the text, sentiment polarity information of the corresponding text, and the text itself. For example, the text vector determination model corresponding to the first feature set is the TinyBert model.

[0074] When the text length exceeds the target length, the text is processed, resulting in a second feature set and a third feature set. The second feature set includes word vectors and context feature vectors corresponding to the segmented words in the text. The third feature set includes a first target vector, which is obtained by combining the character vectors and position vectors corresponding to the fused characters.

[0075] The text vector determination model selected for the second feature set can determine the text vector based on two features: word vectors corresponding to the segmented words involved in the text and context feature vectors. For example, the text vector determination model corresponding to the second feature set is a word-level attention mechanism model.

[0076] The text vector determination model selected for the third feature set can determine the text vector of the text based on the feature of the first target vector corresponding to the characters involved in the text. For example, the text vector determination model corresponding to the third feature set is the TinyBert model.

[0077] 103. Use each text vector to determine the corresponding feature set, and obtain the text vector corresponding to each text vector.

[0078] When the length of the text is no greater than the target length, the feature set formed by processing the text is only the first feature set. The first feature set includes the part-of-speech information of the words involved in the text, the sentiment polarity information of the corresponding text, and the text itself.

[0079] When determining text vectors based on the first feature set, the features in the first feature set are input into the corresponding text vector determination model. The text vector determination model determines the text vector based on the features included in the first feature set: "part-of-speech information of the words involved in the text, sentiment polarity information of the corresponding text, and the text itself." Because the part-of-speech information of the words involved in the text, the sentiment polarity information of the corresponding text, and the text itself compensate for the lack of information in short texts, the resulting text vectors have high accuracy.

[0080] When the text length exceeds the target length, the text is processed, resulting in a second feature set and a third feature set. The second feature set includes word vectors and context feature vectors corresponding to the segmented words in the text. The third feature set includes a first target vector, which is obtained by combining the character vectors and position vectors corresponding to the fused characters.

[0081] When determining text vectors based on the second feature set, the specific process of using each text vector to determine the corresponding feature set and obtaining the text vector corresponding to each text vector determination model includes the following steps one and two:

[0082] Step 1: Use a word-level attention mechanism model to process the context feature vectors included in the second feature set to obtain the weights corresponding to each word segmentation.

[0083] Different word segments contribute differently to understanding the semantics of the text. Therefore, a word-level attention mechanism is used to process the context feature vectors included in the second feature set, assigning a corresponding weight to each word involved in the text. When assigning weights, the greater the semantic contribution of a word segment, the greater the weight it is assigned.

[0084] Step two: Determine the text vector of the text based on the word vector and weight corresponding to each word segmentation.

[0085] The text vector is obtained by multiplying the word vector and weight corresponding to each word segment, and then summing all the resulting products. Since the word vectors and context feature vectors corresponding to the words involved in the text describe the coherent semantic features of the text based on words, the resulting text vector has high accuracy.

[0086] When determining text vectors based on the third feature set, the features in the third feature set are input into the corresponding text vector determination model. The text vector determination model then determines the text vector based on the "first target vector" feature included in the third feature set, thus obtaining the text vector of the text. Since the first target vector feature describes the coherent semantic features of the text based on characters, the obtained text vector has high accuracy.

[0087] 104. Use an intent recognition model to perform intent recognition processing on the obtained text vectors.

[0088] If the text length is no greater than the target length, a text vector is determined based on the first feature vector. Therefore, when performing intent recognition processing on the obtained text vector using the intent recognition model, the intent recognition model can be directly used to perform intent recognition. After intent recognition, an intent recognition result is obtained, which describes the intent of the text, so that the human-computer interaction system can perform the task represented by this intent or provide a text response in response to this intent. The specific type of intent recognition model is specifically defined in the steps of this embodiment. For example, the intent recognition model is a softmax model.

[0089] When the length of the text is greater than the target length, a text vector is determined based on the second feature vector, and another text vector is determined based on the third feature vector. Therefore, the specific processing procedure for performing intent recognition processing on the obtained text vectors using the intent recognition model includes the following steps one and two:

[0090] Step 1: Merge the two text vectors corresponding to the text to obtain the second target vector.

[0091] One of the two text vectors is obtained by processing the second feature set by the text vector determination model corresponding to the second feature set, and the other text vector is obtained by processing the third feature set by the text vector determination model corresponding to the third feature set.

[0092] The methods for merging the two text vectors mentioned above can include the following: First, concatenate the two text vectors. The concatenation order of the two text vectors can be determined based on specific business requirements. Second, use a target algorithm to perform operations on the two text vectors. The target algorithm can be selected based on business requirements. For example, the target algorithm is a hash algorithm.

[0093] Step two: Use the intent recognition model to perform intent recognition processing on the second target vector.

[0094] The second target vector is input into the intent recognition model, which then performs intent recognition. After intent recognition, an intent recognition result is obtained, describing the intent of the text so that the human-computer interaction system can perform the task represented by this intent or provide a text response in response to this intent. The specific type of intent recognition model is specifically defined in this embodiment; for example, the intent recognition model is a softmax model.

[0095] The intent recognition method provided in this application first processes the text to be identified into N feature sets corresponding to the length of the text. Then, a corresponding text vector determination model is selected for each feature set, and each text vector determination model is used to process the corresponding feature set to obtain the text vector corresponding to each text vector determination model. Finally, the intent recognition model is used to perform intent recognition processing on the obtained text vectors. It can be seen that in the scheme provided in this application, when performing intent recognition on text, the length of the text determines the richness of the features contained in the text. Therefore, in order to obtain richer features, the scheme provided in this application forms feature sets based on the length of the text. Since the feature sets in the scheme provided in this application are based on the length of the text, the resulting feature sets can compensate for the lack of features in the text. Therefore, when performing intent recognition based on the obtained feature sets, the accuracy of intent recognition can be improved.

[0096] Furthermore, according to Figure 1 The method shown in this application, in another embodiment, also provides an intent recognition method, such as... Figure 2A and Figure 2B As shown, the method mainly includes:

[0097] 201. Obtain the text to be identified.

[0098] 202. Determine if the length of the text is greater than the target length; if not, proceed to step 203; otherwise, proceed to step 209.

[0099] 203. Perform part-of-speech tagging on the text to obtain a part-of-speech tag set, which includes the part-of-speech information of the words involved in the text.

[0100] 204. Determine the emotional polarity information corresponding to the text.

[0101] 205. Integrate the part-of-speech tag set, sentiment polarity information, and text into a first feature set.

[0102] 206. Select the corresponding text vector to determine the model for the first feature set, wherein the text vector model is used to determine the text vector of the text based on the first feature set.

[0103] 207. Use text vectors to determine the first feature set and obtain the text vectors corresponding to the text vector determination model.

[0104] 208. Use the intent recognition model to perform intent recognition processing on the obtained text vector, and then end the current process.

[0105] 209. Divide the text into corresponding word sets and character sets, and execute steps 210 and 216.

[0106] 210. Determine the word vector corresponding to each word segment in the word set.

[0107] 211. Use a bidirectional recurrent neural network model to process the determined word vectors to obtain the context feature vectors corresponding to each word segmentation.

[0108] 212. Integrate the word vector and context feature vector corresponding to each word segment into a second feature set.

[0109] 213. Select the corresponding text vectors for the second feature set to determine the model, where the text vector model is a word-level attention mechanism model used to determine the text vectors of the text based on the second feature set.

[0110] 214. Use a word-level attention mechanism model to process the context feature vectors included in the second feature set to obtain the weights corresponding to each word segmentation.

[0111] 215. Based on the word vector and weight corresponding to each word segment, determine the text vector of the text and execute step 221.

[0112] 216. Determine the character vector and position vector corresponding to each character in the character set, where the position vector is used to describe the position of the corresponding character in the text.

[0113] 217. For each character, merge the character vector and position vector corresponding to the character to form the first target vector corresponding to the character.

[0114] 218. Integrate the first target vector corresponding to each character to form the third feature set.

[0115] 219. Select corresponding text vectors for the third feature set to determine the model, where the text vector model is used to determine the text vectors of the text based on the third feature set.

[0116] 220. Use text vectors to determine the model processing of the third feature set to obtain the text vectors corresponding to the text vector determination model.

[0117] 221. The second target vector is obtained by fusing the two text vectors corresponding to the text.

[0118] In this process, one of the two text vectors is obtained by processing the second feature set by the text vector determination model corresponding to the second feature set, and the other text vector is obtained by processing the third feature set by the text vector determination model corresponding to the third feature set.

[0119] 222. Use an intent recognition model to perform intent recognition processing on the second target vector.

[0120] Furthermore, based on the above method embodiments, another embodiment of this application also provides an intent recognition device, such as... Figure 3 As shown, the device includes:

[0121] The first processing unit 31 is used to process the text to be identified and form N feature sets corresponding to the length of the text, wherein each feature set includes features required to determine the text vector of the text, and N is an integer greater than or equal to 1.

[0122] The selection unit 32 is used to select a corresponding text vector to determine the model for each feature set, wherein the text vector model is used to determine the text vector of the text based on the corresponding feature set;

[0123] The second processing unit 33 is used to process the corresponding feature set using each of the text vector determination models to obtain the text vector corresponding to each of the text vector determination models.

[0124] The recognition unit 34 is used to perform intent recognition processing on the obtained text vector using an intent recognition model.

[0125] The intent recognition device provided in this application, when needing to recognize intent from text, first processes the text to be recognized to form N feature sets corresponding to the length of the text. Then, a corresponding text vector determination model is selected for each feature set, and each text vector determination model is used to process the corresponding feature set to obtain a text vector corresponding to each text vector determination model. Finally, the intent recognition model is used to perform intent recognition processing on the obtained text vectors. It can be seen that in the solution provided in this application, when performing intent recognition on text, the length of the text determines the richness of the features contained in the text. Therefore, in order to obtain richer features, the solution provided in this application forms feature sets based on the length of the text. Since the feature sets in the solution provided in this application are based on the length of the text, the resulting feature sets can compensate for the lack of features in the text. Therefore, when performing intent recognition based on the obtained feature sets, the accuracy of intent recognition can be improved.

[0126] Optional, such as Figure 4 As shown, the first processing unit 31 includes:

[0127] The first processing module 311 is used to perform part-of-speech tagging on the text when the length of the text is not greater than the target length, to obtain a part-of-speech tagging set, wherein the part-of-speech tagging set includes part-of-speech information of the words involved in the text.

[0128] The first determining module 312 is used to determine the emotional polarity information corresponding to the text;

[0129] The first integration module 313 is used to integrate the part-of-speech tag set, the sentiment polarity information, and the text into a first feature set.

[0130] Optional, such as Figure 4 As shown, the first processing unit 31 includes:

[0131] The segmentation module 314 is used to segment the text into a corresponding word set and character set when the length of the text is greater than the target length;

[0132] The second processing module 315 is used to process the word set to form a second feature set;

[0133] The third processing module 316 is used to process the word set to form a third feature set.

[0134] Optional, such as Figure 4As shown, the second processing module 315 is specifically used to determine the word vector corresponding to each word segment in the word set; process the determined word vector using a bidirectional recurrent neural network model to obtain the context feature vector corresponding to each word segment; and integrate the word vector and context feature vector corresponding to each word segment into the second feature set.

[0135] Optional, such as Figure 4 As shown, the second processing module 315 is specifically used to process the context feature vectors included in the second feature set using a word-level attention mechanism model to obtain the weights corresponding to each word segmentation; and to determine the text vector of the text based on the word vectors and weights corresponding to each word segmentation.

[0136] Optional, such as Figure 4 As shown, the third processing module 316 is specifically used to determine the character vector and position vector corresponding to each character in the character set, wherein the position vector is used to describe the position of the corresponding character in the text; for each character, the character vector and position vector corresponding to the character are fused to form the first target vector corresponding to the character; and the first target vector corresponding to each character is integrated to form the third feature set.

[0137] Optional, such as Figure 4 As shown, the recognition unit 34 is specifically used to fuse the two text vectors corresponding to the text to obtain a second target vector, wherein one of the two text vectors is obtained by processing the second feature set by the text vector determination model corresponding to the second feature set, and the other text vector is obtained by processing the third feature set by the text vector determination model corresponding to the third feature set; the intention recognition model is used to perform intention recognition processing on the second target vector.

[0138] For a detailed explanation of the methods used in the operation of each functional module in the intent recognition device provided in this application embodiment, please refer to the corresponding method details of the above intent recognition method embodiment, which will not be repeated here.

[0139] Furthermore, based on the above embodiments, another embodiment of this application provides a computer-readable storage medium, the storage medium including a stored program, wherein the program controls the device where the storage medium is located to execute the above-described intent recognition method when it is running.

[0140] The beneficial effects of the computer-readable storage medium provided in the embodiments of this application can be referred to the description in the embodiments of the intent recognition method described above, and will not be repeated here.

[0141] Furthermore, based on the above embodiments, another embodiment of this application also provides a storage management device, the storage management device comprising: a memory for storing a program; and a processor coupled to the memory for running the program to perform the above-described intent recognition method.

[0142] The beneficial effects of the storage management device provided in this application embodiment can be referred to the description in the above-described embodiment of the intent recognition method, and will not be repeated here.

[0143] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0144] It is understood that the relevant features in the above methods and apparatus can be referenced interchangeably. Furthermore, the terms "first," "second," etc., in the above embodiments are used to distinguish between embodiments and do not represent the superiority or inferiority of any particular embodiment.

[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0146] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0147] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0148] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features but not others included in other embodiments, combinations of features from different embodiments are intended to be within the scope of this application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0149] The various component embodiments of this application can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the method, apparatus, and framework for operating the deep neural network model according to the embodiments of this application. This application can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such an implementation of this application can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0150] It should be noted that the above embodiments are illustrative of this application and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. An intent recognition method, characterized in that, The method includes: The text to be identified is processed to form N feature sets corresponding to the length of the text, wherein each feature set includes features required to determine the text vector of the text, and N is an integer greater than or equal to 1; For each of the feature sets, a corresponding text vector determination model is selected, wherein the text vector determination model is used to determine the text vector of the text based on the corresponding feature set; Each text vector is used to determine the corresponding feature set, thereby obtaining the text vector corresponding to each text vector determination model. The obtained text vectors are processed for intent recognition using an intent recognition model; The process of processing the text to be identified, forming N feature sets corresponding to the length of the text, includes: performing part-of-speech tagging on the text when the length of the text is not greater than the target length, obtaining a part-of-speech tag set, wherein the part-of-speech tag set includes part-of-speech information of the words involved in the text, and the words involved in the text do not include words that are meaningless for intent identification and are selected from the text based on part-of-speech; determining the sentiment polarity information corresponding to the text, wherein the sentiment polarity information represents the emotional tendency of the user when inputting the text, and the sentiment polarity information is any one of negative, positive, and neutral; and integrating the part-of-speech tag set, the sentiment polarity information, and the text into a first feature set; If the length of the text is greater than the target length, the text is segmented into a corresponding word set and a character set; the word set is processed to form a second feature set; the character set is processed to form a third feature set. The step of selecting a corresponding text vector to determine the model for each of the feature sets includes: using the TinyBert model as the text vector determination model for the first feature set; using a word-level attention mechanism model as the text vector determination model for the second feature set; and using the TinyBert model as the text vector determination model for the third feature set.

2. The method according to claim 1, characterized in that, Processing the word set to form a second feature set includes: Determine the word vector corresponding to each word segment in the word set; The determined word vectors are processed using a bidirectional recurrent neural network model to obtain the context feature vector corresponding to each word segmentation; The word vector and context feature vector corresponding to each word segment are integrated into the second feature set.

3. The method according to claim 2, characterized in that, Each text vector is used to determine the corresponding feature set, resulting in a text vector corresponding to each text vector determination model, including: The context feature vectors included in the second feature set are processed using a word-level attention mechanism model to obtain the weight corresponding to each word segmentation; Based on the word vector and weight corresponding to each word segment, the text vector of the text is determined.

4. The method according to claim 2, characterized in that, Processing the set of characters to form a third feature set includes: Determine the character vector and position vector corresponding to each character in the character set, wherein the position vector is used to describe the position of the corresponding character in the text; For each character, the character vector and position vector corresponding to the character are fused to form the first target vector corresponding to the character; The first target vector corresponding to each character is integrated to form the third feature set.

5. The method according to claim 1, characterized in that, The intent recognition model is used to perform intent recognition processing on the obtained text vectors, including: The two text vectors corresponding to the text are fused to obtain the second target vector, wherein one of the two text vectors is obtained by processing the second feature set by the text vector determination model corresponding to the second feature set, and the other text vector is obtained by processing the third feature set by the text vector determination model corresponding to the third feature set. The intent recognition model is used to perform intent recognition processing on the second target vector.

6. An intent recognition device, characterized in that, The device includes: The first processing unit is used to process the text to be identified and form N feature sets corresponding to the length of the text, wherein each feature set includes features required to determine the text vector of the text, and N is an integer greater than or equal to 1. A selection unit is used to select a corresponding text vector determination model for each feature set, wherein the text vector determination model is used to determine the text vector of the text based on the corresponding feature set; The second processing unit is used to process the corresponding feature set using each of the text vector determination models to obtain the text vector corresponding to each of the text vector determination models. The recognition unit is used to perform intent recognition processing on the obtained text vector using the intent recognition model; The first processing unit includes: The first processing module is used to perform part-of-speech tagging on the text when the length of the text is not greater than the target length, to obtain a part-of-speech tag set, wherein the part-of-speech tag set includes part-of-speech information of the words involved in the text, and the words involved in the text do not include words that are filtered from the text based on part-of-speech and are meaningless for intent recognition. The first determining module is used to determine the emotional polarity information corresponding to the text, wherein the emotional polarity information represents the emotional tendency of the user when inputting the text, and the emotional polarity information is any one of negative, positive and neutral. The first integration module is used to integrate the part-of-speech tagging set, the sentiment polarity information, and the text into a first feature set; The segmentation module is used to segment the text into corresponding word sets and character sets when the length of the text is greater than the target length; The second processing module is used to process the word set to form a second feature set; The third processing module is used to process the character set to form a third feature set; The selection unit is specifically used to select the TinyBert model as the text vector determination model corresponding to the first feature set; select the word-level attention mechanism model as the text vector determination model corresponding to the second feature set; and select the TinyBert model as the text vector determination model corresponding to the third feature set.

7. A computer-readable storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, it controls the device where the storage medium is located to perform the intent recognition method according to any one of claims 1 to 5.

8. A storage management device, characterized in that, The storage management device includes: Memory, used to store programs; A processor, coupled to the memory, is used to run the program to perform the intent recognition method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data processing method and apparatus, and mobile terminal

    CN109165292A

  • Text classification method and device

    CN110399488A

  • Text intention recognition method and device, equipment and storage medium

    CN113627197A