Intention recognition method, apparatus, device, medium, and product

By combining multiple intent recognition modules and cross-module scoring, the problem of low intent recognition accuracy of a single model under complex user input is solved, achieving higher intent recognition accuracy and precision.

CN119830922BActive Publication Date: 2026-04-28ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2025-01-07
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

A single large language model has low intent recognition accuracy when dealing with diverse and complex user input.

Method used

Multiple intent recognition modules are used to recognize the dialogue text separately, leveraging the advantages of different intent recognition methods. The target intent is determined through cross-module scoring, and a comprehensive score is obtained by combining the weights of the intent recognition modules.

Benefits of technology

It improves the accuracy and precision of intent recognition, and enhances the ability to understand complex user input through multi-module scoring and weight adjustment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119830922B_ABST
    Figure CN119830922B_ABST
Patent Text Reader

Abstract

The application discloses an intention recognition method, device, equipment, medium and product. The method comprises the following steps: obtaining dialogue text; performing intention recognition on the dialogue text by using a plurality of pre-obtained intention recognition modules respectively, to obtain candidate intentions output by each intention recognition module, wherein the intention recognition modules are different from each other; performing cross-module scoring on the candidate intentions output by each intention recognition module, to obtain a target intention of the dialogue text, wherein the cross-module scoring is used for scoring each candidate intention according to the weight of each intention recognition module. In the above method, the dialogue text is recognized by using a plurality of intention recognition modules respectively, so that the advantages of different intention recognition modes can be combined, and the accuracy of intention recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of artificial intelligence technology, and in particular relates to an intent recognition method, device, equipment, medium and product. Background Technology

[0002] With the rapid development of artificial intelligence technology, natural language processing has been widely applied in various fields, especially in user intent recognition, where large language models (such as ChatGPT) have demonstrated powerful capabilities. However, a single large model may suffer from low accuracy in intent recognition when dealing with diverse and complex user inputs. Summary of the Invention

[0003] This application provides an intent recognition method, apparatus, device, medium, and product that can improve the accuracy of intent recognition.

[0004] In a first aspect, embodiments of this application provide an intent recognition method, the method comprising:

[0005] Get the dialogue text;

[0006] Multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text to obtain candidate intents output by each intent recognition module, wherein each intent recognition module uses a different intent recognition method;

[0007] The target intent of the dialogue text is obtained by performing cross-module scoring on the candidate intents output by each intent recognition module. The cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module.

[0008] Secondly, embodiments of this application provide an intent recognition device, the device comprising:

[0009] The acquisition module is used to acquire the dialogue text;

[0010] The first recognition module is used to perform intent recognition on the dialogue text using multiple pre-acquired intent recognition modules respectively, and obtain the candidate intent output by each intent recognition module, wherein each intent recognition module uses a different intent recognition method;

[0011] The second recognition module is used to perform cross-module scoring on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text. The cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module.

[0012] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory storing computer program instructions;

[0013] When the processor executes the computer program instructions, it implements the intent recognition method as described in the first aspect.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the intent recognition method as described in the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform the intent recognition method as described in the first aspect.

[0016] In this embodiment, dialogue text is acquired; multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text, respectively, to obtain candidate intents output by each intent recognition module. Each intent recognition module employs a different intent recognition method. Cross-module scoring is performed on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text. The cross-module scoring is used to score each candidate intent based on the weight of each intent recognition module. By using multiple intent recognition modules to perform intent recognition on the dialogue text, the advantages of different intent recognition methods can be combined, improving the accuracy of intent recognition. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the intent recognition method provided in an embodiment of this application;

[0019] Figure 2a This is another schematic flowchart of the intent recognition method provided in the embodiments of this application;

[0020] Figure 2b This is a schematic diagram illustrating the implementation process of the rule matching module provided in an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of the intent classification device provided in the embodiments of this application;

[0022] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0023] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0024] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0025] In all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. Additionally, when embodiments of this application require access to sensitive personal information, separate permission or consent from the user is obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments obtained.

[0026] To address the problems of the prior art, embodiments of this application provide an intent recognition method, apparatus, device, medium, and product. The intent recognition method provided in this application embodiment will be described first below.

[0027] Figure 1 A flowchart illustrating an embodiment of the intent recognition method provided in this application is shown. Figure 1 As shown, the intent recognition method provided in this application embodiment is applied to an electronic device and includes the following steps 101-103, wherein:

[0028] Step 101: Obtain the dialogue text.

[0029] The dialogue text can refer to text entered by the user, such as "I want to buy a mobile phone" or "How is the weather today?", without limitation.

[0030] Step 102: The dialogue text is subjected to intent recognition by multiple pre-acquired intent recognition modules to obtain the candidate intent output by each intent recognition module. Each intent recognition module uses a different intent recognition method.

[0031] The intent recognition modules are pre-configured. There are multiple intent recognition modules, each employing a different intent recognition method. For example, with two intent recognition modules, one might use keyword matching, while the other might use regular expressions. Alternatively, the intent recognition modules could be implemented using a Few-Shot model or based on similarity matching; no specific limitations are specified here.

[0032] Step 103: Perform cross-module scoring on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text. The cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module.

[0033] The candidate intents output by each intent recognition module are scored according to the weight of each intent recognition module. The higher the weight of an intent recognition module, the higher the score of the candidate intent output by that module. For example, if two intent recognition modules output the same candidate intent, the score corresponding to that candidate intent can be the sum of the weights of the two intent recognition modules. For example, the candidate intent with the highest score can be taken as the target intent.

[0034] It should be noted that the sum of the weights of each intent recognition module is 1.

[0035] In this embodiment, dialogue text is acquired; multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text respectively, obtaining candidate intents output by each intent recognition module, wherein each intent recognition module uses a different intent recognition method; cross-module scoring is performed on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text, wherein the cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module. In the above, by using multiple intent recognition modules to perform intent recognition on the dialogue text respectively, the advantages of different intent recognition methods can be combined to improve the accuracy of intent recognition.

[0036] In one embodiment of this application, multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text respectively, obtaining candidate intents output by each intent recognition module, including:

[0037] Multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text, respectively, to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent. The first score of the candidate intent output by the intent recognition module is determined according to the weight of the intent recognition module.

[0038] The target intent of the dialogue text is obtained by performing cross-module scoring on the candidate intents output by each intent recognition module, including:

[0039] Based on the weight of each intent recognition module and the first score of the candidate intent, a cross-module score is performed on the candidate intent output by each intent recognition module to obtain a second score for each candidate intent;

[0040] The target intent of the dialogue text is determined based on a second score for each candidate intent.

[0041] In this embodiment, the intent recognition module outputs a first score for each candidate intent along with the candidate intent itself. This first score is obtained by the intent recognition module internally evaluating the candidate intent. Based on the weights of the intent recognition modules and the first score of the candidate intent, a second score can be obtained by cross-module scoring of the candidate intent. For example, if there are three intent recognition modules with weights of 0.5, 0.3, and 0.2 respectively, the module outputs will be candidate intents... Figure 1 (First score 0.2), Candidate Intent 2 (First score 0.5), Candidate Intent Figure 1 (If the first score is 0.3), then when performing cross-module scoring, the candidate intention is calculated. Figure 1 The second score is: 0.5 × 0.2 + 0.2 × 0.3 = 0.16; the second score for candidate intent 2 is: 0.15. After calculating the second score for each candidate intent, an intent can be selected as the target intent based on the second score. For example, the candidate intent with the highest second score can be selected as the target intent.

[0042] In this embodiment, based on the weight of each intent recognition module and the first score of the candidate intent, a cross-module score is performed on the candidate intent output by each intent recognition module to obtain a second score for each candidate intent; based on the second score of each candidate intent, the target intent of the dialogue text is determined. By performing intent recognition on the dialogue text by multiple intent recognition modules respectively, the advantages of different intent recognition methods can be combined, and the target intent can be determined based on the score of the candidate intent, which can improve the accuracy of intent recognition.

[0043] In another embodiment of this application, the step of using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text, and obtaining a candidate intent output by each intent recognition module and a first score of the candidate intent, includes:

[0044] The dialogue text is generalized to obtain multiple generalized texts;

[0045] For each of the intent recognition modules, the following processing is performed:

[0046] The intent recognition module is used to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent;

[0047] Based on the confidence level of the initial intent corresponding to each of the generalized texts, candidate intents output by the intent recognition module and the first score of the candidate intents are selected from the obtained initial intents.

[0048] In this embodiment, the dialogue text is generalized to obtain multiple generalized texts. Each intent recognition module performs intent recognition on each generalized text. Specifically, the intent recognition module performs intent recognition on each generalized text to obtain the initial intent corresponding to each generalized text and its confidence level. The higher the confidence level of the initial intent, the greater the likelihood that the initial intent is the true intent of the dialogue text. For example, after obtaining the confidence level of the initial intent corresponding to each generalized text, the initial intent corresponding to the highest confidence level can be selected as the candidate intent output by the intent recognition module, and this confidence level can be used as the first score of the candidate intent. Other methods can also be used to determine this, which are not limited here.

[0049] In this embodiment, the dialogue text is generalized to obtain multiple generalized texts. Generalization can support the understanding of the complexity of human language expression. Multiple generalized texts can express different intentions. By performing intention recognition on multiple generalized texts and selecting the intention of the dialogue text from them, the accuracy of the candidate intentions output by the intention recognition module is higher.

[0050] In another embodiment of this application, the step of selecting candidate intents output by the intent recognition module and a first score of the candidate intents from the obtained initial intents based on the confidence level of the initial intent corresponding to each of the generalized texts includes:

[0051] The initial intents corresponding to the multiple generalized texts are grouped to obtain multiple first groups, and the initial intents with the same intent belong to the same group;

[0052] For each of the first groups, the following steps are performed: calculate the first score of the initial intent corresponding to the first group based on the confidence level of each initial intent in the first group and the weight of the intent recognition module;

[0053] The initial intent with the highest first score is taken as the candidate intent output by the intent recognition module, and the highest first score is taken as the first score of the candidate intent.

[0054] In the above, the initial intents corresponding to multiple generalized texts may be the same. The same initial intent belongs to one initial intent. The initial intents corresponding to multiple generalized texts are grouped to obtain multiple first groups. The same initial intent is assigned to the same group. The first score of the initial intent corresponding to each first group is calculated. For example, if the weight of the intent recognition module is 0.2, corresponding to two first groups, the first first group has two first initial intents with confidence levels of 0.5 and 0.2 respectively. Then the first score of the first initial intent is a weighted calculation of 0.5×0.2+0.2×0.2=0.14. The second first group has one second initial intent with a confidence level of 0.8. Then the first score of the second initial intent is a weighted calculation of 0.8×0.2=0.16. The second initial intent is used as the candidate intent output by the intent recognition module, and 0.16 is the first score of the candidate intent.

[0055] In this embodiment, the initial intents corresponding to multiple generalized texts are grouped to obtain multiple first groups, with initial intents having the same intent belonging to the same group. For each first group, the following steps are performed: a first score for the initial intent corresponding to the first group is calculated based on the confidence level of each initial intent in the first group and the weight of the intent recognition module; the initial intent with the highest first score is selected as a candidate intent output by the intent recognition module, and the highest first score is used as the first score of the candidate intent. By performing intra-module scoring on the initial intents identified by the intent recognition module through the above process, obtaining a first score for each initial intent, and using the initial intent with the highest first score as a candidate intent output by the intent recognition module, the accuracy of the intents output by the intent recognition module can be improved.

[0056] In another embodiment of this application, the step of performing cross-module scoring on the candidate intents output by each intent recognition module based on the weight of each intent recognition module and the first score of the candidate intent to obtain a second score for each candidate intent includes:

[0057] The candidate intents output by the multiple intent recognition modules are grouped to obtain multiple second groups, and candidate intents with the same intent belong to the same group;

[0058] For each of the second groups, perform the following: calculate the second score of the candidate intent corresponding to each of the second groups by weighting the first score of each candidate intent in the second group and the weight of the intent recognition module corresponding to the candidate intent.

