Intent recognition method and apparatus

By coordinating multiple intent recognition paths and assisting with a large language model, combined with domain knowledge and multiple rounds of iterative rewriting, the problem of inaccurate intent recognition caused by single-dimensional recognition is solved, and high-accuracy intent recognition is achieved in complex intelligent systems.

WO2026233238A1PCT designated stage Publication Date: 2026-11-12HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/094283
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-08
Filing Date
2026-04-30
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

Most existing intent recognition schemes identify intent from a single dimension, resulting in poor accuracy, especially in complex intelligent systems where it is difficult to consider domain information and the interaction between multiple dimensions.

Method used

By collaboratively processing multiple intent recognition paths, relevant information is extracted using a large language model. Combined with domain knowledge and intent recognizers, intent recognition is performed from multiple dimensions, taking into account the relationships and interactions between different dimensions. The query text is rewritten through multiple iterations to supplement information.

Benefits of technology

It improves the accuracy of intent recognition, enabling more precise identification of user intent and enhancing the user experience, especially in query interaction scenarios in professional fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026094283_12112026_PF_FP_ABST
    Figure CN2026094283_12112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of artificial intelligence. Provided are an intent recognition method and apparatus. The method comprises: acquiring query text; then, performing intent recognition processing on the query text by means of a plurality of intent recognition paths, so as to obtain a plurality of intent recognition results, wherein the plurality of intent recognition paths are used for performing intent recognition on the query text from a plurality of dimensions; and finally, on the basis of the plurality of intent recognition results, obtaining an intent corresponding to the query text. In the present application, intent recognition is performed on query text by means of a plurality of intent recognition paths, so as to implement the intent recognition of the query text from a plurality of dimensions, thereby improving the accuracy of intent recognition.
Need to check novelty before this filing date? Find Prior Art

Description

An intent recognition method and apparatus

[0001] This application claims priority to Chinese Patent Application No. 202510596032.0, filed on May 8, 2025, entitled "A Method and Apparatus for Intent Recognition", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence (AI) technology, and in particular to an intent recognition method and apparatus. Background Technology

[0003] Intent recognition has become a core module of complex intelligent systems such as intelligent agents: For complex intelligent agent systems composed of multiple tools, the first step is to recognize the user's intent, guiding the agent to execute the correct process or provide corresponding information, making it an indispensable part of intelligent interaction systems. Current intent recognition solutions mostly rely on a single dimension, resulting in poor accuracy. Summary of the Invention

[0004] The embodiments of this application provide an intent recognition method and apparatus that perform intent recognition on query text from multiple dimensions, thereby improving the accuracy of intent recognition.

[0005] Firstly, this application provides an intent recognition method, which includes obtaining query text; then performing intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results, wherein the multiple intent recognition paths are used to perform intent recognition on the query text from multiple dimensions; and finally, based on the multiple intent recognition results, obtaining the intent corresponding to the query text.

[0006] This application achieves intent recognition of query text through the collaboration of multiple intent recognition paths, realizing intent recognition of query text from multiple dimensions and improving the accuracy of intent recognition.

[0007] In one possible implementation, before performing intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results, the process also includes: extracting information from the query text based on the definition of each intent recognition path to obtain relevant information in the query text related to each intent recognition path.

[0008] By extracting relevant information related to each intent recognition path from the query text, it is easier to recognize the intent of each subsequent intent recognition path.

[0009] In another possible implementation, based on the definition of each intent recognition path, information is extracted from the query text to obtain relevant information related to each intent recognition path in the query text. A specific implementation is as follows: a first prompt is generated based on the query text and the definition of each intent recognition path; the first prompt is used as the input of the first large language model, which is instructed to extract information from the query text with reference to the definition of each intent recognition path and output the relevant information of each intent recognition path.

[0010] In other words, by calling a large language model to extract relevant information related to each intent recognition path from the query text, the ability of the large language model to extract information from the query text is convenient and fast, without the need to train a dedicated neural network model or write specific extraction rules, thus saving costs.

[0011] In another possible implementation, each intent recognition path includes an intent recognizer, which is used to identify the intent sub-category of the dimension corresponding to the intent recognition path. A specific implementation of performing intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results is as follows: the relevant information of each intent recognition path is used as the input of the intent recognizer of each recognition path, and the intent sub-category corresponding to each intent recognition path is output; based on the intent sub-category corresponding to each intent recognition path, multiple intent recognition results are obtained.

[0012] Intent recognition for each intent recognition path is achieved by setting a corresponding intent recognizer in each intent recognition path. The intent recognizer can be a multi-class classifier or multiple binary classifiers. The classifier can be a trained neural network model, such as a multilayer perceptron (MLP) or a support vector machine (SVM).

[0013] In some other possible implementations, the intent recognizer can also be implemented using a large language model or by rules.

[0014] In another possible implementation, a specific approach to processing the query text using multiple intent recognition paths to obtain multiple intent recognition results is as follows: Based on the relationships between the multiple intent recognition paths, the execution order of the multiple intent recognition paths is determined, with the relationships based on the relevant information of each intent recognition path; following the execution order, the multiple intent recognition paths are executed to process the query text using intent recognition, resulting in intent recognition results for each intent recognition path; based on the intent recognition results of each intent recognition path, multiple intent recognition results are obtained.

[0015] For example, multiple intent recognition paths include intent recognition path 1, intent recognition path 2, intent recognition path 3, intent recognition path 4, intent recognition path 5, and intent recognition path 6. Intent recognition paths 2, 3, and 5 are related, and intent recognition paths 4 and 6 are related. Intent recognition path 1 is not related to other intent recognition paths. The intent recognition paths without relationships are executed first, followed by the related intent recognition paths. The execution order is: intent recognition path 1, intent recognition path 2, intent recognition path 3, intent recognition path 5, intent recognition path 4, and intent recognition path 6.

[0016] In another possible implementation, following the execution order, multiple intent recognition paths are executed to process the query text for intent recognition, and the intent recognition results of each intent recognition path are obtained. One specific implementation is as follows: the intent recognition results of the completed intent recognition paths are used to assist the current intent recognition path in intent recognition, and the intent recognition result of the current intent recognition path is obtained. There is a correlation between the completed intent recognition paths and the current intent recognition path.

[0017] For example, intent recognition path 4 is executed before intent recognition path 6. When intent recognition path 6 is executed to perform intent recognition, intent recognition path 4 has already been completed. At this time, the intent recognition result of intent recognition path 4 can be used to assist the intent recognition of intent recognition path 6. In this way, the mutual influence between different intent dimensions is considered during the recognition process, thereby improving the accuracy of intent recognition.

[0018] In another possible implementation, multiple intent recognition results include multiple intent subcategories corresponding to each intent recognition path; a specific implementation for determining the intent corresponding to the query text based on multiple intent recognition results is as follows: based on the association relationship between multiple intent recognition paths, multiple intent subcategories corresponding to different intent recognition paths are associated and combined to obtain multiple candidate intent combinations, and the association relationship between multiple intent paths is determined based on the relevant information of each intent recognition path; based on multiple candidate intent combinations, the intent corresponding to the query text is determined.

[0019] For example, there are a total of N intent recognition paths. Each intent recognition path outputs multiple intent subcategories, denoted as topk_n. The number of intent subcategories output by each intent recognition path can be the same, for example, each intent recognition path outputs 3 intent subcategories. The number of intent subcategories output by each intent recognition path can also be different. For example, intent recognition path 1 outputs 3 intent subcategories with the highest probability, while intent recognition path 2 outputs 2 intent subcategories with the highest probability. Then, based on the correlation, the multiple intent subcategories output by the intent recognition paths with correlation are freely combined. For example, intent recognition path 4 and intent recognition path 6 are correlated. The intent subcategories output by intent recognition path 4 include intent 4.1 and intent 4.2, and the intent subcategories output by intent recognition path 6 include intent 6.1, intent 6.2, and intent 6.3. After freely combining the outputs of intent recognition paths 4 and 6, multiple alternative intent combinations are obtained: (intent 4.1, intent 6.1), (intent 4.1, intent 6.2), (intent 4.1, intent 6.3), (intent 4.2, intent 6.1), (intent 4.2, intent 6.2), and (intent 4.2, intent 6.3). Then, the intent corresponding to the query text is determined based on the multiple alternative combinations.

[0020] In another possible implementation, the multiple intent recognition paths include a first type of intent recognition path, which includes a knowledge retrieval module and an intent recognizer. The intent recognition result corresponding to the first type of intent recognition path also includes retrieval knowledge, which is obtained from the knowledge base by the knowledge retrieval module using relevant information. A specific implementation of determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations; the intent corresponding to the query text is determined based on the multiple candidate intent combinations.

