Method, device, equipment, medium and product for determining target intention recognition result
By acquiring user intent recognition input information, determining target intent labels and labeled sample sets, calculating scores to identify relevant negative samples, and combining preset intent descriptions and sample labels, determining target prompt words for intent classification, the problem of low accuracy and low efficiency in intent recognition in existing technologies is solved, achieving more efficient intent recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA MOBILE JIUTIAN ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
- Filing Date
- 2026-01-13
- Publication Date
- 2026-06-05
AI Technical Summary
Existing intent recognition methods based on large language models fail to fully utilize the reasoning capabilities of LLMs and the limited amount of existing labeled data, resulting in low accuracy and low efficiency in intent recognition.
By acquiring user intent recognition input information, determining the set of labeled samples corresponding to the target intent label, calculating the target labeled sample score, identifying relevant negative samples and negative sample intent labels, and combining preset intent, intent description, positive sample and negative sample image labels, determining target prompt words and classifying intent, thereby improving the accuracy and efficiency of intent recognition.
It improves the accuracy and efficiency of intent recognition, makes full use of the reasoning ability of LLM and limited labeled data, and enhances the effect of intent recognition.
Smart Images

Figure CN122153431A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium and product for determining the result of target intent recognition. Background Technology
[0002] In scenarios such as knowledge-based question answering and multi-turn dialogues, intent recognition is a crucial first step in the interaction process, and its accuracy directly affects the overall question-and-answer outcome.
[0003] Currently, existing intent recognition methods include: machine learning methods (Naive Bayes, Support Vector Machines, etc.), deep learning methods (Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), etc.), pre-trained model fine-tuning methods (Bidirectional Encoder Representations from Transformers (BERT) and its variants), and methods based on Large Language Models (LLMs). Traditional machine learning and deep learning methods require large amounts of labeled data and have low accuracy. Pre-trained model fine-tuning methods also require a certain amount of labeled data to achieve high accuracy. In contrast, LLMs require only a small number of labeled samples or even zero samples to optimize only the prompt words, thus achieving high accuracy. Therefore, intent recognition methods based on LLMs are more popular. Optimization methods for intent recognition based on LLMs include: optimizing prompt words, fine-tuning training, and hierarchical (stage-by-stage) recognition. Optimization methods for prompt words include: knowledge base-based prompt word expansion, semantic model-based prompt word expansion, and dialogue context-based prompt word expansion. Optimization methods for fine-tuning training include: using LLM for data augmentation to obtain more training data, and then using incremental or full fine-tuning to fine-tune the base version instruction model to ensure the model's output format and accuracy. Hierarchical (stage-based) recognition methods break down complex single-level intent recognition into multi-level simple intent recognition tasks, optimizing the intent recognition model at each level to improve accuracy. However, existing LLM-based intent recognition methods typically employ methods such as optimizing prompts, fine-tuning training, and hierarchical (stage-based) recognition. Fine-tuning training incurs significant training costs and can lead to problems such as increased model illusion and degradation of general capabilities, making it difficult to control actual performance. Multi-level classification decomposes intent recognition into multi-stage classification sub-tasks, each relatively simple, thus improving overall intent performance. However, hierarchical classification leads to multiple calls to LLM, increasing service latency and potentially causing error accumulation. Optimizing prompts can improve intent recognition accuracy while avoiding the problems of the previous two methods. However, existing methods for optimizing prompt words include: (1) optimizing the description of intent recognition tasks by using function templates, knowledge graphs, etc. to decompose the description of intent recognition tasks into multiple feature elements and filter and combine them for different user inputs to obtain the best task description; (2) constructing knowledge bases such as domain knowledge and background knowledge and adding specific knowledge information for different user inputs; (3) adding a certain amount of example information to assist LLM in intent recognition; and (4) using LLM to semantically expand user inputs and labeled samples.Even so, there is still room for improvement in the accuracy and efficiency of intent recognition. In addition, most of these methods do not make full use of the reasoning ability of LLM and the limited amount of existing labeled data, resulting in low accuracy and low efficiency in intent recognition.
[0004] Therefore, there is an urgent need for a method to determine the result of target intent recognition, so as to improve the accuracy and efficiency of intent recognition. Summary of the Invention
[0005] This application provides a method, apparatus, device, medium, and product for determining target intent recognition results, aiming to solve the technical problem of low accuracy and efficiency in intent recognition due to insufficient utilization of LLM's inference capabilities and the limited amount of existing labeled data. The technical solution of this application determines target prompt words based on preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and classifies the target prompt words according to intent, thereby determining the target intent recognition result of the user's intent recognition input information, improving the accuracy and efficiency of target intent recognition results.
[0006] In a first aspect, embodiments of this application provide a method for determining the result of target intent recognition, comprising: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The target labeled sample set corresponding to the target intent label is determined based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label; The target labeled sample score is determined based on the target labeled sample set, and the target related negative sample and the target negative sample intent label are determined based on the target labeled sample score; The reasons for target intent recognition and the description of target intent recognition are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target-related negative samples, and the target negative sample intent labels. Based on the user intent, the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample are determined according to the user intent input information. The target prompt words are determined based on the preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and the target prompt words are classified according to intent to determine the target intent recognition result of the user intent recognition input information.
[0007] In one embodiment, the target annotation sample score includes a first target annotation sample score; determining the target annotation sample score based on the target annotation sample set includes: A first set of labeled samples corresponding to a first intent label is determined based on the user intent recognition input information; wherein, the first intent label is a set of first candidate intent labels that are different from the target intent label among all intent labels in the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label; The score of the first labeled sample is determined based on the first labeled sample set, the target labeled sample set, and the first scoring algorithm. The score of the second labeled sample is determined based on the first labeled sample set, the target labeled sample set, and the second scoring algorithm. The score of the third labeled sample is determined based on the first labeled sample data, the target labeled sample set, and the third scoring algorithm; wherein the first scoring algorithm, the second scoring algorithm, and the third scoring algorithm are different scoring algorithms. The score of the first target annotation sample is determined based on the scores of the first annotation sample, the second annotation sample, and the third annotation sample.
[0008] In one embodiment, the target annotation sample score further includes: a second target annotation sample score; determining the target annotation sample score based on the target annotation sample set includes: A second set of labeled samples corresponding to the second intent label is determined based on the user intent recognition input information; wherein, the second intent label is the second candidate intent label other than the target intent label among all intent labels in the user intent recognition input information; the second candidate intent label is an intent label that is different from the target intent label; The score of the fourth annotation sample is determined based on the second annotation sample set, the target annotation sample set, and the first scoring algorithm. The score of the fifth labeled sample is determined based on the second labeled sample set, the target labeled sample set, and the second scoring algorithm. The score of the sixth labeled sample is determined based on the second labeled sample set, the target labeled sample set, and the third scoring algorithm. The score of the second target annotation sample is determined based on the scores of the fourth, fifth, and sixth annotation samples.
[0009] In one embodiment, determining the target-related negative sample and the target negative sample intent label of the target-related negative sample based on the target labeled sample score includes: Determine the first relevant negative sample and the intent label of the first negative sample corresponding to the first relevant negative sample based on the score of the first target labeled sample; Determine the intent label of the second negative sample corresponding to the second negative sample based on the score of the second target labeled sample; The target-related negative sample and the target negative sample intent label are determined based on the first relevant negative sample, the first negative sample intent label, the second relevant negative sample and the second negative sample intent label.
[0010] In one embodiment, determining the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the score of the first target labeled sample includes: Determine the first candidate labeled sample set; wherein, the first candidate labeled sample set is the set of labeled samples corresponding to all intent labels except any one intent label in the user intent recognition input information; The first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample are determined based on the first candidate labeled sample set and the first labeled sample score.
[0011] In one embodiment, determining the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the second target labeled sample score includes: Determine the second candidate annotation sample set; wherein, the second candidate annotation sample set is the set of annotation samples other than the target annotation sample set corresponding to the target intent label in the user intent recognition input information; The second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample are determined based on the second candidate labeled sample set and the second labeled sample score.
[0012] In one embodiment, determining the cause of target intent recognition and the description of target intent recognition based on a preset intent, a preset intent description, target intent tags, a set of target-annotated samples, target-related negative samples, and target negative sample intent tags includes: The candidate intent recognition reasons and candidate intent descriptions are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and the first large language model; The initial intent analysis results are determined based on the reasons for candidate intent identification and the second major language model; the second major language model is a different major language model from the first major language model. If the initial intent analysis result is determined to be unreasonable, the steps of determining the candidate intent recognition cause and candidate intent description based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and the first large language model continue until the initial intent analysis result is reasonable. In this case, the candidate intent recognition cause is determined to be the target intent recognition cause, and the candidate intent description corresponding to the candidate intent recognition cause is the target intent recognition description.
[0013] In one embodiment, determining the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample based on user intent recognition input information includes: Perform semantic retrieval on the user intent-based input information to determine the initial labeled samples; The user intent recognition input information and initial labeled samples are sorted to determine the target positive sample and the corresponding positive sample image label; Based on the user intent, the input information and the target positive sample are used to determine the target negative sample and the corresponding negative sample map label.
[0014] In one embodiment, determining the target prompt word based on a preset intent label, a preset intent label description, a target positive sample, a target positive sample image label, a target negative sample, a target negative sample image label, a target intent recognition reason, and a target intent recognition description includes: The reasons for identifying the positive target sample intent and the description of the positive target sample intent are determined based on the positive target sample, the positive target sample image label, the reason for identifying the target intent, and the description of identifying the target intent. The reasons for identifying the intent of the target negative sample and the description of the intent of the target negative sample are determined based on the target negative sample, the target negative sample image label, the reason for identifying the intent, and the description of the intent. The target prompt word is obtained by concatenating the preset intent label, preset intent label description, target positive sample, target positive sample image label, target positive sample intent recognition reason, target positive sample intent recognition description, target negative sample, target negative sample image label, target negative sample intent recognition reason, and target negative sample intent recognition description.
[0015] Secondly, embodiments of this application provide an apparatus for determining the result of target intent recognition, comprising: The information acquisition module is used to acquire user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The set determination module is used to determine the target labeled sample set corresponding to the target intent label based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label; The scoring determination module is used to determine the score of the target labeled sample based on the target labeled sample set, and to determine the target-related negative sample and the target negative sample intent label based on the target labeled sample score; The cause determination module is used to determine the cause and description of target intent recognition based on the preset intent, preset intent description, target intent label, target labeled sample set, target-related negative samples, and target negative sample intent labels. The sample determination module is used to determine the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample based on the user intent recognition input information. The result determination module is used to determine the target prompt words based on the preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and to classify the target prompt words according to intents to determine the target intent recognition result of the user intent recognition input information.
[0016] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the steps of the method for determining the target intent recognition result of the first aspect.
[0017] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the method for determining the target intent recognition result of the first aspect.
[0018] Fifthly, embodiments of this application provide a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the steps of the method for determining the target intent recognition result of the first aspect.
[0019] This application provides a method, apparatus, device, medium, and product for determining target intent recognition results. It acquires user intent recognition input information, including m intent labels, each corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2. The method determines the target labeled sample set corresponding to the target intent label based on the user intent recognition input information; the target intent label is any one of the intent labels in the user intent recognition input information, and the target labeled sample set is the set of labeled samples corresponding to any one intent label. The method determines the target labeled sample score based on the target labeled sample set, and determines target-related negative samples and target-related negative samples based on the target labeled sample score. This application's technical solution, by determining target intention labels based on preset intentions, preset intention descriptions, target intention labels, target labeled sample sets, target-related negative samples, and target negative sample intention labels, as well as determining the target intention recognition reason and target intention recognition description based on user intention recognition input information; determining target positive samples, the corresponding positive sample image labels, target negative samples, and the corresponding negative sample image labels based on user intention recognition input information; determining target prompt words based on preset intention labels, preset intention label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intention recognition reason, and target intention recognition description; and classifying the target prompt words to determine the target intention recognition result of user intention recognition input information, improves the accuracy and efficiency of target intention recognition results. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart illustrating the method for determining the target intent recognition result provided in the embodiments of this application.
[0022] Figure 2 This is a schematic diagram of the structure of the device for determining the target intent recognition result provided in the embodiments of this application.
[0023] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] The following is combined Figure 1 The method for determining the target intent recognition result provided in this application is described. The method for determining the target intent recognition result provided in this application can be applied to the case of intent recognition optimization based on a large language model. The execution subject of this method can be an electronic device or a target intent recognition result determination device set in the electronic device. The target intent recognition result determination device can be implemented by software, hardware or a combination of both. Figure 1 This is a flowchart illustrating the method for determining the target intent recognition result provided in the embodiments of this application. (Refer to...) Figure 1 This application provides a method for determining the result of target intent recognition, which may include steps 101, 102, 103, 104, 105 and 106.
[0026] Step 101: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2.
[0027] In this step, a labeled sample set includes k sample labels, where k is greater than or equal to 1 and less than or equal to m. This embodiment does not limit this.
[0028] Specifically, user intent recognition input information refers to the input information obtained by the user that needs to perform intent recognition. The user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2.
[0029] Step 102: Determine the target labeled sample set corresponding to the target intent label based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label.
[0030] In this step, the target intent label could be, for example, ,in, The target intent label may correspond to at least one label sample. .
[0031] Specifically, in the user intent recognition input information, there are m intent labels. The set of labeled samples corresponding to any one of the m intent labels is determined as the target labeled sample set corresponding to the target intent label.
[0032] Step 103: Determine the target labeled sample score based on the target labeled sample set, and determine the target related negative sample and the target negative sample intent label based on the target labeled sample score.
[0033] In one embodiment, the target labeled sample score includes a first target labeled sample score; determining the target labeled sample score based on the target labeled sample set includes: determining a first labeled sample set corresponding to a first intent label based on user intent recognition input information; wherein, the first intent label is a set of first candidate intent labels that are different from the target intent label among all intent labels of the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label; determining the first labeled sample score based on the first labeled sample set, the target labeled sample set, and a first scoring algorithm; determining a second labeled sample score based on the first labeled sample set, the target labeled sample set, and a second scoring algorithm; determining a third labeled sample score based on the first labeled sample data, the target labeled sample set, and a third scoring algorithm; wherein, the first scoring algorithm, the second scoring algorithm, and the third scoring algorithm are different scoring algorithms; and determining a first target labeled sample score based on the first labeled sample score, the second labeled sample score, and the third labeled sample score.
[0034] In this step, the first intent label is the set of first candidate intent labels that are different from the target intent label among all intent labels of the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label. ,in, Not equal to ,1≤ ≤m, where each intent label is a label distinguished according to intent category. For example, there may be intent label 1, intent label 2, intent label 3, etc., and the first set of labeled samples corresponding to the first intent label includes at least one labeled sample. This embodiment does not limit this aspect.
[0035] The first scoring algorithm could be, for example, the Best Matching 25 (BM25 algorithm), the second scoring algorithm could be, for example, the dual-tower model, and the third scoring algorithm could be, for example, the cross-coding model. This embodiment does not limit these algorithms.
[0036] Specifically, a first set of labeled samples corresponding to the first intent label is determined based on the user intent recognition input information; wherein, the first intent label is a set of first candidate intent labels that are different from the target intent label among all intent labels in the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label; and each intent label is calculated one by one using the first scoring algorithm, namely the BM25 algorithm. Each labeled sample in the first set of labeled samples and each label sample in the target labeled sample set The score is used to obtain the score of the first labeled sample. (0≤) ≤1). The second scoring algorithm, the dual-tower model, is used to calculate each intent label individually. Each labeled sample in the first set of labeled samples and each label sample in the target labeled sample set The score is used to obtain the score of the second labeled sample. (0≤) ≤1). The third scoring algorithm, namely the cross-coding model, is used to calculate each intent label individually. Each labeled sample in the first set of labeled samples and each label sample in the target labeled sample set The score is used to obtain the score of the third labeled sample. (0≤) ≤1).
[0037] Determining the score of the first labeled sample Second labeled sample score and the score of the third labeled sample Then, the score of the first target annotation sample is determined based on the scores of the first, second, and third annotation samples. (First target annotation sample score) = ,in, , and These are pre-defined constant coefficients.
[0038] For example, For example, it could be 0.2. For example, it could be 0.3. For example, it could be 0.5, but this embodiment does not limit it.
[0039] For example, the calculated score of the first labeled sample Second labeled sample score and the score of the third labeled sample Each set of scores has m-1 points. Therefore, the scores of the first labeled sample are also m-1 points, and each point set includes at least two sample scores.
[0040] In one embodiment, the target annotation sample score further includes: a second target annotation sample score; determining the target annotation sample score based on the target annotation sample set includes: determining a second annotation sample set corresponding to a second intent label based on user intent recognition input information; wherein, the second intent label is a second candidate intent label other than the target intent label among all intent labels in the user intent recognition input information; the second candidate intent label is an intent label that is different from the target intent label; determining a fourth annotation sample score based on the second annotation sample set, the target annotation sample set, and a first scoring algorithm; determining a fifth annotation sample score based on the second annotation sample set, the target annotation sample set, and a second scoring algorithm; determining a sixth annotation sample score based on the second annotation sample set, the target annotation sample set, and a third scoring algorithm; and determining a second target annotation sample score based on the fourth annotation sample score, the fifth annotation sample score, and the sixth annotation sample score.
[0041] In this step, all intent tags in the user intent recognition input information are not distinguished except for the target intent tag; this embodiment does not limit this.
[0042] Specifically, a second set of labeled samples corresponding to the second intent label is determined based on the user intent recognition input information; wherein, the second intent label is the second candidate intent label among all intent labels in the user intent recognition input information, excluding the target intent label; the second candidate intent label is an intent label that is different from the target intent label; the first scoring algorithm, namely the BM25 algorithm, is used to calculate each labeled sample in the second set of labeled samples and each label sample in the target set of labeled samples one by one. The score is used to obtain the score of the fourth labeled sample. (0≤) ≤1). The second scoring algorithm, namely the dual-tower model, is used to calculate the scores for each labeled sample in the second labeled sample set and each labeled sample in the target labeled sample set. The score is used to obtain the score of the fifth labeled sample. (0≤) ≤1). The third scoring algorithm, namely the cross-coding model, is used to calculate the scores for each labeled sample in the second labeled sample set and each labeled sample in the target labeled sample set. The score is used to obtain the score of the sixth labeled sample. (0≤) ≤1).
[0043] Determining the score of the fourth labeled sample Fifth labeled sample score and the score of the sixth labeled sample Next, the score of the second target annotation sample is determined based on the scores of the fourth, fifth, and sixth annotation samples. (Second target annotation sample score) = ,in, , and These are pre-defined constant coefficients.
[0044] For example, For example, it could be 0.2. For example, it could be 0.3. For example, it could be 0.5, but this embodiment does not limit it.
[0045] For example, the calculated score of the fourth labeled sample Fifth labeled sample score and the score of the sixth labeled sample Each set of scores has m-1 points. Therefore, the scores of the second target labeled samples are also m-1 points, and each point set includes at least two sample scores.
[0046] In one embodiment, determining the target-related negative sample and the target negative sample intent label of the target-related negative sample based on the target labeled sample score includes: determining the first related negative sample and the first negative sample intent label corresponding to the first related negative sample based on the first target labeled sample score; determining the second related negative sample and the second negative sample intent label corresponding to the second related negative sample based on the second labeled sample score; and determining the target-related negative sample and the target negative sample intent label of the target-related negative sample based on the first related negative sample, the first negative sample intent label, the second related negative sample and the second negative sample intent label.
[0047] Specifically, after determining the scores of the first target labeled sample and the second labeled sample, the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample are determined based on the score of the first target labeled sample; the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample are determined based on the score of the second labeled sample; then, the target relevant negative sample and the target negative sample intent label of the target relevant negative sample are determined based on the first relevant negative sample, the first negative sample intent label, the second relevant negative sample and the second negative sample intent label.
[0048] In one embodiment, determining the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the score of the first target labeled sample includes: determining a first candidate labeled sample set; wherein, the first candidate labeled sample set is a set of labeled samples corresponding to all intent labels in the user intent recognition input information except for any one intent label; and determining the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the first candidate labeled sample set and the score of the first target labeled sample.
[0049] In this step, the first relevant negative sample refers to the most relevant negative sample corresponding to different intent labels among all labeled samples in the user intent recognition input information according to intent category.
[0050] Specifically, after obtaining the scores of the first target labeled samples, there are m-1 score sets. Each score set includes at least two sample scores. The highest sample score is selected from these at least two sample scores in each of the m-1 score sets (the highest sample score is the one most relevant to the labeled sample). Most similar labeled sample ), and determine the labeled sample corresponding to the highest sample score. The most relevant negative sample is identified, and the m-1 most relevant negative sample and the intent label corresponding to the m-1 most relevant negative sample are determined. The m-1 most relevant negative sample is determined to be the first relevant negative sample, and the intent label corresponding to the m-1 most relevant negative sample is determined to be the intent label of the first negative sample.
[0051] In one embodiment, determining the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the second target labeled sample score includes: determining a second candidate labeled sample set; wherein, the second candidate labeled sample set is a set of labeled samples in the user intent recognition input information other than the target labeled sample set corresponding to the target intent label; and determining the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the second candidate labeled sample set and the second target labeled sample score.
[0052] In this step, the second relevant negative sample refers to the most relevant negative sample corresponding to all labeled samples in the user intent recognition input information obtained without distinguishing intent labels.
[0053] Specifically, after obtaining the scores of the second target labeled samples, there are also m-1 score sets, each containing at least two sample scores. The second candidate labeled sample set is then determined; this second candidate labeled sample set refers to the set of labeled samples in the user intent recognition input information, excluding the target labeled sample set corresponding to the target intent label. (1≤ The set of all labeled samples ≤ m is used, without distinguishing between intent labels. Then, the scores of the top L samples in the second target labeled sample score are selected, and the corresponding labeled samples are selected from the second candidate labeled sample set based on the scores of the top L samples. These are the second relevant negative samples, and the intent label of the second negative sample corresponding to the second relevant negative sample is determined. Where L = m - 1.
[0054] For example, if there are m intent tags, for the target intent tag (1≤ Any labeled sample ≤m) (1≤k≤ (Total labeled sample size), and the BM25 algorithm is used to calculate the intent labels one by one. Each labeled sample in the labeled sample set (i≠j,1≤j≤m) and Score (0≤) ≤1); If there are m intent labels, for the intent labels (1≤ Any labeled sample ≤m) (1≤k≤ (Total labeled sample size), and calculate the intent tags one by one using a dual-tower model. Each labeled sample in the labeled sample set (i≠j,1≤j≤m) and Score (0≤) ≤1); If there are m intent tags, for the target intent tag Any labeled sample of (1≤i≤m) (1≤k≤ (Total sample size), and calculate the intent tags one by one using a cross-coding model. Each labeled sample in the labeled sample set (i≠j,1≤j≤m) and Score (0≤) ≤1); according to = Obtain the corresponding set from each of the m-1 sets. closest ( From the highest-ranking labeled samples, a total of m-1 most relevant negative samples were obtained. This involves identifying the first relevant negative sample. If there are m intent labels, then for the target intent label... (1≤ Any labeled sample ≤m) The BM25 algorithm is used to calculate each tag that does not belong to the target intent. Each labeled sample in the set of all labeled samples and Score (0≤) ≤1). If there are m intent tags, for the target intent tag... (1≤ Any labeled sample ≤m) The dual-tower model is used to calculate each tag that does not belong to the target intent. (1≤ Each labeled sample in the set of all labeled samples ≤m) is compared with Score (0≤) ≤1). If there are m intent tags, for the target intent tag... (1≤ Any labeled sample ≤m) The cross-coding model algorithm is used to calculate each tag that does not belong to the target intent. (1≤ Each labeled sample in the set of all labeled samples ≤m) is compared with Score (0≤) ≤1). According to = It does not belong to the target intent tag. (1≤ Select from all labeled sample sets ≤m) (L=m-1) most relevant negative samples This involves determining the second relevant negative sample. Finally, the first and second relevant negative samples are merged to obtain the target relevant negative sample; and the first negative sample intent label corresponding to the first relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample are merged to obtain the target negative sample intent label of the target relevant negative sample.
[0055] Step 104: Determine the reason for target intent recognition and the description of target intent recognition based on the preset intent, preset intent description, target intent label, target labeled sample set, target related negative samples and target negative sample intent labels.
[0056] In this step, the preset intent is a pre-defined user intent, and the preset intent description is a pre-defined intent description. This embodiment does not limit this.
[0057] Specifically, after determining the target intent label, target labeled sample set, target related negative samples, and target negative sample intent labels, the target intent recognition reason and target intent recognition description are determined based on the preset intent, preset intent description, target intent label, target labeled sample set, target related negative samples, and target negative sample intent labels.
[0058] In one embodiment, determining the cause and description of target intent identification based on a preset intent, a preset intent description, a target intent tag, a target labeled sample set, target-related negative samples, and target negative sample intent tags includes: determining candidate intent identification causes and candidate intent descriptions based on the preset intent, the preset intent description, the target intent tag, the target labeled sample set, the target-related negative samples, the target negative sample intent tags, and a first major language model; determining an initial intent analysis result based on the candidate intent identification causes and a second major language model; wherein the second major language model and the first major language model are different major language models; if the initial intent analysis result is determined to be unreasonable, the step of determining candidate intent identification causes and candidate intent descriptions based on the preset intent, the preset intent description, the target intent tag, the target labeled sample set, the target-related negative samples, the target negative sample intent tags, and the first major language model continues until the initial intent analysis result is reasonable, at which point the candidate intent identification cause is determined as the target intent identification cause, and the candidate intent description corresponding to the candidate intent identification cause is the target intent identification description.
[0059] In this step, both the first and second large language models are large language models capable of deep retrieval, and the first and second large language models are different large language models. This embodiment does not limit this.
[0060] Specifically, the preset intent, preset intent description, target intent tag, target labeled sample set, target related negative samples, and target negative sample intent tags are concatenated to obtain a concatenated result. This concatenated result is input into a first large language model. The first large model language performs deep analysis and network retrieval on the concatenated result to obtain the candidate intent recognition reason and candidate intent description output by the first large model language. Then, the candidate intent recognition reason is output to a second large language model. The second large language model performs a rationality judgment on the candidate intent recognition reason to obtain the initial intent analysis result output by the second large language model. If the initial intent analysis result indicates that the candidate intent recognition reason is unreasonable, the process continues to execute the steps of determining the candidate intent recognition reason and candidate intent description based on the preset intent, the preset intent description, the target intent tag, the target labeled sample set, the target related negative samples, the target negative sample intent tags, and the first large language model, until the initial intent analysis result indicates that the candidate intent recognition reason is reasonable. At this point, the candidate intent recognition reason is determined to be the target intent recognition reason, and the candidate intent description corresponding to the current candidate intent recognition reason is determined to be the target intent recognition description.
[0061] The advantage of this setup is that, in the field of intent recognition, we can use the deep thinking and network retrieval capabilities of large language models such as LLM to iteratively improve the methods for intent description and intent recognition reasons.
[0062] In one specific embodiment, if it is determined that the initial intent analysis result is unreasonable due to the candidate intent identification reason, the initial intent analysis result can be manually corrected to determine the candidate intent analysis result, and the candidate intent analysis result can be further input into the second language model for re-judgment. This embodiment does not limit this.
[0063] Step 105: Based on the user intent recognition input information, determine the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample.
[0064] In this step, the user intent recognition input information also includes the user-input query information, which is not limited in this embodiment.
[0065] In one embodiment, determining the target positive sample, the corresponding positive sample image label, the target negative sample, and the corresponding negative sample image label based on user intent recognition input information includes: performing semantic retrieval on the user intent recognition input information to determine initial labeled samples; sorting the user intent recognition input information and the initial labeled samples to determine the target positive sample and the corresponding positive sample image label; and determining the target negative sample and the corresponding negative sample image label based on the user intent recognition input information and the target positive sample.
[0066] Specifically, after obtaining the user's output query information from the user intent recognition input information, semantic retrieval is used to recall the sample set corresponding to the intent label in the user intent recognition input information that has the closest cosine distance to the user's input query information. The most relevant samples , The most relevant samples This constitutes the initial labeled sample. Then, cross-coding is used to analyze the user's intent in the input information, specifically the user's output query information (query). The most relevant samples Sort to obtain of This involves outputting the target positive sample of the query information to the user and determining the corresponding positive sample graph label. After determining the target positive sample and the corresponding positive sample graph label, assuming there are m label samples and m intent labels, where one intent label is the positive sample graph label, then the remaining m-1 intent labels are the negative sample graph labels, and the m-1 label samples are the target negative samples. Thus, the remaining intent labels are determined to be the negative sample graph labels corresponding to the target negative samples.
[0067] The advantage of this setup is that it improves the utilization rate of the entire set of labeled samples by using semantic and cosine distance to calculate text similarity and establish relationships between labeled samples with different intent labels.
[0068] Step 106: Determine the target prompt words based on the preset intent label, preset intent label description, target positive sample, target positive sample image label, target negative sample, target negative sample image label, target intent recognition reason, and target intent recognition description; and classify the target prompt words according to intent to determine the target intent recognition result of the user intent recognition input information.
[0069] Specifically, target prompt words are determined based on preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions. The target prompt words are then input into a large-scale language model, which performs intent classification on the target prompt words to obtain the final target intent recognition result of the user intent recognition input information output by the large-scale language model.
[0070] The large language model can be, for example, a large language model (LLM), but this embodiment does not limit it.
[0071] In one embodiment, determining the target prompt word based on a preset intent label, a preset intent label description, a target positive sample, a target positive sample image label, a target negative sample, a target negative sample image label, a target intent recognition reason, and a target intent recognition description includes: determining the target positive sample intent recognition reason and target positive sample intent recognition description based on the target positive sample, target positive sample image label, target intent recognition reason, and target intent recognition description; determining the target negative sample intent recognition reason and target negative sample intent recognition description based on the target negative sample, target negative sample image label, target intent recognition reason, and target intent recognition description; and concatenating the preset intent label, preset intent label description, target positive sample, target positive sample image label, target positive sample intent recognition reason, target positive sample intent recognition description, target negative sample, target negative sample image label, target negative sample intent recognition reason, and target negative sample intent recognition description to obtain the target prompt word.
[0072] Specifically, after determining the preset intent label, preset intent label description, target positive sample, target positive sample image label, target negative sample, target negative sample image label, target intent recognition reason, and target intent recognition description, the target intent recognition reason for the target positive sample is determined from the target intent recognition reason based on the target negative sample, and the target intent recognition description for the target positive sample is determined from the target intent recognition description; similarly, the target intent recognition reason for the target negative sample is determined from the target intent recognition reason, and the target intent recognition description for the target negative sample is determined from the target intent recognition description. Then, the determined preset intent label, preset intent label description, target positive sample, target positive sample image label, target positive sample intent recognition reason, target positive sample intent recognition description, target negative sample, target negative sample image label, target negative sample intent recognition reason, and target negative sample intent recognition description are concatenated to obtain the target prompt word.
[0073] The advantage of this setup is that, in the field of intent recognition, by outputting the concatenated target prompts as an LLM, and then using the LLM to classify the intent of the target prompts, the final target intent recognition result of the user intent recognition input information output by the large language model is obtained, thereby improving the intent recognition effect.
[0074] This application provides a method for determining the result of target intent recognition. The method involves acquiring user intent recognition input information, where the user intent recognition input information includes m intent labels, each corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2. The method determines the target labeled sample set corresponding to the target intent label based on the user intent recognition input information; where the target intent label is any one of the intent labels in the user intent recognition input information, and the target labeled sample set is the set of labeled samples corresponding to any one intent label. The method then determines the target labeled sample score based on the target labeled sample set, and determines the target-related negative samples and the target negative samples based on the target labeled sample score. This application's technical solution, by determining target intent recognition reasons and descriptions based on preset intents, preset intent descriptions, target intent tags, target labeled sample sets, target-related negative samples, and target negative sample intent tags, improves the accuracy and efficiency of target intent recognition results by determining target prompt words based on preset intent tags, preset intent tag descriptions, target positive samples, target positive sample image tags, target negative samples, target negative sample image tags, target intent recognition reasons, and target intent recognition descriptions, and classifying the target prompt words according to intents; and classifying the target prompt words according to intents to determine the target intent recognition results of user intent recognition input information.
[0075] The apparatus for determining the target intent recognition result provided in the embodiments of this application will be described below. The apparatus for determining the target intent recognition result described below and the method for determining the target intent recognition result described above can be referred to in correspondence with each other.
[0076] Figure 2 This is a schematic diagram of the structure of the device for determining the target intent recognition result provided in the embodiments of this application, with reference to... Figure 2 As shown, the target intent recognition result determination device 200 includes: an information acquisition module 201, a set determination module 202, a score determination module 203, a cause determination module 204, a sample determination module 205, and a result determination module 206; wherein, The information acquisition module 201 is used to acquire user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2.
[0077] The set determination module 202 is used to determine the target labeled sample set corresponding to the target intent label based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label.
[0078] The scoring determination module 203 is used to determine the target labeled sample score based on the target labeled sample set, and to determine the target-related negative sample and the target negative sample intent label based on the target labeled sample score.
[0079] The cause determination module 204 is used to determine the cause of target intent recognition and the description of target intent recognition based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples and the target negative sample intent labels.
[0080] The sample determination module 205 is used to determine the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample based on the user intent recognition input information.
[0081] The result determination module 206 is used to determine the target prompt words based on the preset intent label, preset intent label description, target positive sample, target positive sample image label, target negative sample, target negative sample image label, target intent recognition reason and target intent recognition description; and to classify the target prompt words according to intent to determine the target intent recognition result of the user intent recognition input information.
[0082] In one example embodiment, the target annotation sample score includes the first target annotation sample score.
[0083] In one example embodiment, the score determination module 203 determines the target labeled sample score based on the target labeled sample set, specifically by: determining a first labeled sample set corresponding to a first intent label based on user intent recognition input information; wherein, the first intent label is a set of first candidate intent labels that are different from the target intent label among all intent labels in the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label; determining the first labeled sample score based on the first labeled sample set, the target labeled sample set, and a first scoring algorithm; determining the second labeled sample score based on the first labeled sample set, the target labeled sample set, and a second scoring algorithm; determining the third labeled sample score based on the first labeled sample data, the target labeled sample set, and a third scoring algorithm; wherein, the first scoring algorithm, the second scoring algorithm, and the third scoring algorithm are different scoring algorithms; and determining the first target labeled sample score based on the first labeled sample score, the second labeled sample score, and the third labeled sample score.
[0084] In one example embodiment, the target annotation sample score further includes: a second target annotation sample score.
[0085] In one example embodiment, the score determination module 203 determines the target labeled sample score based on the target labeled sample set, specifically by: determining the second labeled sample set corresponding to the second intent label based on the user intent recognition input information; wherein, the second intent label is the second candidate intent label other than the target intent label among all intent labels of the user intent recognition input information; the second candidate intent label is an intent label that is different from the target intent label; determining the fourth labeled sample score based on the second labeled sample set, the target labeled sample set, and the first scoring algorithm; determining the fifth labeled sample score based on the second labeled sample set, the target labeled sample set, and the second scoring algorithm; determining the sixth labeled sample score based on the second labeled sample set, the target labeled sample set, and the third scoring algorithm; and determining the second target labeled sample score based on the fourth labeled sample score, the fifth labeled sample score, and the sixth labeled sample score.
[0086] In one example embodiment, the score determination module 203 determines the target-related negative sample and the target negative sample intent label of the target-related negative sample based on the target labeled sample score. Specifically, it is used to: determine the first related negative sample and the first negative sample intent label corresponding to the first related negative sample based on the first target labeled sample score; determine the second related negative sample and the second negative sample intent label corresponding to the second related negative sample based on the second target labeled sample score; and determine the target-related negative sample and the target negative sample intent label of the target-related negative sample based on the first related negative sample, the first negative sample intent label, the second related negative sample, and the second negative sample intent label.
[0087] In one example embodiment, the score determination module 203 determines the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the score of the first target labeled sample. Specifically, it is used to: determine the first candidate labeled sample set; wherein, the first candidate labeled sample set is the set of labeled samples corresponding to all intent labels in the user intent recognition input information except for any one intent label; and determine the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the first candidate labeled sample set and the score of the first target labeled sample.
[0088] In one example embodiment, the score determination module 203 determines the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the score of the second target labeled sample. Specifically, it is used to: determine the second candidate labeled sample set; wherein, the second candidate labeled sample set is the set of labeled samples in the user intent recognition input information other than the target labeled sample set corresponding to the target intent label; and determine the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the score of the second candidate labeled sample set and the second target labeled sample.
[0089] In one example embodiment, the cause determination module 204 is specifically configured to: determine candidate intent identification causes and candidate intent descriptions based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and a first large language model; determine an initial intent analysis result based on the candidate intent identification causes and a second large language model; wherein the second large language model and the first large language model are different large language models; if the initial intent analysis result is determined to be unreasonable, continue executing the step of determining candidate intent identification causes and candidate intent descriptions based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and the first large language model until the initial intent analysis result is reasonable, then determine the candidate intent identification cause as the target intent identification cause, and the candidate intent description corresponding to the candidate intent identification cause as the target intent identification description.
[0090] In one example embodiment, the sample determination module 205 is specifically used for: performing semantic retrieval on the user intent recognition input information to determine initial labeled samples; sorting the user intent recognition input information and the initial labeled samples to determine the target positive samples and the positive sample image labels corresponding to the target positive samples; and determining the target negative samples and the negative sample image labels corresponding to the target negative samples based on the user intent recognition input information and the target positive samples.
[0091] In one example embodiment, the result determination module 206 determines the target prompt word based on the preset intent label, preset intent label description, target positive sample, target positive sample image label, target negative sample, target negative sample image label, target intent recognition reason, and target intent recognition description. Specifically, it is used to: determine the target positive sample intent recognition reason and target positive sample intent recognition description based on the target positive sample, target positive sample image label, target intent recognition reason, and target intent recognition description; determine the target negative sample intent recognition reason and target negative sample intent recognition description based on the target negative sample, target negative sample image label, target intent recognition reason, and target intent recognition description; and concatenate the preset intent label, preset intent label description, target positive sample, target positive sample image label, target positive sample intent recognition reason, target positive sample intent recognition description, target negative sample, target negative sample image label, target negative sample intent recognition reason, and target negative sample intent recognition description to obtain the target prompt word.
[0092] The apparatus of this embodiment can be used to execute the method of any embodiment in the side embodiment of the method for determining the target intent recognition result. Its specific implementation process and technical effects are similar to those in the side embodiment of the method for determining the target intent recognition result. For details, please refer to the detailed description in the side embodiment of the method for determining the target intent recognition result, which will not be repeated here.
[0093] Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other via the communication bus 340. The processor 310 can call a computer program in the memory 330 to execute the steps of a method for determining the result of target intent recognition, such as including: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The target labeled sample set corresponding to the target intent label is determined based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label; The target labeled sample score is determined based on the target labeled sample set, and the target related negative sample and the target negative sample intent label are determined based on the target labeled sample score; The reasons for target intent recognition and the description of target intent recognition are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target-related negative samples, and the target negative sample intent labels. Based on the user intent, the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample are determined according to the user intent input information. The target prompt words are determined based on the preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and the target prompt words are classified according to intent to determine the target intent recognition result of the user intent recognition input information.
[0094] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0095] On the other hand, embodiments of this application also provide a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the method for determining the target intent recognition result provided in the above embodiments, such as including: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The target labeled sample set corresponding to the target intent label is determined based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label; The target labeled sample score is determined based on the target labeled sample set, and the target related negative sample and the target negative sample intent label are determined based on the target labeled sample score; The reasons for target intent recognition and the description of target intent recognition are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target-related negative samples, and the target negative sample intent labels. Based on the user intent, the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample are determined according to the user intent input information. The target prompt words are determined based on the preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and the target prompt words are classified according to intent to determine the target intent recognition result of the user intent recognition input information.
[0096] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing a processor to execute the steps of the method for determining the target intent recognition result provided in the above embodiments, such as including: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The target labeled sample set corresponding to the target intent label is determined based on the user intent recognition input information; wherein, the target intent label is any intent label in the user intent recognition input information, and the target labeled sample set is the labeled sample set corresponding to any intent label; The target labeled sample score is determined based on the target labeled sample set, and the target related negative sample and the target negative sample intent label are determined based on the target labeled sample score; The reasons for target intent recognition and the description of target intent recognition are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target-related negative samples, and the target negative sample intent labels. Based on the user intent, the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample are determined according to the user intent input information. The target prompt words are determined based on the preset intent labels, preset intent label descriptions, target positive samples, target positive sample image labels, target negative samples, target negative sample image labels, target intent recognition reasons, and target intent recognition descriptions; and the target prompt words are classified according to intent to determine the target intent recognition result of the user intent recognition input information.
[0097] Processor-readable storage media can be any available medium or data storage device that the processor can access, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).
[0098] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0099] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for determining the result of target intent recognition, characterized in that, include: Obtain user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The target annotation sample set corresponding to the target intent label is determined based on the user intent recognition input information; wherein, the target intent label is any one of the intent labels in the user intent recognition input information, and the target annotation sample set is the annotation sample set corresponding to any one of the intent labels; The target labeled sample score is determined based on the target labeled sample set, and the target-related negative sample and the target negative sample intent label are determined based on the target labeled sample score; The target intent recognition reason and target intent recognition description are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, and the target negative sample intent labels; Based on the user intent recognition input information, determine the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample; The target prompt word is determined based on the preset intent label, the preset intent label description, the target positive sample, the target positive sample image label, the target negative sample, the target negative sample image label, the target intent recognition reason, and the target intent recognition description; and the target prompt word is classified according to intent to determine the target intent recognition result of the user intent recognition input information.
2. The method for determining the target intent recognition result according to claim 1, characterized in that, The target labeled sample score includes the first target labeled sample score; Determining the target labeled sample score based on the target labeled sample set includes: A first set of labeled samples corresponding to a first intent label is determined based on the user intent recognition input information; wherein, the first intent label is a set of first candidate intent labels that are different from the target intent label among all the intent labels in the user intent recognition input information; wherein, the first candidate intent label set includes at least one first candidate intent label; The score of the first labeled sample is determined based on the first labeled sample set, the target labeled sample set, and the first scoring algorithm. The score of the second labeled sample is determined based on the first labeled sample set, the target labeled sample set, and the second scoring algorithm. The score of the third labeled sample is determined based on the first labeled sample data, the target labeled sample set, and the third scoring algorithm; wherein the first scoring algorithm, the second scoring algorithm, and the third scoring algorithm are different scoring algorithms; The score of the first target annotation sample is determined based on the scores of the first annotation sample, the second annotation sample, and the third annotation sample.
3. The method for determining the target intent recognition result according to claim 2, characterized in that, The target annotation sample score further includes: a second target annotation sample score; the step of determining the target annotation sample score based on the target annotation sample set includes: A second set of labeled samples corresponding to the second intent label is determined based on the user intent recognition input information; wherein, the second intent label is a second candidate intent label other than the target intent label among all the intent labels in the user intent recognition input information; the second candidate intent label is an intent label that is different from the target intent label; The score of the fourth annotation sample is determined based on the second annotation sample set, the target annotation sample set, and the first scoring algorithm. The score of the fifth labeled sample is determined based on the second labeled sample set, the target labeled sample set, and the second scoring algorithm; The score of the sixth labeled sample is determined based on the second labeled sample set, the target labeled sample set, and the third scoring algorithm; The score of the second target annotation sample is determined based on the scores of the fourth, fifth, and sixth annotation samples.
4. The method for determining the target intent recognition result according to claim 3, characterized in that, The step of determining the target-related negative samples and the target negative sample intent labels of the target-related negative samples based on the target labeled sample scores includes: Determine the first relevant negative sample and the intent label of the first negative sample corresponding to the first relevant negative sample based on the score of the first target labeled sample; Determine the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the score of the second target labeled sample; The target related negative sample and the target negative sample intent label are determined based on the first related negative sample, the first negative sample intent label, the second related negative sample, and the second negative sample intent label.
5. The method for determining the target intent recognition result according to claim 4, characterized in that, The step of determining the first relevant negative sample and the first negative sample intent label corresponding to the first relevant negative sample based on the score of the first target labeled sample includes: Determine a first candidate annotation sample set; wherein, the first candidate annotation sample set is the set of annotation samples corresponding to all intent tags except any one intent tag in the user intent recognition input information; The first relevant negative sample and the intent label of the first negative sample corresponding to the first relevant negative sample are determined based on the first candidate labeled sample set and the score of the first target labeled sample.
6. The method for determining the target intent recognition result according to claim 4, characterized in that, The step of determining the second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample based on the score of the second target labeled sample includes: Determine a second candidate annotation sample set; wherein, the second candidate annotation sample set is the set of annotation samples in the user intent recognition input information other than the target annotation sample set corresponding to the target intent tag; The second relevant negative sample and the second negative sample intent label corresponding to the second relevant negative sample are determined based on the second candidate labeled sample set and the second target labeled sample score.
7. The method for determining the target intent recognition result according to claim 1, characterized in that, The step of determining the cause and description of target intent recognition based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target-related negative samples, and the target negative sample intent labels includes: The candidate intent recognition reasons and candidate intent descriptions are determined based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and the first large language model; The initial intent analysis result is determined based on the candidate intent identification reasons and the second major language model; wherein, the second major language model is a different major language model from the first major language model; If the initial intent analysis result is determined to be unreasonable, the steps of determining the candidate intent recognition reason and candidate intent description based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, the target negative sample intent labels, and the first large language model continue until the initial intent analysis result is reasonable. In this case, the candidate intent recognition reason is determined to be the target intent recognition reason, and the candidate intent description corresponding to the candidate intent recognition reason is the target intent recognition description.
8. The method for determining the target intent recognition result according to any one of claims 1-7, characterized in that, The step of determining the target positive sample, the positive sample image label corresponding to the target positive sample, the target negative sample, and the negative sample image label corresponding to the target negative sample based on the user intent recognition input information includes: Perform semantic retrieval on the user intent recognition input information to determine the initial labeled samples; The user intent recognition input information and the initial labeled samples are sorted to determine the target positive sample and the positive sample image label corresponding to the target positive sample; Based on the user intent recognition input information and the target positive sample, determine the target negative sample and the corresponding negative sample image label.
9. The method for determining the target intent recognition result according to claim 8, characterized in that, The step of determining the target prompt word based on the preset intent label, the preset intent label description, the target positive sample, the target positive sample image label, the target negative sample, the target negative sample image label, the target intent recognition reason, and the target intent recognition description includes: The target positive sample intent recognition reason and target positive sample intent recognition description are determined based on the target positive sample, the target positive sample image label, the target intent recognition reason, and the target intent recognition description. The target negative sample intent recognition reason and target negative sample intent recognition description are determined based on the target negative sample, the target negative sample image label, the target intent recognition reason, and the target intent recognition description. The target prompt word is obtained by concatenating the preset intent label, the preset intent label description, the target positive sample, the target positive sample image label, the target positive sample intent recognition reason, the target positive sample intent recognition description, the target negative sample, the target negative sample image label, the target negative sample intent recognition reason, and the target negative sample intent recognition description.
10. A device for determining the result of target intent recognition, characterized in that, include: The information acquisition module is used to acquire user intent recognition input information; wherein, the user intent recognition input information includes m intent labels, each intent label corresponding to a set of labeled samples; m is a positive integer greater than or equal to 2; The set determination module is used to determine the target annotation sample set corresponding to the target intent label based on the user intent recognition input information; wherein, the target intent label is any one of the intent labels in the user intent recognition input information, and the target annotation sample set is the annotation sample set corresponding to any one of the intent labels; The scoring determination module is used to determine the target labeled sample score based on the target labeled sample set, and to determine the target-related negative sample and the target negative sample intent label based on the target labeled sample score; The cause determination module is used to determine the cause of target intent recognition and the description of target intent recognition based on the preset intent, the preset intent description, the target intent label, the target labeled sample set, the target related negative samples, and the target negative sample intent labels; The sample determination module is used to determine, based on the user intent recognition input information, a target positive sample, a positive sample image label corresponding to the target positive sample, a target negative sample, and a negative sample image label corresponding to the target negative sample; The result determination module is used to determine target prompt words based on preset intent labels, preset intent label descriptions, the target positive samples, the target positive sample image labels, the target negative samples, the target negative sample image labels, the target intent recognition reason, and the target intent recognition description; and to classify the target prompt words according to intent to determine the target intent recognition result of the user intent recognition input information.
11. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for determining the target intent recognition result as described in any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for determining the target intent recognition result as described in any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for determining the target intent recognition result as described in any one of claims 1 to 9.