[0059] Specifically, cross-module voting is performed on the candidate intents output by the intent recognition module to obtain a second score for each candidate intent corresponding to a second group. Identical candidate intents are grouped together, and the second score for each candidate intent corresponding to a second group is calculated. For example, if there are two second groups, and the first second group contains two first candidate intents with confidence levels of 0.16 and 0.2 respectively, and the corresponding weights of the intent recognition module are 0.2 and 0.3 respectively, then the second score for the first candidate intent is 0.16 × 0.2 + 0.2 × 0.3 = 0.092; and the second second group contains one second candidate intent with a confidence level of 0.25 and a corresponding weight of 0.5, then the second score for the second candidate intent is 0.25 × 0.5 = 0.125. Furthermore, the second candidate intents can be used as candidate intents output by the intent recognition module.

[0060] In this embodiment, the candidate intents output by the intent recognition module are scored across modules through the above process to obtain a second score corresponding to each candidate intent. Subsequently, the target intent of the dialogue text can be determined based on the second score of the candidate intent, which can improve the accuracy of intent recognition.

[0061] In another embodiment of this application, determining the target intent of the dialogue text based on a second score for each candidate intent includes:

[0062] The second scores of the candidate intentions are sorted from largest to smallest to obtain the sorting results;

[0063] If the difference between the first second score and the second second score in the sorting results is greater than or equal to a preset threshold, then the candidate intent corresponding to the first second score is taken as the target intent of the dialogue text.

[0064] If the difference between the first second score and the second second score is less than a preset threshold, then the weight of each intent recognition module is adjusted, and the process jumps to the step of using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text respectively, and obtaining the candidate intent output by each intent recognition module and the first score of the candidate intent.

[0065] Specifically, the preset threshold can be set according to the actual situation, and is not limited here. For example, the preset threshold can be 0.01 or 0.02, etc. If the difference between the two second scores ranked first in the sorting results is greater than or equal to the preset threshold, it means that the two candidate intents are likely to be the target intents, and the candidate intent corresponding to the first second score is more likely to be the target intent. In this case, the candidate intent corresponding to the second score ranked first is taken as the target intent of the dialogue text.

[0066] If the difference between the first second score and the second second score is less than a preset threshold, it indicates that the second scores of the two candidate intents ranked first are relatively close, and the probability that these two candidate intents are the target intent is not much different. In order to make the target intent more accurate, the weight of each intent recognition module can be dynamically adjusted using preset rules, and then the intent recognition of the dialogue text can be performed again. That is, the step of using multiple pre-acquired intent recognition modules to perform intent recognition of the dialogue text is executed again to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent, thereby improving the accuracy of intent recognition.

[0067] It should be noted that, if the difference between the first second score and the second second score is less than a preset threshold, the weight of each intent recognition module is adjusted, and the step of using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text again to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent is executed; alternatively, if the difference between the first second score and the second second score is less than a preset threshold, the weight of each intent recognition module is adjusted, and the candidate intent output by the intent recognition module and the first score of the candidate intent are selected from the obtained initial intents based on the confidence level of the initial intent corresponding to each generalized text. The difference between the two is that the former requires the intent recognition modules to perform intent recognition on the dialogue text again, while the latter does not require intent recognition again, but directly uses the confidence level of the initial intent obtained from the first recognition and the weight of the intent recognition module to calculate the first score.

[0068] In another embodiment of this application, if the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then adjusting the weight of each intent recognition module includes:

[0069] If the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then the weight of each intent recognition module is adjusted according to at least one of the following:

[0070] The accuracy of intent recognition by each of the intent recognition modules in the first historical time period;

[0071] The degree of fit between the intent predicted by each intent recognition module in the second historical time period and the context of the dialogue text;

[0072] The preset priority of each of the intent recognition modules.

[0073] In the above, the first historical time period and the second historical time period can be the same or different, and there is no limitation here. The first historical time period and the second historical time period can be the most recent week, the most recent month, etc., and can be set according to the actual situation. The higher the accuracy of the intent recognition module in recognizing intent in the first historical time period, the greater the weight added to the intent recognition module. For example, the correspondence between accuracy and weight can be preset. For example, if the accuracy is 0.1, the weight increases by 0.1; if the accuracy is 0.2, the weight increases by 0.2, and so on. The correspondence between accuracy and the weight of the intent recognition module can also be set in other ways, and there is no limitation here.

[0074] The higher the fit between the intent predicted by the intent recognition module in the second historical time period and the context of the dialogue text, the greater the weight of the intent recognition module. That is, if the context of the dialogue text determines the dialogue scenario, and the intent recognition module has a higher accuracy rate in predicting the intent within that dialogue scenario in the second historical time period, then the weight of that intent recognition module increases. For example, if the dialogue scenario is determined to be a shopping scenario based on the context of the dialogue text, and the intent recognition module using similarity matching has a higher accuracy rate in predicting the intent within the shopping scenario in the second historical time period, then the weight of that intent recognition module increases.

[0075] The higher the priority of the intent recognition module, the greater the increase in weight. The priority of the intent recognition module can be preset. For example, in a new domain, the priority of the Few-Shot intent recognition module can be set higher, or the priority of the intent recognition module with excellent historical performance can be set higher. The priority of the intent recognition module can also be dynamically adjusted. For example, the more times the candidate intent output by the intent recognition module becomes the target intent in the third historical time period, the higher the priority of the intent recognition module will be adjusted. The third historical time period can be set according to the actual situation. For example, if the priority of the intent recognition module is 1, the weight of the intent recognition module increases by 0.1; if the priority of the intent recognition module is 2 (the higher the priority, the higher the weight), the weight of the intent recognition module increases by 0.2. Other methods of adjusting weight based on priority can also be used, which are not limited here.

[0076] It should be noted that after adjusting the weight of each intent recognition module, the weight of each intent recognition module also needs to be normalized so that the sum of the weights of all intent recognition modules is 1.

[0077] In this embodiment, the weights of the intent recognition module can be dynamically adjusted in the manner described above to improve the accuracy of finally determining the target intent.

[0078] In another embodiment of this application, the step of using the intent recognition module to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent includes:

[0079] If the intent recognition module includes a first recognition submodule and a second recognition submodule, then for each generalized text, the following processing is performed:

[0080] The first identification submodule is used to perform intent recognition on the generalized text to obtain a first initial intent corresponding to the generalized text, and the second identification submodule is used to perform intent recognition on the generalized text to obtain a second initial intent corresponding to the generalized text. In this case, one of the first identification submodule and the second identification submodule performs intent recognition based on keywords, and the other performs intent recognition based on regular expressions.