[0021] By introducing a corresponding domain knowledge base into the intent recognition path, the knowledge base retrieval can assist in the intent recognition of the intent recognition path. Then, based on the domain knowledge of the intent recognition path, conflicting intent combinations can be filtered. The interaction between intents is taken into account, which can effectively avoid the misidentification of unreasonable intents and improve the accuracy of intent recognition.

[0022] In another possible implementation, based on retrieval knowledge, a specific implementation of eliminating conflicting intent combinations from multiple candidate intent combinations to obtain multiple candidate intent combinations is as follows: Based on retrieval knowledge and the multiple candidate intent combinations, a second prompt is generated; the second prompt is used as input to a second language model, instructing the second language model to identify conflicting intent combinations from the multiple candidate intent combinations with reference to retrieval knowledge, and outputting the conflicting intent combinations; the conflicting intent combinations are eliminated from the multiple candidate intent combinations to obtain multiple candidate intent combinations.

[0023] By leveraging the comprehensive capabilities of large language models and using domain knowledge to assist in identifying conflicting intents, we can help large language models correctly identify intents without fine-tuning, especially in professional domains, thereby improving the accuracy of intent recognition.

[0024] In another possible implementation, a specific approach to determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: combine multiple candidate intent combinations to obtain multiple full-dimensional intent combinations; determine the probability of each full-dimensional intent combination based on the sum of the probabilities of the intent subcategories in each full-dimensional intent combination; and determine the intent combination with the highest probability among the multiple full-dimensional intent combinations as the intent corresponding to the query text.

[0025] By comprehensively ranking the intents and interactions across various dimensions, the optimal intent recognition result is output, further improving the accuracy of the final intent recognition.

[0026] In another possible implementation, the intent recognition method provided in this application further includes: determining that the query text contains insufficient information; rewriting the query text based on the intent corresponding to the query text and retrieval knowledge to obtain the rewritten query text; performing intent recognition on the rewritten query text; and obtaining the intent corresponding to the query text after multiple iterations.

[0027] In this possible timeline, if the current information is insufficient to complete the required dimension of intent recognition, the information content of the query text is supplemented by retrieved domain knowledge and intent recognition results. Then, intent recognition is performed again, and after multiple iterations, a final complete intent recognition result is output. For example, an upper limit can be set for the number of iterations or the response time. If a complete intent recognition result is not output even after reaching the upper limit, the process is forcibly stopped, and an incomplete intent recognition result is output.

[0028] Optionally, the intent recognition method provided in this application also supports the expansion of the intent recognition path, such as adding new intent recognition paths, so that the intent recognition path can be expanded according to the actual scenario requirements.

[0029] Secondly, this application also provides an intent recognition device, which includes an acquisition module, a multi-path recognition module, and an intent recognition module. The acquisition module is used to acquire query text; the multi-path recognition module is used to perform intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results. The multiple intent recognition paths are used to perform intent recognition on the query text from multiple dimensions; and the intent recognition module is used to obtain the intent corresponding to the query text based on the multiple intent recognition results.

[0030] In one possible implementation, the intent recognition device provided in this application further includes an extraction module, which is used to extract information from the query text based on the definition of each intent recognition path, and obtain relevant information in the query text related to each intent recognition path.

[0031] In another possible implementation, the extraction module is specifically used to generate a first prompt based on the query text and the definition of each intent recognition path; the first prompt is used as input to the first large language model, which instructs the first large language model to extract information from the query text with reference to the definition of each intent recognition path, and output the relevant information of each intent recognition path.

[0032] In another possible implementation, each intent recognition path includes an intent recognizer, which is used to identify the intent sub-category of the dimension corresponding to the intent recognition path. The multi-path recognition module is specifically used to take the relevant information of each intent recognition path as the input of the intent recognizer of each recognition path, and output the intent sub-category corresponding to each intent recognition path. Based on the intent sub-category corresponding to each intent recognition path, multiple intent recognition results are obtained.

[0033] In another possible implementation, the multi-path recognition module is specifically used to determine the execution order of multiple intent recognition paths based on the association between them. The association between multiple intent recognition paths is determined based on the relevant information of each intent recognition path. According to the execution order, the multiple intent recognition paths are executed to perform intent recognition processing on the query text, and the intent recognition results of each intent recognition path are obtained. Based on the intent recognition results of each intent recognition path, multiple intent recognition results are obtained.

[0034] In another possible implementation, following the execution order, multiple intent recognition paths are executed to process the query text for intent recognition, and the intent recognition results of each intent recognition path are obtained. One specific implementation is as follows: the intent recognition results of the completed intent recognition paths are used to assist the current intent recognition path in intent recognition, and the intent recognition result of the current intent recognition path is obtained. There is a correlation between the completed intent recognition paths and the current intent recognition path.

[0035] In another possible implementation, multiple intent recognition results include multiple intent subcategories corresponding to each intent recognition path; the intent recognition module is specifically used to associate and combine multiple intent subcategories corresponding to different intent recognition paths based on the association relationship of multiple intent recognition paths to obtain multiple candidate intent combinations, and the association relationship of multiple intent paths is determined based on the relevant information of each intent recognition path; based on multiple candidate intent combinations, the intent corresponding to the query text is determined.

[0036] In another possible implementation, the multiple intent recognition paths include a first type of intent recognition path, which includes a knowledge retrieval module and an intent recognizer. The intent recognition result corresponding to the first type of intent recognition path also includes retrieval knowledge, which is obtained from the knowledge base by the knowledge retrieval module using relevant information. A specific implementation of determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations; based on the multiple candidate intent combinations, the intent corresponding to the query text is determined.

[0037] In another possible implementation, based on retrieval knowledge, a specific implementation of eliminating conflicting intent combinations from multiple candidate intent combinations to obtain multiple candidate intent combinations is as follows: Based on retrieval knowledge and the multiple candidate intent combinations, a second prompt is generated; the second prompt is used as input to a second language model, instructing the second language model to identify conflicting intent combinations from the multiple candidate intent combinations with reference to retrieval knowledge, and outputting the conflicting intent combinations; the conflicting intent combinations are eliminated from the multiple candidate intent combinations to obtain multiple candidate intent combinations.

[0038] In another possible implementation, a specific approach to determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: combine multiple candidate intent combinations to obtain multiple full-dimensional intent combinations; determine the probability of each full-dimensional intent combination based on the sum of the probabilities of the intent subcategories in each full-dimensional intent combination; and determine the intent combination with the highest probability among the multiple full-dimensional intent combinations as the intent corresponding to the query text.

[0039] In another possible implementation, the intent recognition device provided in this application further includes a re-recognition module; the re-recognition module is used to determine that the query text contains insufficient information; based on the intent corresponding to the query text and the retrieval knowledge, the query text is rewritten to obtain the rewritten query text; intent recognition is performed on the rewritten query text; after multiple iterations, the intent corresponding to the query text is obtained.

[0040] Optionally, multiple intent recognition paths can be extended to add new intent recognition paths.

[0041] Thirdly, embodiments of this application provide a computing device, including a memory and a processor, wherein the memory stores instructions that, when executed by the processor, cause the method described in the first aspect or any possible implementation of the first aspect to be implemented.

[0042] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the method described in the first aspect or any possible implementation thereof to be implemented.

[0043] Fifthly, embodiments of this application also provide a computer program or computer program product, which includes instructions that, when executed, cause a computer to perform the method described in the first aspect or any possible implementation thereof.

[0044] Sixthly, embodiments of this application also provide a chip including at least one processor and a communication interface, the processor being used to perform the method described in the first aspect or any possible implementation of the first aspect.

[0045] It is understandable that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here for the sake of brevity. Attached Figure Description

[0046] Figure 1 illustrates an application scenario of the intent recognition method provided in this application embodiment;

[0047] Figure 2 shows a flowchart of an intent recognition method provided in an embodiment of this application;

[0048] Figure 3 illustrates the implementation process of multi-dimensional intent recognition through multi-path recognition.

[0049] Figure 4 shows a schematic diagram of the implementation process of the multi-path intent filtering and sorting steps;

[0050] Figure 5 is a flowchart illustrating an intent recognition method provided in an embodiment of this application;

[0051] Figure 6 is a schematic diagram of an intent recognition device provided in an embodiment of this application;

[0052] Figure 7 is a schematic diagram of the structure of the computing device provided in the embodiment of this application. Detailed Implementation

[0053] The term "and / or" used in this article describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0054] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same properties in the description of embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a list of elements is not necessarily limited to those elements, but may include other elements not expressly listed or inherent to such processes, methods, systems, products, or apparatus.

