A multi-intent recognition method and device

By constructing a mapping relationship between the number of intents and category labels and entity words, and combining preprocessing and template selection, the accuracy problem of multi-intent recognition is solved, and more efficient multi-intent recognition is achieved.

CN117116265BActive Publication Date: 2026-07-24四川启睿克科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
四川启睿克科技有限公司
Filing Date
2023-08-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing intent recognition methods cannot effectively handle multi-intent recognition. In particular, traditional methods cannot handle complex language structures and contextual information. Machine learning-based methods require a large amount of labeled data and are limited by the availability of data in specific domains, resulting in inaccurate multi-intent recognition.

Method used

By defining the mapping relationship between intent count and category labels and entity words, we construct intent count and category prediction prompt templates. We combine manual and generative models to construct intent count and category prediction tasks, perform signal preprocessing and select the optimal template, and use a label entity word converter and prompt template mapper to perform multi-intent recognition.

Benefits of technology

It improves the accuracy of multi-intent recognition, expands the scope of application, and enhances the accuracy of intent category recognition through preprocessing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117116265B_ABST
    Figure CN117116265B_ABST
Patent Text Reader

Abstract

The present application mainly relates to the technical field of natural language processing. In order to solve the problem that the current search engine and the like cannot perform multi-intent recognition or the multi-intent recognition is inaccurate in the process of voice recognition, the present application provides a multi-intent recognition method and device, a label entity word converter and a prompt template mapper are respectively constructed, the prompt template mapper includes an intent number prediction prompt template and an intent category prediction prompt template, the intent number prediction prompt template is used for predicting an intent number entity word of a to-be-predicted signal, the label entity word converter converts the intent number entity word into an intent number label to obtain a final intent number; the intent category prediction prompt template is used for predicting an intent category entity word of the to-be-predicted signal, and the label entity word converter converts the intent category entity word into an intent category label according to the intent number to obtain the category of each intent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and apparatus for multi-intent recognition. Background Technology

[0002] Intent recognition is frequently required when using search engines, intelligent assistants, or natural language processing applications. Intent recognition refers to identifying and understanding a user's intent and purpose from given text or speech signals. It is widely used in automated customer service systems, intelligent voice assistants, and online search.

[0003] Currently, intent recognition functionality still has some limitations. Traditional rule-based or keyword-matching-based intent recognition methods cannot handle complex language structures and contextual information. Machine learning-based methods require large labeled datasets to train the model and may be limited by the availability of data in specific domains. Furthermore, these methods can only be used for single intent recognition and cannot accurately capture all intents for multi-intent recognition. Summary of the Invention

[0004] The technical problem to be solved by this invention:

[0005] This invention provides a method and apparatus for multi-intent recognition, which solves the problem that current search engines and other technologies cannot perform multi-intent recognition or have inaccurate multi-intent recognition during speech recognition.

[0006] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:

[0007] Define the mapping relationship between intent count tags and intent count entity words, and between intent category tags and intent category entity words;

[0008] The text to be predicted is concatenated with the intent count prediction prompt template and used as the input signal to the intent count prediction model. The intent count prediction model outputs the intent count entity words of the text signal to be predicted. Based on the mapping relationship between intent count tags and intent count entity words, the intent count entity words are converted into intent count tags to obtain the intent count of the text to be predicted.

[0009] The text to be predicted is concatenated with the intent category prediction prompt template and used as the input signal to the intent category prediction model. The intent category prediction model outputs the intent category entity words of the text signal to be predicted. The intent category entity words are selected according to the number of intents. The intent category entity words are converted into intent category labels according to the mapping relationship between intent category labels and intent category entity words, and the intent category of the signal to be predicted is obtained.

[0010] Furthermore, it also includes building a tag entity word converter, which maps an intent count tag to an intent count entity word, and maps an intent category tag to an intent category entity word.

[0011] Furthermore, the tag entity word converter, which maps an intent category tag to a class of intent category entity words, specifically includes establishing a thesaurus of synonyms for commonly used intent category entity words, and mapping each intent category entity word in the thesaurus to an intent category tag.

[0012] Furthermore, it also includes constructing a prompt template mapper, which uses both manual and generative models to construct text descriptions for the intent count prediction task and the intent category prediction task, respectively, to obtain the intent count prediction prompt template and the intent category prediction prompt template.

[0013] Furthermore, the accuracy of manually constructed and generative model-constructed intent count prediction prompt templates and intent category prediction prompt templates was verified on a multi-intent recognition verification dataset. The intent count prediction prompt template and intent category prediction prompt template with the highest accuracy were selected as the final intent count prediction prompt template and intent category prediction prompt template.