[0081] If the first initial intent and the second initial intent are the same, then the first initial intent or the second initial intent shall be taken as the initial intent corresponding to the generalized text;

[0082] If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is greater than the first difference threshold, then the first initial intent is taken as the initial intent corresponding to the generalized text.

[0083] If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is less than or equal to the first difference threshold, then based on the user's historical behavior information, the first initial intent or the second initial intent is determined to be the initial intent corresponding to the generalized text, and the user is the user who provided the dialogue text.

[0084] The implementation principle of the keyword-based intent recognition submodule described above includes:

[0085] 1. Keyword library construction: Build a keyword library related to the field, with each keyword corresponding to one or more intents.

[0086] 2. Keyword extraction: Segment the input generalized text and extract the keywords.

[0087] 3. Keyword matching: The extracted keywords are compared with those in the keyword database to find matching keywords and their corresponding intents.

[0088] 4. Intent Determination: Determine the intent of the generalized text based on the matched keywords.

[0089] The implementation principle of the intent recognition submodule based on regular expressions includes:

[0090] 1. Pattern library construction: Common query patterns are defined using regular expressions, with each pattern corresponding to an intent.

[0091] 2. Pattern Extraction: Perform pattern matching on the input generalized text to extract text information that matches the pattern.

[0092] 3. Pattern matching: The extracted patterns are compared with those in the pattern library to find matching patterns and their corresponding intents.

[0093] For example, the pattern library:

[0094] "I want to buy.*" corresponds to the intent "to buy";

[0095] The meaning of “help me find.*” is “search”.

[0096] Generalized text: "I want to buy a mobile phone" Matching pattern: "I want to buy.*", Extraction pattern: "I want to buy a mobile phone", Matching result: Intent is "buy".

[0097] In this embodiment, one of the first identification submodule and the second identification submodule performs intent recognition based on keywords, while the other performs intent recognition based on regular expressions. When the first initial intent and the second initial intent are different (a conflict occurs), if the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is greater than a first difference threshold (the first difference threshold can be set according to the actual situation and is not limited here), it indicates that the confidence levels of the first initial intent and the second initial intent differ significantly, and the first initial intent is taken as the initial intent corresponding to the generalized text. If the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is less than or equal to the first difference threshold, it indicates that the confidence levels of the first initial intent and the second initial intent differ slightly, and based on the user's historical behavior information, the first initial intent or the second initial intent is determined to be the initial intent corresponding to the generalized text, where the user is the user who provided the dialogue text.

[0098] In this embodiment, processing the various cases of the first initial intent and the second initial intent separately can improve the accuracy of the intent recognition module in determining the initial intent corresponding to the generalized text.

[0099] In the above, determining the first initial intent or the second initial intent as the initial intent corresponding to the generalized text based on the user's historical behavior information includes:

[0100] The historical behavior information is obtained, which includes at least one of the following: the user's historical dialogue information, the context information of the dialogue text, the importance of keywords, and the user's preferences.

[0101] The weights of the first initial intention and the second initial intention are determined based on the historical behavior information.

[0102] The initial intent with the largest weight is selected from the first initial intent and the second initial intent, and is used as the initial intent corresponding to the generalized text.

[0103] For example, if the intent determined based on historical dialogue information is the same as the first initial intent, for example, if the user makes multiple inquiries within the fourth historical time period and the first initial intent is to make an inquiry, then the intent determined based on historical dialogue information is considered to be the same as the first initial intent, and the weight of the first initial intent is increased.

[0104] If the intent determined based on the context information of the dialogue text is the same as the first initial intent, then increase the weight of the first initial intent;

[0105] If the generalized text includes the target keyword, and the first identification submodule is an identification submodule that performs intent recognition based on keywords, and the target keyword is a keyword in the keyword library of the first identification submodule, then the weight of the first initial intent output by the first identification submodule is increased.

[0106] For example, if users prefer to express their intent by asking questions directly, and the first identification submodule is an intent identification submodule based on keywords, then the weight of the first initial intent output by the first identification submodule will be increased.

[0107] In this embodiment, when there is a conflict between the first initial intent and the second initial intent, the user's historical behavior information is used to determine whether the first initial intent or the second initial intent is the initial intent corresponding to the generalized text, which can improve the accuracy of the intent recognition module in determining the initial intent corresponding to the generalized text.

[0108] The following uses three intent recognition modules as examples to illustrate the intent recognition method provided in this application. The three intent recognition modules are: a rule matching module, a similarity matching module, and a Few-Shot large model module. The rule matching module includes a keyword matching submodule and a pattern matching submodule. The keyword matching submodule is an intent recognition submodule that matches based on keywords, and the pattern matching submodule is an intent recognition submodule that matches based on regular expressions. The similarity matching module is an intent recognition module that matches based on similarity, and the Few-Shot large model module is an intent recognition module that performs intent recognition through Few-Shot learning.

[0109] Specifically, 1. Rule matching module:

[0110] Input: generalized text;

[0111] Output: Intent results obtained through keyword and pattern matching;

[0112] Function: Identify keywords and patterns in generalized text to determine intent.

[0113] 2. Similarity matching module:

[0114] Input: Generalized text.

[0115] Output: The intent result obtained through similarity calculation.

[0116] Function: Calculates the similarity between generalized text and historical generalized text using Word2Vec to retrieve similar intents.

[0117] The implementation process of the similarity matching module includes:

[0118] Query vectorization: Converts generalized text and preset text from the preset matching library into vector representations.

[0119] Similarity calculation: Calculate the similarity between the vector of the generalized text and the vector of the preset text in the matching library, and select the preset texts with the highest similarity.

[0120] Results retrieval: Based on similarity, select the top k most similar preset texts and their corresponding intents.

[0121] The generalized text is Q, and the preset text in the matching library is D = {d1, d2, ..., dn}. The vector representations of the generalized text and the preset text are as follows: and Calculate cosine similarity:

[0122]

[0123] 3. Few-Shot large model module:

[0124] Input: Generalized text.

[0125] Output: The intent result obtained through Few-Shot learning.

[0126] Functionality: Guide large models to perform intent recognition using a small number of examples, adapting to new domains and tasks.

[0127] The implementation process of the Few-Shot large model module includes:

[0128] 1. Configure prompt word templates: Design prompt word templates containing a small number of examples to guide the large model in intent judgment.