[0055] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0056] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.

[0057] In the field of natural language processing (NLP), intent recognition is essentially a classification task involving natural language understanding (NLU). One related technical solution utilizes machine learning classifiers to achieve intent understanding. This involves collecting and labeling training data, converting the data into representation vectors using an encoder, and training a classification model using a chosen algorithm (e.g., decision tree, SVM). When needed, the user's query text is encoded, input into the trained classification model, and the model outputs the intent category.

[0058] This approach requires a large amount of manually labeled data. If the user query is not within the distribution of the labeled training data, the algorithm's generalization ability is relatively poor.

[0059] The second related technical solution utilizes deep learning classification models to achieve intent recognition. For example, training data is collected and labeled, and generative or discriminative classification models are directly trained based on neural network models such as BERT and LSTM. In use, the user query is directly input into the trained neural network model, which directly outputs the intent category.

[0060] This approach also requires a certain amount of manually labeled data for training, and it suffers from insufficient generalization performance and difficulty in injecting professional knowledge.

[0061] The third related technical solution utilizes a large language model (LLM) to achieve intent recognition. The user query and intent category are input into the large language model in the form of zero / few-shot prompts, and the large language model generates intent category discrimination results.

[0062] This solution uses only a single process / pipeline to complete the intent recognition task, without considering the changes in intent caused by changes in information of different dimensions in the user query, and the potential mutual influence between multiple perspectives of intent tendency.

[0063] As can be seen from the above description, the relevant intent recognition schemes have the following problems:

[0064] (1) Domain information and expressions are difficult to apply to intent recognition. In many domains, user intent is often highly related to specific words, expressions and information in the query. Existing intent recognition technologies lack the use of relevant knowledge, which can lead to a completely wrong understanding of the actual intent.

[0065] (2) The interaction between multiple dimensions of intent is difficult to utilize. In complex intelligent systems, user intent is often a combination of multiple types and perspectives, and there may be mutual influence between different dimensions, such as mutual exclusion or coexistence. Existing intent recognition technologies are difficult to take into account these influences.

[0066] In view of this, embodiments of this application provide an intent recognition method and apparatus, which realizes intent recognition of query text through the collaboration of multiple intent recognition paths, thereby achieving intent recognition of query text from multiple dimensions and improving the accuracy of intent recognition.

[0067] The following describes in detail the specific implementation of the intent recognition method and apparatus provided in the embodiments of this application, with reference to the accompanying drawings and examples.

[0068] The intent recognition method provided in this application can be applied to various agent and process task routing scenarios as well as query interaction routing scenarios, such as user automatic guidance systems and intelligent question answering systems. In particular, it can be applied to query interaction routing scenarios in professional fields to accurately identify user intent, so as to return response content that matches the user intent and improve the user experience.

[0069] Figure 1 illustrates an application scenario of the intent recognition method provided in this application embodiment. As shown in Figure 1, the intent recognition method provided in this application embodiment can be applied to an intelligent question-answering system. This system, based on predefined intent categories, determines the intent category of the user-input query, routes it to a specified process, executes the corresponding action, or obtains relevant information, and returns the execution result.

