Intention recognition method and device, electronic equipment, storage medium and program product

Through the weighted voting algorithm that interprets user query statements and intent classification results, combined with the second-stage search model to optimize the intent scenario library, the problems of low accuracy of LLM intent recognition and insufficient generalization are solved, and higher intent recognition accuracy and intelligent question-and-answer effect are achieved.

CN120386861APending Publication Date: 2025-07-29CHINA MOBILE GROUP ZHEJIANG +3
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510513717.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, the accuracy of using LLM for intent recognition is low, and the generalization and scalability of the intent scenario library is not strong, and the lack of user feedback leads to insufficient optimization of intent recognition.

Method used

By interpreting the user query statement, combining the first intention classification results and the second intention classification results of the statement interpretation, a weighted voting algorithm and self-increase operation are used to determine the target intention, and the second stage search model is used to optimize the intention scenario library to generate a pseudo-intention tag set to update the intention scenario library.

Benefits of technology

It improves the accuracy of intention recognition, enhances the generalization and scalability of the system, and improves the accuracy and user experience of intelligent question-and-answer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386861A_ABST
    Figure CN120386861A_ABST
Patent Text Reader

Abstract

The invention provides an intention recognition method and device, electronic equipment, a storage medium and a program product, and belongs to the technical field of artificial intelligence, and the method comprises the steps: determining a target intention of a user query statement based on a first intention classification result of the user query statement and a second intention classification result of a statement paraphrase corresponding to the user query statement; the statement paraphrasing is output by the statement paraphrasing model after the user query statement is input into the statement paraphrasing model. When intention recognition is carried out on the user query statement, paraphrase processing is additionally carried out on the user query statement to obtain the corresponding statement paraphrase, multi-layer semantics input by the user are mined, and meanwhile the final target intention of the user query statement is jointly determined by considering the user query statement and the intention classification result of the statement paraphrase of the user query statement. The intention recognition accuracy can be improved when scenes such as complex query, multi-intention problems and deep semantic understanding are processed, and finally the accuracy of subsequent intention recognition such as intelligent questions and answers and the user experience degree are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to an intention recognition method, device, electronic device, storage medium, and program product. Background Art

[0002] With the development of artificial intelligence and large language models (LLMs), intelligent question-and-answer systems based on large language models have developed rapidly and are widely used. Intention recognition is an important part of mainstream intelligent question-and-answer systems.

[0003] Currently, the main method of intention recognition is to combine intention scenario library matching and LLM intention recognition. The user query statement input by the user in real time is matched with the representative query statements in the pre-created intention scenario library for similarity. If there are representative query statements with a similarity higher than the set threshold, the intention recognition result is determined according to the intention label text corresponding to the representative query statement higher than the set threshold; if there are no representative query statements with a similarity higher than the set threshold, the user query statement is input into the LLM, and the LLM processes the user query statement to obtain the intention recognition result.

[0004] However, in the case of simply using the LLM to perform intention recognition on the user query statement, there is a defect that the accuracy of intention recognition is relatively low. It is necessary to provide a solution that can improve the accuracy of intention recognition. Summary of the Invention

[0005] The present invention provides an intention recognition method, device, electronic device, storage medium, and program product to solve the defect that the accuracy of using the LLM to perform intention recognition on the user query statement in the prior art is relatively low, and to improve the accuracy of intention recognition.

[0006] The present invention provides an intention recognition method, including: Determining a target intention of the user query statement based on a first intention classification result of the user query statement and a second intention classification result of a statement paraphrase corresponding to the user query statement; The statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

[0007] According to an intention recognition method provided by the present invention, the first intention classification result includes a first classification label and its corresponding first confidence level; the second intention classification result includes a second classification label and its corresponding second confidence level; The determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement includes: Combine the same labels in the first classification label and the second classification label to obtain each candidate classification label, and determine the confidence levels corresponding to each candidate classification label according to the first confidence level corresponding to the first classification label and the second confidence level corresponding to the second classification label; For each candidate classification label, determine the weight value of each candidate classification label according to the confidence levels of each candidate classification label to determine the weight values of each candidate classification label; Based on the candidate classification label with the highest weight value, determine the target intent of the user query statement.

[0008] According to an intent recognition method provided by the present invention, the determining the weight value of each candidate classification label according to the confidence levels of each candidate classification label includes: When the confidence levels of each candidate classification label include the first confidence level, perform an increment operation on the first confidence level, and determine the weight value of each candidate classification label according to the confidence levels including the incremented first confidence level.

[0009] According to an intent recognition method provided by the present invention, the determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement includes: Input the user query statement into an intent classification model to obtain the first intent classification result output by the intent classification model; When the confidence level corresponding to the first classification label in the first intent classification result is less than a first preset threshold, input the user query statement into the statement paraphrase model to obtain the statement paraphrase output by the statement paraphrase model; Input the statement paraphrase into the intent classification model to obtain the second intent classification result output by the intent classification model; Based on the first intent classification result and the second intent classification result, determine the target intent.