[0129] 2. Model Inference: Inference is performed using prompt word templates and generalized text to generate intent prediction results.

[0130] 3. Result Evaluation: Evaluate the intent of the model output and adjust the prompt word template to optimize the results.

[0131] The specific implementation process includes:

[0132] 1. Example selection: Select a small number of high-quality examples for each intent from the training dataset to build a few-shot cue word template.

[0133] 2. Prompt word construction: Combine examples with generalized text (i.e., queries) to build a complete large model for prompt word input.

[0134] 3. Model Inference: Use a large model (such as GPT-3) to process the prompt words and generate intent prediction results.

[0135] 4. Feedback Optimization: Adjust and optimize the prompt word template based on the accuracy of the model output.

[0136] For example: Set the prompt word template as follows:

[0137] {

[0138] Example 1: User: "I want to buy a mobile phone" Model predicts intent: Buy a mobile phone

[0139] Example 2: User: "Help me find a restaurant" Model predicts intent: Find a restaurant

[0140] User: "{query}"

[0141] Model prediction:

[0142] }

[0143] The model output for the query "I need a new phone" is: Buy a phone.

[0144] Figure 2a The diagram shown is a flowchart illustrating an intent recognition method provided in an embodiment of this application. Figure 2a As shown, the intent recognition method includes the following steps:

[0145] Step 201, obtain the dialogue text;

[0146] Step 202: Use a Large Language Model (LLM) to generalize the dialogue text to obtain multiple generalized texts;

[0147] Step 203: Use multiple intent recognition modules to perform intent recognition on each dialogue text to obtain the candidate intent output by each intent recognition module;

[0148] Step 204: The candidate intents output by each intent recognition module are voted on using a voting selection module. Specifically:

[0149] Voting selection module:

[0150] Input: The intent results of three modules: rule matching module, similarity matching module, and Few-Shot large model module.

[0151] Output: The final determined user intent (i.e., the target intent).

[0152] Function: Voting is conducted on the results from the three modules to select the result that best reflects the user's intent.

[0153] As described above, the rule matching module includes a keyword matching submodule and a pattern matching submodule, where, for example... Figure 2b As shown, the implementation process of the rule matching module includes:

[0154] Keyword library construction: Build a keyword library related to the domain, with each keyword corresponding to one or more intents.

[0155] Keyword extraction: Segment the generalized text and extract the keywords.

[0156] Keyword matching: The extracted keywords are compared with the keyword database to find matching keywords and their corresponding intents.

[0157] Keyword matching result 1: Determine the user's intent based on the matched keywords.

[0158] Let the keyword database be K = {k1, k2, ..., kn}, and the intent corresponding to each keyword ki be Ii. The user input query is Q, and the extracted keyword set is Qk = {q1, q2, ..., qm}.

[0159] The keyword matching process is as follows: Match(Qk,K)={Ij|qi∈Qk,qi=kj,kj∈K}

[0160] The implementation process of the pattern matching submodule includes:

[0161] Build a pattern library: Define common query patterns using regular expressions, with each pattern corresponding to an intent.

[0162] Pattern extraction: Perform pattern matching on generalized text to extract information that matches the pattern.

[0163] Pattern matching result 2: The extracted patterns are compared with the pattern library to find the matching patterns and their corresponding intentions.

[0164] For example: the pattern library includes:

[0165] "I want to buy.*" corresponds to the intent "to buy";

[0166] The meaning of “help me find.*” is “search”.

[0167] Generalized text: "I want to buy a mobile phone" Matching pattern: "I want to buy.*" Extraction pattern: "I want to buy a mobile phone" Matching result: Intent is "buy".

[0168] Determine if there is a conflict between the intent results obtained from keyword matching and pattern matching. If not, obtain the final intent result. If so, introduce the context and perform iterative analysis to determine the final intent, where:

[0169] Contextual analysis includes: based on the contextual information of the generalized text, such as historical text and conversation context.

[0170] Iterative analysis: Make decisions based on contextual information and select the intent that best fits the current context.

[0171] For example, the historical text is "I want to buy a mobile phone," while the generalized text is "Let me look for a tablet."

[0172] Based on the context, the intention is "to buy a tablet" rather than "to find a tablet".

[0173] The following example illustrates how to handle intent conflicts between keyword matching and pattern matching:

[0174] A conflict can be identified when the intents obtained through keyword matching and pattern matching are inconsistent in the following ways:

[0175] (1) Inconsistent intent classification: Keyword matching and pattern matching results belong to different intent categories. For example, keyword matching identifies the intent as "purchase", while pattern matching identifies the intent as "consult".

[0176] (2) Significant differences in intent weights: The confidence (or similarity) of the two matching results are close, but it is impossible to determine which one is better.

[0177] To determine the final intent based on contextual analysis in conflict situations, multiple dimensions of data, such as historical dialogues, session context, and user behavior, can be combined to identify higher-priority intent outcomes.

[0178] 1. Context weight assignment: Define a context weight table, as shown in Table 1, and dynamically adjust the weight of each intent category based on the user's historical dialogue records, the contextual intent of the current dialogue, and behavioral patterns in historical data.

[0179] Table 1

[0180]

[0181] For example, if a user has a history of multiple instances of "purchase" intent, and the current conversation involves product-related terms (such as "phone" or "computer"), then the weight of the "purchase" intent is increased.

[0182] For example, if a user has asked "buy a phone" multiple times in the past week, and the current query (i.e., the generalized text) "help me find a smartphone" contains the keyword "phone," then the context weight can be determined by referring to historical context. Figure 1 The system dynamically adjusts parameters based on consistency, keyword importance, etc. The assignment rules are as follows:

[0183] Historical significance Figure 1 Consistency: Since the user's previous queries all pointed to "purchase", the weight of "purchase" in the current intent is increased by 0.2.

[0184] Keyword importance: If the current query contains the keyword "mobile phone", the importance of this keyword in this field is assigned a weight of 0.3.

[0185] User preferences: Users tend to express their intent by asking direct questions, so keyword matching results should be given priority.

[0186] According to the context weight table, the overall weight is: Total weight = 0.2 + 0.3 + 0.15 = 0.65;

[0187] 2. Time Series Analysis: This involves time-series modeling of users' historical intent and behavior to determine trends at specific points in time. For example, if a user repeatedly searches for the same category of products or has the same intent within a specific time period, time series analysis can be used to confirm whether this behavior aligns with user habits. For instance, a time series model (such as LSTM) can be used to combine user query behavior across different time periods to determine current intent.