[0070] The intent recognition method provided in this application embodiment can be applied to the intent recognition stage of an intelligent question answering system (i.e., understanding the user's current message intent in conjunction with the context in Figure 1), improving the accuracy of intent recognition, thereby ensuring that the returned execution result matches the user's query intent and improving the user experience.

[0071] Figure 2 shows a flowchart of an intent recognition method provided in an embodiment of this application. As shown in Figure 2, for a user-input query, multi-dimensional intent recognition steps are first performed through multi-path recognition to obtain multiple intent recognition results.

[0072] For example, firstly, using LLM in conjunction with the given definitions of different intent recognition paths, information related to each intent recognition path in the query is extracted (which can be called the relevant information of each intent recognition path), and the correlation between each intent recognition path and other intent recognition paths is given.

[0073] Users can input queries in various ways, such as text input and voice input. Taking a smart question-and-answer scenario on a terminal device as an example, users can manually input natural query text as query text in the question-and-answer input box on the terminal (e.g., a mobile phone). For example, a user taps the question-and-answer input box on the phone's touchscreen interface to bring up the virtual keyboard, then uses the virtual keyboard to input the query text "Where should I get the third dose of the vaccine?", and clicks the "OK" button to submit the query text. In response to this operation, the phone obtains the query text and displays it on the phone's display screen.

[0074] For example, users can also input their queries via voice input. For instance, a user can operate the voice input icon on the question-and-answer interface displayed on the phone's touchscreen and then input voice through the microphone. The phone responds to the user's action, acquires the user's voice input, recognizes the voice content, and then converts it into query text. Specific methods for converting voice content into text content can be found in existing technologies, and will not be elaborated upon in this application.

[0075] It is understood that the methods for obtaining query text by terminal devices described above are merely illustrative and do not constitute a limitation on the scope of protection of the embodiments of this application.

[0076] The LLM (Limited Language Management) is invoked, combining the definitions of different intent recognition paths to extract information related to each intent recognition path from the query. For example, a prompt is generated based on the query and the definitions of each intent recognition path. This prompt serves as input to the LLM, instructing it to extract information from the query by referring to the definitions of each intent recognition path and outputting the relevant information for each intent recognition path. In one example, prompts can be generated using pre-defined templates, such as: "Intent recognition path 1 is for recognizing product intent; please extract the product-related information from the query: '…'"; "Intent recognition path 2 is for recognizing feature intent; please extract the feature-related information from the query: '…'"; ...; "Intent recognition path n is for recognizing scenario intent; please extract the scenario-related information from the query: '…'". In some examples, the prompt template can also provide examples for the LLM to reference, improving the accuracy of LLM information extraction.

[0077] In another example, LLM analysis can be used to provide the relationships between various consciousness recognition paths. For instance, the generated prompt may include information instructing the LLM analysis to provide these relationships, such as the statement "Please analyze the relationships between the relevant information of each consciousness recognition path, and then provide the relationships between each consciousness recognition path." For example, intent recognition path 1 is associated with intent recognition paths 2 and 3, intent recognition path 4 is associated with intent recognition path 6, intent recognition path 8 is associated with intent recognition path 10, and intent recognition paths 5, 7, and 9 have no association with other intent recognition paths.

[0078] In other examples, other methods can be used to extract information related to each intent recognition path. For instance, rules can be used to extract information related to each intent recognition path from the query. For example, expert experience can be used to analyze the characteristics of how information related to each intent recognition path appears in the query within the application's business scenario. Based on these characteristics, information extraction rules can be written, and then these rules can be used to extract the relevant information for each intent recognition path from the query.

[0079] Alternatively, other methods can be used to analyze the relationships between different intent recognition paths, such as using a decision tree approach. Or, the relationships between the intent recognition paths can be pre-configured, meaning the relationships between the intent recognition paths are fixed.

[0080] After extracting the relevant information for each intent recognition path, the intent recognition information for each intent recognition path is input into that path to complete domain knowledge supplementation and intent sub-category discrimination. For example, the relevant information extracted from the query for each intent recognition path includes: relevant information 1 for intent recognition path 1, relevant information 2 for intent recognition path 2, relevant information 3 for intent recognition path 3, and relevant information 4 for intent recognition path 4. Then, relevant information 1 is input into intent recognition path 1, and through processing by intent recognition path 1, domain knowledge 1 (also known as retrieval knowledge 1) and intent sub-category set 1 are obtained; relevant information 2 is input into intent recognition path 2, and through processing by intent recognition path 2, domain knowledge 2 and intent sub-category set 2 are obtained; relevant information 3 is input into intent recognition path 3, and through processing by intent recognition path 4, intent sub-category set 4 is obtained.

[0081] Then, the intent subcategories output by each intent recognition path are filtered and sorted through a multi-path intent filtering and sorting step to obtain the intent recognition result.

[0082] For example, each intent recognition path returns k_n intent subcategories. The sets of intent subcategories output by related intent recognition paths are freely combined to obtain multiple candidate intent combinations. For instance, if intent recognition path 1 and intent recognition path 2 are related, then the intent subcategories in intent subcategory set 1 and intent subcategory set 2 are freely combined to obtain candidate intent combinations. For example, if intent subcategory set 1 includes intent subcategory 1.1 and intent subcategory 1.2, and intent subcategory set 2 includes intent subcategory 2.1, intent subcategory 2.2, and intent subcategory 2.3, then the candidate intent combinations obtained by freely combining the sets of intent subcategories output by related intent recognition paths, intent recognition path 1 and intent recognition path 2, are: (intent 1.1, intent 2.1), (intent 1.1, intent 2.2), (intent 1.1, intent 2.3), (intent 1.2, intent 2.1), (intent 1.2, intent 2.2), and (intent 1.2, intent 2.3).

[0083] Then, based on the domain knowledge output from the intent recognition path (e.g., domain knowledge 1 and domain knowledge 2), conflicting or unreasonable candidate intent combinations are identified. These conflicting or unreasonable candidate intent combinations are filtered out, leaving a set of candidate intent combinations. These candidate intent combinations are then sorted in descending order, and the highest-ranked intent combination is selected as the user intent. For example, intent 1.1 is a router. Domain knowledge of routers indicates that a router cannot have characteristic 'a', while intent 2.1 has characteristic 'a'. Therefore, intent 1.1 and intent 2.1 are conflicting, and the candidate intent combinations (intent 1.1, intent 2.1) are eliminated. This process is repeated for other conflicting candidate intent combinations, leaving a set of candidate intent combinations. For example, candidate intent combinations might include (intent 1.1, intent 2.3), (intent 1.2, intent 2.1), and (intent 1.2, intent 2.2). These candidate intent combinations are then sorted in descending order of probability, and the highest-ranked candidate intent combination is selected as the user intent identified in the current round. For example, if the probability of intent 1.1 is 0.6 and the probability of intent 2.3 is 0.7, then the probability of the candidate intent combination (intent 1.1, intent 2.3) is 1.3. If the probability of intent 1.2 is 0.4 and the probability of intent 2.1 is 0.2, then the probability of the candidate intent combination (intent 1.2, intent 2.1) is 0.5. If the probability of intent 1.2 is 0.4 and the probability of intent 2.2 is 0.1, then the probability of the candidate intent combination (intent 1.2, intent 2.2) is 0.5. Arranging these probabilities in descending order, we get: (intent 1.1, intent 2.3), (intent 1.2, intent 2.1), and (intent 1.2, intent 2.2). The candidate intent combination (intent 1.1, intent 2.3) has the highest ranking, so it is selected as the user intent for the current identification round. In this way, by taking into account the interaction between intents, the system can effectively avoid misidentification of unreasonable intents, and by ranking the results based on the combined influence of various dimensions and interactions, the system can output the best recognition result and improve the accuracy of intent recognition.

[0084] Finally, if the current information is insufficient to complete the required dimension of intent recognition (or the user query contains insufficient information), the query is rewritten and re-recognized based on the recognition results of the previous round and the recalled domain knowledge. In this way, through multiple rounds of iteration, the information is supplemented to obtain a complete intent recognition result.

[0085] In one example, you can set an upper limit for the number of iterations or the response time. If the upper limit is reached, the iteration stops, and an incomplete intent recognition result is forced to be output. For example, if the number of iterations is set to 10, and the required dimension of intent recognition is not completed after 10 iterations, an incomplete intent recognition result will be forced to be output. Alternatively, if the response time is set to 30 seconds, and the required dimension of intent recognition is not completed after 30 seconds, an incomplete intent recognition result will be forced to be output.

[0086] It should be noted that the meaning of the required dimension of intent recognition can be understood as the situation where there is a case where the intent recognition path output is empty among the pre-built multiple intent recognition paths. That is, there is one or more intent recognition paths that fail to recognize the intent result of that dimension. For example, if the user query does not contain information of several dimensions, the relevant information of the intent recognition path corresponding to the corresponding dimension cannot be extracted during information extraction. In this case, the intent recognition path will not output the intent recognition result. Or, if the amount of information extracted for a certain dimension is too small or incomplete, the relevant information will not be output as intent recognition result when it is input into the corresponding intent recognition path.

[0087] In another example, if the required intent recognition result is still not identified after reaching the iteration count or response time limit, the LLM will ask follow-up questions. For example, if the scenario dimension information is still not identified after multiple iterations, the LLM can ask the user, "What is the application scenario of the product in question?" so that the user can answer the missing information in a targeted manner.

[0088] Figure 3 illustrates the implementation process of multi-dimensional intent recognition through multi-path identification. As shown in Figure 3, multiple intent recognition paths are pre-built according to the actual business scenario needs, and a domain knowledge base is built for some or all intent recognition paths according to actual requirements. The domain knowledge base includes knowledge documents that record knowledge of specific domains. For example, if the business scenario is a network device business scenario, the domain knowledge base includes knowledge documents related to network devices such as routers and switches.

[0089] Each intent recognition path is used to identify intents in one dimension. For example, intent recognition path 1 is used to identify intents in the product dimension, intent recognition path 2 is used to identify intents in the feature dimension, and intent recognition path n is used to identify intents in the scenario dimension.

[0090] As shown in Figure 3, the pre-built intent recognition paths include intent recognition path 1 for product recognition, intent recognition path 2 for feature recognition, ..., intent recognition path n for scenario recognition. Each intent recognition path contains an intent recognizer, allowing the user to identify the intent sub-category corresponding to that dimension. For example, intent recognition path 1 uses a product recognizer to identify the product-dimensional intent sub-category, i.e., which product the user wants to inquire about; intent recognition path 2 uses a feature recognizer to identify the feature-dimensional intent sub-category, i.e., which feature the user wants to query; ...; intent recognition path n uses a scenario recognizer to identify the scenario-dimensional intent sub-category, i.e., the user wants to query a question about a specific feature of a product in a specific scenario. Knowledge base query modules can be set up in some intent recognition paths as needed. For example, intent recognition path 1 includes a product knowledge base query module, which allows users to retrieve domain knowledge from the pre-built product knowledge base, such as domain knowledge about a specific router model, to assist subsequent intent recognition by providing domain knowledge. To avoid the inability to understand the specific meaning of certain content due to a lack of domain knowledge—for example, a router model from a company—without expertise in that company's routers, the specific meaning of that model cannot be understood. In this embodiment, a product knowledge base can be constructed. By querying this product knowledge base, domain knowledge can be obtained to assist in subsequent intent recognition and improve its accuracy. For another example, a feature knowledge base query module can be set up in intent recognition path 2 to retrieve domain knowledge of features from a pre-built feature knowledge base, thus assisting in subsequent intent recognition.

[0091] In another example, the product knowledge base query module and the feature knowledge base query module can also retrieve relevant domain knowledge directly from the internet. For instance, both the product knowledge base module and the feature knowledge base query module can be implemented by calling an LLM to retrieve relevant domain knowledge from the internet.

[0092] The LLM is invoked, and based on the given definitions of different intent recognition paths, information related to each intent recognition path in the query is extracted and decomposed, and the relationship between each intent recognition path and other intent recognition paths is given.

[0093] The relevant information of each intent recognition path is extracted and sorted according to the relationship, and knowledge retrieval and intent recognition classification within the intent recognition path are completed in sequence.

[0094] For example, multiple intent recognition paths include intent recognition path 1, intent recognition path 2, intent recognition path 3, intent recognition path 4, intent recognition path 5, and intent recognition path 6. Intent recognition paths 2, 3, and 5 are related, and intent recognition paths 4 and 6 are related. Intent recognition path 1 is not related to other intent recognition paths. The unrelated intent recognition paths are executed first, followed by the related intent recognition paths. The execution order is: intent recognition path 1, intent recognition path 2, intent recognition path 3, intent recognition path 5, intent recognition path 4, and intent recognition path 6.

[0095] In one example, the intent recognition results of a completed intent recognition path are used to assist the intent recognition of the current intent recognition path, resulting in the intent recognition result of the current intent recognition path. There is a correlation between the completed intent recognition paths and the current intent recognition path. For example, intent recognition path 4 is executed before intent recognition path 6. When intent recognition path 6 is executed, intent recognition path 4 has already been completed. At this time, the intent recognition result of intent recognition path 4 can be used to assist the intent recognition of intent recognition path 6. This allows the interaction between different intent dimensions to be considered during the recognition process, thereby improving the accuracy of intent recognition.

[0096] Taking the intent recognizer implemented through LLM as an example, intent recognition path 4 outputs relevant domain knowledge and intent subcategories. This relevant domain knowledge and intent subcategories are input into LLM. LLM refers to this relevant domain knowledge and intent subcategories to perform intent recognition on the relevant information of intent recognition path 6, thereby improving the accuracy of intent recognition for intent recognition path 6.

[0097] As shown in Figure 3, based on LLM extraction, product dimension information, feature dimension information, ..., scenario dimension information are obtained. The product dimension information is used as input to intent recognition path 1, and sequentially processed by the product knowledge base query module and the product recognizer, outputting product knowledge and a product recognition subset. The product knowledge base query module processes the product dimension information by retrieving it from the product knowledge base to obtain product knowledge. The product recognizer processes the product dimension information by using it as input and outputting a product recognition subset {product X, product Y}.

[0098] By processing multiple intent recognition paths, multiple intent recognition results are obtained, including product knowledge, product recognition subsets {product X, product Y}, feature knowledge, feature recognition subsets {feature a, feature b}, and scene recognition subsets {scene 1, scene 2}.

[0099] Figure 4 illustrates the implementation flow of the multi-path intent filtering and sorting step. As shown in Figure 4, the domain knowledge output by the intent recognition paths that output domain knowledge is integrated. For example, intent recognition path 1 outputs product knowledge, and intent recognition path 2 outputs feature knowledge. The product knowledge and feature knowledge are integrated to obtain the integrated domain knowledge.

[0100] Optionally, the domain knowledge output from each intent recognition path can be integrated in various ways. For example, it can be integrated by calling an LLM (Local Language Management) mechanism. For instance, a prompt can be generated asking users to process the following domain knowledge: "", resulting in structured information. This prompt is then used as input to the LLM, which integrates the domain knowledge output from each intent recognition path and outputs the integrated domain knowledge. Alternatively, the domain knowledge output from each intent recognition path can be integrated using rules, such as directly concatenating the domain knowledge output from each path to obtain the integrated domain knowledge.

[0101] The sets of intent subcategories output by related intent recognition paths are freely combined to obtain multiple candidate intent combinations. For example, intent recognition path 1 and intent recognition path 2 are related, and the intent subcategories output by intent recognition path 1 and intent recognition path 2 are freely combined to obtain candidate intent combinations including: (Product X, Feature a), (Product X, Feature b), (Product Y, Feature a), and (Product Y, Feature b); intent recognition path 2 and intent recognition path 3 are related, and the intent subcategories output by intent recognition path 2 and intent recognition path 3 are freely combined to obtain candidate intent combinations including: (Feature a, Scenario 1), (Feature a, Scenario 2), (Feature b, Scenario 1), and (Feature b, Scenario 2). Based on domain knowledge, product Y cannot have features a and b, and there is a conflict between product Y, features a, and features b. Therefore, the candidate intent combinations (Product Y, Feature a) and (Product Y, Feature b) are eliminated. Feature a conflicts with scenario 2, and feature b conflicts with scenario 1. Therefore, the alternative intent combinations (feature a, scenario 2) and (feature b, scenario 1) are eliminated. The remaining alternative intent combinations are: (product X, feature a), (product X, feature b), (feature a, scenario 1), and (feature b, scenario 2). The remaining alternative intent combinations can be called candidate intent combinations. These subsequent intent combinations are then combined across all dimensions to obtain the full-dimensional intent combinations (Product X, Feature a, Scenario 1) and (Product X, Feature b, Scenario 2). The product identifier outputs probabilities of Product X and Product Y of 0.6 and 0.3 respectively; the feature identifier outputs probabilities of Feature a and Feature b of 0.7 and 0.2 respectively; and the scenario identifier outputs probabilities of Scenario 1 and Scenario 2 of 0.6 and 0.3 respectively. Therefore, the probability of the full-dimensional intent combination (Product X, Feature a, Scenario 1) is 0.6 + 0.7 + 0.6 = 1.9, and the probability of the full-dimensional intent combination (Product X, Feature b, Scenario 2) is 0.6 + 0.2 + 0.3 = 1.1. The full-dimensional intent combination with the highest probability is selected as the user intent, i.e., the user intent is (Product X, Feature a, Scenario 1), meaning the user intent is to ask about Feature a of Product X in Scenario 1.

[0102] The intent recognition method provided in this application supports the expansion of multiple intent recognition paths, such as adding new intent recognition paths as needed. Different intent recognition paths can have overlapping scopes; that is, the intents corresponding to different dimensions of different intent recognition paths can partially overlap. For example, the dimension corresponding to intent recognition path 1 covers the dimension corresponding to intent recognition path 2. In other words, the dimension intent corresponding to intent recognition path 1 is the superior intent of the dimension intent corresponding to intent recognition path 2. For instance, intent recognition path 1 aims to recognize a query intent, while intent recognition path 2 aims to recognize a weather query intent.

[0103] The intent recognition method provided in this application constructs different intent recognition paths based on the multi-dimensional nature of intent. Each intent recognition path independently defines a classification target and intent classifier (i.e., intent recognizer). It decouples different dimensions of user queries and their inter-dimensional relationships based on LLM (Limited Memory Management). The execution order and method of multiple intent recognition paths are arranged based on these relationships. This allows for the expansion of intent recognition paths according to actual scenario needs. The functionality of intent recognition paths and intent coverage can overlap, while ensuring that the recognition process conforms to the mutual influence between intent dimensions. Furthermore, a corresponding domain knowledge base is introduced into the intent recognition path, supporting knowledge base retrieval to assist intent recognition for that path. Domain knowledge retrieval and integration based on multiple paths assist in the filtering of conflicting intent combinations and the ranking of all-dimensional combinations. By introducing domain knowledge, it assists LLM in correctly recognizing intents without fine-tuning, especially in professional domains, improving the accuracy of intent recognition. On the other hand, based on intent dimension decoupling and correlation analysis, related dimension combinations are subjected to conflict filtering, and the final recognition result is output by ranking all-dimensional intent combinations. The interaction between intents is considered, effectively avoiding the erroneous recognition of unreasonable intents. By comprehensively considering the ranking of various dimensions and their interaction effects, the optimal recognition result is output.

[0104] Figure 5 is a flowchart illustrating an intent recognition method provided in an embodiment of this application. This method can be executed by any device, equipment, platform, or cluster of devices with computing capabilities. This application embodiment does not specifically limit the specific computing device executing the method; a suitable computing device can be selected as needed. For example, it can be implemented by a server, meaning the intent recognition method can be implemented by a server to provide intent recognition services. Alternatively, it can be implemented on a cloud device, providing intent recognition services to cloud users in the form of a cloud service. Or, it can be implemented on a terminal device, directly recognizing user intent on the terminal device without going to the cloud, thus protecting user privacy. For ease of description, the form of the executing entity will not be distinguished in the following text; all will be described as executing devices. As shown in Figure 5, the intent recognition method provided in this application embodiment includes at least steps S501 to S503.

[0105] In step S501, the query text is obtained.

[0106] Taking a mobile phone as an example, a large language model is deployed on the mobile phone, which can provide intelligent question and answer services to users in the form of a mobile phone intelligent assistant.

[0107] For example, when a user has a question that needs answering, they can activate their phone's smart assistant and manually enter a natural query as the search text in the assistant's question-and-answer input box. For instance, the user taps the question-and-answer input box on the phone's touchscreen to bring up the virtual keyboard, then enters the query text "Which department should I go to for chest tightness and shortness of breath?" in the input box and clicks the "OK" button to submit the query. In response, the phone retrieves the query text and displays it on the phone's screen.

[0108] In another example, users can also input query text via voice. For instance, after waking up the phone's smart assistant, a user can directly ask a question through the microphone. The phone responds to the user's action, acquires the user's voice input, recognizes the voice content, and then converts it into query text. Specific methods for converting voice content into text content can be found in existing technologies, and will not be elaborated upon in this application.

[0109] It is understood that the methods for obtaining query text by terminal devices described above are merely illustrative and do not constitute a limitation on the scope of protection of the embodiments of this application.

[0110] In step S502, the query text is processed for intent recognition through multiple intent recognition paths to obtain multiple intent recognition results.

[0111] Users can pre-build N intent recognition paths according to actual business needs. Each intent recognition path is used to recognize intent in one dimension.

[0112] After obtaining the user's input query, the LLM (Limited Language Management) is invoked to extract information related to each intent recognition path from the query, based on the definitions of different intent recognition paths. For example, a prompt is generated based on the query and the definitions of each intent recognition path. This prompt is used as input to the LLM, instructing it to extract information from the query by referring to the definitions of each intent recognition path and outputting the relevant information for each intent recognition path. In one example, prompts can be generated using pre-set prompt templates, such as: Intent recognition path 1 is used to identify product intent; please help me extract information about the product from the query: "..."; Intent recognition path 2 is used to identify feature intent; please help me extract information about the feature from the query: "..."; ...; Intent recognition path n is used to identify scenario intent; please help me extract information about the scenario from the query: "...". In some examples, the prompt template can also provide examples for the LLM to reference, improving the accuracy of LLM's information extraction.

[0113] In one example, each intent recognition path includes an intent recognizer. The extracted information about each intent recognition path is used as input to the intent recognizer for each path, and the output is the intent sub-category corresponding to each intent recognition path. Based on the intent sub-categories corresponding to each intent recognition path, multiple intent recognition results are obtained. For example, the intent recognizer for each intent recognition path outputs the top k_n intent sub-categories with the highest probabilities. The number of intent sub-categories output by the intent recognizers for different intent recognition paths can be the same or different.

[0114] Thus, each intent recognition path returns k_n intent subcategories. The k_n intent subcategories output by the intent recognition path each day constitute multiple intent recognition results. For example, if there are a total of 4 intent recognition paths, including intent recognition path 1, intent recognition path 2, intent recognition path 3, and intent recognition path 4, then intent recognizer 1 of intent recognition path 1 outputs two intent subcategories: intent 1.1 and intent 1.2; intent recognizer 2 of intent recognition path 2 outputs three intent subcategories: intent 2.1, intent 2.2, and intent 2.3; intent recognizer 3 of intent recognition path 3 outputs two intent subcategories: intent 3.1 and intent 3.2; and intent recognizer 4 of intent recognition path 4 outputs one intent subcategory: intent 4.1. Therefore, the multiple intent recognition results include intent subcategory set 1 (intent 1.1, intent 1.2), intent subcategory set 2 (intent 2.1, intent 2.2, intent 2.3), intent subcategory set 3 (intent 3.1, intent 3.2), and intent subcategory set 4 (intent 4.1).

[0115] The specific implementation of the intent recognizer is described above and will not be repeated here for the sake of brevity.

[0116] In step S503, the intent corresponding to the query text is obtained based on multiple intent recognition results.

[0117] After obtaining the intent sub-category set output by each intent recognition path, in one example, the intent sub-categories in different intent sub-category sets can be freely combined to obtain multiple candidate intent combinations. Then, LLM is called to analyze the conflicting intent combinations among the multiple candidate intent combinations, and the conflicting intent combinations are eliminated. The remaining intent combinations are used as candidate intent combinations. Then, based on the probability of the candidate intent combinations, the intent combination with the highest probability is selected as the currently recognized user intent.

[0118] For example, there are three intent recognition paths: Intent Recognition Path 1, Intent Recognition Path 2, and Intent Recognition Path 3. Intent Recognition Path 1 outputs the intent sub-category set (Intent 1.1, Intent 1.2), Intent Recognition Path 2 outputs the intent sub-category set (Intent 2.1, Intent 2.2), and Intent Recognition Path 3 outputs the intent sub-category set (Intent 3.1, Intent 3.2). The alternative intent combinations after free combination include: (Intent 1.1, Intent 2.1, Intent 3.1), (Intent 1.1, Intent 2.1, Intent 3.2), etc. .2), (Intention 1.1, Intention 2.2, Intention 3.1), (Intention 1.1, Intention 2.2, Intention 3.2), (Intention 1.2, Intention 2.1, Intention 3.1), (Intention 1.2, Intention 2.2, Intention 3.1), (Intention 1.2, Intention 2.2, Intention 3.2); then, through LLM analysis, alternative intention combinations are obtained, (Intention 1.2, Intention 2.1, Intention 3.1), (Intention 1.2, Intention 2.2, Intention 3.1), (Intention 1.2, Intention 2.2, Intention 3.2) have conflicts, and they are eliminated. The remaining intent combinations (intent 1.1, intent 2.1, intent 3.1), (intent 1.1, intent 2.1, intent 3.2), (intent 1.1, intent 2.2, intent 3.1), and (intent 1.1, intent 2.2, intent 3.2) are used as candidate intent combinations. The probability of each intent combination is calculated. Based on the probability of each intent sub-category in the intent combination (i.e., the probability of that sub-category output by the intent recognizer) and the probability of the candidate intent combination, the probability of the candidate intent combination is obtained. Taking Figure 2.1 and Intent 3.1 as examples, the probability of Intent 1.1 is 0.7, the probability of Intent 2.1 is 0.6, and the probability of Intent 3.1 is 0.4. Therefore, the probability of the candidate intent combination (Intent 1.1, Intent 2.1, Intent 3.1) is 0.7 + 0.6 + 0.4 = 1.7. After calculation, the candidate intent combination (Intent 1.1, Intent 2.1, Intent 3.2) has the highest probability. Therefore, the candidate intent combination (Intent 1.1, Intent 2.1, Intent 3.2) is taken as the currently identified user intent.