[0010] According to an intent recognition method provided by the present invention, the intent classification model includes a first-stage embedding module and a second-stage re-ranking module connected in sequence; the first-stage embedding module is used to determine candidate intent label texts in an intent scenario library whose similarity to the input vector is greater than a second preset threshold; the second-stage re-ranking module is used to re-rank the candidate intent label texts according to the similarity between the candidate intent label texts and the input vector of the intent classification model, and output an intent classification result.

[0011] According to an intention recognition method provided by the present invention, after determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement, it further includes: Cluster the second classification labels in the second intention classification result of the statement paraphrase corresponding to the low-intention query statement to obtain a pseudo-intention label set; the low-intention query statement is a user query statement in a preset period whose confidence level corresponding to the first classification label in the first intention classification result is less than the first preset threshold; the pseudo-intention label set includes several of the second classification labels; Generate an intention description corresponding to the pseudo-intention label set; Use the pseudo-intention label set to update the intention label text in the intention scenario library; use the intention description corresponding to the pseudo-intention label set to update the prompt word corresponding to the intention label text in the intention scenario library; the prompt word is used to instruct the user to input a user query statement.

[0012] The present invention also provides an intention recognition device, including: An identification module, configured to determine the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement; The statement paraphrase is output by the statement paraphrase model after inputting the user query statement into the statement paraphrase model.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and running on the processor, where the processor implements the intention recognition method as described in any one of the above when executing the computer program.

[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and the computer program implements the intention recognition method as described in any one of the above when executed by a processor.

[0015] The present invention also provides a computer program product, including a computer program, and the computer program implements the intention recognition method as described in any one of the above when executed by a processor.

[0016] The intention recognition method, device, electronic device, storage medium and program product provided by the present invention, when recognizing the intention of a user query statement, additionally performs paraphrasing processing on the user query statement to obtain the corresponding statement paraphrase, mines the multi-layer semantics input by the user, and jointly determines the final target intention of the user query statement by considering the intention classification results of the user query statement and its statement paraphrase. It can reduce intention classification errors, improve the accuracy of intention recognition, and ultimately improve the accuracy and user experience of subsequent operations such as intelligent answering, whether using an LLM for intention recognition or based on an intention scenario library, when dealing with scenarios such as complex queries, multi-intention problems, and deep semantic understanding. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0018] Figure 1 is a flowchart of the intention recognition process in the related art.

[0019] Figure 2 is a flowchart of the intention recognition method provided by the present invention.

[0020] Figure 3 is a structural diagram of the intention recognition device provided by the present invention.

[0021] Figure 4 is a structural diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] To make the objectives, technical solutions, and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the drawings in the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments in the present invention belong to the scope of protection of the present invention.

[0023] It should be noted that in the description of the present invention, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. For those of ordinary skill in the art, the specific meaning of the above terms in the present invention can be understood according to specific circumstances.

[0024] The terms "first", "second", etc. in the present invention are used to distinguish similar objects and are not used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.

[0025] The following will Figures 1-4 describe the intent recognition method, device, electronic device, storage medium, and program product provided by the present invention.

[0026] Figure 1 is a schematic flow diagram of intent recognition in the related art. As Figure 1 shown, mainstream intelligent Q&A systems often combine and adopt an intent recognition method that matches the intent scenario library and uses the LLM for intent recognition.

[0027] An intent scenario library is created and maintained in advance in the intelligent Q&A system. The intent scenario library stores a certain number of common and representative intent scenario records. Each intent scenario record includes, but is not limited to, representative query statements input by the user in the past, intent label texts corresponding to the representative query statements, prompt words corresponding to the intent label texts, and other contents. It can be understood that one intent label text can correspond to one or more than two representative query statements.

[0028] When performing intent recognition, similarity matching, sorting, and other operations are performed on the user query statement input by the user in real time and each representative query statement in the intent scenario library. If a representative query statement with a similarity higher than the set threshold can be matched in the intent scenario library, the intent classification result of the user query statement is determined according to the intent label text corresponding to the representative query statement with a similarity higher than the set threshold, and the intent recognition of the user query statement is completed.

[0029] If no representative query statement with a similarity higher than the set threshold can be matched in the intended scenario library, the user query statement input by the user in real time is directly input into the LLM, and the LLM is used to determine the intent label and intent scenario to which the user query statement belongs, so as to obtain the result of intent recognition.

[0030] According to the result of intent recognition, the intelligent question answering system can enter different question answering branches to conduct question answering in specific scenarios, so as to realize more intelligent question answering that conforms to the user's intent.

[0031] However, the foregoing solution for intent recognition of user query statements has at least the following problems: First, when no representative query statement with high similarity can be matched, the LLM is directly used to perform intent recognition on the user query statement, and the accuracy is not as high as when performing similarity matching of user query statements; Second, the intent label text in the intent scenario library is fixed, and all user inputs can only be matched to the existing intent label text in the intent scenario library, resulting in the inability to process user inputs outside the intents corresponding to the set intent label text, lacking the ability to discover the intents of continuously changing user inputs in the real scenario, and resulting in poor generalizability and scalability of the system; Third, there is a lack of user feedback, making it difficult to optimize intent recognition targeted.

