Question and answer method, system and equipment based on multi-intention recognition and storage medium

By using the adaptive instance threshold learning method, combined with entity recognition and intent recognition models, the problem of identifying "none of the above" intents in small-sample multi-intent recognition is solved, achieving fast and accurate intent recognition and improving user experience.

CN120821793APending Publication Date: 2025-10-21CHINA NAT PETROLEUM CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410439154.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

Existing multi-intent recognition methods cannot effectively identify whether user questions contain intent labels in small sample scenarios, especially "none of the above" intents. As a result, the question-answering system cannot handle problems where user intent exceeds the set label set.

Method used

An adaptive instance threshold learning method is adopted. Through entity recognition, entity linking and intent recognition models, text encoder and multi-layer perceptron are used to design task and instance threshold learning modules to determine whether user questions have intent labels and identify their categories.

Benefits of technology

It achieves fast and accurate intent recognition with small sample data, avoids the time-consuming and labor-intensive manual labeling, improves the efficiency of the question-answering system and user experience, and can identify "none of the above" intent to avoid misleading users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821793A_ABST
    Figure CN120821793A_ABST
Patent Text Reader

Abstract

The invention discloses a question and answer method, system and device based on multi-intention recognition and a storage medium, and relates to the field of natural language process.The method comprises the steps that a user question is obtained, entity recognition and entity link recognition are conducted on the user question, and an intention recognition model is obtained based on training of a self-adaptive instance threshold value learning mode; performing intention recognition on the user question; according to the entity recognition result, the entity link recognition result and the intention recognition result, the answer statement of the user question is determined, and intention recognition is conducted on the user question by means of the intention recognition model obtained through training based on the self-adaptive instance threshold value learning mode; according to the method, training of the intention recognition model can be rapidly completed only by using a small amount of label data, time and labor consumption caused by a large amount of manual labeling is avoided, good generalization performance can be achieved for unseen intentions, and rapid and accurate intention recognition is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to a question-answering method, system, device and storage medium based on multi-intent recognition. Background Art

[0002] Multi-intent recognition aims to identify the multiple intents of a user's question. The general form is to determine how many intents exist in a given query instance text and what type of intents exist. With the development and application of artificial intelligence technology, multi-intent recognition, as one of the key technologies, has been widely used in intelligent search, intelligent question answering, personalized recommendation and other fields. Multi-intent recognition methods based on supervised learning have achieved excellent results. They require sufficient and fully labeled training data. However, in many application areas (such as question-answering systems), it is very difficult to ensure sufficient training data for each type of intent. Therefore, it is necessary to study how to improve the performance of multi-intent recognition using a small amount of labeled or even unlabeled data.

[0003] Currently, the main approach to small-sample multi-intent recognition is to design a label-instance correlation function and a threshold. Using the correlation function, the correlation score between the query instance and each intent label is calculated, and the intent label with a score above the threshold is selected as the result. Based on the threshold calculation strategy, small-sample multi-intent recognition methods in recent years have been divided into two types: one is to learn a universal fixed threshold. This method structures the data into multiple subtasks. In each subtask, the intent of the query instance must belong to the subtask's label set. A mean threshold is learned across the subtasks to ensure that the intent labels of the query instances in different subtasks are as accurate as possible. The disadvantage of this fixed threshold method is that it is difficult to adapt to the diverse user conversation domains. The other method is to adaptively learn the threshold based on meta-learning. Considering that thresholds may vary in multi-intent recognition tasks across different topics, a universal threshold is first learned, regardless of the topic. Then, a small number of examples from the current topic are used to fine-tune the universal threshold to obtain the threshold for the specific topic. This threshold calculation method assumes that the query instance must contain an intent in the label set, ignoring the possibility that the query instance may not have an intent label.

[0004] Existing threshold calculation methods ensure that query instances have at least one intent label. However, in real-world scenarios (such as question-answering systems), user conversations are random and diverse, and many user intents are not included in the limited set of labels. Figure 1This paper presents an example of a few-shot multi-intent recognition task involving the "None of the Above" category. The intent labels include "RiskPerson" and "Risk Company," while the query "What family members does Anthony Swire have?" does not contain either intent label and should be labeled "NOTA." Existing methods are unable to handle "None-of-the-above (NOTA)" intents, so determining whether an intent label exists is crucial in few-shot multi-intent recognition.

[0005] Small-sample multi-intent recognition, a key step in question-answering systems, aims to determine the primary intent of user questions using a small amount of training data. In business risk question-answering scenarios, user conversations are random and diverse, and user questions may not have any intent, or the intent of the question may exceed the scope of the business risk system's answer. Many intents are not included in the limited set of labels set by the system. Existing multi-intent recognition work assumes that user questions have at least one intent label. It learns a similarity function based on a threshold strategy and selects multiple intent labels with scores above the threshold as the result. However, it is impossible to recognize "none of the above" intents. Therefore, it is crucial to determine whether intent labels exist in small-sample multi-intent recognition. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to address the deficiencies of the existing technology and specifically provide a question-answering method, system, device and storage medium based on multi-intent recognition, as follows:

[0007] 1) In the first aspect, the present invention provides a question-answering method based on multi-intent recognition, the specific technical solution of which is as follows:

[0008] Obtain user questions, perform entity recognition and entity link recognition on the user questions, and use the intent recognition model trained based on adaptive instance threshold learning to identify the intent of the user questions;

[0009] Determine the answer statement for the user's question based on the entity recognition results, entity link recognition results, and intent recognition results.

[0010] The beneficial effects of the question-answering method based on multi-intent recognition provided by the present invention are as follows:

[0011] The intent recognition model trained based on the adaptive instance threshold learning method can be used to recognize the intent of user questions. It can quickly complete the training of the intent recognition model using only a small amount of labeled data, avoiding the time and labor-intensive manual labeling. It can also have good generalization performance for unseen intents, achieving fast and accurate intent recognition.

[0012] 2) In a second aspect, the present invention further provides a question-answering system based on multi-intent recognition, the specific technical solution of which is as follows:

[0013] including a recognition module and an answer determination module;

[0014] The recognition module is used to obtain user questions, perform entity recognition and entity link recognition on the user questions, and use the intent recognition model trained based on adaptive instance threshold learning to identify the intent of the user questions;

[0015] The answer determination module is used to determine the answer statement of the user's question based on the entity recognition results, entity link recognition results and intent recognition results.

[0016] 3) In a third aspect, the present invention also provides a computer device, comprising a processor coupled to a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor, so that the computer device implements any of the above-mentioned question-answering methods based on multi-intent recognition.

[0017] 4) In a fourth aspect, the present invention further provides a computer-readable storage medium, in which at least one computer program is stored, and at least one computer program is loaded and executed by a processor so that the computer implements any of the above-mentioned question-answering methods based on multi-intent recognition.

[0018] It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0020] Figure 1 This is an example of a small-sample multi-intent recognition task that includes the “none of the above” category;

[0021] Figure 2 Schematic diagram of a flow chart of a question-answering method based on multi-intent recognition according to an embodiment of the present invention;

[0022] Figure 3 Some examples of the global business risk knowledge graph;

[0023] Figure 4 This is a second flow chart of a question-answering method based on multi-intent recognition according to an embodiment of the present invention;

[0024] Figure 5 Schematic diagram of the process of intent recognition;

[0025] Figure 6 Schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0027] like Figure 2 As shown, a question-answering method based on multi-intent recognition according to an embodiment of the present invention includes:

[0028] S1. Obtain user questions, perform entity recognition and entity link recognition on the user questions, and use the intent recognition model trained based on adaptive instance threshold learning to identify the intent of the user questions;

[0029] S2. Determine the answer statement to the user's question based on the entity recognition results, entity linking recognition results, and intent recognition results.

[0030] Optionally, in the above technical solution, the intent recognition model trained based on the adaptive instance threshold learning method includes a trained text encoder and a trained preset learning model, and the process of training the intent recognition model based on the adaptive instance threshold learning method includes:

[0031] S101, using the text encoder to support set D support Encode each sample question in and get the support set D support The context embedding vector of each sample question in ;

[0032] Construct a multi-intent recognition dataset FewIR that includes multiple sample questions. The sample questions in the multi-intent recognition dataset are obtained by collecting and annotating. The multi-intent recognition dataset is combined according to intent categories. According to the intent category, M intent category data are extracted from the dataset to form a training set D train , the remaining intent category data constitute the test set D val . Training set D train Contains M categories, N instances, each instance represents an unstructured question. From the training set D train Randomly select M1 categories, including N1 instances, to form the support set D support , D support The i-th element in is recorded as Use r i Represents y iThe label description of the intent category is used to further explain the intent category. Randomly extract M2 categories from the remaining samples of the training set, containing N2 instances, and construct the query set D query , D query The kth element in

[0033] For example: D support The dataset contains two intent categories: y1 and y2. y1 is "Risk person" and y2 is "Risk company." The intent category label for y1 is r1, and the intent category label for y2 is r2. r1 is "Someone who has business risk," and r2 is "Some company who has business risk." The first sample question in the support set, x1, is "Who has business risks multiple times by the SDN list?" The intent category label for x1 is Y1, "Risk person." The second sample question in the support set, x2, is "Which persons and companies have business risks in Russia in October 2023?" The intent category labels for x2, Y2, are "Risk person" and "Risk company."

[0034] S102: Obtain support set D based on the context embedding vector of each sample question and the intent category label of each sample question. support The intent category prototype matrix for each intent recognition label in The task center matrix t is obtained according to all the intention category prototype matrices, specifically:

[0035] 1) Support set D support Contains M1 intent categories, each intent category has m i instances, add and average all instance codes under the same category to generate the central representation of the current intent category where x i is x i Each word in the question is embedded in a word and the sum of the average results is obtained. The word embedding is performed using the Bert model.

[0036] 2) When there is a sample question corresponding to at least two intent recognition labels, if only the central representation of the intent category in the above content is used, it will lead to ambiguity. Therefore, label description is introduced here to emphasize the differences between different intent recognitions. use calculate Corresponding intent category prototype matrix where r i is r i The result of averaging the word embeddings for each character in the intent category label description is obtained. β represents the interpolation factor, which is a hyperparameter and can be set according to actual conditions.

[0037] 3) Support set D support The next M1 intent prototype representation Add and average to generate the task center matrix