[0119] In another example, the relationships between multiple intent recognition paths are used to combine the sets of intent subcategories output by different intent recognition paths to obtain multiple candidate intent combinations. That is, the sets of intent subcategories output by intent recognition paths with relationships are freely combined to obtain multiple candidate intent combinations. For example, intent recognition path 1 and intent recognition path 2 are related; freely combining the intent subcategories output by intent recognition path 1 and intent recognition path 2 yields candidate intent combinations including: (Product X, Feature a), (Product X, Feature b), (Product Y, Feature a), and (Product Y, Feature b); intent recognition path 2 and intent recognition path 3 are related; freely combining the intent subcategories output by intent recognition path 2 and intent recognition path 3 yields candidate intent combinations including: (Feature a, Scenario 1), (Feature a, Scenario 2), (Feature b... The candidate intent combinations are then analyzed using LLM (Layer Modeling). Conflicting intent combinations are identified, eliminating those with conflicting intents. The remaining combinations are then used as candidate intent combinations. These subsequent combinations are then combined across all dimensions to obtain full-dimensional intent combinations. For example, candidate intent combinations might include: (Product X, Feature a), (Product X, Feature b), (Feature a, Scenario 1), and (Feature b, Scenario 2). After full-dimensional combination, the resulting full-dimensional intent combinations are: (Product X, Feature a, Scenario 1) and (Product X, Feature b, Scenario 2). The probability of each full-dimensional combination is then calculated, and the combination with the highest probability is selected as the currently identified user intent.

[0120] In another example, all or part of the intent recognition path also includes a domain knowledge retrieval module, which is used to retrieve domain knowledge corresponding to the dimension of the intent recognition path. When filtering intent combinations, the retrieved domain knowledge is used to assist LLM in identifying conflicting intent combinations to obtain candidate intent combinations. Then, the candidate intent combinations are combined in all dimensions to obtain all-dimensional intent combinations. The probability of each all-dimensional combination is calculated, and the all-dimensional combination with the highest probability is selected as the currently identified user intent.

[0121] For example, by freely combining the sets of intent subcategories output from intent recognition paths with related relationships, the candidate intent combinations include: (Product X, Feature a), (Product X, Feature b), (Product Y, Feature a), (Product Y, Feature b), (Feature a, Scenario 1), (Feature a, Scenario 2), (Feature b, Scenario 1), and (Feature b, Scenario 2). Based on domain knowledge, Product Y cannot possess both Feature a and Feature b; there is a conflict between Product Y, Feature a, and Feature b. Therefore, the candidate intent combinations (Product Y, Feature a) and (Product Y, Feature b) are eliminated. Feature a conflicts with Scenario 2, and Feature b conflicts with Scenario 1; therefore, the candidate intent combinations (Feature a, Scenario 2) and (Feature b, Scenario 1) are also eliminated. The remaining candidate intent combinations include: (Product X, Feature a), (Product X, Feature b), (Feature a, Scenario 1), and (Feature b, Scenario 2). The remaining alternative intent combinations can be called candidate intent combinations. These candidate intent combinations are then combined across all dimensions to obtain full-dimensional intent combinations (Product X, Feature a, Scenario 1) and (Product X, Feature b, Scenario 2). The probability of each full-dimensional combination is then calculated, and the full-dimensional combination with the highest probability is selected as the currently identified user intent. For example, as shown in Figure 4, the finally identified user intent is (Product X, Feature a, Scenario 1).

[0122] In another example, considering that the information contained in the user's input query may be insufficient to identify the full range of intents, the intent recognition method provided in this application further includes, if the information contained in the user's query is insufficient, rewriting the query and re-identifying it based on the recognition results of the previous round and the recalled domain knowledge. In this way, through multiple iterations, the information is supplemented to obtain a complete intent recognition result.

[0123] In one example, you can set an upper limit for the number of iterations or the response time. If the upper limit is reached, the iteration stops, and an incomplete intent recognition result is forced to be output. For example, if the number of iterations is set to 10, and the required dimension of intent recognition is not completed after 10 iterations, an incomplete intent recognition result will be forced to be output. Alternatively, if the response time is set to 30 seconds, and the required dimension of intent recognition is not completed after 30 seconds, an incomplete intent recognition result will be forced to be output.

[0124] In another example, if the required intent recognition result is still not identified after reaching the iteration count or response time limit, the LLM will ask follow-up questions. For example, if the scenario dimension information is still not identified after multiple iterations, the LLM can ask the user, "What is the application scenario of the product in question?" so that the user can answer the missing information in a targeted manner.

[0125] Based on the same concept as the aforementioned embodiment of the intent recognition method, this application also provides an intent recognition device 600. This intent recognition device 600 can be applied to the pre-processing query routing module of an Agent intelligent system. It can be implemented through software code in computer memory, without special requirements on computer hardware or operating system. For example, it can be mounted on a cloud server, local server, or terminal device to achieve intent recognition of query text from multiple dimensions, improving the accuracy of intent recognition. The intent recognition device 600 includes units or modules for implementing the various steps in the intent recognition method shown in Figures 2-5.

[0126] Figure 6 is a schematic diagram of an intent recognition device provided in an embodiment of this application. As shown in Figure 6, the intent recognition device 600 includes an acquisition module 601, a multi-path recognition module 602, and an intent recognition module 603. The acquisition module 601 is used to acquire query text; the multi-path recognition module 602 is used to perform intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results. The multiple intent recognition paths are used to perform intent recognition on the query text from multiple dimensions; the intent recognition module 603 is used to obtain the intent corresponding to the query text based on the multiple intent recognition results.

[0127] In one possible implementation, the intent recognition device 600 provided in this application further includes an extraction module 604, which is used to extract information from the query text based on the definition of each intent recognition path, and obtain relevant information related to each intent recognition path in the query text.

[0128] In another possible implementation, the extraction module 604 is specifically used to generate a first prompt based on the query text and the definition of each intent recognition path; the first prompt is used as input to the first large language model, instructing the first large language model to extract information from the query text with reference to the definition of each intent recognition path, and output the relevant information of each intent recognition path.

[0129] In another possible implementation, each intent recognition path includes an intent recognizer, which is used to identify the intent sub-category of the dimension corresponding to the intent recognition path; the multi-path recognition module 602 is specifically used to take the relevant information of each intent recognition path as the input of the intent recognizer of each recognition path, and output the intent sub-category corresponding to each intent recognition path; based on the intent sub-category corresponding to each intent recognition path, multiple intent recognition results are obtained.

[0130] In another possible implementation, the multi-path recognition module 602 is specifically used to determine the execution order of multiple intent recognition paths based on the association between them, wherein the association between the multiple intent recognition paths is determined based on the relevant information of each intent recognition path; according to the execution order, the multiple intent recognition paths are executed to perform intent recognition processing on the query text, and the intent recognition results of each intent recognition path are obtained; based on the intent recognition results of each intent recognition path, multiple intent recognition results are obtained.

[0131] In another possible implementation, following the execution order, multiple intent recognition paths are executed to process the query text for intent recognition, and the intent recognition results of each intent recognition path are obtained. One specific implementation is as follows: the intent recognition results of the completed intent recognition paths are used to assist the current intent recognition path in intent recognition, and the intent recognition result of the current intent recognition path is obtained. There is a correlation between the completed intent recognition paths and the current intent recognition path.

[0132] In another possible implementation, multiple intent recognition results include multiple intent subcategories corresponding to each intent recognition path; the intent recognition module 603 is specifically used to associate and combine multiple intent subcategories corresponding to different intent recognition paths based on the association relationship of multiple intent recognition paths to obtain multiple candidate intent combinations, the association relationship of multiple intent paths is determined based on the relevant information of each intent recognition path; based on multiple candidate intent combinations, the intent corresponding to the query text is determined.

[0133] In another possible implementation, the multiple intent recognition paths include a first type of intent recognition path, which includes a knowledge retrieval module and an intent recognizer. The intent recognition result corresponding to the first type of intent recognition path also includes retrieval knowledge, which is obtained from the knowledge base by the knowledge retrieval module using relevant information. A specific implementation of determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations; based on the multiple candidate intent combinations, the intent corresponding to the query text is determined.

[0134] In another possible implementation, based on retrieval knowledge, a specific implementation of eliminating conflicting intent combinations from multiple candidate intent combinations to obtain multiple candidate intent combinations is as follows: Based on retrieval knowledge and the multiple candidate intent combinations, a second prompt is generated; the second prompt is used as input to a second language model, instructing the second language model to identify conflicting intent combinations from the multiple candidate intent combinations with reference to retrieval knowledge, and outputting the conflicting intent combinations; the conflicting intent combinations are eliminated from the multiple candidate intent combinations to obtain multiple candidate intent combinations.

[0135] In another possible implementation, a specific approach to determining the intent corresponding to the query text based on multiple candidate intent combinations is as follows: determine the probability of each candidate intent combination based on the sum of the probabilities of the intent subcategories in each candidate intent combination; and determine the intent combination with the highest probability among the multiple candidate intent combinations as the intent corresponding to the query text.

[0136] In another possible implementation, the intent recognition device 600 provided in this application further includes a re-recognition module 605; the re-recognition module 605 is used to determine that the query text contains insufficient information; based on the intent corresponding to the query text and the retrieval knowledge, the query text is rewritten to obtain the rewritten query text; intent recognition is performed on the rewritten query text; after multiple iterations, the intent corresponding to the query text is obtained.

[0137] Optionally, multiple intent recognition paths can be extended to add new intent recognition paths.

[0138] The intent recognition device 600 according to the embodiments of this application can correspond to the execution of the methods described in the embodiments of this application, and the above and other operations and / or functions of each module in the intent recognition device 600 are respectively to implement the corresponding processes of each method in FIG2-5. For the sake of brevity, they will not be described again here.

[0139] This application also provides a computing device including at least one processor, a memory, and a communication interface, wherein the processor is used to execute the method described in Figures 2-5.

[0140] Figure 7 is a schematic diagram of the structure of the computing device provided in the embodiment of this application.

[0141] As shown in Figure 7, the computing device 700 includes at least one processor 701, a memory 702, and a communication interface 703. The processor 701, memory 702, and communication interface 703 are communicatively connected, which can be achieved via a wired (e.g., bus) or wireless connection. The communication interface 703 is used to send and / or receive data from other devices. The memory 702 stores computer instructions, which the processor 701 executes to perform the methods described in the preceding method embodiments, thereby improving the accuracy of intent recognition.

[0142] It should be understood that in the embodiments of this application, the processor 701 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0143] The memory 702 may include read-only memory and random access memory, and provides instructions and data to the processor 701. The memory 702 may also include non-volatile random access memory. Optionally, the random access memory may be, for example, high bandwidth memory (HBM).