[0032] In view of this, the present invention provides an intent recognition method, device, electronic device, storage medium and program product to solve at least one of the above problems.

[0033] Figure 2 It is a schematic flowchart of the intent recognition method provided by the present invention, as Figure 2 shown, the intent recognition method includes but is not limited to step 201.

[0034] It should be noted that the execution subject of the intent recognition method provided by the present invention is the corresponding intent recognition device, which may specifically be a server, a computer device, such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an Ultra-Mobile Personal Computer (UMPC), a netbook or a Personal Digital Assistant (PDA), etc.

[0035] Step 201: Determine the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement.

[0036] Among them, the statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

[0037] The target intent is used to indicate that the intelligent question - answering system enters different question - answering branches; different question - answering branches correspond to different question - answering scenarios.

[0038] The first intent classification result refers to the intent classification result of the user's query statement obtained by using various intent recognition methods; the second intent classification result refers to the intent classification result of each statement paraphrase corresponding to the user's query statement obtained by using various intent recognition methods.

[0039] Optionally, the statement paraphrase model is constructed and pre - trained based on the LLM. Among them, the statement paraphrase model is pre - trained using multiple training samples; each training sample includes a query statement sample and its corresponding paraphrase label.

[0040] Specifically, in the case where it is necessary to perform intent recognition on the user's query statement, the user's query statement is pre - input into the statement paraphrase model, and the statement paraphrase model performs paraphrase processing on the user's query statement to obtain one or more statement paraphrases output by the statement paraphrase model.

[0041] Further obtain the first intent classification result of the user's query statement and the second intent classification results of each statement paraphrase corresponding to the user's query statement, and determine the target intent of the user's query statement according to the first intent classification result and the second intent classification results, thus completing the intent recognition of the user's query statement.

[0042] In one embodiment, the first intent classification result and the second intent classification result are obtained based on the following method: input the user's query statement into the pre - trained LLM to obtain the first intent classification result output by the LLM; input each statement paraphrase corresponding to the user's query statement into the pre - trained LLM respectively to obtain the second intent classification results output by the LLM respectively.

[0043] In another embodiment, the first intent classification result and the second intent classification result are obtained based on the following method: perform similarity matching between the user's query statement and each representative query statement in the intent scenario library, and determine the first intent classification result according to the intent label text corresponding to the representative query statement with a similarity higher than the set threshold or the highest similarity; perform similarity matching between each statement paraphrase corresponding to the user's query statement and each representative query statement in the intent scenario library respectively, and determine the second intent classification results respectively according to the intent label text corresponding to the representative query statement with a similarity higher than the set threshold or the highest similarity.

[0044] The intent recognition method provided by the present invention, when recognizing the intent of a user query statement, additionally performs paraphrasing processing on the user query statement to obtain the corresponding statement paraphrase, mines the multi-layer semantics input by the user, and jointly determines the final target intent of the user query statement by considering the intent classification results of the user query statement and its statement paraphrase. In scenarios such as processing complex queries, multi-intent problems, and deep semantic understanding, whether using an LLM for intent recognition or based on an intent scenario library for intent recognition, it can reduce intent classification errors, improve the accuracy of intent recognition, and ultimately improve the accuracy and user experience of subsequent intent recognition such as intelligent answering questions.

[0045] Based on the above embodiments, as an alternative embodiment, the first intent classification result includes a first classification label and its corresponding first confidence level; the second intent classification result includes a second classification label and its corresponding second confidence level. Determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement includes: Combining the same labels in the first classification label and the second classification label to obtain each candidate classification label, and determining each confidence level corresponding to each candidate classification label according to the first confidence level corresponding to the first classification label and the second confidence level corresponding to the second classification label. For each candidate classification label, determining the weight value of each candidate classification label according to the confidence levels of each candidate classification label to determine the weight values of each candidate classification label. Based on the candidate classification label with the highest weight value, determining the target intent of the user query statement.

[0046] Taking the example of obtaining the intent classification result by matching with the intent scenario library, matching the similarity between the user query statement and each representative query statement in the intent scenario library can determine the highly similar representative query statement with a similarity higher than the set threshold or the highest similarity to the user query statement. Taking the intent label text corresponding to the highly similar representative query statement in the intent scenario library as the first classification label in the first intent classification result, and taking the similarity between the user query statement and the highly similar representative query statement as the first confidence level corresponding to the first classification label.

[0047] Similarly, by separately matching the semantic interpretations of each statement in the user query statement with each representative query statement in the intent scenario library, representative query statements with high similarity that are higher than the set threshold or have the highest similarity with each semantic interpretation can be determined. The intent label text corresponding to the representative query statements with high similarity in the intent scenario library is used as the second classification label in the second intent classification result of each semantic interpretation, and the similarity between each semantic interpretation and the representative query statements with high similarity is used as the second confidence level corresponding to the second classification label.