[0038] S103. Calculate any sample question x in the query set query and The correlation score between them is compared with the task threshold and instance threshold respectively. According to the comparison results, the prediction x is query The intent category label, where the task threshold is obtained based on the preset learning model;

[0039] Calculate the value of any sample question x in the training set and The correlation score between .

[0040] Among them, using the formula f t =SIM(x query ,t)=x query t, calculate x query f between one of the N2 questions in the task center representation t t , for any question, it is a t.

[0041] Among them, using the formula Calculate x query One of the N2 questions in the prototype representation The correlation score f c,i , corresponding to any question, a total of M1

[0042] In the current scenario, calculate x query and Similarity between H1, H2...H M1 ,Will As weight, The number of corresponding intent labels As a variable, weighted average is used to obtain the task threshold t task Calculate x query and Find the maximum and minimum values ​​in the correlation score and use interpolation to obtain

[0043] The process of obtaining the task threshold and instance threshold is as follows:

[0044] 1) Support set D support Current task threshold t task study:

[0045] For the support set D support Any supported instance {x i ,Y i ,r i}, calculate the query sentence x query and the similarity between supporting questions H(I(x query ),I(x i ), λ), where λ is the bandwidth factor, obtained through data learning:

[0046]

[0047] I(x) returns features related to the number of labels for instance x. Consider features related to the number of sentence intents, including sentence length z1, number of conjunctions z2, number of predicates z3, punctuation z4, and number of interrogative pronouns z5. These are concatenated to form a feature vector z = [z1; z2; z3; z4; z5], which is then fed into a multilayer perceptron to encode the feature I(x). W1, W2, b1, and b2 are weight parameters.

[0048] I(x)=MLP(z)=Relu(W2·Relu(W1·z+b1)+b2)

[0049] Given a support set D support , t task is the weighted average number of labels of the support examples. The weight is calculated as the similarity H(I(x query ),I(x i );λ),|y i | represents instance x i The number of intent labels, Z is the normalization factor:

[0050]

[0051]

[0052] 2) Adaptive instance-level threshold t instance,i study:

[0053] To automatically adapt the instance-level threshold to a specific query, set the threshold to the current D support The interpolation between the maximum score and the minimum score is: α is the learned interpolation rate parameter:

[0054]

[0055] S104, based on the support set and query set, combined with the prediction x query The process of intent category labeling is carried out, and the loss function is introduced to train the text encoder and the preset learning model to obtain the trained text encoder and the trained preset learning model.

[0056] Judgment 1:

[0057] In the current scenario, calculate x query One of the N2 questions in the task center representation t, such as “What family members does Anthony Swire have?” t Less than the task threshold t task , x query The intent tag Y is {“NOTA”}. If x query For one of the N2 questions in the question set, such as “Which enterprises have business riskAsian Development Bank?”, the relevance score f is calculated with the task-centric representation t. t , due to f t Greater than the task threshold t task , enter judgment 2.

[0058] Among them, using the formula f t =SIM(x query ,t)=x query tCalculate f t , for any question, it is a t.

[0059] Decision 2: Calculate x query One of the N2 questions in the prototype representation The correlation score f c,1 、f c,2 …f c,n (M1 selected from N1 intents in the support set), when f c,1 Less than the instance threshold t instance,i (There are M1 in total) and f c,1 Greater than the instance threshold t instance,i , x query The intent label Y is {“Risk company”}. And so on, a judgment is made for each class.

[0060] Among them, using the formula Calculate f c,i , corresponding to any question, a total of M1

[0061] Enter query instance x query , obtain the current support set D through the threshold learning module support Lower task threshold t task and instance threshold t instance,i . Task threshold t task Used to determine the query instance in D support Is there an intent label under the instance threshold t instance,i Used to determine the query instance in D support The type of the intended label.

[0062] The specific method is as follows:

[0063] (1) Calculate the relevance score f between the query instance and the task center representation t , and the current task threshold t task Compare, if f t ≥t task , query the instance for the existence of intent, and continue with step (2); if f t <t task Otherwise, there is no intent in the query instance, which is "NOTA".

[0064] (2) Calculate the relevance score between the test sample and the prototype representation of each intent category And the obtained instance threshold t instance,i Compare and predict the intent category. c,i ≥t instance,i , then the test sample belongs to this intent category; if f c,i <t instance,i , the test sample does not belong to this intent category.

[0065] (3) Calculate the loss function, is the prototype representation of the true intent category of the query instance, is the prototype representation of the false intent category of the query instance, where the loss function is:

[0066]

[0067] Optionally, in the above technical solution, the text encoder is a Bert model, and the preset learning model is a multi-layer perceptron.

[0068] Optionally, in the above technical solution, it further includes: arranging a variety of original data related to business risks to generate a business risk knowledge graph;

[0069] Among them, the business risk knowledge graph can be a global business risk knowledge graph generated by sorting out a variety of original data related to business risks around the world, capturing structured business risk data from a variety of monitoring data sources and storing them in the graph library according to the ontology specification, for example, Figure 3 The global business risk knowledge graph shown here identifies data sources for risk information, ensuring their reliability and frequency of updates. 86 data sources, including government business risk lists and lists of international organizations, are monitored. Data collection and organization utilize web crawlers to collect data, remove duplicates and missing values, and standardize data formats to ensure data consistency and availability. Ontology definition and attribute setting determine the types of entities within the graph and the relationships between them, defining entity types and the attributes of each entity. A total of 23 entities and 14 relationships were established. For data storage and management, a Neo4j graph database was selected to store the sanctions graph data, implementing data persistence and updates to maintain the graph's real-time performance.