[0144] The memory 702 can be volatile memory or non-volatile memory, or it can include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0145] It should be understood that the computing device 700 according to the embodiments of this application can execute the method shown in Figures 2-5 of the embodiments of this application. For a detailed description of the implementation of the method, please refer to the above text. For the sake of brevity, it will not be repeated here.

[0146] Embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein when the computer instructions are executed by a processor, the aforementioned method is implemented.

[0147] An embodiment of this application provides a chip including at least one processor and an interface, wherein the at least one processor determines program instructions or data through the interface; the at least one processor is used to execute the program instructions to implement the method mentioned above.

[0148] Embodiments of this application provide a computer program or computer program product that includes instructions that, when executed, cause a computer to perform the methods mentioned above.

[0149] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0150] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented using hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0151] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only a specific embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. An intent recognition method, characterized in that, include: Get the query text; The query text is processed by multiple intent recognition paths to obtain multiple intent recognition results. The multiple intent recognition paths are used to perform intent recognition on the query text from multiple dimensions. Based on the multiple intent recognition results, the intent corresponding to the query text is obtained.

2. The method according to claim 1, characterized in that, The step of performing intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results also includes: Based on the definition of each intent recognition path, information is extracted from the query text to obtain relevant information related to each intent recognition path in the query text.