[0048] Understandably, a user query statement may have an indefinite number of representative query statements with high similarity. Therefore, the number of first classification labels in the first intent classification result corresponds to one or more than two; a semantic interpretation may have an indefinite number of representative query statements with high similarity. Therefore, the number of second classification labels in each second intent classification result corresponds to one or more than two.

[0049] Specifically, when determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the semantic interpretation corresponding to the user query statement, the same labels among the first classification labels in the first intent classification result and the second classification labels in the second intent classification result are merged to obtain each distinct candidate classification label.

[0050] For each candidate classification label among all candidate classification labels, the first confidence level as the first classification label and / or the second confidence level as the second classification label is used as the confidence levels of each candidate classification label. After performing necessary arithmetic operations such as normalization and weighted summation on the confidence levels of each candidate classification label, the weight value of each candidate classification label is obtained, and then the weight values of all candidate classification labels are determined. Finally, the candidate classification label with the highest weight value among all candidate classification labels is determined as the target intent of the user query statement, completing the intent recognition.

[0051] For example, if the first classification label A is the same as the second classification labels B1 and B2, the first classification label A and the second classification labels B1 and B2 are merged into the candidate classification label α. The first confidence level a corresponding to the first classification label A and the second confidence levels b1 and b2 corresponding to the second classification labels B1 and B2 are all used as the confidence levels of the candidate classification label α, and necessary arithmetic operations are performed on the confidence levels to obtain the weight value Q of the candidate classification label α. α 。

[0052] Optionally, determining the target intent of the user query statement by aggregating and analyzing the first intent classification result based on the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement is performed by any one of aggregation algorithms such as the Weighted Voting algorithm, Bayesian aggregation, and confidence-based sorting algorithm.

[0053] Taking the weighted voting algorithm as an example, when implementing the aggregation and analysis of the first intent classification result and the second intent classification result through the weighted voting algorithm, different weights are given to the classifiers corresponding to each classification label (including the first classification label and the second classification label) according to the confidence levels (including the first confidence level and the second confidence level) corresponding to each classification label, and the classification labels corresponding to each candidate classification label are weighted and summed, and the candidate classification label with the highest weight is selected as the target intent.

[0054] In one embodiment, using the weighted voting algorithm, based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement, the expression (1) for determining the target intent of the user query statement is as follows: ;(1) Wherein, is the target intent of the user query statement, that is, the candidate classification label with the highest weight value; are the candidate classification labels; is the number of classifiers, which is the sum of the number of the first classification labels in the first intent classification result and the number of the second classification labels in the second intent classification result; is the weight corresponding to each classifier, that is, the first confidence level corresponding to the first classification label or the second confidence level corresponding to the second classification label; is the confidence level of the classification label corresponding to the is the sum of the confidence levels of the classification labels corresponding to all classifiers; is the indicator function; is the classification result of the classifier, that is, the first classification label or the second classification label corresponding to the

[0055] It can be understood that when holds, the value is 1; when does not hold, the value is 0.

[0056] It should be noted that the It is a normalization operation that normalizes the confidence levels of each classifier to a sum of 1, and is used to balance the absolute confidence differences of different classifiers.

[0057] The intent recognition method provided by the present invention, by adopting the combination means in intent paraphrasing and intent aggregation, performs aggregation analysis on the same classification labels in the intent classification results of the user query statement and its corresponding statement paraphrase, determines the weight value of the candidate classification label according to the confidence levels corresponding to the candidate classification labels, and determines the target intent corresponding to the user query statement according to the candidate classification label with the highest weight value, which can further reduce intent classification errors, improve the accuracy of intent recognition, and ultimately improve the accuracy and user experience of subsequent operations such as intelligent question answering in intent recognition.

[0058] Based on the above embodiments, as an alternative embodiment, the determining the weight value of each candidate classification label according to the confidence levels of each candidate classification label includes: When the confidence levels of each candidate classification label include the first confidence level, perform an increment operation on the first confidence level, and determine the weight value of each candidate classification label according to the confidence levels including the incremented first confidence level.

[0059] Specifically, for each candidate classification label, if the confidence levels corresponding to the candidate classification label include the first confidence level, it means that the candidate classification label belongs to the classification label obtained when performing intent recognition on the user query statement directly input by the user. At this time, perform an increment operation on the first confidence level of the candidate classification label to increase the first confidence level of the candidate classification label, and determine the weight value of the candidate classification label according to the confidence levels including the incremented first confidence level.

[0060] It should be noted that the increment amplitude when performing the increment operation can be preset, such as setting the increment amplitude to 10%, 20%, etc. of the first confidence level, and the present invention does not limit this.

[0061] Optionally, when the confidence levels of each candidate classification label include the first confidence level, the performing an increment operation on the first confidence level and determining the weight value of each candidate classification label according to the confidence levels including the incremented first confidence level includes: Perform an increment operation on the confidence levels of each candidate classification label, and determine the weight value of each candidate classification label according to the confidence levels after the increment operation.