[0070] In S2, based on the entity recognition results, entity linking recognition results, and intent recognition results, the answer statement for the user's question is determined, including:

[0071] S20, based on the entity recognition results, entity link recognition results, and intent recognition results, and in combination with the query template, mapping the user question to generate a query statement;

[0072] Based on the information obtained from question understanding, the query statements required to complete the task are generated. Template management: Based on the business scenario, different templates are prepared for all predefined intent categories: {"Risk Person": "Match(n:Person)where n.caption contains'$Person'return n.reason", "Risk Company": "MATCH(n:Sanction)-[p:sanction]->(q)where q.country_name contains'$Company'RETURN n"}. Template mapping: The mapping layer determines the specific template to call based on the question intent and question entity type information. The template corresponding to Question 2 is "Match(n:Person)where n.caption contains'SADIKOV Alexey Lvovich'return n.reason."

[0073] S21. Use a query statement to search the business risk knowledge graph and obtain an answer statement to the user's question.

[0074] After querying the graph based on the query statement, one or more query results will be returned. Using a customized speech template, the final answer returned to the user is generated: "Member of the Board of Directors of a backbone Russian company, which is involved in sectors of the economy that provide a significant source of income for the government of the Russian Federation."

[0075] Optionally, in S1, entity recognition is performed on the user's question, including:

[0076] S10. Use BILSTM-CRF technology to perform entity recognition on user questions.

[0077] Identify named entities from questions. This example uses the open-source BERT-BILSTM-CRF technology. Each word in question 2, "What business risks does Alexey Lvovich have?", is used as input to the BERT pre-trained model to obtain the corresponding contextual word embedding. The word embeddings and a randomly initialized state transition probability matrix are then used as input to the BILSTM-CRF model. The label sequence with the highest prediction score is selected as the optimal answer output, namely, {"AlexeyLvovich": "PERSON"}.

[0078] Optionally, in S1, entity link recognition is performed on the user question, including:

[0079] S11. Use spatial vector technology to calculate the cosine similarity between any entity identified from the user's question and each feature vector in the graph candidate entity set, and select the candidate entity with the highest similarity as the target entity of the link corresponding to the entity, until the target entity of the link corresponding to each entity is obtained.

[0080] The extracted entity data is linked to the corresponding entry in the knowledge graph. This embodiment specifically uses space vector technology to identify the entity "Alexey Lvovich" and calculate the cosine similarity {0.89, 0.25, ...} between the feature vectors of the entity and the set of candidate graph entities {"SADIKOVAlexey Lvovich", "John Anthony Swire", ...}. The candidate entity "SADIKOV Alexey Lvovich" with the highest similarity is selected as the target entity for the link.

[0081] The interpretation of intent recognition for user questions is as follows:

[0082] For example, if question 1, "What family members does Anthony Swire have?", and question 2, "What business risks does Alexey Lvovich have?", are input into a trained small sample intent recognition model for "None of the Above" questions, the model will select the appropriate category from all predefined intent categories {"Risk Person," "Risk Company"} and return it. If no category matches, it returns "NOTA" as the question intent type. The intent type for question 1 is "NOTA," and the intent type for question 2 is "Risk Person."

[0083] The present invention provides a question-answering method based on multi-intention recognition, specifically a method for constructing a business risk question-answering system for "none of the above" type of intention recognition under a small sample, such as Figure 4 As shown, it includes: organizing various raw data related to business risks, generating a global business risk knowledge graph, and storing it in the graph database; obtaining user questions and performing semantic analysis on user questions, including question intent recognition, entity recognition, and entity linking; using query templates to perform question mapping to generate query statements, querying results in the global business risk graph, and returning them.

[0084] The present invention starts from how to identify the "none of the above" type of intent in a small sample, designs a task threshold learning module to determine whether the user's question has an intent label, and designs an adaptive instance threshold learning module to determine the type of the user's question intent label. The business risk question-answering system identifies the "none of the above" type of intent and clearly informs the user which questions cannot be answered, avoiding the disappointment of the user's expectations not matching the actual results, and allowing the user to better understand the capabilities and limitations of the system. At the same time, the business risk question-answering system avoids wasting time and resources on questions that cannot be answered, thereby improving efficiency, which is particularly important for application scenarios that process a large number of user questions. In addition, this method can quickly complete specific multi-label intent recognition tasks with a small amount of labeled data, avoiding the time-consuming and labor-intensive process of large amounts of manual labeling, and achieving fast and accurate intent.

[0085] The following will be combined Figure 4 The method of the present invention is described in detail, comprising the following steps:

[0086] S201. Build a global business risk knowledge graph:

[0087] Capture structured business risk data from various monitoring data sources and store them in the graph library according to the ontology specifications, such as Figure 3 As shown, specifically:

[0088] 1) Determine the data source for obtaining risk information, ensure the reliability and update frequency of the data source, and monitor a total of 86 data sources including the government's business risk list and the international organization's business risk list.