3. The method according to claim 2, characterized in that, Based on the definitions of each intent recognition path, information is extracted from the query text to obtain relevant information related to each intent recognition path in the query text, including: A first prompt is generated based on the query text and the definitions of each intent recognition path; The first prompt is used as input to the first large language model, which is then instructed to extract information from the query text by referring to the definitions of each intent recognition path and output the relevant information of each intent recognition path.

4. The method according to claim 2 or 3, characterized in that, Each intent recognition path includes an intent recognizer, which is used to identify the intent sub-category of the dimension corresponding to the intent recognition path. The intent recognition processing of the query text through multiple intent recognition paths yields multiple intent recognition results, including: The relevant information of each intent recognition path is used as the input of the intent recognizer of each recognition path, and the intent sub-category corresponding to each intent recognition path is output. Based on the intent sub-category corresponding to each intent recognition path, the multiple intent recognition results are obtained.

5. The method according to any one of claims 1-3, characterized in that, The intent recognition processing of the query text through multiple intent recognition paths yields multiple intent recognition results, including: Based on the association between the multiple intent recognition paths, the execution order of the multiple intent recognition paths is determined, and the association between the multiple intent recognition paths is determined based on the relevant information of each intent recognition path; According to the execution order, the multiple intent recognition paths are executed to perform intent recognition processing on the query text, and the intent recognition results of each intent recognition path are obtained; Based on the intent recognition results of each intent recognition path, the multiple intent recognition results are obtained.