[0188] 3. Conflict decision-making algorithm (based on a rule base for initial evaluation; context analysis is performed if the rule base is not activated):

[0189] Define priority rules for conflicting intents. Assign higher weights to intents that appear more frequently in the current context or historical behavior.

[0190] Using a dynamic weighted algorithm: Let Ik be the confidence level of the intent obtained from keyword matching, Im be the intent obtained from pattern matching, and Wk and Wm be the weights of the intents given after context analysis. The final confidence level of the intent If is obtained by weighting: When Wk > Wm, the keyword matching result is selected first; otherwise, the pattern matching result is selected.

[0191] By generalizing using LLM, n similar generalized texts are obtained. Each generalized text will yield multiple intent results. These intent results can be scored across modules (which can also be called cross-module voting) to finally determine the result that best matches the user's true intent (i.e., the target intent).

[0192] 1. Preliminary voting within the module:

[0193] Input processing: n generalized texts generate several intent candidate results in the rule matching module, similarity matching module, and Few-Shot large model module, respectively.

[0194] Preliminary voting mechanism: The candidate intent results within each module are voted on using a weighted voting mechanism within the module. A comprehensive score is calculated based on the module's confidence level, the confidence level of the output intent, and contextual relevance. The intent with the highest score becomes the preliminary result for that module.

[0195] Weighted voting formula:

[0196] in:

[0197] ·S m The score is the internal voting score for the module (i.e., the first score);

[0198] ·C i It is the confidence level of the i-th intention;

[0199] ·W m It is the weight of the module;

[0200] For example, if the rule matching module obtains candidate intent results such as "purchase" (confidence 0.7) and "consult" (confidence 0.5), and the module weight is 0.4, then the score is:

[0201] Finally, the highest-scoring "purchase" was selected as the initial result of the rule matching module.

[0202] 2. Cross-module merged voting:

[0203] Inter-module summary: Summarize the preliminary results of each module (rule matching module, similarity matching module, and Few-Shot large model module).

[0204] Cross-module voting: During the cross-module voting phase, the voting results of each module are weighted based on the module's historical performance, current context fit, and module priority.

[0205] Weighted formula:

[0206] in:

[0207] ·S final This is the final score across modules (i.e., the second score);

[0208] Basis for module weight adjustment:

[0209] Module historical performance: Weights are adjusted based on the module's accuracy and recall over a past period.

[0210] Contextual Adaptability: The weights are adjusted based on the adaptability of the current dialogue topic to the module. For example, if the current statement is a shopping scenario, and the similarity matching module has historically performed well, then the weight of similarity matching will be increased.

[0211] Module priority: When exploring new fields, Few-Shot modules have higher priority, and modules with excellent historical performance also have relatively higher weight.

[0212] Example: Assume the initial result of rule matching is "purchase" 0.28, the similarity matching module is "consultation" 0.3, and the Few-Shot large model is "purchase" 0.4. The weights of each module are as follows:

[0213] Rule matching: 0.3; Similarity matching: 0.2; Few-Shot: 0.5;

[0214] Calculated using the formula:

[0215]

[0216] The intention with the highest final score was "purchase".

[0217] 3. Global voting and dynamic adjustments:

[0218] Confidence-weighted: If the scores are close after voting across modules, the system will calculate the final global score by weighting the scores based on the confidence level of each intent.

[0219] Dynamic Adjustment: If the confidence levels remain close (i.e., the difference between the two top-ranked second-place ratings is less than a preset threshold), the system enters the dynamic adjustment phase. Adjustments are made based on contextual information, historical behavioral patterns, and time-series analysis to increase the weight of certain intentions.

[0220] Dynamic adjustment formula: W adjusted =W m +f(context) +f(historical behavior);

[0221] Based on the adjusted weights, the score for each intent is recalculated, and the final intent is selected.

[0222] Example: If the scores for "purchase" and "consultation" are close in the global vote, the system will dynamically increase the weight of the "purchase" intent based on contextual analysis (the current user has searched for a large number of products on the shopping website) and historical behavior patterns (the user has expressed purchase intent multiple times in the past week).

[0223] W 购买adjusted =0.5 + 0.1 (context promotion) + 0.1 (historical behavior promotion) = 0.7;

[0224] The recalculated score ultimately determined the "purchase" intention.

[0225] The intent recognition method provided in the above embodiments has the following beneficial effects:

[0226] Refinement of voting within modules: Weighted voting within modules improves the accuracy of intent recognition for each module.

[0227] Dynamic adjustment of cross-module weights: Cross-module voting dynamically adjusts module weights based on historical performance, contextual adaptability, and priority, improving the system's flexibility and adaptability.

[0228] Global voting and multiple filtering: By combining confidence weighting, dynamic adjustment and global analysis, the system can effectively handle multiple conflicting intentions in complex scenarios, improving the accuracy and robustness of the final decision.

[0229] This complex voting mechanism improves the accuracy and flexibility of intent recognition through three levels of weighting and dynamic adjustment, combined with multi-dimensional analysis of context, historical data, and confidence levels. Simultaneously, by dynamically adjusting module weights, the system can adaptively optimize in different scenarios, achieving more efficient and accurate graph judgment.

[0230] Figure 3 A structural diagram of the intent recognition device provided in an embodiment of this application is shown. Figure 3 As shown, the intent recognition device 300 includes:

[0231] Module 301 is used to acquire dialogue text;

[0232] The first recognition module 302 is used to perform intent recognition on the dialogue text using a plurality of pre-acquired intent recognition modules respectively, to obtain candidate intents output by each intent recognition module, wherein each intent recognition module uses a different intent recognition method;

[0233] The second recognition module 303 is used to perform cross-module scoring on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text. The cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module.

[0234] In one embodiment of this application, the first identification module 302 includes:

[0235] The first recognition submodule is used to perform intent recognition on the dialogue text using multiple pre-acquired intent recognition modules respectively, to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent, wherein the first score of the candidate intent output by the intent recognition module is determined according to the weight of the intent recognition module.

[0236] The second identification module 303 includes:

[0237] The first scoring submodule is used to perform cross-module scoring on the candidate intents output by each intent recognition module based on the weight of each intent recognition module and the first score of the candidate intent, so as to obtain a second score for each candidate intent.