[0089] 2) Data collection and organization: Use web crawlers to collect data, remove duplicates and missing values, standardize data formats, etc. to ensure data consistency and availability.

[0090] 3) Ontology definition and attribute setting: determine the ontology types in the graph and the relationships between them, define the entity types, and the attributes of each entity. According to statistics, a total of 23 entities and 14 relationships were established.

[0091] 4) Data storage and management: Neo4j graph database is selected to store sanctions graph data, implement data persistence and update mechanism, and maintain the real-time nature of the graph.

[0092] S202: Obtain user questions and perform entity recognition, entity link recognition, and intent recognition on the user questions:

[0093] 1) Intent recognition: Identify the intent type of the user's question. Question 1, "What family members does Anthony Swire have?" and Question 2, "What business risks does Alexey Lvovich have?" are each input into a trained small sample intent recognition model for "None of the Above" questions. The model selects the appropriate category from all predefined intent categories {"Risk Person," "Risk Company"} and returns it. If no category matches, "NOTA" is returned as the question intent type. The intent type for Question 1 is "NOTA," and the intent type for Question 2 is "Risk Person." The details of this step will be provided later.

[0094] 2) Entity Recognition: Identify named entities from user questions. This example uses the open-source BERT-BILSTM-CRF technology. Each word in question 2, "What business risks does Alexey Lvovich have?", is used as input to the BERT pre-trained model to obtain the corresponding contextual word embedding. The word embeddings and a randomly initialized state transition probability matrix are then used as input to the BILSTM-CRF model. The label sequence with the highest prediction score is selected as the optimal answer output, i.e., {"Alexey Lvovich": "PERSON"}.

[0095] 3) Entity Link Identification: The extracted entity data is linked to the corresponding entry in the knowledge graph. This example specifically uses spatial vector technology. Based on the representation of the identified entity "Alexey Lvovich", the cosine similarity {0.89, 0.25, ...} between the feature vectors of the entity and the set of candidate graph entities {"SADIKOV Alexey Lvovich", "John Anthony Swire", ...} is calculated. The candidate entity with the highest similarity, "SADIKOV Alexey Lvovich", is selected as the target entity for the link.

[0096] S203. Use the query template to map the sample question to generate a query statement, query the results in the global business risk map and return them. Specifically: based on the entity recognition results, entity link recognition results and intent recognition results, and in combination with the query template, map the user question to generate a query statement; use the query statement to query in the business risk knowledge map to obtain the answer statement to the user question.

[0097] S203 mainly generates the query statement required to complete the task based on the information obtained from question understanding:

[0098] 1) Query template management: Prepare different templates for predefined questions of all intent categories based on business scenarios: {“Risk Person”: “Match(n:Person)where n.caption contains'$Person'returnn.reason”, “Risk Company”: “MATCH(n:Sanction)-[p:sanction]->(q)where q.country_name contains'$Company'RETURN n”}.

[0099] 2) Query the template mapping. The mapping layer determines the specific template to call based on the question intent and question entity type information. The template corresponding to question 2 is "Match(n:Person) where n.caption contains 'SADIKOV Alexey Lvovich' return n.reason".

[0100] 3) Graph query results. After querying the graph based on the query statement, one or more query results will be returned. Using a customized speech template, the final answer returned to the user is generated: "Member of the Board of Directors of a backbone Russian company, which is involved in sectors of the economy that provide a significant source of income for the government of the Russian Federation."

[0101] like Figure 5 As shown, the intent recognition is explained as follows:

[0102] Input the original user question, that is, the multi-intent recognition dataset, which is the dataset FewIR collected and annotated by myself. The multi-intent recognition dataset is combined according to the intent category. According to the intent category, M intent category data are extracted from the dataset to form a training set D train , the remaining intent category data constitute the test set D val . Training set D train Contains M categories, each category contains N instances, each instance x i Represents an unstructured question. From the training set D train Randomly select M1 categories from r i y i The label description of the intent category. Randomly extract N1 instances from the selected category γ to construct the support set D support , D support The i-th element in is recorded as For instance x i The corresponding intent category label set. Randomly select N2 instances from the remaining samples of the selected category γ to construct the query set D query , D query The kth element in For instance x k The corresponding intent category label set.

[0103] In order to illustrate the specific algorithm process more vividly, combined with specific business risk examples Figure 1 Explain the meaning of the symbols. For example: D support It contains two intent categories {"Risk person", "Risk company"}, and the corresponding label descriptions are {r1 "Someone who has business risk", r2 "Some company who has business risk"}, x1 represents the first question in the support set "Who has business risks multiple times by the SDN list?", and Y1 represents the label set of the first question {"Risk person"}. x2 represents the second question in the support set "Which persons and companies have business risks in Russia in October 2023?", and Y2 represents the label set of the second question {"Risk person", "Risk company"}. query For “What family members does Anthony Swire have?”, predict the question intent label set Y. This includes:

[0104] S2021. Use a text encoder to encode the instance and generate a context embedding vector.