[0014] Furthermore, the intent category entity words output by the graph category prediction model for the text signal to be predicted include concatenating the intent number prediction prompt template and the text signal to be predicted as input signals to the intent number prediction model. The intent number prediction model predicts the probability that the input signal belongs to different intent number entity words, and selects the intent number entity word with the highest probability value as the final intent number entity word.

[0015] Furthermore, the intent category prediction model outputs intent category entity words of the text signal to be predicted by concatenating the intent category prediction prompt template with the text signal to be predicted as input signal to the intent category prediction model. The intent category prediction model predicts the probability value of the input signal belonging to different intent category entity words, sorts the probability values, and selects the intent category entity words with larger probability values ​​according to the number of intents.

[0016] Furthermore, before performing intent recognition on the text to be predicted, the process includes preprocessing the signal to be predicted. The preprocessing includes: if the acquired signal to be predicted is a speech signal, performing noise reduction on the speech signal, converting the noise-reduced speech signal into a text signal, and correcting errors in the text signal.

[0017] Based on the above-mentioned multi-intent recognition method, the present invention also provides a multi-intent recognition device, which includes a signature entity word converter, a prompt template mapper, an intent number prediction model, and an intent category prediction model;

[0018] The prompt template mapper includes an intent count prediction prompt template and an intent category prediction prompt template. The intent count prediction prompt template is used to concatenate with the text signal to be predicted and input into the intent count prediction model to obtain the intent count entity words of the text signal to be predicted. The intent category prediction prompt template is used to concatenate with the text signal to be predicted and input into the intent category prediction model to obtain the intent category entity words of the text to be predicted based on the intent count.

[0019] The tag entity word converter is used to convert the intent number entity into intent number tags to obtain the intent number of the text to be predicted, and to convert the intent category entity word into intent category tags to obtain the intent category of the text to be predicted.

[0020] Furthermore, the multi-intent recognition device also includes a data processing module, which is used to acquire the signal to be predicted and preprocess the signal to be predicted. The preprocessing includes denoising the speech signal, converting the speech signal into a text signal, and correcting errors in the text signal.

[0021] The beneficial effects of this invention are:

[0022] A label entity word converter and a cue template mapper are constructed. The cue template mapper predicts the number of intent entity words in the signal to be predicted. The label entity word converter converts the number of intent entity words into intent number tags to obtain the final number of intents. The intent category prediction cue template predicts the intent category entity words in the signal to be predicted. The label entity word converter converts the intent category entity words into intent category tags according to the number of intents to obtain the category of each intent. The multi-intent recognition method described in this invention combines boundary point recognition and intent classification. By limiting the prediction range of intent categories by the number of intents, it can more accurately identify and process different numbers of intents.

[0023] By manually building and automatically generating intention count prediction prompt templates and intention category prediction prompt templates using an automatic generation model, and then validating and selecting the final prompt templates on a validation dataset, we can more accurately measure the quality of the prompt templates obtained and improve the accuracy of intention category recognition.

[0024] Preprocessing the signal to be predicted before inputting it into the prediction model expands the scope of application. Simultaneously, signal preprocessing helps improve the accuracy of intent category recognition. Attached Figure Description

[0025] Figure 1 This is a flowchart of a multi-intent recognition method according to an embodiment of the present invention.

[0026] Figure 2 This is a structural block diagram of a multi-intent recognition device according to an embodiment of the present invention. Detailed Implementation

[0027] The multi-intent recognition method described in this invention, such as Figure 1 As shown, it includes the following steps:

[0028] Construct a tag entity word converter and define the mapping relationship between intent count tags and intent count entity words, and between intent category tags and intent category entity words;

[0029] Construct a prompt template mapper, which includes prompt templates for predicting the number of intents and prompt templates for predicting the category of intents;

[0030] The intent count prediction prompt template is used to predict the intent count entity words of the signal to be predicted. The tag entity word converter converts the intent count entity words into intent count tags to obtain the final intent count. The intent category prediction prompt template is used to predict the intent category entity words of the signal to be predicted. The tag entity word converter converts the intent category entity words into intent category tags according to the intent count to obtain the category of each intent.

[0031] Example

[0032] 1. Construct a tag entity word converter using a rule-based method that has semantically similar intent category and intent count tags. The tag entity word converter includes intent count tags and intent category tags, where the tag is used as the key and the entity word as the value, or vice versa. The tag entity word refers to an entity word that accurately expresses the semantics of the tag.