[0238] A determination submodule is used to determine the target intent of the dialogue text based on a second score for each candidate intent.

[0239] In one embodiment of this application, the first identification submodule includes:

[0240] A generalization unit is used to generalize the dialogue text to obtain multiple generalized texts;

[0241] The processing unit is configured to perform the following processing on each of the intent recognition modules:

[0242] The intent recognition module is used to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent;

[0243] Based on the confidence level of the initial intent corresponding to each of the generalized texts, candidate intents output by the intent recognition module and the first score of the candidate intents are selected from the obtained initial intents.

[0244] In one embodiment of this application, the processing unit is further configured to:

[0245] The initial intents corresponding to the multiple generalized texts are grouped to obtain multiple first groups, and the initial intents with the same intent belong to the same group;

[0246] For each of the first groups, the following steps are performed: calculate the first score of the initial intent corresponding to the first group based on the confidence level of each initial intent in the first group and the weight of the intent recognition module;

[0247] The initial intent with the highest first score is taken as the candidate intent output by the intent recognition module, and the highest first score is taken as the first score of the candidate intent.

[0248] In one embodiment of this application, the first scoring submodule includes:

[0249] The grouping unit is used to group the candidate intents output by the multiple intent recognition modules to obtain multiple second groups, and the candidate intents with the same intent belong to the same group;

[0250] The scoring unit is used to perform the following for each second group: perform a weighted calculation based on the first score of each candidate intent in the second group and the weight of the intent recognition module corresponding to the candidate intent, to obtain the second score of the candidate intent corresponding to each second group.

[0251] In one embodiment of this application, the determining submodule includes:

[0252] A sorting unit is used to sort the second scores of the candidate intentions from largest to smallest to obtain a sorting result;

[0253] The first determining unit is used to determine the candidate intent corresponding to the first second score as the target intent of the dialogue text if the difference between the first second score and the second second score in the sorting result is greater than or equal to a preset threshold.

[0254] The second determining unit is configured to adjust the weight of each intent recognition module and jump to the step of using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text respectively, and obtaining the candidate intent output by each intent recognition module and the first score of the candidate intent if the difference between the first second score and the second second score in the sorting result is less than the preset threshold.

[0255] In one embodiment of this application, the second determining unit is specifically used for:

[0256] If the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then the weight of each intent recognition module is adjusted according to at least one of the following:

[0257] The accuracy of intent recognition by each of the intent recognition modules in the first historical time period;

[0258] The degree of fit between the intent predicted by each intent recognition module in the second historical time period and the context of the dialogue text;

[0259] The preset priority of each of the intent recognition modules.

[0260] In one embodiment of this application, the processing unit is further configured to:

[0261] If the intent recognition module includes a first recognition submodule and a second recognition submodule, then for each generalized text, the following processing is performed:

[0262] The first identification submodule is used to perform intent recognition on the generalized text to obtain a first initial intent corresponding to the generalized text, and the second identification submodule is used to perform intent recognition on the generalized text to obtain a second initial intent corresponding to the generalized text. In this case, one of the first identification submodule and the second identification submodule performs intent recognition based on keywords, and the other performs intent recognition based on regular expressions.

[0263] If the first initial intent and the second initial intent are the same, then the first initial intent or the second initial intent shall be taken as the initial intent corresponding to the generalized text;

[0264] If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is greater than the first difference threshold, then the first initial intent is taken as the initial intent corresponding to the generalized text.

[0265] If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is less than or equal to the first difference threshold, then based on the user's historical behavior information, the first initial intent or the second initial intent is determined to be the initial intent corresponding to the generalized text, and the user is the user who provided the dialogue text.

[0266] In one embodiment of this application, the processing unit is further configured to:

[0267] The historical behavior information is obtained, which includes at least one of the following: the user's historical dialogue information, the context information of the dialogue text, the importance of keywords, and the user's preferences.

[0268] The weights of the first initial intention and the second initial intention are determined based on the historical behavior information.

[0269] The initial intent with the largest weight is selected from the first initial intent and the second initial intent, and is used as the initial intent corresponding to the generalized text.

[0270] The intent recognition device 300 provided in this application embodiment can implement the various processes implemented in the aforementioned intent recognition method embodiment and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0271] Figure 4 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0272] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.

[0273] Specifically, the processor 401 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0274] Memory 402 may include mass storage for data or instructions. For example, and not limitingly, memory 402 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 402 may include removable or non-removable (or fixed) media. Where appropriate, memory 402 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 402 is non-volatile solid-state memory.

[0275] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to the first or second aspect of this disclosure.

[0276] The processor 401 implements any of the information auditing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 402.

[0277] In one example, the electronic device may also include a communication interface 403 and a bus 410. For example, Figure 4 As shown, the processor 401, memory 402, and communication interface 403 are connected through bus 410 and complete communication with each other.

[0278] The communication interface 403 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0279] Bus 410 includes hardware, software, or both, that couples components of an information auditing method or verification device together. For example, and not as a limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 410 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.

[0280] Furthermore, in conjunction with the intent recognition methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the intent recognition methods in the above embodiments.

[0281] This application provides a computer program product in which instructions, when executed by a processor of an electronic device, cause the electronic device to perform any of the intent recognition methods described in the above embodiments.

[0282] This application also provides a computer program product, wherein the instructions in the computer program product, when executed by the processor of an electronic device, cause the electronic device to perform any of the intent recognition methods described in the above embodiments.

[0283] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described as examples. However, the method process of this application is not limited to the specific steps described. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0284] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0285] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0286] The foregoing flowcharts and / or block diagrams of methods, apparatus (systems) according to embodiments of the present disclosure have described various aspects of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0287] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. An intent recognition method, characterized in that, The method includes: Get the dialogue text; Multiple pre-acquired intent recognition modules are used to perform intent recognition on the dialogue text, respectively, to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent. The first score of the candidate intent output by the intent recognition module is determined according to the weight of the intent recognition module. Each intent recognition module uses a different intent recognition method. Based on the weight of each intent recognition module and the first score of the candidate intent, a cross-module score is performed on the candidate intent output by each intent recognition module to obtain a second score for each candidate intent. The cross-module score is used to score each candidate intent based on the weight of each intent recognition module. The target intent of the dialogue text is determined based on a second score for each candidate intent; The process involves using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text, obtaining a candidate intent output by each intent recognition module and a first score for the candidate intent, including: The dialogue text is generalized to obtain multiple generalized texts; For each of the intent recognition modules, the following processing is performed: The intent recognition module is used to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent; Based on the confidence level of the initial intent corresponding to each of the generalized texts, candidate intents output by the intent recognition module and the first score of the candidate intents are selected from the obtained initial intents.