[0105] In this specific implementation, for each question x i ={w1,w2,...,w l} represents question x i By l words w k Composition. i As the input of the text encoder, the generated context embedding representation is denoted as X i ={w1,w2,...,w l}, where each word d is the dimension of word vector. Add the average to get the corresponding sentence embedding representation (It may be the query set N1 or the support set N2). For each intent category label description r i ={w'1,w'2,...,w' l}, a total of M1 intentions, w' k Intent category label description r i The kth word in the string, l represents the label description ri The number of words in r i As the input of the text encoder, the generated context embedding representation is denoted as R i ={w'1,w'2,...,w' l}, where each word Describe the label i Each word w' k Add the average to get the corresponding sentence embedding representation (r i is a label description). In this specific implementation, the Bert model is used as the text encoder (parameters that need to be updated).

[0106] S2022. Calculate the current support set D support Prototype representation and task-centric representation for each intent category.

[0107] The context embedding representation of all questions under each category and the context embedding representation of the intent category label description are used as the input of the multi-level representation calculation module to generate the current intent prototype representation and the task center is represented by t.

[0108] In the current scenario, the contextual embedding representations of x1 and x2 and the contextual embedding representation of r1 are used as inputs to the multi-level representation calculation module to generate the prototype representation of the “Risk person” intention. The x2 context embedding representation and the r2 context embedding representation are input into the multi-level representation calculation module to generate the prototype representation of the "Risk company" intent Will The task center representation t is obtained by adding and averaging.

[0109] The specific method is as follows:

[0110] (1) Support set D support Contains M1 intent categories, each intent category has m i instances, add and average all instance codes under the same category to generate the central representation of the current intent category c i There are a total of m selected from the N1 intents in the support set i x j ∈{x|(x,Y)∈S∩y i ∈Y}, y i is the support sample label, m i is the total number of such support instances in the support set S.

[0111] (2) In a multi-label setting, if only D supportThe average value of instance encoding in is used as the category representation, which will lead to ambiguity. Therefore, the label description is introduced here to emphasize the difference between different intent categories. Intuitively, the semantic embedding representation r of the label name is used. i and support instances to represent each intent. For the intent label y i , use the interpolation factor λ to calculate the intent prototype representation r i There are a total of m selected from the N1 intents in the support set i indivual, Likewise, λ needs to be learned.

[0112] (3) Support set D support The next M1 intent prototype representation Add and average to generate task center representation There is only one t.

[0113] S1023. Calculate query sentence x query and the prototype representation of each intent category The correlation score f(x query ,y i ,D support ). SIM(·) represents the similarity function, and the dot product similarity is used here. The specific formula is as follows:

[0114]

[0115] S2024, threshold learning. Input query instance x query , obtain the current support set D through the threshold learning module support Lower task threshold t task and instance threshold t instance . Task threshold t task Used to determine the query instance in D support Is there an intent label under the instance threshold t instance Used to determine the query instance in D support The type of the intended label.

[0116] In the current scenario, calculate x query The similarity between x1 and x2 is H1 and H2. H1 and H2 are used as weights, and the number of x1 and x2 labels |y1| and |y2| are used as variables. The weighted average is used to obtain the task threshold t task Calculate x query Correlation scores f1 and f2 with x1 and x2, find the maximum and minimum values ​​in {f1, f2} and use interpolation to get t instance .

[0117] The specific method is as follows:

[0118] (1) Support set Dsupport Current task threshold t task study:

[0119] For the support set D support Any supported instance {x j ,Y j ,R j}, calculate the query sentence x query and the similarity between supporting questions H(I(x query ),I(x j ), λ), where λ is the bandwidth factor:

[0120]

[0121] I(x) returns features related to the number of labels for instance x. Consider features related to the number of sentence intents, including sentence length z1, number of conjunctions z2, number of predicates z3, punctuation marks z4, and number of interrogative pronouns z5, and concatenate them to form a feature vector z = [z1; z2; z3; z4; z5], where z1, z2, z3, z4, and z5 represent any question x in the support set. query (N2) or any support set question x j Five parameters of (N1).

[0122] And input it into the multi-layer perceptron encoding to obtain the feature I(x). W1, W2, b1, b2 are all weight parameters, and W1, W2, b1 and b2 need to be learned.

[0123] I(x)=MLP(z)=Relu(W2·Relu(W1·z+b1)+b2)

[0124] Given a support set D support , t task is the weighted average number of labels of the support examples. The weight is calculated as the similarity H(I(x query ),I(x j );λ),|y j | represents instance x j The number of intent labels, Z is the normalization factor:

[0125]

[0126]

[0127] (2) Adaptive instance-level threshold t instance study:

[0128] To automatically adapt the instance-level threshold to a specific query, set the threshold to the current D supportThe interpolation of the maximum score and the minimum score under α is the interpolation rate parameter that needs to be learned:

[0129]

[0130] S2025. Query instance x query Predict intent categories and calculate loss functions.

[0131] In the current scenario, calculate x query “What family members does Anthony Swire have?” has a relevance score f with the task center representation t t1 , f t1 Less than the task threshold t task , x query The intent tag Y is {“NOTA”}. If x query For “Which enterprises have business risk Asian Development Bank?”, the computation and task center indicates the correlation score f t2 , due to f t2 Greater than the task threshold t task , calculate x query With prototype representation The correlation score f c1 、f c2 , due to f c1 Less than the instance threshold t instance And f c1 Greater than the instance threshold t instance , x query The intent label Y is {“Risk company”}, and the specific method is as follows:

[0132] (1) Calculate the relevance score f(x query ,t,D support ), and the current task threshold t task Compare, if f(x query ,t,D support )≥t task , query the existence of intent in the instance, and continue with step (2); if f(x query ,t,D support )<t task Otherwise, there is no intent in the query instance, which is "NOTA".

[0133] (2) Calculate the correlation score f(x query ,y,D support ), and compared with the obtained instance threshold tinstance Compare and predict intent categories:

[0134] Y=h(x query ,D support )={y|f(x query ,y,D support )>t instance ,y∈γ}

[0135] (3) Calculate the loss function, y i is the true label of the query instance, y j is the false label of the query instance, where the loss function is:

[0136]

[0137] Small-sample multi-intent recognition, a key step in this invention, aims to determine the primary intent of user questions using a small amount of training data. In business risk question-answering scenarios, user conversations are arbitrary and diverse. User questions may lack intent, or their intent may exceed the scope of the business risk system's answer. Many intents are not included in the system's limited set of labels. Existing multi-intent recognition approaches assume that user questions have at least one intent label. They learn similarity functions based on threshold strategies and select multiple intent labels with scores above a threshold as the result. This approach fails to recognize "none of the above" intents. Therefore, this invention aims to identify "none of the above" intents using small sample sizes and provides a method for constructing a business risk question-answering system for this purpose. The method employs a task threshold learning module to determine whether a question has an intent label, and an adaptive instance threshold learning module to determine the type of intent label. This method improves the performance of the question-answering system and enhances the user experience. Furthermore, it can quickly complete specific multi-label intent recognition tasks using only a small amount of labeled data, avoiding the time-consuming and labor-intensive manual labeling. Furthermore, it can generalize well to unseen intents, enabling rapid and accurate recognition.

[0138] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the scope of protection of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0139] A question-answering system based on multi-intention recognition according to an embodiment of the present invention includes a recognition module and an answer determination module;

[0140] The recognition module is used to obtain user questions, perform entity recognition and entity link recognition on the user questions, and use the intent recognition model trained based on adaptive instance threshold learning to identify the intent of the user questions;

[0141] The answer determination module is used to determine the answer statement of the user's question based on the entity recognition results, entity link recognition results and intent recognition results.

[0142] Optionally, the above technical solution further includes a model training module. The intent recognition model trained based on the adaptive instance threshold learning method includes a trained text encoder and a trained preset learning model. The model training module is used to:

[0143] Using the text encoder to support set D support Encode each sample question in and get the support set D support The context embedding vector of each sample question in ;

[0144] According to the context embedding vector of each sample question and the intent category label of each sample question, the support set D is obtained. support The intent category prototype matrix of each intent recognition label in , and the task center matrix t is obtained according to all the intent category prototype matrices;

[0145] Calculate the query set D query Any sample question x in query The correlation score between the query set D and each intent category prototype matrix is ​​calculated query Any sample question x in query The correlation score between the task center matrix t and the task threshold t task and instance threshold t instance Compare and predict x based on the comparison results. query The intention category label Y, wherein the task threshold is obtained based on a preset learning model;

[0146] Based on the support set D support and query set D query , combined with the predicted x query The process of obtaining the intent category label Y and introducing a loss function to train the text encoder and the preset learning model to obtain the trained text encoder and the trained preset learning model.

[0147] Optionally, in the above technical solution, the text encoder is a Bert model, and the preset learning model is a multi-layer perceptron.

[0148] Optionally, the above technical solution further includes a graph generation module, which is used to organize various original data related to business risks and generate a business risk knowledge graph.

[0149] The answer determination module is specifically used to: map user questions based on entity recognition results, entity link recognition results and intent recognition results, and combine with query templates to generate query statements; use query statements to query in the business risk knowledge graph to obtain answer statements to user questions.

[0150] Optionally, performing entity recognition on the user question includes: performing entity recognition on the user question using BILSTM-CRF technology.

[0151] Optionally, entity link recognition is performed on the user question, including:

[0152] Using spatial vector technology, the cosine similarity between any entity identified from the user's question and each feature vector in the graph candidate entity set is calculated, and the candidate entity with the highest similarity is selected as the target entity of the link corresponding to the entity until the target entity of the link corresponding to each entity is obtained.

[0153] It should be noted that the beneficial effects of the question-answering system based on multi-intention recognition provided by the above embodiment are the same as the beneficial effects of the question-answering method based on multi-intention recognition, which will not be repeated here. In addition, when the system provided by the above embodiment realizes its functions, it only uses the division of the above functional modules as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0154] like Figure 6 As shown, a computer device 300 according to an embodiment of the present invention includes a processor 320, which is coupled to a memory 310. The memory 310 stores at least one computer program 330. The at least one computer program 330 is loaded and executed by the processor 320, so that the computer device 300 implements any of the above-mentioned question-answering methods based on multi-intent recognition, specifically:

[0155] The computer device 300 may have relatively large differences due to different configurations or performance, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, and the at least one computer program 330 is loaded and executed by the one or more processors 320 to enable the computer device 300 to implement any of the question-answering methods based on multi-intent recognition provided in the above embodiments. Of course, the computer device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The computer device 300 may also include other components for implementing device functions, which will not be described in detail here.

[0156] A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that the computer implements any of the above-mentioned question-answering methods based on multi-intent recognition.

[0157] Alternatively, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.

[0158] In an exemplary embodiment, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the aforementioned question-answering methods based on multi-intent recognition.

[0159] It should be noted that the terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects and to define a specific order or precedence. Where appropriate, the order used for similar objects may be interchanged, such that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.

[0160] Those skilled in the art will appreciate that the present invention may be implemented as a system, method, or computer program product. Therefore, the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, resident software, microcode, etc.), or in a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may be implemented in the form of a computer program product embodied in one or more computer-readable media containing computer-readable program code.

[0161] Any combination of one or more computer-readable media can be used. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device.

[0162] Although the embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

Claims

1. A question-answering method based on multi-intent recognition, characterized in that: include: Obtaining a user question, performing entity recognition and entity link recognition on the user question, and performing intent recognition on the user question using an intent recognition model trained based on an adaptive instance threshold learning method; An answer statement for the user question is determined based on the entity recognition results, the entity link recognition results, and the intent recognition results.