[0062] The intention recognition method provided by the present invention can increase the weight of the classification label obtained when performing intention recognition on the user query statement of the user's direct original input by additionally increasing the first confidence level among the confidences corresponding to the candidate classification labels, so that the result of intention recognition is more inclined to the user query statement of the user's direct original input, further improving the accuracy of intention recognition, and ultimately improving the accuracy and user experience of subsequent intention recognition such as intelligent question answering.

[0063] Based on the above embodiments, as an alternative embodiment, determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement includes: Input the user query statement into the intention classification model to obtain the first intention classification result output by the intention classification model; In the case where the confidence level corresponding to the first classification label in the first intention classification result is less than the first preset threshold, input the user query statement into the statement paraphrase model to obtain the statement paraphrase output by the statement paraphrase model; Input the statement paraphrase into the intention classification model to obtain the second intention classification result output by the intention classification model; Determine the target intention based on the first intention classification result and the second intention classification result.

[0064] Optionally, the intention classification model is constructed and pre-trained based on the LLM. Among them, the intention classification model is pre-trained using a plurality of training samples; each training sample includes a query statement sample and its corresponding intention classification label.

[0065] Specifically, when performing intention recognition, input the user query statement into the pre-trained intention classification model to obtain the intention classification result corresponding to the user query statement output by the intention classification model, that is, the first intention classification result, and the first intention classification result includes the first classification label and its corresponding confidence level.

[0066] Further determine whether the confidence level corresponding to the first classification label in the first intention classification result is greater than the first preset threshold. In the case where the confidence level corresponding to the first classification label in the first intention classification result is greater than the first preset threshold, directly determine the target intention of the user query statement according to the first classification label in the first intention classification result.

[0067] When the confidence level corresponding to the first classification label in the first intention classification result is less than the first preset threshold, it indicates that the existing intention classification model, intention scenario library, etc. cannot perform good intention recognition on the user query statement. The reason may be that the user query statement belongs to complex queries, multi-intention problems, or scenarios that require in-depth semantic understanding, but the existing intention classification model, intention scenario library, etc. have not yet formed the recognition ability for these complex situations. At this time, the user query statement is input into the pre-trained sentence paraphrasing model to obtain several sentence paraphrases corresponding to the user query statement output by the sentence paraphrasing model.

[0068] Further, the several sentence paraphrases of the user query statement are respectively input into the intention classification model to obtain the respective second intention classification results output by the intention classification model.

[0069] Finally, considering comprehensively the first intention classification result of the user query statement and the second intention classification results of the sentence paraphrases corresponding to the user query statement, the target intention of the user query statement is determined.

[0070] The intention recognition method provided by the present invention, when the similarity between the original user query statement and the intention classification result is not high, utilizes the powerful semantic understanding and generation capabilities of LLM, etc., to further mine the semantics of the user query statement to obtain sentence paraphrases, and performs intention classification on the sentence paraphrases. At the same time, considering the intention classification result of the original semantics of the user query statement and the intention classification result of the semantics after mining the user query statement, combining paraphrasing and aggregation to jointly determine the target intention of the user query statement, reducing classification errors, effectively dealing with complex queries, multi-intention problems, or intention recognition scenarios that require in-depth semantic understanding, and improving the intention recognition accuracy in these complex scenarios, as well as the accuracy and user experience of subsequent intelligent question answering, etc.

[0071] In another embodiment, determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification results of the sentence paraphrases corresponding to the user query statement includes: Input the user query statement into the intention classification model to obtain the first intention classification result output by the intention classification model; when the confidence level corresponding to the first classification label in the first intention classification result is less than the first preset threshold, input the user query statement into the sentence paraphrasing model to obtain the sentence paraphrases output by the sentence paraphrasing model; input the sentence paraphrases into the intention classification model to obtain the second intention classification result output by the intention classification model; the first intention classification result includes the first classification label and its corresponding first confidence level; the second intention classification result includes the second classification label and its corresponding second confidence level; Based on the first intent classification result and the second intent classification result, determining the target intent includes: combining the same labels in the first classification label and the second classification label to obtain each candidate classification label, and determining each confidence corresponding to each candidate classification label according to the first confidence corresponding to the first classification label and the second confidence corresponding to the second classification label; for each candidate classification label, determining the weight value of each candidate classification label according to the confidences of each candidate classification label to determine the weight values of each candidate classification label; and determining the target intent of the user query statement based on the candidate classification label with the highest weight value.

[0072] Based on the above embodiments, as an optional embodiment, the intent classification model includes a one-stage embedding module and a two-stage reranking module connected in sequence; the one-stage embedding module is configured to determine candidate intent label texts from the intent scenario library whose similarity to the input vector is greater than a second preset threshold; the two-stage reranking module is configured to rerank the candidate intent label texts according to the similarity between the candidate intent label texts and the input vector of the intent classification model, and output an intent classification result.