6. The method according to claim 5, characterized in that, The process of executing the multiple intent recognition paths to perform intent recognition processing on the query text according to the execution order, and obtaining the intent recognition results of each intent recognition path, includes: The intent recognition results of the completed intent recognition path are used to assist the current intent recognition path in intent recognition, thereby obtaining the intent recognition result of the current intent recognition path. There is a correlation between the completed intent recognition path and the current intent recognition path.

7. The method according to any one of claims 1-6, characterized in that, The multiple intent recognition results include multiple intent subcategories corresponding to each intent recognition path; The step of determining the intent corresponding to the query text based on the multiple intent recognition results includes: Based on the association between the multiple intent recognition paths, multiple intent subcategories corresponding to different intent recognition paths are associated and combined to obtain multiple candidate intent combinations. The association between the multiple intent paths is determined based on the relevant information of each intent recognition path. Based on the multiple alternative intent combinations, the intent corresponding to the query text is determined.

8. The method according to claim 7, characterized in that, The multiple intent recognition paths include a first type of intent recognition path, which includes a knowledge retrieval module and an intent recognizer; the intent recognition result corresponding to the first type of intent recognition path also includes retrieved knowledge, which is obtained from the knowledge base by the knowledge retrieval module using the relevant information; The step of determining the intent corresponding to the query text based on the multiple candidate intent combinations includes: Based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations. Based on the combination of the multiple candidate intents, the intent corresponding to the query text is determined.

9. The method according to claim 8, characterized in that, Based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations, including: Based on the retrieved knowledge and the combination of the multiple alternative intents, a second suggestion is generated; The second prompt is used as input to the second language model, which is then instructed to identify conflicting intent combinations among the multiple candidate intent combinations by referring to the retrieval knowledge, and output the conflicting intent combinations. The conflicting intent combinations are eliminated from the plurality of alternative intent combinations to obtain the plurality of candidate intent combinations.

10. The method according to claim 8 or 9, characterized in that, Determining the intent corresponding to the query text based on the combination of the multiple candidate intents includes: The multiple candidate intents are combined to obtain multiple full-dimensional intent combinations; The probability of each full-dimensional intent combination is determined based on the sum of the probabilities of the intent subcategories in each full-dimensional intent combination. The intent combination with the highest probability among the multiple multi-dimensional intent combinations is determined as the intent corresponding to the query text.

11. The method according to any one of claims 8-10, characterized in that, Also includes: The query text was found to contain insufficient information. Based on the intent corresponding to the query text and the retrieval knowledge, the query text is rewritten to obtain the rewritten query text. Intent recognition is performed on the rewritten query text; After multiple iterations, the intent corresponding to the query text is obtained.

12. The method according to any one of claims 1-11, characterized in that, The multiple intent recognition paths can be extended to add new intent recognition paths.

13. An intent recognition device, characterized in that, include: The retrieval module is used to retrieve the query text; The multi-path recognition module is used to perform intent recognition processing on the query text through multiple intent recognition paths to obtain multiple intent recognition results. The multiple intent recognition paths are used to perform intent recognition on the query text from multiple dimensions. The intent recognition module is used to obtain the intent corresponding to the query text based on the multiple intent recognition results.

14. The apparatus according to claim 13, characterized in that, It also includes an extraction module, which is used to extract information from the query text based on the definition of each intent recognition path, and obtain relevant information in the query text related to each intent recognition path.

15. The apparatus according to claim 14, characterized in that, The extraction module is specifically used to: generate a first prompt based on the query text and the definitions of each intent recognition path; The first prompt is used as input to the first large language model, which is then instructed to extract information from the query text by referring to the definitions of each intent recognition path and output the relevant information of each intent recognition path.

16. The apparatus according to claim 14 or 15, characterized in that, Each intent recognition path includes an intent recognizer, which is used to identify the intent sub-category of the dimension corresponding to the intent recognition path. The multi-path recognition module is specifically used to: take the relevant information of each intent recognition path as the input of the intent recognizer of each recognition path, and output the intent sub-category corresponding to each intent recognition path; Based on the intent sub-category corresponding to each intent recognition path, the multiple intent recognition results are obtained.

17. The apparatus according to any one of claims 13-15, characterized in that, The multi-path recognition module is specifically used to: determine the execution order of the multiple intent recognition paths based on the association between them, wherein the association between the multiple intent recognition paths is determined based on the relevant information of each intent recognition path; According to the execution order, the multiple intent recognition paths are executed to perform intent recognition processing on the query text, and the intent recognition results of each intent recognition path are obtained; Based on the intent recognition results of each intent recognition path, the multiple intent recognition results are obtained.

18. The apparatus according to claim 17, characterized in that, The process of executing the multiple intent recognition paths to perform intent recognition processing on the query text according to the execution order, and obtaining the intent recognition results of each intent recognition path, includes: The intent recognition results of the completed intent recognition path are used to assist the current intent recognition path in intent recognition, thereby obtaining the intent recognition result of the current intent recognition path. There is a correlation between the completed intent recognition path and the current intent recognition path.

19. The apparatus according to any one of claims 13-18, characterized in that, The multiple intent recognition results include multiple intent subcategories corresponding to each intent recognition path; The intent recognition module is specifically used to: based on the association relationship of the multiple intent recognition paths, associate and combine multiple intent subcategories corresponding to different intent recognition paths to obtain multiple candidate intent combinations, wherein the association relationship of the multiple intent paths is determined based on the relevant information of each intent recognition path; Based on the multiple alternative intent combinations, the intent corresponding to the query text is determined.

20. The apparatus according to claim 19, characterized in that, The multiple intent recognition paths include a first type of intent recognition path, which includes a knowledge retrieval module and the intent recognizer; the intent recognition result corresponding to the first type of intent recognition path also includes retrieved knowledge, which is obtained from the knowledge base by the knowledge retrieval module using the relevant information; The step of determining the intent corresponding to the query text based on the multiple candidate intent combinations includes: Based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations. Based on the combination of the multiple candidate intents, the intent corresponding to the query text is determined.

21. The apparatus according to claim 20, characterized in that, Based on the retrieval knowledge, conflicting intent combinations among the multiple candidate intent combinations are eliminated to obtain multiple candidate intent combinations, including: Based on the retrieved knowledge and the combination of the multiple alternative intents, a second suggestion is generated; The second prompt is used as input to the second language model, which is then instructed to identify conflicting intent combinations among the multiple candidate intent combinations by referring to the retrieval knowledge, and output the conflicting intent combinations. The conflicting intent combinations are eliminated from the plurality of alternative intent combinations to obtain the plurality of candidate intent combinations.

22. The apparatus according to claim 20 or 21, characterized in that, Determining the intent corresponding to the query text based on the combination of the multiple candidate intents includes: The multiple candidate intents are combined to obtain multiple full-dimensional intent combinations; The probability of each full-dimensional intent combination is determined based on the sum of the probabilities of the intent subcategories in each full-dimensional intent combination. The intent combination with the highest probability among the multiple multi-dimensional intent combinations is determined as the intent corresponding to the query text.

23. The apparatus according to any one of claims 20-22, characterized in that, It also includes a re-identification module; The re-identification module is used to: determine that the query text contains insufficient information; Based on the intent corresponding to the query text and the retrieval knowledge, the query text is rewritten to obtain the rewritten query text. Intent recognition is performed on the rewritten query text; After multiple iterations, the intent corresponding to the query text is obtained.

24. The apparatus according to any one of claims 13-23, characterized in that, The multiple intent recognition paths can be extended to add new intent recognition paths.

25. A computing device, comprising a memory and a processor, characterized in that, The memory stores instructions that, when executed by a processor, cause the method described in any one of claims 1-12 to be implemented.

26. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it causes the method as described in any one of claims 1-12 to be implemented.

27. A chip comprising at least one processor and a communication interface, characterized in that, The processor is used to perform the method as described in any one of claims 1-12.

28. A computer program or computer program product comprising instructions, characterized in that, When the instruction is executed, the computer performs the method as described in any one of claims 1-12.