An intent recognition method and device based on retrieval enhancement and related equipment
By using a pre-defined intent knowledge base classification structure and vector semantics technology, high-quality candidate intents are filtered and generated, solving the problem of large model response latency and achieving fast and accurate intent recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-03-03
- Publication Date
- 2026-07-21
AI Technical Summary
Large models have significant response latency when processing a large number of intents, which cannot meet the needs of real-time interaction.
By using the classification structure, keywords, and vector semantics of the pre-defined intent knowledge base, multiple high-quality candidate intents are identified and generated, reducing the number of intents input to the model. A hierarchical filtering mechanism and a pre-defined index table are used for fast retrieval, reducing the amount of input to the model.
By compressing 100,000 intents into 10-15 high-quality candidates, the response time was reduced from over 4 seconds to less than 150 milliseconds, and the recognition accuracy reached over 95%, improving the model's processing efficiency and recognition accuracy.
Smart Images

Figure CN122432271A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and specifically to an intent recognition method, apparatus, and related equipment based on retrieval enhancement. Background Technology
[0002] Large-scale models can understand input queries and efficiently identify the intent behind them. In related technologies, users input their queries into a large-scale model, which then identifies the intent and generates a corresponding response. However, the large-scale model can only handle a limited number of input intents. When there is a large amount of input, the model needs to use all of it as contextual input to identify the intent. In other words, the large-scale model directly processes intent identification, using all intent descriptions as contextual input. However, the input length of the large-scale model is limited. When the number of intents reaches tens of thousands or more, the number of context tokens exceeds 10,000, resulting in a response latency exceeding 4 seconds, which cannot meet the requirements of real-time interaction and leads to a significant processing delay for the large-scale model.
[0003] It is evident that the related technologies suffer from significant response latency issues when processing large models. Summary of the Invention
[0004] This invention provides an intent recognition method, apparatus, and related equipment based on retrieval enhancement to solve the problem of large response latency in large model processing in related technologies.
[0005] To solve the above problems, the present invention is implemented as follows: In a first aspect, embodiments of the present invention provide an intent recognition method based on retrieval enhancement, comprising: Receive user query requests; Based on the classification structure of the preset intent knowledge base, multiple first intents corresponding to the query request are determined, and the preset intent knowledge base is used to determine the intents corresponding to different query requests. Based on keywords, multiple second intents corresponding to the query request are retrieved from the preset intent knowledge base; Based on vector semantics, multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base; A plurality of fourth intentions are generated based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; Identify the target intent corresponding to the query request from the plurality of fourth intents.
[0006] Secondly, embodiments of the present invention provide an intent recognition device based on retrieval enhancement, comprising: The receiving module is used to receive user query requests; The determination module is used to determine multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests; The first retrieval module is used to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The second retrieval module is used to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics; The generation module is used to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The identification module is used to identify the target intent corresponding to the query request from the plurality of fourth intents.
[0007] Thirdly, embodiments of the present invention also provide an electronic device, including a transceiver and a processor. The transceiver is used to receive user query requests; The processor is configured to determine multiple first intents corresponding to the query request based on the classification structure of a preset intent knowledge base, wherein the preset intent knowledge base is configured to determine the intents corresponding to different query requests. The processor is further configured to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The processor is also configured to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics; The processor is further configured to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The processor is further configured to identify the target intent corresponding to the query request from the plurality of fourth intents.
[0008] Fourthly, embodiments of the present invention provide an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, it implements the steps of the retrieval-enhanced intent recognition method described in the first aspect.
[0009] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the intent recognition method based on retrieval enhancement described in the first aspect.
[0010] In a sixth aspect, the present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the retrieval-enhanced intent recognition method described in the first aspect.
[0011] In this embodiment of the invention, a user's query request is received; multiple first intents corresponding to the query request are determined based on the classification structure of a preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests; multiple second intents corresponding to the query request are retrieved from the preset intent knowledge base based on keywords; multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base based on vector semantics; multiple fourth intents are generated based on the multiple first intents, the multiple second intents, and the multiple third intents; and the target intent corresponding to the query request is identified from the multiple fourth intents. In this way, by pre-setting the classification structure, keywords, and vector semantics of the intent knowledge base, multiple first, second, and third intents are obtained from different paths. Then, multiple fourth intents are generated based on these first, second, and third intents, reducing the number of intents input to the model. This compresses hundreds of thousands of intents into 10-15 high-quality candidates, achieving a 99.9% candidate space compression. The target intent corresponding to the query request is identified from the multiple fourth intents, facilitating the generation of response content based on the target intent. Since the number of intents input to the model is controllable, it is not necessary to input all intents into the model, reducing the input of a large model from over 10,000 tokens to less than 500 tokens, and the response time from over 4 seconds to less than 150 milliseconds, achieving a recognition accuracy of over 95%. This effectively improves the model's processing efficiency and reduces its latency. Simultaneously, the high accuracy of the obtained first, second, and third intents leads to a high accuracy of the generated fourth intents, further improving the accuracy of the identified target intent. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart of an intent recognition method based on retrieval enhancement provided in an embodiment of the present invention; Figure 2 This is a structural diagram of an intent recognition system provided in an embodiment of the present invention; Figure 3 This is a structural diagram of an intent recognition device based on retrieval enhancement provided in an embodiment of the present invention; Figure 4This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] Please see Figure 1 , Figure 1 This is a flowchart of an intent recognition method based on retrieval enhancement provided by an embodiment of the present invention, such as... Figure 1 As shown, it includes the following steps: Step 101: Receive the user's query request.
[0016] The above query request is a user input request, which needs to be identified through intent recognition, and then a response needs to be given based on the identified intent.
[0017] Query requests can be received through an intent recognition system or a server equipped with intent recognition functionality. The results of the intent recognition system are as follows: Figure 2 As shown, Figure 2 This is a structural diagram of an intent recognition system provided in an embodiment of the present invention, illustrating a two-stage processing architecture: the first stage is an intelligent retrieval and compression stage based on a knowledge base, including a module for triple structure matching, a module for BM25 keyword retrieval, and a module for vector semantic retrieval; the second stage is a precise recognition stage based on a large model, including a module for context construction and a module for semantic reasoning. Through the intent recognition system, the intent of the input query request can be recognized, and the large model can be used to respond to the recognized intent.
[0018] Step 102: Determine multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests.
[0019] The aforementioned preset intent knowledge base (also known as a "hierarchical intent knowledge base") is a pre-configured database that includes multiple concrete instances of intents. These concrete instances are categorized using a classification structure to group different intents into different categories. When determining the multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base, the intent category corresponding to the query request is first determined, and then the multiple first intents corresponding to the query request are determined from the instances included in that intent category. Each instance can contain complete information such as an intent identifier, descriptive text, a 768-dimensional semantic vector, example representations, and a triple structure.
[0020] It should be understood that by determining multiple primary intents corresponding to a query request through a classification structure, the intent category to which the query request belongs is first determined, and then multiple primary intents are retrieved and identified within that category. This hierarchical filtering mechanism ensures that each primary intent belongs to the correct category related to the query request, thereby improving the overall accuracy of intent recognition.
[0021] Step 103: Retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords.
[0022] It should be noted that, in addition to identifying multiple primary intents through the classification structure mentioned above, since the preset intent knowledge base includes specific instances of multiple intents, multiple secondary intents corresponding to the query request can also be directly retrieved from these intents using keywords. In this way, obtaining multiple secondary intents corresponding to the query request through keyword retrieval expands the number of intents retrieved, providing sufficient input for subsequent filtering to obtain the target intent and improving the final recognition accuracy.
[0023] Specifically, retrieving multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords can be achieved by extracting keywords from the query request and then retrieving multiple second intents including the keywords from the preset intent knowledge base using those keywords.
[0024] Step 104: Retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics.
[0025] It should be noted that, in addition to determining the intent corresponding to the query request through classification structure and keywords, it is also possible to directly retrieve from multiple intents included in the preset intent knowledge base through vector semantics, so as to expand the number of intents obtained by retrieval, which can provide sufficient input for subsequent filtering of target intents and improve the accuracy of final recognition.
[0026] Among them, vector semantics refers to the vector semantics corresponding to the query request, and the vector semantics corresponding to the intents among the multiple intents included in the preset intent knowledge base. Based on the vector semantics, multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base. This can be done by calculating the similarity between the vector semantics corresponding to the query request and the vector semantics corresponding to different intents among the multiple intents, and then filtering to obtain multiple third intents.
[0027] Step 105: Generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions.
[0028] The number of the aforementioned multiple first intents, multiple second intents, multiple third intents, and multiple fourth intents can be the same or different. The number of multiple first intents, multiple second intents, multiple third intents, and multiple fourth intents can be configured according to requirements.
[0029] Among them, each of the multiple fourth intentions is a first intention, a second intention, or a third intention. That is, multiple fourth intentions are generated based on the multiple first intentions, the multiple second intentions, and the multiple third intentions. Specifically, multiple first intentions, multiple second intentions, and multiple third intentions can be used as intentions to be filtered, and then the intention that best matches the query request is selected from the intentions to be filtered, thus obtaining multiple fourth intentions.
[0030] In some implementations, generating multiple fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions can be achieved by determining whether an intention is simultaneously a first intention, a second intention, and / or a third intention. If an intention is simultaneously a first intention, a second intention, and / or a third intention, the probability that this intention is the target intention is higher, and in this case, this intention can be used as the fourth intention. Thus, intentions that are simultaneously first intentions, second intentions, and / or third intentions are selected as fourth intentions until the required number of fourth intentions are obtained.
[0031] Furthermore, after filtering for the first, second, and / or third intents simultaneously, if the required number of fourth intents has not yet been obtained, and the remaining intents are all different, the first intent can be prioritized as the fourth intent, then the second intent as the fourth intent, and finally the third intent as the fourth intent, in order to complete the filtering of the fourth intent.
[0032] Step 106: Identify the target intent corresponding to the query request from the plurality of fourth intents.
[0033] The aforementioned target intent is the intent that the identified query request ultimately corresponds to. Based on the target intent, the corresponding response content can be generated for the query request, thereby realizing the response to the query request.
[0034] The process of identifying the target intent corresponding to the query request from the multiple fourth intents can be achieved by inputting multiple fourth intents into a large model, identifying the target intent that best matches the query request from the multiple fourth intents through the large model, and generating response content for the target intent.
[0035] In this embodiment of the invention, a user's query request is received; multiple first intents corresponding to the query request are determined based on the classification structure of a preset intent knowledge base, which is used to determine the intents corresponding to different query requests; multiple second intents corresponding to the query request are retrieved from the preset intent knowledge base based on keywords; multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base based on vector semantics; multiple fourth intents are generated based on the multiple first intents, the multiple second intents, and the multiple third intents; and the target intent corresponding to the query request is identified from the multiple fourth intents. Thus, by using the classification structure, keywords, and vector semantics of the preset intent knowledge base, multiple first intents, multiple second intents, and multiple third intents are obtained from different paths, and multiple fourth intents are generated based on these first intents, multiple second intents, and multiple third intents, thereby reducing the number of intents input to the model; the target intent corresponding to the query request is identified from the multiple fourth intents, so as to generate response content based on the target intent. Since the number of intents input to the model is controllable, it is not necessary to input all intents into the model, thereby effectively improving the efficiency of model processing and reducing the latency of model processing. At the same time, since the accuracy of the multiple first intents, multiple second intents and multiple third intents obtained is high, the accuracy of the multiple fourth intents generated based on the multiple first intents, multiple second intents and multiple third intents is also high, which can further improve the accuracy of the target intents identified.
[0036] In one embodiment, the classification structure of the preset intent knowledge base includes a first level, a second level, and a third level. Determining multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base includes: The query request is parsed to obtain the action parameters, object parameters, and constraint parameters corresponding to the query request; The object parameters corresponding to the query request are matched based on the N major categories included in the first level to obtain the first major category corresponding to the query request, where N is a positive integer greater than or equal to 1; Based on the M subclasses corresponding to the first major category in the second level, the action parameters and object parameters corresponding to the query request are matched to obtain the first subclass corresponding to the query request, where M is a positive integer greater than or equal to 1; Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first intents.
[0037] The above-described parsing of the query request to obtain the corresponding action parameters, object parameters, and constraint parameters can be achieved using a lightweight sequence labeling model (inference takes only 5ms). It should be noted that the user-inputted query request can be decomposed into a triple structure of "Action + Object + Constraint" (i.e., action parameters, object parameters, and constraint parameters). For example, if the user-inputted query request is "Query last month's audit report," parsing the query request yields a triple structure including the action parameter "query," the object parameter "audit report," and the constraint parameter "last month." Then, multiple primary intents are determined sequentially using the action parameters, object parameters, and constraint parameters. This parsing and matching method based on the triple structure improves the accuracy of determining the primary intent.
[0038] In some implementations, to improve the accuracy of the first intent and avoid errors, the action parameter must be precisely matched with the first intent when performing recognition based on the action parameter. For example, if the action parameter is "query" and an intent instance is "delete last month's audit report," the two differ only in their actions. Matching them via vectors might lead to the intent being identified as a query request. However, in this invention, filtering is performed directly using the action parameter, which can filter out such intents, thereby improving the accuracy of intent recognition.
[0039] In some implementations, object parameters and constraint parameters can be matched to obtain intentions that are similar or identical to objects and have similar or identical constraint parameters, thereby achieving multiple first intentions.
[0040] It should be understood that by setting different weights for action parameters, object parameters, and constraint parameters, the first similarity between the action parameters of the query request and the action parameters of the intent can be calculated, the second similarity between the object parameters of the query request and the object parameters of the intent can be calculated, and the third similarity between the constraint parameters of the query request and the constraint parameters of the intent can be calculated. Then, the final similarity can be obtained by calculating the first similarity, the second similarity, and the third similarity. The final similarity and a preset threshold can be used to determine whether the intent is the first intent.
[0041] For example, the weight of the action parameter is 0.5, the weight of the object parameter is 0.3, the weight of the constraint parameter is 0.2, and the preset threshold is 0.8. Thus, if the action parameters are different, but the object and constraint parameters match perfectly (such as "query audit report" and "delete audit report"), the calculated final similarity is 0.5, which is less than the preset threshold. This ensures that the query request matches the action parameters of the initial intent, solving the problem that overall vector similarity cannot distinguish key differences.
[0042] Specifically, in this embodiment of the invention, the object parameters corresponding to the query request are matched based on the N major categories included in the first level to obtain the first major category corresponding to the query request. The intents included in the first major category are those that match the object parameters queried by the query request. Then, the action parameters and object parameters corresponding to the query request are matched based on the M subcategories corresponding to the first major category in the second level to obtain the first subcategory corresponding to the query request. The objects and actions in the first subcategory match the object parameters and action parameters of the query request. Finally, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched based on the multiple intents corresponding to the first subcategory in the third level to obtain multiple first intents. This ensures that each first intent matches the query request in terms of action parameters, object parameters, and constraint parameters, thereby improving the accuracy of the first intents.
[0043] It should be noted that the preset intent knowledge base has a classification structure including first, second, and third levels. This three-level classification structure categorizes different intents, facilitating the identification of multiple primary intents. The N main categories, M subcategories, and the intents included in each subcategory are pre-configured; an intent instance exists only in one main category and one subcategory. For example, as... Figure 2 As shown in Dimension 1, the first level is the business category, which includes 10-20 categories; the second level is the functional subcategories, which include 20-50 subcategories; and the third level is the specific intents, which include a total of 100,000 intents.
[0044] In this embodiment of the invention, the query request is parsed to obtain the action parameters, object parameters, and constraint parameters corresponding to the query request. The object parameters corresponding to the query request are matched based on the N major categories included in the first level to obtain the first major category corresponding to the query request, where N is a positive integer greater than or equal to 1. The action parameters and object parameters corresponding to the query request are matched based on the M subcategories corresponding to the first major category in the second level to obtain the first subcategory corresponding to the query request, where M is a positive integer greater than or equal to 1. The action parameters, object parameters, and constraint parameters corresponding to the query request are matched based on the multiple intents corresponding to the first subcategory in the third level to obtain the multiple first intents. Thus, by using a pre-defined intent knowledge base classification structure and the action parameters, object parameters, and constraint parameters corresponding to the query request, the accuracy of the multiple first intents obtained through matching is improved. At the same time, the classification structure effectively reduces the complexity of matching, thereby reducing the latency of query request processing.
[0045] In some implementations, three hash tables can be maintained for the triple structure: Action_Map stores the mapping from 200 action words to intent IDs, Object_Map stores the mapping from 5000 business objects, and Constraint_Map stores the mapping of constraints such as time and location. The first intent is obtained through matching using these three hash tables. For example, when querying "Delete last month's audit report", the triple {Delete, Audit Report, Last Month} is first extracted. The Action_Map is then used to precisely search for the intent set A_set (approximately 500 entries) corresponding to "Delete", and the Object_Map is used to search for the set O_set (approximately 200 entries) corresponding to "Audit Report". The intersection A_set ∩ O_set yields candidate intents (approximately 10). The actions must be precisely matched to avoid the risk of data loss due to misidentifying "Delete" as "Query".
[0046] In one embodiment, the matching of action parameters, object parameters, and constraint parameters corresponding to the query request based on multiple intents corresponding to the first subclass in the third level to obtain the multiple first intents includes: Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first initial intents; The plurality of first initial intentions are filtered based on a preset intention relationship network to obtain the plurality of first intentions. The preset intention relationship network includes the relationship type between any two first initial intentions among the plurality of first initial intentions. Wherein, if the relationship type indicates that the two first initial intentions are mutually exclusive, one of the two first initial intentions is deleted.
[0047] The aforementioned preset intent relationship network includes the relationship type between any two first initial intents among multiple first initial intents. The preset intent relationship network is pre-configured and is used to achieve more accurate matching of first intents.
[0048] In some implementations, the preset intent relationship network can be represented as G=(V,E), where G is the preset intent relationship network, V is the set of intent nodes (i.e., the set of different intents), and E is the set of associated edges (i.e., the relationship type between any two intents).
[0049] Among them, the relation type is as follows: Figure 2 Dimension 2, as shown, includes mutual exclusion, dependency, and similarity relationships. Mutually exclusive relationships (Em) identify logically mutually exclusive intent pairs, such as "apply for reimbursement" and "cancel reimbursement" cannot both be true, used to exclude logically conflicting candidates during the retrieval phase. Dependency relationships (Ed) represent preconditions between intents, such as "query order status" presupposes "order placed," used to verify the rationality of candidate intents. Similarity relationships (Es) connect groups of intents with similar functions; connections are established when the similarity exceeds a threshold of 0.7, used for candidate expansion and error tolerance. Dependency and similarity relationships are used to expand the number of initial intents obtained through filtering, while mutually exclusive relationships are used to remove conflicting initial intents, thus obtaining multiple initial intents.
[0050] It should be understood that these relationship types are specific to the intent identification in this application, and document retrieval alone does not meet this logical verification requirement. Through constraint verification of the relationship network, the system can filter out unreasonable candidates during the retrieval stage, significantly improving the logical correctness of the final identification.
[0051] In this embodiment of the invention, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched based on multiple intents corresponding to the first subclass in the third level to obtain multiple first initial intents; the multiple first initial intents are then filtered based on a preset intent relationship network to obtain multiple first intents, wherein the preset intent relationship network includes the relationship type between any two of the multiple first initial intents; wherein, if the relationship type indicates that the two first initial intents are mutually exclusive, one of the two first initial intents is deleted. Thus, by using the preset intent relationship network to filter and obtain multiple first intents, the accuracy of the first intents is further improved.
[0052] In one embodiment, retrieving multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords includes: Extract keywords from the query request; Based on a preset index table, multiple second intents corresponding to the keywords are queried. The preset index table includes multiple mapping relationships, and each mapping relationship is used to represent the intents in the preset intent knowledge base corresponding to different keywords.
[0053] The aforementioned preset index table is pre-configured and includes multiple mapping relationships. Each mapping relationship is used to represent the intent in the preset intent knowledge base corresponding to different keywords. By pre-configuring the preset index table, multiple secondary intents can be quickly determined based on the keywords in the query request and the preset index table after receiving a query request, thereby improving retrieval efficiency.
[0054] The process of querying multiple secondary intents corresponding to the keywords based on a preset index table can employ BM25 keyword retrieval, with a focus on adapting to the domain characteristics of intent recognition. It should be understood that, unlike general document retrieval, intent recognition requires particular attention to the precise matching of action words and business terms. In this invention, a vocabulary is maintained, containing highly distinctive action words (such as "approval," "revocation," and "query") and domain terms (such as "compliance audit" and "risk assessment"), giving these words higher weight in the BM25 calculation. Simultaneously, by maintaining a preset index table to index example expressions of intents, it ensures compatibility with diverse user input methods, improving retrieval efficiency.
[0055] In this embodiment of the invention, keywords are extracted from the query request; multiple second intents corresponding to the keywords are queried based on a preset index table, where the preset index table includes multiple mapping relationships, each mapping relationship representing an intent in the preset intent knowledge base corresponding to different keywords. Thus, multiple second intents can be quickly retrieved using the preset index table and keywords.
[0056] In some implementations, the BM25 keyword index handles queries containing technical terms. A pre-defined index table stores the word segmentation results for each intent. BM25 uses differentiated IDF weights for different types of words during calculation: the IDF of action words is multiplied by 2.0 (e.g., the IDF of "approval" increases from 3.5 to 7.0), the IDF of technical terms is multiplied by 1.5 (e.g., "compliance" increases from 4.2 to 6.3), while general terms remain unchanged. When querying "compliance approval process," the BM25 score = 7.0 × (1 × 2.4) / (1 + 1.4) + 6.3 × (1 × 2.4) / (1 + 1.4) + 2.1 × (1 × 2.4) / (1 + 1.4) = 22.56. This weighted strategy results in higher scores for intents containing key action words and technical terms. BM25 retrieval takes 10ms and has an accuracy rate of 94% for technical queries.
[0057] Among them, the IDF weights can be obtained through methods such as Figure 2 The parameters shown in dimension three are used to determine the IDF weights, including parameters such as usage frequency, access time, and seasonality.
[0058] In one embodiment, retrieving multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics includes: Based on the query vector corresponding to the query request, multiple third initial intents are retrieved from the preset intent knowledge base, and the initial similarity between each of the multiple third initial intents and the query vector is greater than a first threshold. Determine the category corresponding to each third initial intent and the category corresponding to the query request; Based on the initial similarity between each third initial intent and the query vector, the major category corresponding to each third initial intent and the major category corresponding to the query request, the intermediate similarity corresponding to the corresponding third initial intent is calculated respectively. The plurality of third intentions are determined based on the intermediate similarity corresponding to the plurality of third initial intentions. The intermediate similarity corresponding to the plurality of third intentions is greater than the intermediate similarity corresponding to other third initial intentions. The other third initial intentions are third initial intentions other than the plurality of third initial intentions.
[0059] In this embodiment of the invention, multiple third initial intents are retrieved from the preset intent knowledge base based on the query vector corresponding to the query request. The initial similarity between each of the multiple third initial intents and the query vector is greater than a first threshold. The major category corresponding to each third initial intent and the major category corresponding to the query request are determined. Based on the initial similarity between each third initial intent and the query vector, the major category corresponding to each third initial intent, and the major category corresponding to the query request, intermediate similarities are calculated for each corresponding third initial intent. The multiple third intents are determined based on the intermediate similarities corresponding to the multiple third initial intents, where the intermediate similarity of the multiple third intents is greater than the intermediate similarity of other third initial intents, and the other third initial intents are third initial intents other than the multiple third initial intents. Thus, multiple third intents are retrieved through the query vector corresponding to the query request, and these multiple third intents have an intermediate similarity with the query vector greater than the similarity with other third initial intents, thereby improving the accuracy of the retrieved multiple third intents.
[0060] In one embodiment, the plurality of third initial intentions include intermediate intentions, and the step of calculating the intermediate similarity corresponding to each third initial intention based on the initial similarity between each third initial intention and the query vector, the major category corresponding to each third initial intention, and the major category corresponding to the query request includes: If the category corresponding to the intermediate intent matches the category corresponding to the query request, the initial similarity between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent. If the category corresponding to the intermediate intent does not match the category corresponding to the query request, the product of the initial similarity and the preset coefficient between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent.
[0061] It should be understood that since the preset intent knowledge base includes major categories and subcategories, the intermediate similarity can be corrected by major categories, reducing the similarity of the third initial intents that belong to different major categories from the query vector. This makes the multiple third intents finally selected as much as possible belong to the same major category as the query vector, thereby improving the accuracy of the third intents.
[0062] Furthermore, the similarity between the subclass of the third initial intent and the subclass of the query vector can be calculated, and the similarity can be used as a weight to further correct the intermediate similarity. Then, multiple third intents can be obtained by filtering through the corrected intermediate similarity.
[0063] Specifically, in this embodiment of the invention, when the category corresponding to the intermediate intent matches the category corresponding to the query request, the initial similarity between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent; when the category corresponding to the intermediate intent does not match the category corresponding to the query request, the product of the initial similarity between the intermediate intent and the query vector and a preset coefficient is set as the intermediate similarity corresponding to the intermediate intent. In this way, the accuracy of multiple third intents is improved by utilizing the categories included in the preset intent knowledge base.
[0064] This involves using a pre-trained encoder to convert query requests into 768-dimensional query vectors, and then searching for the most similar intent in the vector space (i.e., vectors containing multiple intents from a pre-defined intent knowledge base). However, unlike document retrieval, intent vector retrieval needs to consider category boundaries—not only calculating cosine similarity, but also verifying whether candidate intents and queries belong to the same major category or adjacent subcategories, avoiding cross-domain mismatches and effectively improving the accuracy of the filtered third intents.
[0065] For example, the vector index built using the HNSW algorithm contains 768-dimensional BERT vectors for all intents. During a query, the user input is first encoded into a query vector q, and then the 100 nearest neighbors are found in HNSW. However, pure vector similarity is prone to cross-domain mismatches, so a category constraint is introduced: when calculating the similarity between q and candidate intent i, if i and q belong to the same major category, the similarity remains unchanged at sim(q,i); if they belong to different major categories, the similarity is reduced to 0.5×sim(q,i). For example, the vector for "view payslip" has a similarity of 0.82 to "view order," but because they belong to the "HR" and "Transaction" categories respectively, the actual score is reduced to 0.41, avoiding mismatches. HNSW retrieval takes 15ms and has a recall rate of 95%.
[0066] In one embodiment, generating a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions includes: Calculate a score for each of the plurality of first intents, the plurality of second intents, and the plurality of third intents, wherein the score is used to characterize the matching status between the corresponding intent and the action parameters, object parameters, and constraint parameters corresponding to the query request, respectively; The plurality of fourth intentions are determined, wherein the scores of the plurality of fourth intentions are greater than the scores of other intentions, wherein the other intentions are the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions other than the plurality of fourth intentions.
[0067] The above scores are used to characterize the matching between the corresponding intent and the action parameters, object parameters, and constraint parameters corresponding to the query request. The higher the score, the closer the intent is to the true intent of the query request.
[0068] In some implementations, the similarity between each intent and the query request can be calculated sequentially across three dimensions: action parameters, object parameters, and constraint parameters. The similarity scores are then weighted to obtain a score for each intent.
[0069] In this embodiment of the invention, a score is calculated for each of the plurality of first intents, the plurality of second intents, and the plurality of third intents. The score characterizes the matching degree between the corresponding intent and the action parameters, object parameters, and constraint parameters corresponding to the query request. A plurality of fourth intents are determined, wherein the scores of the plurality of fourth intents are greater than the scores of the other intents, which are intents other than the plurality of first intents, the plurality of second intents, and the plurality of third intents. Thus, by calculating the score of each intent, the relevance of each intent to the query request can be determined by the score, and a plurality of fourth intents can be obtained by filtering based on the score.
[0070] In some implementations, multiple first intentions, multiple second intentions, and multiple third intentions can be filtered through a preset intention relationship network to filter out intentions with mutually exclusive relationships, thereby further improving the accuracy of multiple fourth intentions.
[0071] For example, first, check if there are any mutual exclusion conflicts among the candidate's multiple first intentions, multiple second intentions, and multiple third intentions. If both "open" and "close" appear simultaneously, a re-evaluation is required. Second, verify whether the dependencies are satisfied to ensure that the fourth intention is reasonable in the current context. Finally, adjust the order based on the score of the intention usage. Only candidates that pass all verifications are included in the final multiple fourth intentions, such as 15 fourth intentions.
[0072] Furthermore, the score for the i-th intent can be expressed as: Score(i) = α × S_struct(i) + β × S_vector(i) + γ × S_bm25(i). The weights are dynamically adjusted: if the triples match perfectly, α = 0.5, β = 0.3, γ = 0.2; if only partially, α = 0.3, β = 0.4, γ = 0.3; if there is no structural match, α = 0, β = 0.5, γ = 0.5. Finally, a consistency check is performed. If there is a mutually exclusive relationship among the Top-3 candidates (e.g., both "Enable Service" and "Close Service" appear simultaneously), the intent with the lower score is deleted. After fusion, the Top-10 candidates are output and enter the large model stage. The entire fusion process takes no more than 30ms, with an end-to-end accuracy of 95.3%.
[0073] In one embodiment, the method further includes: Obtain multiple intents; Extract the action parameters, object parameters, and constraint parameters of each of the multiple intents; Based on the action parameters, object parameters, and constraint parameters of the multiple intentions, the multiple intentions are divided into different major categories and different subcategories; The preset intent knowledge base is constructed based on the multiple intents that have been divided into different major categories and different subcategories.
[0074] In this embodiment of the invention, multiple intentions are acquired; action parameters, object parameters, and constraint parameters of each intention are extracted; based on the action parameters, object parameters, and constraint parameters of the multiple intentions, the multiple intentions are divided into different major categories and different subcategories; and a preset intention knowledge base is constructed based on the multiple intentions divided into different major categories and different subcategories. Thus, by dividing the action parameters, object parameters, and constraint parameters of multiple intentions into different major categories and different subcategories, a preset intention knowledge base is constructed.
[0075] The above-mentioned acquisition of multiple intents can specifically refer to acquiring multiple raw intents, where the raw intent data is D={d1, d2,..., d...}. n The data undergoes cleaning and standardization, where n is the total number of intents, typically ranging from 100,000 to 500,000. Each intent record has a d... i Includes the following required fields: Intent Identifier ID (d i ), Intent Name (d i ), Functional description Desc(d i Examples (d) i )={e1, e2, ..., e k}, where k≥3. The preprocessing process includes: removing duplicate intents by calculating the edit distance of the descriptive text, and determining duplicates when the distance is less than a threshold of 5; unifying the text format by converting all text to UTF-8 encoding and removing special characters and extra spaces; and supplementing missing information by automatically supplementing intents that lack example expressions using template generation methods. After preprocessing, a standardized intent set I={i1, i2, ..., i m}, where m≤n, with a typical compression rate of 5-10%.
[0076] The above-described extraction process extracts the action parameters, object parameters, and constraint parameters for each of the multiple intents. These parameters represent the structured features of the intent, enabling accurate modeling. Specifically, a lightweight sequence labeling model is used to structurally decompose the description and examples of each intent, extracting a "Action + Object + Constraint" triple structure. For any intent i... j Its triple is represented as Triple(i j )={A(i j ), O(i j ), C(i j Action parameter A(i) j The object is selected from a predefined action vocabulary, including core actions such as "query," "create," "modify," "delete," and "approve," totaling approximately 200 actions; the object parameter O(i) is... j ) represents the business entity being operated on, such as "audit report", "user information", "order data", etc.; constraint parameter C(i j This includes limiting information such as time, location, and conditions. The accuracy of triple extraction is required to reach over 95%. For complex intents that cannot be extracted automatically, the system generates a labeling request for manual confirmation.
[0077] The above-mentioned classification of multiple intents into different major categories and subcategories based on their action parameters, object parameters, and constraint parameters can leverage the inherent business attributes of intents to construct a three-level index structure, rather than relying on unsupervised clustering. The first level is the major category, divided according to the business domain of the intent, by parsing the object parameters O(i) of the intent. j The classification is determined by predefined domain mapping rules. For example, intents containing keywords such as "audit," "compliance," and "risk" are categorized into "audit"; those containing keywords such as "personnel," "recruitment," and "salary" are categorized into "human resources." A business domain dictionary containing approximately 500 domain feature words is maintained, and rule matching automatically completes the first-level classification, forming 10-20 major categories. The second level consists of subcategories, further subdivided according to the action type and object of the intent. For example, under the "audit" category, subcategories are divided into "query audit," "generate audit," and "approval audit," with each major category containing 20-50 subcategories. The third level directly stores the intent instance. Each level maintains necessary metadata: category identifier, category name, list of included intents, and statistical information. Compared to clustering algorithms, this business rule-based organization method results in classifications that better align with business logic, offer stronger interpretability, and avoid the uncertainty inherent in clustering.
[0078] In one embodiment, the method further includes: Extract the vocabulary included in each of the multiple intents; A preset index table is constructed based on the vocabulary included in each of the multiple intentions.
[0079] In this embodiment of the invention, the vocabulary included in each of the plurality of intentions is extracted; a preset index table is constructed based on the vocabulary included in each of the plurality of intentions, so as to quickly retrieve the plurality of second intentions through the preset index table and keywords.
[0080] Specifically, to support precise keyword matching in the BM25 algorithm, a dedicated inverted index structure is constructed for each intent. The name and description of each intent are segmented into Chinese words using the precise mode of the jieba word segmentation tool to extract nouns, verbs, and technical terms. A pre-defined index table is constructed: Term→{(IID1,TF1,Pos1,DL1), (IID2,TF2,Pos2,DL2), ...}, where Term is the index term, IID is the intent identifier, TF is the term frequency, Pos is the location information, and DL is the document length. This information is necessary for the BM25 algorithm's calculations. The BM25 retrieval uses the formula: Score(Q,D)=Σ i IDF(q i )×(f(q i ,D)×(k1+1)) / (f(q i The index is calculated as Q = (D) + k1 × (1 - b + b × DL / avgDL), where Q is the query, D is the intent document, k1 = 1.2, and b = 0.75 are adjustment parameters. Specific optimizations for intent recognition scenarios include: assigning 2x IDF weights to action words (such as "query," "delete," and "approval") to ensure accurate action matching; reducing the weight of high-frequency words (document frequency > 50%) to avoid interference from meaningless words; and increasing the weight of domain-specific terms (document frequency < 1%) to improve the accuracy of specialized queries. The index uses a B+ tree structure for storage and supports prefix matching and range queries. Experiments show that the optimized BM25 improves accuracy from 82% to 94% when processing queries containing domain-specific terms.
[0081] In one embodiment, the method further includes: Generate the encoding vector corresponding to each of the multiple intents.
[0082] Specifically, a pre-trained Chinese BERT-base model (110M parameters) is used to vectorize each intent. For intent iⱼ, the vectorization process is as follows: First, the descriptive text Desc(i) is vectorized... j Input the BERT encoder and take the output at the [CLS] position as the basic semantic vector. Then, for the example expression set Examples(i jEach example in the dataset is encoded separately, and the average value is used as the example vector v_exam(i). j ); final intention vector v(i) j )=α×v_base(i j )+(1-α)×v_exam(i j ), where α=0.7. The HNSW algorithm is used to construct the vector index, with parameters M=16 and ef_construction=200, ensuring a retrieval recall rate of over 95%. Simultaneously, the center vectors of each category are calculated and stored as semantic representations of the categories for subsequent rapid localization to obtain multiple third-party intents.
[0083] In one embodiment, the method further includes: Obtain the relationship between any two intentions among the plurality of intentions; A preset intent relationship network is constructed based on the relationship between any two intents among the plurality of intents.
[0084] In this embodiment of the invention, by obtaining the relationship between any two intentions among the plurality of intentions, a preset intention relationship network can be constructed based on the relationship between any two intentions among the plurality of intentions.
[0085] Specifically, a predefined intent relationship network G=(V,E) is constructed, where V is the set of intent nodes, |V|=m; E is the set of associated edges, containing three types of relationships. Mutually exclusive relationships E m By defining business rules, a mutual exclusion edge is established when the actions of two intentions form antonyms (such as "enable-deactivate", "create-delete"), with an edge weight w(e). m = -1 indicates strong mutual exclusion. Dependency relationship Eᵈ is obtained by mining historical operation logs, and frequent itemsets are extracted using an association rule algorithm. When intention i... a →i β When the confidence level exceeds 0.8, establish the dependency edge e. d (i a i β ), edge weight w(e) d = Confidence value. The similarity relationship Es is generated by calculating the cosine similarity of the intent vectors. When sim(v(i) = 1 / 2, the similarity is calculated. a ),v(i β When the edge weight is greater than 0.7, similar edges are established, and the edge weight is w(e). s = Similarity value. The graph uses an adjacency list for storage, supporting fast relationship lookup and propagation.
[0086] In some implementations, new intents can be added to the preset intent knowledge base by means of the following methods, and the preset index table and preset intent relationship network can be updated accordingly.
[0087] Step U1: New Intent Encoding and Structure Extraction. The descriptive text of the new intent is used to generate a 768-dimensional vector v through a pre-trained BERT encoder. new The encoding process is consistent with the knowledge base construction. Simultaneously, a sequence labeling model is used to extract the triplet structure Triple(i new )={A(i new ), O(i new ), C(i new The entire encoding process takes about 10 seconds and requires no model training or fine-tuning.
[0088] Step U2: Fast Parallel Localization Mechanism. Abandoning the traditional layer-by-layer traversal method, a three-way parallel indexing approach is adopted to quickly determine the hierarchical affiliation of the new intent. The first path locates via vector indexing, utilizing the already constructed HNSW index to calculate v. new Cosine similarity with all class center vectors; due to the efficiency of HNSW, finding the K most similar classes in a knowledge base of 100,000 takes only 10-15ms. The second approach uses a triplet structure for localization, based on the extracted action A(i). new The system directly searches for the corresponding category in the action-category mapping table. Due to the limited size of the action vocabulary (approximately 200 words), a hash table is used to achieve an O(1) complexity search, which takes less than 1ms. The third approach uses a keyword inverted index to locate the core words in the new intent description. The inverted index is used to search for the category to which the intent belongs, and a B+ tree index structure is used, which takes approximately 5ms. The three-way location results are fused through a voting mechanism. If a category is selected by two or more approaches, it is directly determined as the target category; otherwise, the category with the highest vector similarity is selected. When all similarities are below the threshold of 0.3, the system automatically creates a new category. The entire parallel location process takes no more than 20ms, which is more than 250 times more efficient than the 5-second time of serial traversal.
[0089] Step U3: Preset index table update. Insert the new intent into the target category of the location and assign a globally unique identifier IID(i new=timestamp_random, ensuring the uniqueness and traceability of the identifier. The process of updating the three types of index structures is executed in parallel. The vector index update adopts the dynamic insertion algorithm of HNSW. The new node establishes a bidirectional connection with the M nearest neighbors. The optimal connection is determined by greedy search. The insertion complexity is O(M×log n), and it takes about 15ms for a scale of 100,000. The preset index table update is optimized by batch operation. All keywords of the new intent are collected and the corresponding inverted list is updated at one time to avoid multiple I / O operations. The update takes about 10ms. The structured index adds new mapping relationships to the hash table of the three dimensions of action, object and constraint based on the triple information. The update of each dimension is an O(1) operation and the total time does not exceed 5ms. The update adopts the copy-on-write strategy to ensure that the update process does not affect concurrent queries.
[0090] Step U4: Statistical Information and Metadata Maintenance. The statistical information of the affected categories is updated using an incremental calculation method. The class center vector is updated using the incremental formula: Center'(C) = (Center(C) × n + v) new The calculation involves vector addition and scalar division, taking less than 1ms. Category statistical metadata includes intent count Count'(C) = Count(C) + 1, average vector magnitude, vector distribution variance, etc., all updated incrementally to avoid re-traversing all intents. Update operations ensure concurrency safety through atomic operations and use the Compare-And-Swap (CAS) mechanism to avoid lock contention. Metadata updates also include timestamp recording, version number incrementing, and update log generation to support auditing and rollback. The entire statistical update process takes no more than 100ms.
[0091] Step U5: Dynamically expand the preset intent relationship network. After a new intent is added, a relationship connection needs to be established with existing intents. Similarity relationships are established through batch calculation of vector similarity, calculating only the similarity of intents within the same category. When sim(v new ,v i Similarity edges are established when the similarity is greater than 0.7. Since the scope has been narrowed down through hierarchical localization, only about 1000 intents need to be calculated for similarity. Vectorized computation is used for optimization, taking approximately 500ms. Mutual exclusion relationships are determined by the rule engine, checking whether the action of a new intent forms an antonym pair with an existing intent (e.g., "open" vs. "close"). Rule matching uses the AC automaton algorithm, taking approximately 10ms. Dependencies are initially empty and are gradually established through online learning from subsequent usage logs. Newly established relationship edges are added via the batch insertion interface of the graph database, using incremental updates of the adjacency list, without requiring a reconstruction of the entire graph structure.
[0092] Step U6: Consistency Verification and Conflict Handling. Multiple verifications are performed to ensure the consistency of the knowledge base. Duplicate detection calculates the edit distance and semantic similarity between the new intent and highly similar intents of the same class. When the similarity exceeds 0.95 and the edit distance is less than 5, a duplicate warning is triggered, and a merging suggestion is provided. Conflict detection verifies the uniqueness of triples. If intents with identical actions and objects but different constraints are found, an ambiguity warning is generated, and manual confirmation is required. Integrity checks ensure that all necessary fields are not empty, formatted correctly, and references are valid. The verification process uses a parallel pipeline, with each check performed simultaneously, taking approximately 30 seconds in total. If a serious conflict is detected, the system supports transaction rollback to restore the state before the update.
[0093] Thus, by achieving training-free updates using the above method, the total time consumption is broken down as follows: vector encoding 10 seconds, parallel localization 20ms, index update 30ms, statistical maintenance 100ms, relation expansion 500ms, and consistency verification 30 seconds, totaling approximately 41 seconds, far below the claimed 5-minute limit. Compared to traditional methods that require 3-7 days of model retraining and tens of thousands of yuan in GPU costs, this invention achieves true real-time scalability. The system supports batch update optimization; when adding multiple new intents simultaneously, vector encoding and index update operations can be reused, further reducing the average update time for a single intent to less than 10 seconds.
[0094] It should be understood that in this invention, multiple first intents corresponding to the query request are determined based on the classification structure of a preset intent knowledge base, and the preset intent knowledge base is used to determine the intents corresponding to different query requests; multiple second intents corresponding to the query request are retrieved from the preset intent knowledge base based on keywords; multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base based on vector semantics; and multiple fourth intents are generated based on the multiple first intents, the multiple second intents, and the multiple third intents. The entire process does not require pre-training a model for recognition, and can be completed directly through the classification structure, preset intent relationship network, and preset index table in the preset intent knowledge base. Furthermore, the classification structure, preset intent relationship network, and preset index table in the preset intent knowledge base do not require a training process during construction, nor do they require training when adding new intents, thereby effectively reducing expansion costs.
[0095] In one embodiment, identifying the target intent corresponding to the query request from the plurality of fourth intents includes: The multiple fourth intentions are input into a large model, and the target intention is obtained through processing by the large model.
[0096] It should be understood that by compressing multiple first intentions, multiple second intentions, and multiple third intentions into multiple fourth intentions using the method described above, the efficiency of large model processing can be improved and the processing latency reduced.
[0097] Specifically, the large model understanding module receives multiple fourth intents from the first stage output and first constructs a context. Unlike simply listing candidates, the large model employs a structured context organization method. Each fourth intent is formatted as a description containing three elements: intent identifier and name, providing a clear category label; functional description, using 50-100 tokens to describe the intent's specific function and applicable scenarios; and distinguishing features, clearly indicating key differences from other similar intents. This structured representation ensures the large model can accurately understand the boundaries and features of each candidate. The complete context is organized according to a template of "task description - user query - candidate list - output requirements," with the total number of tokens controlled within 500, far below the large model's context window limit.
[0098] For example, the set C = {c1, c2, ..., c} of multiple fourth intents that receive the output of the first stage. K After setting K=10-15, a structured input context is constructed. Each fourth intent is formatted as a three-element description: intent identifier and name, functional description (50-100 tokens), and distinguishing features from other candidates. The context is organized according to a template of "task description - user query - candidate list - output requirements," with the total number of tokens controlled within 500. Compared to traditional methods that require all intents to be used as context (10k+ tokens), this invention achieves 95% input compression through pre-screening using the RAG architecture, reducing the inference time of large models from 4 seconds to less than 100 milliseconds. This compression not only improves speed but, more importantly, allows large models to perform in-depth analysis of each candidate, rather than a shallow scan.
[0099] Furthermore, the large-scale model's inference process fully leverages the advantages of pre-trained language models. Because the number of candidates has been significantly reduced, the large-scale model can perform in-depth analysis on each candidate: understanding the true intent of the query, including implicit needs and omitted information; evaluating the semantic matching degree between each candidate and the query, considering not only surface similarity but also analyzing deep semantic relationships; and inferring from contextual information to select the most reasonable intent. For example, when a user's query is "view that report from last month," the large-scale model can understand that "that report" in an auditing context likely refers to the "monthly audit report," rather than other types of reports.
[0100] Furthermore, the large model output includes recognition results and confidence assessments. The internal scores of the large model are converted into a probability distribution using the Softmax function, with the intent with the highest probability being used as the recognition result. Simultaneously, a confidence score is calculated; when the highest confidence score falls below a threshold of 0.3, the system returns "unrecognizable" instead of forcibly outputting a low-quality result. The entire inference process is executed on the GPU, typically taking 50-100 milliseconds. Adding the 50 milliseconds for the first stage, the end-to-end response time is controlled within 150 milliseconds.
[0101] For example, the output of a large model includes an intent identifier, name, and confidence score. The raw scores are transformed into a probability distribution using Softmax: P(c i |q)=exp(s i / τ) / Σ j exp(s j / τ), with temperature parameter τ=1.0. When the highest confidence level is below 0.3, "Unrecognizable" is returned to avoid forcibly outputting low-quality results. The system maintains a confidence level calibration mechanism, dynamically adjusting the output confidence level to more accurately reflect reliability by statistically analyzing the actual accuracy of different confidence level intervals using historical data. The final result is returned in JSON format, containing three fields: intent_id, intent_name, and confidence_score.
[0102] In this way, by outputting the confidence level of each fourth intent through the large model, the fourth intent with the highest confidence level can be identified as the target intent.
[0103] In some implementations, if the confidence level of the fourth intent with the highest confidence level is lower than a preset threshold, an unrecognizable result is returned.
[0104] The aforementioned preset threshold is used to determine whether the identified intent is accurate. If the confidence level of the fourth intent with the highest confidence level is lower than the preset threshold, it is considered that each of the multiple fourth intents is inaccurate, and the result of being unable to identify is returned directly, that is, the intent of the query request cannot be identified.
[0105] The present invention also provides a specific example to demonstrate that the method of the present invention can effectively improve processing efficiency.
[0106] Specifically, a large enterprise's intelligent audit system has deployed the method of this invention, and its knowledge base contains 85,000 audit-related intents. Auditors input the query: "View the data processing business audit status of all branches in East China in the third quarter of 2024 and generate a compliance confirmation form." The system needs to accurately identify the specific intent "generate a regional business audit compliance confirmation form" from the 85,000 intents, including the following steps: Triple structure matching (5ms): The system extracts the query triple structure {Action: View + Generate, Object: Audit Status + Confirmation Form, Constraint: 2024Q3 + Region + Data Processing Business}. It searches for 500 intents corresponding to "Generate" in the Action_Map and 200 intents corresponding to "Confirmation Form" in the Object_Map, obtaining approximately 30 candidates from the intersection.
[0107] BM25 Keyword Search (10ms): Retrieves keywords using a pre-defined index. The IDF value for "Confirmation Form" is 6.8 (technical term, document frequency 0.3%), "Audit" has an IDF value of 2.1 (high-frequency word), and "Data Processing" has an IDF value of 4.5. BM25 returns the 50 highest-scoring intents, with the "Generate Audit Confirmation Form" intent ranking highly.
[0108] Vector semantic retrieval (15ms): The query is encoded as a 768-dimensional vector, and the 100 nearest neighbors are found in the vector space using HNSW. Since the query clearly belongs to the "audit category", the similarity of non-audit intents is reduced by 50%, and finally highly relevant intents such as "regional business audit analysis" and "compliance audit confirmation" are returned.
[0109] Fusion and Filtering (10ms): When fusing the three results, the triplet finds an exact match between "generate" and "confirmation form," with a weight of 0.5; BM25 finds the keyword "confirmation form," with a weight of 0.3; and vector retrieval has a weight of 0.2. After fusion, the results are sorted, and the Top-12 candidates are output: "Generate Regional Business Audit Compliance Confirmation Form," "Generate Quarterly Audit Report," "Query Audit Compliance Status," etc. The total time for the first stage is 40ms.
[0110] After obtaining the candidate intent, accurate identification is achieved through a large model, including the following steps: Context building (5ms): Organize 12 candidates into structured input, each candidate containing an intent name, a function description (e.g., "Generate a compliance confirmation form for business audit based on specified time and region"), and distinguishing features (e.g., "Requires administrative permissions, output PDF format"). Total input: 450 tokens.
[0111] Semantic reasoning (80ms): The large model understands that the core requirement of the query is "generate a confirmation form" rather than "view a report," and identifies that the three filtering dimensions of time, region, and business type perfectly match the intent of "generate a regional business audit compliance confirmation form." The model gives a confidence score of 0.92.
[0112] Output (5ms): Returns a JSON format result: {"intent_id":"AUDIT_CONF_001","intent_name":"Generated Regional Business Audit Compliance Confirmation Form","confidence": 0.92}. The total time for the second stage is 90ms.
[0113] The total end-to-end time was 130ms, and the target intent was successfully and accurately identified from 85,000 intents, demonstrating the practicality of the method of the present invention.
[0114] Please see Figure 3 , Figure 3 This is a structural diagram of an intent recognition device based on retrieval enhancement provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the intent recognition device 300 based on retrieval enhancement includes: The receiving module 301 is used to receive user query requests; The determining module 302 is used to determine multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests; The first retrieval module 303 is used to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The second retrieval module 304 is used to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics. The generation module 305 is used to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The identification module 306 is used to identify the target intent corresponding to the query request from the plurality of fourth intents.
[0115] In one embodiment, the classification structure of the preset intent knowledge base includes a first level, a second level, and a third level, and the determining module 302 includes: The parsing submodule is used to parse the query request and obtain the action parameters, object parameters and constraint parameters corresponding to the query request. The first matching submodule is used to match the object parameters corresponding to the query request based on the N major categories included in the first level, so as to obtain the first major category corresponding to the query request, where N is a positive integer greater than or equal to 1; The second matching submodule is used to match the action parameters and object parameters corresponding to the query request based on the M subclasses corresponding to the first major category in the second level, so as to obtain the first subclass corresponding to the query request, where M is a positive integer greater than or equal to 1; The third matching submodule is used to match the action parameters, object parameters and constraint parameters corresponding to the query request based on multiple intents corresponding to the first subclass in the third level, so as to obtain the multiple first intents.
[0116] In one embodiment, the third matching submodule includes: The matching unit is used to match the action parameters, object parameters and constraint parameters corresponding to the query request based on multiple intents corresponding to the first subclass in the third level, so as to obtain the multiple first initial intents; A filtering unit is used to filter the plurality of first initial intentions based on a preset intention relationship network to obtain the plurality of first intentions. The preset intention relationship network includes the relationship type between any two first initial intentions among the plurality of first initial intentions. Wherein, if the relationship type indicates that the two first initial intentions are mutually exclusive, one of the two first initial intentions is deleted.
[0117] In one embodiment, the first retrieval module 303 includes: The extraction submodule is used to extract keywords from the query request; The query submodule is used to query multiple secondary intents corresponding to the keywords based on a preset index table. The preset index table includes multiple mapping relationships, and each mapping relationship is used to represent the intents in the preset intent knowledge base corresponding to different keywords.
[0118] In one embodiment, the second retrieval module 304 includes: The retrieval submodule is used to retrieve multiple third initial intents from the preset intent knowledge base based on the query vector corresponding to the query request, wherein the initial similarity between each third initial intent and the query vector is greater than a first threshold. The first determining submodule is used to determine the major category corresponding to each third initial intent and the major category corresponding to the query request; The first calculation submodule is used to calculate the intermediate similarity corresponding to each third initial intent based on the initial similarity between each third initial intent and the query vector, the major category corresponding to each third initial intent and the major category corresponding to the query request; The second determining submodule is used to determine the plurality of third intentions based on the intermediate similarity corresponding to the plurality of third initial intentions, wherein the intermediate similarity corresponding to the plurality of third intentions is greater than the intermediate similarity corresponding to other third initial intentions, and the other third initial intentions are third initial intentions other than the plurality of third initial intentions.
[0119] In one embodiment, the plurality of third initial intentions includes intermediate intentions, and the computation submodule includes: The first calculation unit is configured to set the initial similarity between the intermediate intent and the query vector as the intermediate similarity corresponding to the intermediate intent when the major category corresponding to the intermediate intent matches the major category corresponding to the query request. The second calculation unit is used to set the product of the initial similarity and the preset coefficient between the intermediate intent and the query vector as the intermediate similarity corresponding to the intermediate intent when the major category corresponding to the intermediate intent does not match the major category corresponding to the query request.
[0120] In one embodiment, the generation module 305 includes: The second calculation submodule is used to calculate the score of each of the plurality of first intentions, the plurality of second intentions and the plurality of third intentions, wherein the score is used to characterize the matching status between the corresponding intention and the action parameters, object parameters and constraint parameters corresponding to the query request, respectively; The third determining submodule is used to determine the plurality of fourth intentions, wherein the scores of the plurality of fourth intentions are greater than the scores of other intentions, and the other intentions are the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions other than the plurality of fourth intentions.
[0121] In one embodiment, the retrieval-enhanced intent recognition device 300 further includes: The acquisition module is used to acquire multiple intents; The first extraction module is used to extract the action parameters, object parameters, and constraint parameters of each of the multiple intentions; The segmentation module is used to divide the multiple intentions into different major categories and different subcategories based on the action parameters, object parameters and constraint parameters of the multiple intentions; The first construction module is used to construct the preset intent knowledge base based on the multiple intents that have been divided into different major categories and different subcategories.
[0122] In one embodiment, the intent recognition device 300 further includes: The second extraction module is used to extract the vocabulary included in each of the multiple intentions; The second construction module is used to construct a preset index table based on the vocabulary included in each of the plurality of intentions.
[0123] The intent recognition device based on retrieval enhancement provided in this embodiment of the invention can implement each process of the above-described intent recognition method based on retrieval enhancement. The technical features are one-to-one and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0124] It should be noted that the intent recognition device in the embodiments of the present invention can be a device, or it can be a component, integrated circuit, or chip in an electronic device.
[0125] This invention also provides an electronic device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the above-described functionality. Figure 1 The various processes shown in the embodiment of the intent recognition method based on retrieval enhancement can achieve the same technical effect, and will not be described again here to avoid repetition.
[0126] For details, see Figure 4 As shown, this embodiment of the invention also provides an electronic device, including a bus 401, a transceiver 402, an antenna 403, a bus interface 404, a processor 405, and a memory 406.
[0127] The transceiver 402 is used to receive user query requests; The processor 405 is used to determine multiple first intents corresponding to the query request based on the classification structure of a preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests. The processor 405 is further configured to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The processor 405 is further configured to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics; The processor 405 is further configured to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The processor 405 is further configured to identify the target intent corresponding to the query request from the plurality of fourth intents.
[0128] In one embodiment, the classification structure of the preset intent knowledge base includes a first level, a second level, and a third level. Determining multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base includes: The query request is parsed to obtain the action parameters, object parameters, and constraint parameters corresponding to the query request; The object parameters corresponding to the query request are matched based on the N major categories included in the first level to obtain the first major category corresponding to the query request, where N is a positive integer greater than or equal to 1; Based on the M subclasses corresponding to the first major category in the second level, the action parameters and object parameters corresponding to the query request are matched to obtain the first subclass corresponding to the query request, where M is a positive integer greater than or equal to 1; Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first intents.
[0129] In one embodiment, the matching of action parameters, object parameters, and constraint parameters corresponding to the query request based on multiple intents corresponding to the first subclass in the third level to obtain the multiple first intents includes: Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first initial intents; The plurality of first initial intentions are filtered based on a preset intention relationship network to obtain the plurality of first intentions. The preset intention relationship network includes the relationship type between any two first initial intentions among the plurality of first initial intentions. Wherein, if the relationship type indicates that the two first initial intentions are mutually exclusive, one of the two first initial intentions is deleted.
[0130] In one embodiment, retrieving multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords includes: Extract keywords from the query request; Based on a preset index table, multiple second intents corresponding to the keywords are queried. The preset index table includes multiple mapping relationships, and each mapping relationship is used to represent the intents in the preset intent knowledge base corresponding to different keywords.
[0131] In one embodiment, retrieving multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics includes: Based on the query vector corresponding to the query request, multiple third initial intents are retrieved from the preset intent knowledge base, and the initial similarity between each of the multiple third initial intents and the query vector is greater than a first threshold. Determine the category corresponding to each third initial intent and the category corresponding to the query request; Based on the initial similarity between each third initial intent and the query vector, the major category corresponding to each third initial intent and the major category corresponding to the query request, the intermediate similarity corresponding to the corresponding third initial intent is calculated respectively. The plurality of third intentions are determined based on the intermediate similarity corresponding to the plurality of third initial intentions. The intermediate similarity corresponding to the plurality of third intentions is greater than the intermediate similarity corresponding to other third initial intentions. The other third initial intentions are third initial intentions other than the plurality of third initial intentions.
[0132] In one embodiment, the plurality of third initial intentions include intermediate intentions, and the step of calculating the intermediate similarity corresponding to each third initial intention based on the initial similarity between each third initial intention and the query vector, the major category corresponding to each third initial intention, and the major category corresponding to the query request includes: If the category corresponding to the intermediate intent matches the category corresponding to the query request, the initial similarity between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent. If the category corresponding to the intermediate intent does not match the category corresponding to the query request, the product of the initial similarity and the preset coefficient between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent.
[0133] In one embodiment, generating a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions includes: Calculate a score for each of the plurality of first intents, the plurality of second intents, and the plurality of third intents, wherein the score is used to characterize the matching status between the corresponding intent and the action parameters, object parameters, and constraint parameters corresponding to the query request, respectively; The plurality of fourth intentions are determined, wherein the scores of the plurality of fourth intentions are greater than the scores of other intentions, wherein the other intentions are the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions other than the plurality of fourth intentions.
[0134] In one embodiment, the transceiver 402 is further configured to acquire multiple intents; The processor 405 is also used to extract the action parameters, object parameters and constraint parameters of each of the plurality of intentions; The processor 405 is further configured to classify the multiple intentions into different major categories and different subcategories based on the action parameters, object parameters and constraint parameters of the multiple intentions; The processor 405 is also used to construct the preset intent knowledge base based on the multiple intents that have been divided into different major categories and different subcategories.
[0135] In one embodiment, the processor 405 is further configured to extract the vocabulary included in each of the plurality of intents; The processor 405 is also configured to construct a preset index table based on the vocabulary included in each of the plurality of intentions.
[0136] exist Figure 4 In this context, a bus architecture (represented by bus 401) is used. Bus 401 can include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 405 and memory represented by memory 406. Bus 401 can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 404 provides an interface between bus 401 and transceiver 402. Transceiver 402 can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 405 is transmitted over a wireless medium via antenna 403, which further receives data and transmits data to processor 405.
[0137] Processor 405 is responsible for managing bus 401 and general processing, and can also provide various functions, including timing, peripheral interface, voltage regulation, power management, and other control functions. Memory 406 can be used to store data used by processor 405 during operation.
[0138] Optionally, the processor 405 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or a graphics processing unit (GPU).
[0139] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the above-described functions. Figure 1 The various processes corresponding to the intent recognition method embodiments based on retrieval enhancement, and achieving the same technical effect, will not be described again here to avoid repetition. The computer-readable storage medium mentioned includes, for example, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0140] The present invention also provides a computer program product, including computer instructions that, when executed by a processor, implement the above-described... Figure 1 The various processes corresponding to the intent recognition method embodiments based on retrieval enhancement, and which can achieve the same technical effect, will not be described again here to avoid repetition.
[0141] In the embodiments of this invention, the terms "first," "second," etc., are used to distinguish similar object parameters and are not necessarily used to describe a specific order or sequence. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the use of "and / or" in this application indicates at least one of the connected object parameters, such as A and / or B and / or C, representing seven possibilities: A alone, B alone, C alone, both A and B present, both B and C present, both A and C present, and A, B, and C present.
[0142] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0143] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or second terminal device, etc.) to execute the methods of the various embodiments of this application.
[0144] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A retrieval-enhanced intent recognition method, characterized in that, include: Receive user query requests; Based on the classification structure of the preset intent knowledge base, multiple first intents corresponding to the query request are determined, and the preset intent knowledge base is used to determine the intents corresponding to different query requests. Based on keywords, multiple second intents corresponding to the query request are retrieved from the preset intent knowledge base; Based on vector semantics, multiple third intents corresponding to the query request are retrieved from the preset intent knowledge base; A plurality of fourth intentions are generated based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; Identify the target intent corresponding to the query request from the plurality of fourth intents.
2. The method as described in claim 1, characterized in that, The classification structure of the preset intent knowledge base includes a first level, a second level, and a third level. The determination of multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base includes: The query request is parsed to obtain the action parameters, object parameters, and constraint parameters corresponding to the query request; The object parameters corresponding to the query request are matched based on the N major categories included in the first level to obtain the first major category corresponding to the query request, where N is a positive integer greater than or equal to 1; Based on the M subclasses corresponding to the first major category in the second level, the action parameters and object parameters corresponding to the query request are matched to obtain the first subclass corresponding to the query request, where M is a positive integer greater than or equal to 1; Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first intents.
3. The method as described in claim 2, characterized in that, The process of matching the action parameters, object parameters, and constraint parameters corresponding to the query request based on multiple intents corresponding to the first subclass in the third level yields the multiple first intents, including: Based on the multiple intents corresponding to the first subclass in the third level, the action parameters, object parameters, and constraint parameters corresponding to the query request are matched to obtain the multiple first initial intents; The plurality of first initial intentions are filtered based on a preset intention relationship network to obtain the plurality of first intentions. The preset intention relationship network includes the relationship type between any two first initial intentions among the plurality of first initial intentions. Wherein, if the relationship type indicates that the two first initial intentions are mutually exclusive, one of the two first initial intentions is deleted.
4. The method as described in claim 1, characterized in that, The step of retrieving multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords includes: Extract keywords from the query request; Based on a preset index table, multiple second intents corresponding to the keywords are queried. The preset index table includes multiple mapping relationships, and each mapping relationship is used to represent the intents in the preset intent knowledge base corresponding to different keywords.
5. The method as described in claim 1, characterized in that, The step of retrieving multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics includes: Based on the query vector corresponding to the query request, multiple third initial intents are retrieved from the preset intent knowledge base, and the initial similarity between each of the multiple third initial intents and the query vector is greater than a first threshold. Determine the category corresponding to each third initial intent and the category corresponding to the query request; Based on the initial similarity between each third initial intent and the query vector, the major category corresponding to each third initial intent and the major category corresponding to the query request, the intermediate similarity corresponding to the corresponding third initial intent is calculated respectively. The plurality of third intentions are determined based on the intermediate similarity corresponding to the plurality of third initial intentions. The intermediate similarity corresponding to the plurality of third intentions is greater than the intermediate similarity corresponding to other third initial intentions. The other third initial intentions are third initial intentions other than the plurality of third initial intentions.
6. The method as described in claim 5, characterized in that, The plurality of third initial intentions include intermediate intentions. The step of calculating the intermediate similarity corresponding to each third initial intention based on the initial similarity between each third initial intention and the query vector, the major category corresponding to each third initial intention, and the major category corresponding to the query request includes: If the category corresponding to the intermediate intent matches the category corresponding to the query request, the initial similarity between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent. If the category corresponding to the intermediate intent does not match the category corresponding to the query request, the product of the initial similarity and the preset coefficient between the intermediate intent and the query vector is set as the intermediate similarity corresponding to the intermediate intent.
7. The method according to any one of claims 1 to 6, characterized in that, The generation of multiple fourth intentions based on the multiple first intentions, the multiple second intentions, and the multiple third intentions includes: Calculate a score for each of the plurality of first intents, the plurality of second intents, and the plurality of third intents, wherein the score is used to characterize the matching status between the corresponding intent and the action parameters, object parameters, and constraint parameters corresponding to the query request, respectively; The plurality of fourth intentions are determined, wherein the scores of the plurality of fourth intentions are greater than the scores of other intentions, wherein the other intentions are the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions other than the plurality of fourth intentions.
8. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain multiple intents; Extract the action parameters, object parameters, and constraint parameters of each of the multiple intents; Based on the action parameters, object parameters, and constraint parameters of the multiple intentions, the multiple intentions are divided into different major categories and different subcategories; The preset intent knowledge base is constructed based on the multiple intents that have been divided into different major categories and different subcategories.
9. The method as described in claim 8, characterized in that, The method further includes: Extract the vocabulary included in each of the multiple intents; A preset index table is constructed based on the vocabulary included in each of the multiple intentions.
10. An intent recognition device based on retrieval enhancement, characterized in that, include: The receiving module is used to receive user query requests; The determination module is used to determine multiple first intents corresponding to the query request based on the classification structure of the preset intent knowledge base, wherein the preset intent knowledge base is used to determine the intents corresponding to different query requests; The first retrieval module is used to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The second retrieval module is used to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics; The generation module is used to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The identification module is used to identify the target intent corresponding to the query request from the plurality of fourth intents.
11. An electronic device, characterized in that, Including transceivers and processors, The transceiver is used to receive user query requests; The processor is configured to determine multiple first intents corresponding to the query request based on the classification structure of a preset intent knowledge base, wherein the preset intent knowledge base is configured to determine the intents corresponding to different query requests. The processor is further configured to retrieve multiple second intents corresponding to the query request from the preset intent knowledge base based on keywords; The processor is also configured to retrieve multiple third intents corresponding to the query request from the preset intent knowledge base based on vector semantics; The processor is further configured to generate a plurality of fourth intentions based on the plurality of first intentions, the plurality of second intentions, and the plurality of third intentions; The processor is further configured to identify the target intent corresponding to the query request from the plurality of fourth intents.
12. An electronic device, characterized in that, include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the intent recognition method based on retrieval enhancement as described in any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the intent recognition method based on retrieval enhancement as described in any one of claims 1 to 9.
14. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the intent recognition method based on retrieval enhancement as described in any one of claims 1 to 9.