2. The intent recognition method according to claim 1, characterized in that, The step of selecting candidate intents output by the intent recognition module and a first score of the candidate intents from the obtained initial intents based on the confidence level of the initial intent corresponding to each generalized text includes: The initial intents corresponding to the multiple generalized texts are grouped to obtain multiple first groups, and the initial intents with the same intent belong to the same group; For each of the first groups, the following steps are performed: calculate the first score of the initial intent corresponding to the first group based on the confidence level of each initial intent in the first group and the weight of the intent recognition module; The initial intent with the highest first score is taken as the candidate intent output by the intent recognition module, and the highest first score is taken as the first score of the candidate intent.

3. The intent recognition method according to claim 1, characterized in that, The step of performing cross-module scoring on the candidate intents output by each intent recognition module based on the weight of each intent recognition module and the first score of the candidate intent to obtain a second score for each candidate intent includes: The candidate intents output by the multiple intent recognition modules are grouped to obtain multiple second groups, and candidate intents with the same intent belong to the same group; For each of the second groups, perform the following: calculate the second score of the candidate intent corresponding to each of the second groups by weighting the first score of each candidate intent in the second group and the weight of the intent recognition module corresponding to the candidate intent.

4. The intent recognition method according to claim 1, characterized in that, Determining the target intent of the dialogue text based on a second score for each candidate intent includes: The second scores of the candidate intentions are sorted from largest to smallest to obtain the sorting results; If the difference between the first second score and the second second score in the sorting results is greater than or equal to a preset threshold, then the candidate intent corresponding to the first second score is taken as the target intent of the dialogue text. If the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then the weight of each intent recognition module is adjusted, and the process jumps to the step of using multiple pre-acquired intent recognition modules to perform intent recognition on the dialogue text respectively, and obtaining the candidate intent output by each intent recognition module and the first score of the candidate intent.

5. The intent recognition method according to claim 4, characterized in that, If the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then the weight of each intent recognition module is adjusted, including: If the difference between the first second score and the second second score in the ranking result is less than the preset threshold, then the weight of each intent recognition module is adjusted according to at least one of the following: The accuracy of intent recognition by each of the intent recognition modules in the first historical time period; The degree of fit between the intent predicted by each intent recognition module in the second historical time period and the context of the dialogue text; The preset priority of each of the intent recognition modules.

6. The intent recognition method according to claim 1, characterized in that, The step of using the intent recognition module to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent includes: If the intent recognition module includes a first recognition submodule and a second recognition submodule, then for each generalized text, the following processing is performed: The first identification submodule is used to perform intent recognition on the generalized text to obtain a first initial intent corresponding to the generalized text, and the second identification submodule is used to perform intent recognition on the generalized text to obtain a second initial intent corresponding to the generalized text. In this case, one of the first identification submodule and the second identification submodule performs intent recognition based on keywords, and the other performs intent recognition based on regular expressions. If the first initial intent and the second initial intent are the same, then the first initial intent or the second initial intent shall be taken as the initial intent corresponding to the generalized text; If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is greater than the first difference threshold, then the first initial intent is taken as the initial intent corresponding to the generalized text. If the first initial intent and the second initial intent are different, and the confidence level of the first initial intent is greater than the confidence level of the second initial intent, and the difference between the confidence level of the first initial intent and the confidence level of the second initial intent is less than or equal to the first difference threshold, then based on the user's historical behavior information, the first initial intent or the second initial intent is determined to be the initial intent corresponding to the generalized text, and the user is the user who provided the dialogue text.

7. The intent recognition method according to claim 6, characterized in that, The step of determining the first initial intent or the second initial intent as the initial intent corresponding to the generalized text based on the user's historical behavior information includes: The historical behavior information is obtained, which includes at least one of the following: the user's historical dialogue information, the context information of the dialogue text, the importance of keywords, and the user's preferences. The weights of the first initial intention and the second initial intention are determined based on the historical behavior information. The initial intent with the largest weight is selected from the first initial intent and the second initial intent, and is used as the initial intent corresponding to the generalized text.

8. An intent recognition device, characterized in that, The device includes: The acquisition module is used to acquire the dialogue text; The first recognition module is used to perform intent recognition on the dialogue text using multiple pre-acquired intent recognition modules respectively, and obtain the candidate intent output by each intent recognition module, wherein each intent recognition module uses a different intent recognition method; The second recognition module is used to perform cross-module scoring on the candidate intents output by each intent recognition module to obtain the target intent of the dialogue text. The cross-module scoring is used to score each candidate intent according to the weight of each intent recognition module. The first identification module includes: The first recognition submodule is used to perform intent recognition on the dialogue text using multiple pre-acquired intent recognition modules respectively, to obtain the candidate intent output by each intent recognition module and the first score of the candidate intent, wherein the first score of the candidate intent output by the intent recognition module is determined according to the weight of the intent recognition module. The second identification module includes: The first scoring submodule is used to perform cross-module scoring on the candidate intents output by each intent recognition module based on the weight of each intent recognition module and the first score of the candidate intent, so as to obtain a second score for each candidate intent. A determination submodule is used to determine the target intent of the dialogue text based on a second score for each candidate intent; The first identification submodule includes: A generalization unit is used to generalize the dialogue text to obtain multiple generalized texts; The processing unit is configured to perform the following processing on each of the intent recognition modules: The intent recognition module is used to perform intent recognition on multiple generalized texts to obtain the initial intent corresponding to each generalized text and the confidence level of the initial intent; Based on the confidence level of the initial intent corresponding to each of the generalized texts, candidate intents output by the intent recognition module and the first score of the candidate intents are selected from the obtained initial intents.

9. An electronic device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the intent recognition method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the intent recognition method as described in any one of claims 1-7.

11. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device performs the intent recognition method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Method and system for realizing intelligent outbound call of robot

    CN117915002A