[0073] Among them, the intent scenario library stores a certain number of common and representative intent scenario records, and each intent scenario record includes, but is not limited to, representative query statements input by users in history, intent label texts corresponding to the representative query statements, prompt words corresponding to the intent label texts, and so on.

[0074] The input vector of the one-stage embedding module is also the input vector of the intent classification model; the input vector of the two-stage reranking module is the output vector of the one-stage embedding module.

[0075] Optionally, the one-stage embedding module is constructed based on the Embedding algorithm. For example, the embedding algorithm is the bce-embedding-vase-v1 algorithm.

[0076] Optionally, the two-stage reranking module is constructed based on the Rerank algorithm. For example, the rerank algorithm is the bge-reranker-v1 algorithm.

[0077] Specifically, before obtaining the intent classification results of the user query statement and its statement paraphrase, a two-stage retrieval method is used to pre-construct an intent classification model including a one-stage embedding module and a two-stage reranking module connected in sequence, and complete the pre-training of the intent classification model.

[0078] When obtaining the intent classification result of the user query statement, the input vector determined according to the user query statement is input into the intent classification model. The one-stage embedding module calculates the similarity between the input vector determined according to the user query statement and the vector representations corresponding to each representative query statement in the intent scenario library, and outputs several intent label texts corresponding to the representative query statements with similarity greater than the second preset threshold as candidate intent label texts, realizing the recall of high-similarity label texts. The candidate intent label texts output by the one-stage embedding module are input into the two-stage re-ranking module. The two-stage embedding module re-ranks the candidate intent label texts in descending or ascending order of similarity, takes the candidate intent label texts with high similarity as the first classification label, and takes the similarity as the first confidence corresponding to the first classification label, realizing the ranking of the user query language and the recalled documents. Finally, the first intent classification result composed of the first classification label and its first confidence is used as the output of the two-stage re-ranking module and also the output of the intent classification model.

[0079] Similarly, when obtaining the intent classification result of the statement paraphrase corresponding to the user query statement, the input vector determined according to the statement paraphrase is input into the intent classification model. The one-stage embedding module calculates the similarity between the input vector determined according to the statement paraphrase and the vector representations corresponding to each representative query statement in the intent scenario library, and outputs several intent label texts corresponding to the representative query statements with similarity greater than the second preset threshold as candidate intent label texts. The candidate intent label texts output by the one-stage embedding module are input into the two-stage re-ranking module. The two-stage embedding module re-ranks the candidate intent label texts, takes the candidate intent label texts with high similarity as the second classification label, and takes the similarity as the second confidence corresponding to the second classification label, realizing the ranking of the user query language and the recalled documents. Finally, the second intent classification result composed of the second classification label and its second confidence is used as the output of the two-stage re-ranking module and also the output of the intent classification model.

[0080] Generally speaking, the two-stage retrieval method consists of a retrieval stage and a re-ranking stage. The separate retrieval stage uses a vector-based dense retrieval method to search for fragments semantically similar to the user query statement by extracting the semantic vectors of the user query statement (user question) and the intent scenario library (knowledge base corpus); since there is no information interaction when extracting the semantic vectors of the user question and the knowledge base corpus, the efficiency is high, but it also limits the upper limit of the semantic retrieval effect. The separate re-ranking stage uses the structure of a cross-encoder, which can realize the information interaction between the user question and the knowledge base corpus, so as to identify more accurate semantic relationships; its algorithm performance upper limit is high, but it needs to extract the semantic relationships between the user question and the knowledge base corpus in real time, and the efficiency is low, and it is impossible to process all the knowledge base corpus in real time. The intent recognition method provided by the present invention can combine the advantages of retrieval and re-ranking by adopting a two-stage retrieval method when performing intent recognition on a user query statement based on an intent scenario library. It can quickly extract intent label texts related to the user's question, place the intent label texts with high similarity at the forefront as much as possible, and filter out low-quality intent label texts at the same time. It can well balance the retrieval effect and efficiency, and greatly improve the application value.

[0081] Based on the above embodiments, as an alternative embodiment, after determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement, it further includes: Cluster the second classification labels in the second intent classification result of the statement paraphrase corresponding to the low-intent query statement to obtain a pseudo-intent label set; the low-intent query statement is a user query statement whose confidence level of the first classification label in the first intent classification result within a preset time period is less than the first preset threshold; the pseudo-intent label set includes several of the second classification labels; Generate an intent description corresponding to the pseudo-intent label set; Use the pseudo-intent label set to update the intent label texts in the intent scenario library; use the intent description corresponding to the pseudo-intent label set to update the prompt words corresponding to the intent label texts in the intent scenario library; the prompt words are used to instruct the user to input a user query statement.

[0082] Among them, the prompt words are used to prompt the user how to better input the text display that is beneficial to intent recognition of the user query statement when the user inputs the user query statement through the UI interface, so as to provide an intuitive and friendly user interaction experience.