[0033] Specifically, for the intent count tag, assuming there are a total of 3 intents, the intent count tag can be set as: L = [1, 2, 3], the intent count entity words can be set as: Le = ["one", "two", "three"], and the tag entity word converter is: {1: "one", "one": 1, 2: "two", "two": 2, 3: "three", "three": 3}.

[0034] For intent entity word tags, an entity word synonym dictionary is built to find entity words with the same or similar meanings. Assume that intent categories are labeled A, B, C, and D during data annotation, where A represents "open" or an entity word in the entity word synonym dictionary with the same or similar meaning as "open," and B represents "reduce" or an entity word in the entity word synonym dictionary with the same or similar meaning as "reduce." That is, A, B, C, and D are intent category tags, and "open" and "reduce" are intent category entity words.

[0035] The tag entity converter converts intent number entity words and intent number tags, and intent category entity words and intent category number words by mapping intent number tags to intent number entity words and intent category tags to intent category entity words.

[0036] II. Constructing a prompt template mapper, which includes an intent count prediction prompt template and an intent category prediction prompt template. The specific methods for constructing the intent count prediction prompt template and the intent category prediction prompt template are as follows:

[0037] Based on the semantics of the intent count prediction task and the intent category prediction task, textual descriptions for the intent count prediction and intent category prediction tasks are constructed using both manual construction and generative models, resulting in cloze-style prompt templates for intent count prediction and intent category prediction.

[0038] The manual intent count prediction prompt template and the intent category prediction prompt template, as well as the intent count prediction prompt template and the intent category prediction prompt template automatically generated by the generative model, were validated on the multi-intent recognition validation dataset. The intent count prediction prompt template and the intent category prediction prompt template with the best performance were selected as the final intent count prediction prompt template and intent category prediction prompt template, respectively.

[0039] Specifically, for manual construction methods, the textual description of the task is first constructed using methods including but not limited to expert rule methods. For example, for an intent count prediction task, the textual description includes, but is not limited to, the following form: "How many intents does this sentence express?" Then, the task description is converted into a cloze test format: "This sentence expresses _ intents?", where "_" represents the target to be filled. For methods that automatically generate the task using generative models, the template length is first set to n, and then "_1,_2,...,_" is used to construct the textual description. n "Using this as the first template, and then concatenating the first template with the input text signal as the input to the generative model, the generative model is finally used to predict "_1,_2,...,_ n The prediction results are used as a second template. The language models include, but are not limited to, language models such as BERT, T5, and GPT2.

[0040] Third, before performing intent recognition on the prediction model, the prediction signal is first processed. If the obtained prediction signal is a speech signal, then the speech signal is denoised, converted into a text signal, and the text signal is corrected.

[0041] IV. The intent count prediction template predicts the intent count entity words of the signal to be predicted. Specifically, the intent count prediction prompt template and the text signal to be predicted are concatenated as input signals to the intent count prediction model. The intent count prediction model predicts the probability that the input signal belongs to different intent count entity words, and selects the intent count entity word with the highest probability value as the final intent count entity word. The tag entity word converter obtains the actual intent count of the text to be predicted based on the mapping relationship between intent count tags and intent count entity words. The intent count prediction model is a language model, including but not limited to: BERT, T5, and GPT2 models.

[0042] The intent category prediction prompt template is used to predict the intent category entity words of the signal to be predicted. This involves concatenating the intent category prediction template with the text signal to be predicted as input to the intent category prediction model. The intent category prediction model predicts the probability that the input signal belongs to different intent category entity words, sorts the probabilities to obtain an intent category probability table, and selects the intent category entity word with the highest probability value from the intent category probability list based on the number of intents. The tag entity word converter maps the intent category entity words to the final intent category according to the mapping relationship between intent category tags and intent category entity words. The intent category prediction model includes, but is not limited to, models such as ERT, T5, and GPT2.

[0043] Based on the above-described multi-intent recognition method, the present invention also provides a multi-intent recognition device, such as... Figure 2 As shown, it specifically includes a tag entity word converter, a prompt template mapper, an intent count prediction model, and an intent category prediction model;

[0044] The prompt template mapper includes an intent count prediction prompt template and an intent category prediction prompt template. The intent count prediction prompt template is concatenated with the text signal to be predicted and input into the intent count prediction model to obtain the intent count entity words of the text signal to be predicted. The intent category prediction prompt template is concatenated with the text signal to be predicted and input into the intent category prediction model to obtain the intent category entity words of the text signal to be predicted based on the intent count.

