A multi-task learning dialogue method supporting anaphora resolution and polysemy
By combining referential resolution and a polysemous model with a multi-task learning model, the problem of traditional dialogue systems being unable to recognize referentials and multiple intentions is solved, enabling intelligent dialogue systems to achieve fast, accurate understanding and coherent responses.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN LANYOU TECHNOLOGY CO LTD
- Filing Date
- 2022-05-19
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional dialogue systems cannot quickly identify the referents of pronouns and the referents of zero pronouns in text, resulting in incoherent responses to user questions in multi-turn dialogues, and they cannot understand the multiple intentions of users in a single sentence.
Employing a pronoun resolution model, a polysemous model, and a multi-task learning model, sequence labeling and probability calculation are performed on the training corpus to identify, replace, or supplement pronouns and referents, extract key components of intent, and identify domain, intent, and slot through the multi-task learning model.
It enables rapid and accurate understanding of user intent, improves dialogue accuracy, shortens response time, and generates coherent dialogue responses.
Smart Images

Figure CN117149958B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent dialogue, and more specifically, to a multi-task learning dialogue method that supports referential resolution and polysemy. Background Technology
[0002] Intelligent dialogue systems are currently widely used in various scenarios such as customer service, marketing, and enterprise services. Relying on dialogue systems, chatbots use text, voice, and multimodal product forms to assist or replace human dialogue, empowering the entire dialogue process to achieve cost reduction and efficiency improvement.
[0003] Benefiting from technological breakthroughs and product implementation in artificial intelligence, the chatbot sector experienced rapid growth starting in 2015, peaking in the number of financing events in 2018 before entering a period of stable development. The "2021 China Chatbot Industry Development Research Report" indicates that the chatbot market size reached 2.71 billion yuan in 2020 and is projected to reach 9.85 billion yuan by 2025. In terms of the competitive landscape, participating companies are diverse, with manufacturers entering the market using strategies such as voice capabilities, semantic capabilities, platform capabilities, standardized products, and vertical scenarios. These strategies are increasingly converging during development. Therefore, developing a more intelligent dialogue system that better aligns with human language habits has become a pressing issue for the industry.
[0004] In users' real-life chats, referential expressions frequently appear, such as "If the weather is nice in Beijing, I want to fly there for a trip tomorrow." Traditional dialogue systems cannot quickly identify referential words and the referents of zero pronouns in the text, leading to disjointed responses to user questions in multi-turn conversations. At the same time, users often express multiple intentions in a single sentence, such as "I want to turn on the air conditioner and then close the sunroof." This sentence contains the intentions of "I want to turn on the air conditioner" and "close the sunroof," but traditional dialogue systems can only recognize a single intention and cannot understand the user's true intention. Summary of the Invention
[0005] To address the shortcomings and deficiencies of existing technologies, this invention provides a multi-task learning dialogue method that supports referential resolution and polysemy.
[0006] To achieve the above objectives, the technical solution adopted by this invention is a multi-task learning dialogue method that supports referential resolution and polysemy. This method is implemented through a referential resolution model, a polysemy model, and a multi-task learning model, and includes the following steps:
[0007] S1: Train the reference resolution model, polysemy model, and multi-task learning model using pre-prepared training corpus;
[0008] S2: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and perform sequence labeling through the aforementioned referential resolution model to label the referents, zero pronouns, and referents in the text;
[0009] S3: Calculate the referential probability of the referent and the referred pronoun or the referential probability of the zero pronoun and the referred pronoun through the referential resolution model, retain the referent and the referred pronoun or the zero pronoun and the referred pronoun with the highest score, and determine whether the referential can be resolved according to the set threshold δ. If the referential can be resolved, the referent or the zero pronoun is replaced or supplemented with the corresponding referred pronoun to form the replacement text.
[0010] S4: Extract k key intent components from the replaced text using a polysemous model;
[0011] S5: The extracted k key intent components are processed through the multi-task learning model to obtain the domain, intent, and slot of each key intent component;
[0012] S6: Send the domain, intent, and slot to the dialogue management module to obtain the dialogue action at that moment.
[0013] S1 includes the following steps:
[0014] S1.1: Train the pronoun resolution model, which includes a CRF layer and a linear classification layer. The CRF layer is used to identify pronouns, zero pronouns, and referenced pronouns. The linear classification layer is used to calculate the pronoun reference probability and classify the domain and intent. For the two cases of zero reference and coreference, two sequence labeling methods are designed to label the pronouns, zero pronouns, and referenced pronouns in the training corpus. The BERT+CRF model is trained and the loss function is optimized through the labeled training corpus. Then, the pronoun reference probability is calculated through the vectors of the pronouns and the vectors of the referenced pronouns.
[0015] S1.2: Train the polysemous model and annotate the key components of intent in the training corpus: preprocess the training corpus, train the BERT+CRF model with the preprocessed training corpus, and then optimize its loss function with the Adam optimization method to obtain the trained polysemous model.
[0016] S1.3: Train the multi-task learning model, count the number of data samples for intent and slot in the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations for each iteration, ensure that the proportion of samples for each class is basically consistent in each round, create an iterator, use the sample data to train the multi-task learning model until the data in the iterator is empty, predict the domain and intent through a linear classification layer, predict the slot through a CRF layer, optimize the total loss function, and obtain the trained multi-task learning model.
[0017] S1.1 includes the following steps:
[0018] S1.1.1: Two sequence labeling methods are designed for the two cases of zero pronouns and coreferences: the referenced pronoun is identified by span1 and BMES is the word position symbol; the zero pronoun is identified by adding the context characters of the zero pronoun and using span_start and span_end as identifiers; the referent is identified by span2 and BMES is the word position symbol, and its context characters are also added. The referents, zero pronouns and referenced pronouns in the training corpus are preprocessed.
[0019] S1.1.2: Train the BERT+CRF model. The BERT+CRF model is trained using preprocessed training corpus. The BERT+CRF model converts the preprocessed training corpus into vectors and performs classification processing. The loss function is optimized using the Adam optimization method to obtain a well-trained subspecies resolution model.
[0020] S1.1.3: Based on the identified pronoun vector or zero pronoun vector vec i and the vector vec of the pronoun being referred to j The specific calculation method for the probabilities of association is as follows:
[0021] vec i,j =vec i +vec j ,
[0022] logit i,j =w×vec i,j +b,
[0023]
[0024] Among them, vec i,j For pronoun vectors or zero pronoun vectors vec i and the vector of the pronoun being referred to vec j splicing and prob i,j Let w represent the probabilities of reference between two words, and b be the network parameters of the linear classification layer, obtained by optimizing the loss function.
[0025]
[0026] Where, loss core The loss function represents the relationship between the pronoun i and the referred pronoun j. Softmax is a classification function that calculates the probability of a category belonging to a given class. BCE stands for Cross Entropy, used to measure the difference between two probability distributions. It is the label of the pronoun being referred to. If the pronoun being referred to j is the actual pronoun that the pronoun i refers to, then it will be represented as a vector full of 1s, otherwise it will be represented as a vector full of 0s.
[0027] S1.2 includes the following steps:
[0028] S1.2.1: The k key intent components of the training corpus are labeled using the BMES annotation method;
[0029] S1.2.2: The BERT pre-trained model is used to convert the labeled k intent key components into vectors, and then the CRF model is used for sequence labeling to train the BERT+CRF model;
[0030] S1.2.3: Optimize the loss function using the Adam optimization method to obtain a trained polysemous model.
[0031] S1.3 includes the following steps:
[0032] S1.3.1: Statistically determine the intent and slot data sample size of the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations, and ensure that the proportion of data samples for each class is consistent in each round;
[0033] S1.3.2: Create an iterator, and each time take out slot data samples and intent data samples with the same ratio for training the model, until the data in the iterator is empty, then enter the next round of training;
[0034] S1.3.3: Intent classification and domain classification are performed through a linear classification layer, wherein the intent recognition loss function is the cross-entropy between the predicted output and the true intent;
[0035] S1.3.4: Predict the BMES label of the slot using the CRF layer;
[0036] S1.3.5: Optimize the total loss function to obtain the trained multi-task learning model. The total loss function is a weighted sum of the intent recognition loss function and the slot recognition loss function, as follows:
[0037]
[0038]
[0039]
[0040] loss = α × loss slots +β(loss intent +loss domain ),
[0041] Where, lossintent It is the intention loss function of the linear classification layer, loss domain It is the neighborhood loss function of the linear classification layer, loss lots It is the loss function for slot identification using CRF, where CSE stands for cross-entropy, α and β are the preset weight coefficients for the intent identification task and the slot identification task, respectively; α is determined by a weight self-learning method based on gradient descent, and β = 1.
[0042] S2 includes the following steps:
[0043] S2.1: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and then convert it into a vector through the BERT pre-trained model;
[0044] S2.2: Identify the referents, zero pronouns, and referenced pronouns in the text through the CRF layer of the aforementioned referential resolution model.
[0045] S3 includes the following steps:
[0046] S3.1: Calculate the probabilities of reference between the referent and the referred word or between the zero pronoun and the referred word through the linear classification layer of the reference resolution model;
[0047] S3.2: Retain the highest-scoring pronoun-referential pair or zero-pronoun-referential pair, and determine whether the reference can be eliminated based on the set threshold δ. If the reference can be eliminated, the pronoun or zero-pronoun is replaced or supplemented with the corresponding referential to form the replacement text.
[0048] The dialogue management module includes a dialogue state maintenance module and a system decision generation module. The dialogue state maintenance module determines the dialogue state based on the dialogue state S at time t. t And from the dialogue state S t The domain of each key component of the identified intent t+1 intent t+1 Word slots t+1 To predict the dialogue state at time t+1, i.e.:
[0049] S t+1 =f DST (S t domain t+1 intent t+1 slots t+1) ,
[0050] Wherein, function f DST To represent the logical transformation function for maintaining the dialogue state,
[0051] The system decision generation module refers to generating system behavior feedback Action based on the dialogue state St in the dialogue state module. t ,Right now:
[0052] Action t =f DP (S t ),
[0053] Wherein, function f DP This describes a method for generating corresponding robot actions based on the dialogue state.
[0054] The beneficial effects of this invention are:
[0055] This invention provides a multi-task learning dialogue method that supports referential resolution and polysemy. By introducing a referential resolution model, a polysemy model, and a multi-task learning model, an intelligent multi-turn dialogue system is proposed, which can more quickly and accurately understand the user's intent and complete the user's expected dialogue response. Experimental verification shows that, compared with traditional serial dialogue systems, this invention can shorten the response time and improve the dialogue accuracy. Attached Figure Description
[0056] Figure 1 This is a flowchart illustrating the steps of a multi-task learning dialogue method that supports referential resolution and polysemy according to the present invention. Detailed Implementation
[0057] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams intended only to illustrate the basic structure of the invention. The specific embodiments are described in detail below. Figure 1 Direction is the standard.
[0058] like Figure 1 As shown, a multi-task learning dialogue method supporting referential resolution and polysemy is presented. The method is implemented through a referential resolution model, a polysemy model, and a multi-task learning model, and includes the following steps.
[0059] S1: Train the reference resolution model, polysemy model, and multi-task learning model using pre-prepared training corpus;
[0060] S2: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and perform sequence labeling through the aforementioned referential resolution model to label the referents, zero pronouns, and referents in the text;
[0061] S3: Calculate the referential probability of the referent and the referred pronoun or the referential probability of the zero pronoun and the referred pronoun through the referential resolution model, retain the referent and the referred pronoun or the zero pronoun and the referred pronoun with the highest score, and determine whether the referential can be resolved according to the set threshold δ. If the referential can be resolved, the referent or the zero pronoun is replaced or supplemented with the corresponding referred pronoun to form the replacement text.
[0062] S4: Extract k key intent components from the replaced text using a polysemous model, where K = {key_span1, key_span2, ..., key_span...} k},
[0063] S5: The extracted k key intent components are processed through the multi-task learning model to obtain the domain of each key intent component. t intent t slots t ;
[0064] For example: K→{(domain1, intent1, slots1), (domain2, intent2, slots2), ..., (domain k intent k slots k )},
[0065] domain t ={domain1,domain2,...,domain k},
[0066] intent t ={intent1, intent2,..., intent k},
[0067] slots t ={slots1, slots2,..., slots k};
[0068] S6: Send the domain, intent, and slot to the dialogue management module to obtain the dialogue action at that moment.
[0069] The multi-task learning model in this invention learns three tasks simultaneously: domain classification, intent classification, and slot recognition. The pronoun resolution model is used to replace pronouns or zero pronouns in the dialogue text with their corresponding referents. The polysemy model is used to extract multiple key intent components from the dialogue text.
[0070] Intent refers to the specific task that the user needs to complete in intelligent dialogue, such as "check if it is raining" or "navigate to the destination".
[0071] Domain: Domain classification, also known as topic labeling or topic recognition, is a text classification method used to assign document domain or category labels to documents of various types and lengths. A "domain" or "category" can be understood as a conversational domain, a specific industry section, or even a specific text genre, depending on the application. For example, "check if it's raining" and "check if it's snowing" both belong to the "weather" domain.
[0072] Intent key components refer to the key components in intelligent dialogue that involve the specific task that the user needs to complete. For example, "navigate to company X" corresponds to the intent of navigation to the destination.
[0073] S1 includes the following steps:
[0074] S1.1: Train the pronoun resolution model, which includes a CRF layer and a linear classification layer. The CRF layer is used to identify pronouns, zero pronouns, and referenced pronouns. The linear classification layer is used to calculate the pronoun reference probability and classify the domain and intent. For the two cases of zero reference and coreference, two sequence labeling methods are designed to label the pronouns, zero pronouns, and referenced pronouns in the training corpus. The BERT+CRF model is trained and the loss function is optimized through the labeled training corpus. Then, the pronoun reference probability is calculated through the vectors of the pronouns and the vectors of the referenced pronouns.
[0075] S1.2: Train the polysemous model and annotate the key components of intent in the training corpus: preprocess the training corpus, train the BERT+CRF model with the preprocessed training corpus, and then optimize its loss function with the Adam optimization method to obtain the trained polysemous model.
[0076] S1.3: Train the multi-task learning model, count the number of data samples for intent and slot in the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations for each iteration, ensure that the proportion of samples for each class is basically consistent in each round, create an iterator, use the sample data to train the multi-task learning model until the data in the iterator is empty, predict the domain and intent through a linear classification layer, predict the slot through a CRF layer, optimize the total loss function, and obtain the trained multi-task learning model.
[0077] S1.1 includes the following steps:
[0078] S1.1.1: Two sequence labeling methods are designed for the two cases of zero pronouns and coreference: the referred pronoun is identified by span1 and BMES is the word position symbol; the zero pronoun is identified by adding the context characters of the zero pronoun and using span_start and span_end as identifiers; the referent is identified by span2 and BMES is the word position symbol, and its context characters are added. The referent, zero pronoun and referred pronoun of the training corpus are preprocessed.
[0079] For example: "Can you check how many high-speed trains are going to Zhuhai recently, and then check what the weather is like there?"
[0080] Zhuhai: B-span1 E-span1, there: span_start B-span2 E-span2 span_end.
[0081] For example: "Searching for Wang Xiaobo's works, I don't know his name."
[0082] Wang Xiaobo's works: B-span1 M-span1 M-span1 M-span1 M-span1 E-span1,
[0083] Dao (zero pronoun) name: span_start span_end.
[0084] S1.1.2: Train the BERT+CRF model. The BERT+CRF model is trained using preprocessed training corpus. The BERT+CRF model converts the preprocessed training corpus into vectors and performs classification processing. The loss function is optimized using the Adam optimization method to obtain a well-trained subspecies resolution model.
[0085] The specific calculation method for the loss function of CRF is as follows;
[0086]
[0087]
[0088]
[0089] Where x is the observation sequence and y is the hidden state sequence of the label sequence l.
[0090] S1.1.3: Based on the identified pronoun vector or zero pronoun vector vec i and the vector vec of the pronoun being referred to j The specific calculation method for the probabilities of reference is as follows:
[0091]
[0092]
[0093]
[0094] Among them, vec i,j For pronoun vectors or zero pronoun vectors vec i and the vector of the pronoun being referred to vec j splicing and prob i,j Let w represent the probabilities of reference between two words, and b be the network parameters of the linear classification layer, obtained by optimizing the loss function.
[0095]
[0096] Where, loss core The loss function represents the relationship between the pronoun i and the referred pronoun j. Softmax is a classification function that calculates the probability of a category belonging to a given class. BCE stands for Cross Entropy, used to measure the difference between two probability distributions. It is the label of the pronoun being referred to. If the pronoun being referred to j is the actual pronoun that the pronoun i refers to, then it will be represented as a vector full of 1s, otherwise it will be represented as a vector full of 0s.
[0097] S1.2 includes the following steps:
[0098] S1.2.1: The k key intent components of the training corpus are labeled using the BMES annotation method;
[0099] S1.2.2: The BERT pre-trained model is used to convert the labeled k intent key components into vectors, and then the CRF model is used for sequence labeling to train the BERT+CRF model;
[0100] S1.2.3: Optimize the loss function using the Adam optimization method to obtain a trained polysemous model.
[0101] For example, the training corpus is "turn off the fan, then turn on the air conditioner", and its key intent component K = {turn off the fan, turn on the air conditioner}.
[0102] S1.3 includes the following steps:
[0103] S1.3.1: Statistically determine the intent and slot data sample size of the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations, and ensure that the proportion of data samples for each class is consistent in each round;
[0104] S1.3.2: Create an iterator, and each time take out slot data samples and intent data samples with the same ratio for training the model, until the data in the iterator is empty, then enter the next round of training;
[0105] S1.3.3: Intent classification and domain classification are performed through a linear classification layer, wherein the intent recognition loss function is the cross-entropy between the predicted output and the true intent;
[0106] S1.3.4: Predict the BMES label of the slot using the CRF layer;
[0107] S1.3.5: Optimize the total loss function to obtain the trained multi-task learning model. The total loss function is a weighted sum of the intent recognition loss function and the slot recognition loss function, as follows:
[0108]
[0109]
[0110]
[0111] loss = α × loss slots +β(loss intent +loss domain ),
[0112] Where, loss intent It is the intention loss function of the linear classification layer, loss domain It is the neighborhood loss function of the linear classification layer, loss slots The loss function for slot identification is CRF, where CSE stands for cross-entropy, α and β are the preset weight coefficients for the intent identification task and the slot identification task, respectively; α is determined by a weight self-learning method based on gradient descent, and β = 1.
[0113] S2 includes the following steps:
[0114] S2.1: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and then convert it into a vector through the BERT pre-trained model;
[0115] S2.2: Identify the referents, zero pronouns, and referenced pronouns in the text through the CRF layer of the aforementioned referential resolution model.
[0116] S3 includes the following steps:
[0117] S3.1: Calculate the probabilities of reference between the referent and the referred word or between the zero pronoun and the referred word through the linear classification layer of the reference resolution model;
[0118] S3.2: Retain the highest-scoring pronoun-referential pair or zero-pronoun-referential pair, and determine whether the reference can be eliminated based on the set threshold δ. If the reference can be eliminated, the pronoun or zero-pronoun is replaced or supplemented with the corresponding referential to form the replacement text.
[0119] For example, the historical dialogue is "Can you check how many high-speed trains are going to Zhuhai recently?", and the current dialogue is "Let me check how the weather is there." The concatenated contextual text is "Can you check how many high-speed trains are going to Zhuhai recently? Let me check how the weather is there." The CRF layer identifies the pronoun "there" and the referred to as "Zhuhai." The pronoun referencing "there" and "Zhuhai" is calculated. If this probability exceeds a set threshold δ, referential resolution is performed, and the replaced text is "Can you check how many high-speed trains are going to Zhuhai recently? Let me check how the weather is in Zhuhai." The set threshold δ can be preset according to user needs, typically 0.8, 0.9, or other values.
[0120] The dialogue management module includes a dialogue state maintenance module and a system decision generation module. The dialogue state maintenance module determines the dialogue state based on the dialogue state S at time t. t And from the dialogue state S t The domain of each key component of the identified intent t+1 intent t+1 Word slots t+1 To predict the dialogue state at time t+1, i.e.:
[0121] S t+1 =f DST (S t domain t+1 intent t+1 slots t+1 ),
[0122] Wherein, function f DST To represent the logical transformation function for maintaining the dialogue state,
[0123] The generation system decision module refers to the module that generates the system based on the dialogue state S in the dialogue state module. t Generate system behavior feedback Action t ,Right now:
[0124] Action t =f DP (S t ),
[0125] Wherein, function f DP This describes a method for generating corresponding robot actions based on the dialogue state.
[0126] This invention also includes a multi-task learning dialogue system that supports pronoun resolution and polysemy, implemented through the above-described method, and comprising the following modules:
[0127] The module includes a context information representation module, a deep detection module, a replacement module, a polysemous word recognition module, an intent word slot multi-task learning module, and a dialogue management module.
[0128] The context information representation module concatenates the historical dialogue and the current dialogue to obtain the context representation text, and then marks the referents, zero pronouns, and referenced pronouns in the context representation text.
[0129] The deep detection module is used to determine whether there is a referential phenomenon in the context text, identify zero pronouns, referents, and referred pronouns, and calculate the referential probability between zero pronouns and referred pronouns or between referents and referred pronouns. If the referential probability is greater than the set threshold δ, it is determined that it can be referred to; otherwise, it is determined that it cannot be referred to.
[0130] The replacement module refers to replacing referential pronouns or zero pronouns with the referent pronoun.
[0131] The polysemous recognition module refers to identifying k key intent components K = {key_span1, key_span2, ..., key_span} that appear in the contextual text through feature extraction. k Then, the intent key component K is learned by the domain intent slot multi-task learning module to learn the domain, intent and slot of each intent key component.
[0132] The domain intent slot multi-task learning module represents the text features of the intent key component K through a pre-trained model, and then simultaneously identifies the domain, intent, and slot of the i-th intent key component of the text through a CRF layer and a linear classification layer.
[0133] The dialogue management module includes a dialogue state maintenance module and a system decision generation module. The dialogue state maintenance module determines the dialogue state based on the dialogue state S at time t. t And from the dialogue state S t The domain of each key component of the identified intent t+1 intent t+1 Word slots t+1 To predict the dialogue state at time t+1, i.e.:
[0134] S t+1 =f DST (S t domain t+1 intentt+1 slots t+1 ),
[0135] Wherein, function f DST To represent the logical transformation function for maintaining the dialogue state,
[0136] The generation system decision module refers to the module that generates the system based on the dialogue state S in the dialogue state module. t Generate system behavior feedback Action t ,Right now:
[0137] Action t =f DP (S t ),
[0138] Wherein, function f DP This describes a method for generating corresponding robot actions based on the dialogue state.
[0139] This invention can simultaneously identify the referential resolution problem of pronouns and zero pronouns, and can flexibly set the threshold for triggering replacement according to the actual effect, making it suitable for engineering practice. Since this invention does not perform polysemous detection through traditional multi-class intent recognition methods, but rather by identifying key components of intent, it can identify multi-intent tasks on more than two intents, thereby understanding the user's true intent more intelligently and accurately. Unlike traditional serial models for domain, intent, and entity recognition, this invention adopts a fusion-based multi-task learning model to identify the domain, intent, and entity of key components of intent, which can make full use of various features in the text and accelerate the response of NLU.
[0140] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-task learning dialogue method supporting referential resolution and polysemy, characterized in that, The method is implemented through a referential resolution model, a polysemous model, and a multi-task learning model, and includes the following steps. S1: Train the reference resolution model, polysemy model, and multi-task learning model using pre-prepared training corpus; S2: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and perform sequence labeling through the aforementioned referential resolution model to label the referents, zero pronouns, and referents in the text; S3: Calculate the referential probability of the pronoun and the referred word, or the zero pronoun and the referred word, using a referential resolution model. Retain the highest-scoring pronoun and referred word pair or the zero pronoun and referred word pair, and then apply a set threshold. Determine whether the reference can be resolved. If the reference can be resolved, replace or supplement the pronoun or zero pronoun with the corresponding referenced pronoun to form the replacement text. S4: Extract k key intent components from the replaced text using a polysemous model; S5: The extracted k key intent components are processed through the multi-task learning model to obtain the domain, intent, and slot of each key intent component; S6: Send the domain, intent, and slot to the dialogue management module to obtain the dialogue action at that moment; S1 includes the following steps: S1.1: Train the pronoun resolution model, which includes a CRF layer and a linear classification layer. The CRF layer is used to identify pronouns, zero pronouns, and referenced pronouns. The linear classification layer is used to calculate the pronoun reference probability and classify the domain and intent. For the two cases of zero reference and coreference, two sequence labeling methods are designed to label the pronouns, zero pronouns, and referenced pronouns in the training corpus. The BERT+CRF model is trained and the loss function is optimized through the labeled training corpus. Then, the pronoun reference probability is calculated through the vectors of the pronouns and the vectors of the referenced pronouns. S1.2: Train the polysemous model and annotate the key components of intent in the training corpus: preprocess the training corpus, train the BERT+CRF model with the preprocessed training corpus, and then optimize its loss function with the Adam optimization method to obtain the trained polysemous model. S1.3: Train the multi-task learning model, count the number of data samples for intent and slot in the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations for each iteration, ensure that the proportion of samples for each class is consistent in each round, create an iterator, use the sample data to train the multi-task learning model until the data in the iterator is empty, predict the domain and intent through a linear classification layer, predict the slot through a CRF layer, optimize the total loss function, and obtain the trained multi-task learning model; S1.1 includes the following steps: S1.1.1: Two sequence labeling methods are designed for the two cases of zero pronouns and coreferences: the referenced pronoun is identified by span1 and BMES is the word position symbol; the zero pronoun is identified by adding the context characters of the zero pronoun and using span_start and span_end as identifiers; the referent is identified by span2 and BMES is the word position symbol, and its context characters are also added. The referents, zero pronouns and referenced pronouns in the training corpus are preprocessed. S1.1.2: Train the BERT+CRF model. The BERT+CRF model is trained using preprocessed training corpus. The BERT+CRF model converts the preprocessed training corpus into vectors and performs classification processing. The loss function is optimized using the Adam optimization method to obtain a well-trained subspecies resolution model. S1.1.3: Based on the identified pronoun vector or zero pronoun vector and the vector of the pronoun being referred to The specific calculation method for the probabilities of association is as follows: , , , in, For pronoun vectors or zero pronoun vectors and the vector of the pronoun being referred to splicing and, Let w represent the probabilities of reference between two words, and b be the network parameters of the linear classification layer, obtained by optimizing the loss function. , in, The loss function represents the relationship between the pronoun i and the referred pronoun j. Softmax is a classification function that calculates the probability of a category belonging to a given class. BCE stands for Cross Entropy, used to measure the difference between two probability distributions. It is the label of the pronoun being referred to. If the pronoun being referred to j is the actual pronoun that the pronoun i refers to, then it will be represented as a vector full of 1s, otherwise it will be represented as a vector full of 0s. S1.2 includes the following steps: S1.2.1: The k key intent components of the training corpus are labeled using the BMES annotation method; S1.2.2: The BERT pre-trained model is used to convert the labeled k intent key components into vectors, and then the CRF model is used for sequence labeling to train the BERT+CRF model; S1.2.3: Optimize the loss function using the Adam optimization method to obtain a trained polysemous model.
2. The multi-task learning dialogue method supporting referential resolution and polysemy as described in claim 1, characterized in that, S1.3 includes the following steps: S1.3.1: Statistically determine the intent and slot data sample size of the training corpus, determine the proportion of data samples and convert them into integers, determine the number of iterations, and ensure that the proportion of data samples for each class is consistent in each round; S1.3.2: Create an iterator, and each time take out slot data samples and intent data samples with the same ratio for training the model, until the data in the iterator is empty, then enter the next round of training; S1.3.3: Intent classification and domain classification are performed through a linear classification layer. The intent recognition loss function is the cross-entropy between the predicted output and the true intent. S1.3.4: Predict the BMES label of the slot using the CRF layer; S1.3.5: Optimize the total loss function to obtain the trained multi-task learning model. The total loss function is a weighted sum of the intention recognition loss function and the slot recognition loss function, as follows: , in, It is the intention loss function of the linear classification layer. It is the neighborhood loss function of the linear classification layer. It is the loss function for slot identification using CRF, where CSE stands for cross-entropy. , These are the preset weight coefficients for the intent recognition task and the slot recognition task, respectively. The weights are determined using a gradient descent-based self-learning method. .
3. The multi-task learning dialogue method supporting referential resolution and polysemy as described in claim 2, characterized in that, S2 includes the following steps: S2.1: Concatenate the historical dialogue and the current dialogue to obtain the contextual representation text, and then... Pre-trained models are converted into vectors; S2.2: Identify the referents, zero pronouns, and referenced pronouns in the text through the CRF layer of the aforementioned referential resolution model.
4. The multi-task learning dialogue method supporting referential resolution and polysemy as described in claim 3, characterized in that, S3 includes the following steps: S3.1: Calculate the probabilities of reference between the referent and the referred word or between the zero pronoun and the referred word through the linear classification layer of the reference resolution model; S3.2: Retain the highest-scoring pronoun-referential pair or zero pronoun-referential pair, and adjust the score according to a set threshold. Determine whether the reference can be resolved. If the reference can be resolved, then replace or supplement the referent or zero pronoun with the corresponding referent to form the replacement text.
5. The multi-task learning dialogue method supporting referential resolution and polysemy as described in claim 1, characterized in that, The dialogue management module includes a dialogue state maintenance module and a system decision generation module. The dialogue state maintenance module determines the dialogue state based on the dialogue state S at time t. t And from the dialogue state S t The domain of each key component of the identified intent ,intention , slot To predict the dialogue state at time t+1, i.e.: , Among them, the function To represent the logical transformation function for maintaining the dialogue state, The generation system decision module refers to the module that generates decisions based on the dialogue state in the dialogue state maintenance module. Generate system behavior feedback ,Right now: , Among them, the function This describes a method for generating corresponding robot actions based on the dialogue state.