[0083] When the confidence level of the first classification label in the first intent classification result is less than the first preset threshold, it indicates that the existing intent classification model, intent scenario library, etc. cannot perform good intent recognition on this user query statement, that is, the intent expressed by the user query statement is a new intent category outside the existing intent categories, and these new intent categories need to be used to update the existing intent classification model, intent scenario library, etc.

[0084] Specifically, the user query statements whose confidence level of the first classification label in the first intent classification result within a preset time period (such as 1 day, 1 week, 14 days, etc.) is less than the first preset threshold are used as low-intent query statements and saved into the low-intent query statement set with unclear intent.

[0085] For each low-intent query statement, cluster the second classification labels in the second intent classification result of the statement paraphrase corresponding to the low-intent query statement obtained during intent recognition to obtain several pseudo-intent label sets , each set of pseudo-intent labels includes several second classification labels with similar semantics . Using the LLM to generate an intent description with specific semantics for each set of pseudo-intent labels .

[0086] Furthermore, the low-intent query statement is used as the representative query statement of the intent scenario record in the intent scenario library. The set of pseudo-intent labels composed of the second classification labels of the low-intent query statement, such as using the LLM to summarize the set of pseudo-intent labels to obtain the pseudo-intent label text, taking the pseudo-intent label text as the intent label text corresponding to the representative query statement, and using the intent description of the set of pseudo-intent labels to update the prompt word corresponding to the intent label text for indicating the user to input the user query statement, thereby completing the update of the intent scenario library and realizing intent discovery.

[0087] The intent recognition method provided by the present invention can automatically identify, expand, and discover new intent categories outside the existing intent categories from user inputs through operations such as clustering, description generation, and intent operation library update for low-intent query statements within a preset time period, thereby enhancing the generalization ability and adaptability of intent recognition, and being able to handle a wider range of user queries and requirements.

[0088] As an optional embodiment, after determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement, it further includes: Display positive feedback options (such as "like") and negative feedback options (such as "dislike") on the UI interface, receive the input of the user clicking the positive feedback option or the negative feedback option, so as to obtain feedback data including but not limited to feedback type (positive feedback or negative feedback), user ID, session ID, intent label, timestamp, etc.; perform data preprocessing on the feedback data, such as data cleaning, outlier exclusion, and abnormal feedback exclusion, and classify the feedback data according to positive feedback and negative feedback; identify possible incorrect intent label texts in the intent scenario library based on the negative feedback data, and re-label the incorrect intent label texts to correct the incorrect intent label texts; dynamically adjust various preset comparison thresholds according to the feedback data and adjust the parameters of relevant models; periodically retrain relevant models using the feedback data. By analyzing user feedback, the function of intent recognition can be further optimized to achieve better intent recognition and intelligent answering effects, and ensure that users obtain a better experience.

[0089] Generally speaking, the intention recognition method provided by the present invention, on the basis of the mainstream intention recognition method, adds the operation of aggregating the sentence paraphrase obtained from the paraphrase of the user's query sentence and the classification labels in the intention classification results of the user's query sentence and its sentence paraphrase. That is, through "paraphrasing - aggregation", the semantic understanding ability of the LLM is utilized, fully considering multiple dimensions of the user input, thereby greatly improving the accuracy of intention recognition; by collecting user inputs with unclear intention recognition in the system, clustering and analyzing them, and using the LLM to automatically generate new intention classifications and intention introductions, the function of automatic discovery of new intentions is realized, further enhancing the expandability and intelligence of the system; by collecting and analyzing the user's feedback data and optimizing intention recognition accordingly, the intention recognition can be made more in line with the user's usage habits and the user experience can be improved.

[0090] Figure 3 is a structural schematic diagram of the intention recognition device provided by the present invention, as Figure 3 shown, the intention recognition device includes but is not limited to an identification module 301.

[0091] The identification module 301 is used to determine the target intention of the user's query sentence based on the first intention classification result of the user's query sentence and the second intention classification result of the sentence paraphrase corresponding to the user's query sentence.

[0092] The sentence paraphrase is output by the sentence paraphrase model after the user's query sentence is input into the sentence paraphrase model.

[0093] It should be noted that the intention recognition device provided by the present invention, during specific operation, can execute the intention recognition method described in any of the above embodiments, and this embodiment will not be elaborated herein.

[0094] The intention recognition device provided by the present invention, when performing intention recognition on the user's query sentence, additionally performs paraphrasing processing on the user's query sentence to obtain the corresponding sentence paraphrase, mines the multi - layer semantics of the user input, and simultaneously considers the intention classification results of the user's query sentence and its sentence paraphrase to jointly determine the final target intention of the user's query sentence. In scenarios such as dealing with complex queries, multi - intention problems, and deep semantic understanding, whether using the LLM for intention recognition or based on the intention scenario library for intention recognition, it can reduce intention classification errors, improve the accuracy of intention recognition, and ultimately improve the accuracy and user experience of subsequent operations such as intelligent question - answering.