[0045] The tag entity word converter is used to convert the intent number entity into intent number tags to obtain the intent number of the text to be predicted, and to convert the intent category entity word into intent category tags to obtain the intent category of the text to be predicted.

[0046] In addition, the multi-intent recognition device also includes a data processing module, which is used to acquire the signal to be predicted and to preprocess the signal to be predicted. The preprocessing includes denoising the speech signal, converting the speech signal into a text signal, and correcting errors in the text signal.

Claims

1. A multi-intent recognition method, characterized in that, include, Define the mapping relationship between intent count tags and intent count entity words, and between intent category tags and intent category entity words; The text to be predicted is concatenated with the intent count prediction prompt template and used as the input signal to the intent count prediction model. The intent count prediction model outputs the intent count entity words of the text signal to be predicted. Based on the mapping relationship between intent count tags and intent count entity words, the intent count entity words are converted into intent count tags to obtain the intent count of the text to be predicted. The text to be predicted is concatenated with the intent category prediction prompt template and used as the input signal to the intent category prediction model. The intent category prediction model outputs the intent category entity words of the text signal to be predicted. The intent category entity words are selected according to the number of intents. The intent category entity words are converted into intent category labels according to the mapping relationship between intent category labels and intent category entity words, and the intent category of the signal to be predicted is obtained.

2. The multi-intent recognition method according to claim 1, characterized in that, It also includes building a tag entity word converter, which maps an intent count tag to an intent count entity word, and maps an intent category tag to an intent category entity word.

3. The multi-intent recognition method according to claim 2, characterized in that, The tag entity converter maps an intent category tag to a class of intent category entity words. Specifically, it includes establishing a thesaurus of synonyms for commonly used intent category entity words and mapping each intent category entity word in the thesaurus to an intent category tag.

4. The multi-intent recognition method according to claim 1, characterized in that, It also includes building a prompt template mapper, which uses both manual and generative models to construct text descriptions for the intent count prediction task and the intent category prediction task, respectively, to obtain the intent count prediction prompt template and the intent category prediction prompt template.

5. The multi-intent recognition method according to claim 4, characterized in that, The accuracy of manually constructed and generative model-constructed intent count prediction prompt templates and intent category prediction prompt templates was verified on a multi-intent recognition verification dataset. The intent count prediction prompt template and intent category prediction prompt template with the highest accuracy were selected as the final intent count prediction prompt template and intent category prediction prompt template.

6. The multi-intent recognition method according to claim 1, characterized in that, The intent category prediction model outputs intent category entity words for the text signal to be predicted. The intent number prediction prompt template and the text signal to be predicted are concatenated and used as input signals to the intent number prediction model. The intent number prediction model predicts the probability that the input signal belongs to different intent number entity words, and selects the intent number entity word with the highest probability value as the final intent number entity word.

7. The multi-intent recognition method according to claim 1, characterized in that, The intent category prediction model outputs intent category entity words of the text signal to be predicted. The intent category prediction prompt template is concatenated with the text signal to be predicted and used as the input signal to the intent category prediction model. The intent category prediction model predicts the probability value of the input signal belonging to different intent category entity words, sorts the probability values, and selects the intent category entity words with larger probability values ​​according to the number of intents.

8. A multi-intent recognition method according to any one of claims 1-7, characterized in that, Before performing intent recognition on the text to be predicted, the process also includes preprocessing the signal to be predicted. The preprocessing includes: if the acquired signal to be predicted is a speech signal, performing noise reduction on the speech signal, converting the noise-reduced speech signal into a text signal, and correcting errors in the text signal.

9. A multi-intent recognition device, used to implement the multi-intent recognition method according to any one of claims 1-8, characterized in that, This includes a tag entity word converter, a cue template mapper, an intent count prediction model, and an intent category prediction model; The prompt template mapper includes an intent count prediction prompt template and an intent category prediction prompt template. The intent count prediction prompt template is used to concatenate with the text signal to be predicted and input into the intent count prediction model to obtain the intent count entity words of the text signal to be predicted. The intent category prediction prompt template is used to concatenate with the text signal to be predicted and input into the intent category prediction model to obtain the intent category entity words of the text to be predicted based on the intent count. The tag entity word converter is used to convert the intent number entity into intent number tags to obtain the intent number of the text to be predicted, and to convert the intent category entity word into intent category tags to obtain the intent category of the text to be predicted.

10. A multi-intent recognition device according to claim 9, characterized in that, It also includes a data processing module, which is used to acquire the signal to be predicted and preprocess the signal to be predicted. The preprocessing includes denoising the speech signal, converting the speech signal into a text signal, and correcting errors in the text signal.