2. The question-answering method based on multi-intention recognition according to claim 1, characterized in that: The intent recognition model trained based on the adaptive instance threshold learning method includes a trained text encoder and a trained preset learning model. The process of training the intent recognition model based on the adaptive instance threshold learning method includes: Using the text encoder to support set D support Encode each sample question in and get the support set D support The context embedding vector of each sample question in ; According to the context embedding vector of each sample question and the intent category label of each sample question, the support set D is obtained. support The intent category prototype matrix of each intent recognition label in , and the task center matrix t is obtained according to all the intent category prototype matrices; Calculate the query set D query Any sample question x in query The correlation score between the query set D and each intent category prototype matrix is ​​calculated query Any sample question x in query The correlation score between the task center matrix t and the task threshold t task and instance threshold t instance Compare and predict x based on the comparison results. query The intention category label Y, wherein the task threshold is obtained based on a preset learning model; Based on the support set D support and query set D query , combined with the predicted x query The process of obtaining the intent category label Y and introducing a loss function to train the text encoder and the preset learning model to obtain the trained text encoder and the trained preset learning model.

3. The question-answering method based on multi-intention recognition according to claim 2, characterized in that: The text encoder is a Bert model, and the preset learning model is a multi-layer perceptron.

4. A question-answering method based on multi-intent recognition according to any one of claims 1 to 3, characterized in that: Also includes: Organize various raw data related to business risks to generate a business risk knowledge graph; Determining an answer statement for the user question based on the entity recognition results, the entity linking recognition results, and the intent recognition results, including: Based on the entity recognition result, the entity link recognition result, and the intent recognition result, and in combination with the query template, the user question is mapped to generate a query statement; The query statement is used to query the business risk knowledge graph to obtain an answer statement to the user's question.

5. The question-answering method based on multi-intent recognition according to any one of claims 1 to 3, characterized in that: Performing entity recognition on the user question, including: performing entity recognition on the user question by using BILSTM-CRF technology.

6. A question-answering method based on multi-intent recognition according to any one of claims 1 to 3, characterized in that: Performing entity link recognition on the user question includes: Using spatial vector technology, the cosine similarity between any entity identified from the user's question and each feature vector in the graph candidate entity set is calculated, and the candidate entity with the highest similarity is selected as the target entity of the link corresponding to the entity until the target entity of the link corresponding to each entity is obtained.

7. A question-answering system based on multi-intent recognition, characterized in that: including a recognition module and an answer determination module; The recognition module is used to: obtain user questions, perform entity recognition and entity link recognition on the user questions, and use the intent recognition model trained based on the adaptive instance threshold learning method to perform intent recognition on the user questions; The answer determination module is used to determine the answer statement of the user question based on the entity recognition result, the entity link recognition result and the intention recognition result.

8. The question-answering system based on multi-intention recognition according to claim 7, characterized in that: The module also includes a model training module. The intent recognition model obtained by training based on the adaptive instance threshold learning method includes a trained text encoder and a trained preset learning model. The model training module is used to: Using the text encoder to support set D support Encode each sample question in and get the support set D support The context embedding vector of each sample question in ; According to the context embedding vector of each sample question and the intent category label of each sample question, the support set D is obtained. support The intent category prototype matrix of each intent recognition label in , and the task center matrix t is obtained according to all the intent category prototype matrices; Calculate the query set D query Any sample question x in query The correlation score between the query set D and each intent category prototype matrix is ​​calculated query Any sample question x in query The correlation score between the task center matrix t and the task threshold t task and instance threshold t instance Compare and predict x based on the comparison results. query The intention category label Y, wherein the task threshold is obtained based on a preset learning model; Based on the support set D support and query set D query , combined with the predicted x query The process of obtaining the intent category label Y and introducing a loss function to train the text encoder and the preset learning model to obtain the trained text encoder and the trained preset learning model.

9. A computer device, characterized in that: The computer device includes a processor, the processor is coupled to a memory, and at least one computer program is stored in the memory. The at least one computer program is loaded and executed by the processor so that the computer device implements a question-answering method based on multi-intent recognition as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor so that the computer implements a question-answering method based on multi-intent recognition as described in any one of claims 1 to 6.