[0095] As an optional embodiment, the intention recognition device further includes an intention discovery module.

[0096] The intention discovery module is used to cluster the second classification labels in the second intention classification result of the statement paraphrase corresponding to the low-intention query statement to obtain a pseudo-intention label set; the low-intention query statement is a user query statement with a confidence level of the first classification label in the first intention classification result within a preset time period being less than the first preset threshold; the pseudo-intention label set includes a number of the second classification labels; generate an intention description corresponding to the pseudo-intention label set; use the pseudo-intention label set to update the intention label text in the intention scenario library; use the intention description corresponding to the pseudo-intention label set to update the prompt word corresponding to the intention label text in the intention scenario library; the prompt word is used to instruct the user to input a user query statement.

[0097] Figure 4 is a schematic structural diagram of the electronic device provided by the present invention, as Figure 4 shown, the electronic device may include: a processor (Processor) 410, a communication interface (Communications Interface) 420, a memory (Memory) 430, and a communication bus 440. Among them, the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440. The processor 410 can call the logical instructions in the memory 430 to execute the intention recognition method provided in any of the above embodiments. The intention recognition method includes but is not limited to the following steps: determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement; the statement paraphrase is output by the statement paraphrase model after inputting the user query statement into the statement paraphrase model.

[0098] In addition, when the logical instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disc that can store program codes.

[0099] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the intent recognition method provided in any of the above embodiments. The intent recognition method includes but is not limited to the following steps: determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement; the statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

[0100] In another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the intent recognition method provided in any of the above embodiments. The intent recognition method includes but is not limited to the following steps: determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement; the statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

[0101] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0102] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An intention recognition method, characterized in that, Including: Determine the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement; The statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

2. The intention recognition method according to claim 1, wherein The first intent classification result includes a first classification label and its corresponding first confidence level; the second intent classification result includes a second classification label and its corresponding second confidence level; The determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement includes: Merge the same labels in the first classification label and the second classification label to obtain each candidate classification label, and determine the confidence levels corresponding to each candidate classification label according to the first confidence level corresponding to the first classification label and the second confidence level corresponding to the second classification label; For each candidate classification label, determine the weight value of each candidate classification label according to the confidence levels of each candidate classification label to determine the weight values of each candidate classification label; Based on the candidate classification label with the highest weight value, determine the target intent of the user query statement.

3. The intention recognition method according to claim 2, characterized in that The determining the weight value of each candidate classification label according to the confidence levels of each candidate classification label includes: When the confidence levels of each candidate classification label include the first confidence level, perform an increment operation on the first confidence level, and determine the weight value of each candidate classification label according to the confidence levels including the incremented first confidence level.

4. The intention recognition method according to claim 1, characterized in that, The determining the target intent of the user query statement based on the first intent classification result of the user query statement and the second intent classification result of the statement paraphrase corresponding to the user query statement includes: Input the user query statement into the intent classification model to obtain the first intent classification result output by the intent classification model; When the confidence level corresponding to the first classification label in the first intent classification result is less than the first preset threshold, input the user query statement into the statement paraphrase model to obtain the statement paraphrase output by the statement paraphrase model; Input the statement paraphrase into the intent classification model to obtain the second intent classification result output by the intent classification model; Based on the first intent classification result and the second intent classification result, determine the target intent.

5. The intention recognition method according to claim 4, wherein The intent classification model includes a first-stage embedding module and a second-stage re-ranking module connected in sequence; The first-stage embedding module is used to determine candidate intent label texts with a similarity greater than a second preset threshold to the input vector from the intent scenario library; the second-stage re-ranking module is used to re-rank the candidate intent label texts according to the similarity between the candidate intent label texts and the input vector of the intent classification model, and output an intent classification result.

6. The intention recognition method according to claim 4, characterized in that After determining the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement, the following steps are further included: Clustering the second classification labels in the second intention classification result of the statement paraphrase corresponding to the low-intention query statement to obtain a pseudo-intention label set; the low-intention query statement is a user query statement in which the confidence level of the first classification label in the first intention classification result within a preset time period is less than the first preset threshold; the pseudo-intention label set includes a plurality of the second classification labels; Generating an intention description corresponding to the pseudo-intention label set; Using the pseudo-intention label set to update the intention label text in the intention scenario library; using the intention description corresponding to the pseudo-intention label set to update the prompt word corresponding to the intention label text in the intention scenario library; the prompt word is used to instruct the user to input a user query statement.

7. An intention recognition device, characterized in that, Including: An identification module, configured to determine the target intention of the user query statement based on the first intention classification result of the user query statement and the second intention classification result of the statement paraphrase corresponding to the user query statement; The statement paraphrase is output by the statement paraphrase model after the user query statement is input into the statement paraphrase model.

8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and running on the processor, wherein, When the processor executes the computer program, the intention recognition method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the intention recognition method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, the intention recognition method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Natural language processing method, electronic device and computer program product

    CN121705390A