Dialogue intent ambiguity elimination method and device
Patent Information
- Application Number
- CN202211089713.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-07
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-09-07
AI Technical Summary
由此可见,一个对话文本的意图的准确性直接影响意图识别模型的准确性,进而影响整个对话系统的准确率
[0018] Furthermore, the reference text is determined based on the intent segmentation hyperplane. This hyperplane reflects the predicted intent of each dialogue text in multiple dialogue texts, and dialogue texts with the same predicted intent are located within the same region. Based on this characteristic of the intent segmentation hyperplane and the continuity of the semantic space of the dialogue text, there is a certain relationship between the predicted intents of the determined reference text and the ambiguous text. Intent labels based on the reference text can eliminate intent ambiguity in the intent labels of the ambiguous text. In summary, this application, based on the continuity of semantic space and the characteristics of the intent segmentation hyperplane, can eliminate dialogue texts with ambiguous intents, improve the quality of the correspondence between dialogue texts and intents, thereby improving the accuracy of downstream intent recognition models and ultimately improving the accuracy of the entire dialogue system. Moreover, this method has good generalization and scalability and can be applied to different domains.
Smart Images

Figure CN117725204B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, and in particular to a method and apparatus for resolving ambiguity in dialogue intent. Background Technology
[0002] With the development of information technology, intelligent dialogue systems are increasingly being applied across various fields. Depending on the application scenario, intelligent dialogue systems are categorized into casual conversation systems and task-oriented dialogue systems. Compared to casual conversation systems, task-oriented dialogue systems have more application scenarios and greater commercial value. The core management method of task-oriented dialogue systems is intent recognition at conversation nodes, especially in personalized dialogue engine systems. Users typically need to first input their intent and related dialogue text, then use this dialogue text to train an intent recognition model. During task-oriented dialogue, the user inputs dialogue data, and the trained intent recognition model identifies the dialogue intent of that data to enter the corresponding dialogue flow node, thereby executing the corresponding dialogue task. Therefore, the accuracy of the intent in a dialogue text directly affects the accuracy of the intent recognition model, and consequently, the accuracy of the entire dialogue system.
[0003] However, text semantics exhibit continuity, and the semantic boundaries of intent can become unclear under certain specific tasks. This can lead to two semantically identical dialogue texts being assigned different intent labels by the same or different users. Consequently, this negatively impacts the training of downstream intent recognition models, thereby reducing the accuracy of the entire dialogue system. Therefore, eliminating intent ambiguity in dialogue text to accurately determine the correct intent label has become one of the urgent technical problems to be solved in intelligent dialogue systems. Summary of the Invention
[0004] This disclosure provides a method and apparatus for eliminating dialogue intent ambiguity, which can improve the quality of the correspondence between dialogue text and intent by eliminating ambiguity in dialogue text, thereby further improving the accuracy of dialogue text intent recognition.
[0005] Firstly, this disclosure provides a method for resolving ambiguity in dialogue intent, including:
[0006] Retrieve multiple dialogue texts;
[0007] Perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text;
[0008] Intent segmentation is performed based on the text representation vector and intent label corresponding to each dialogue text to obtain the intent segmentation hyperplane corresponding to the plurality of dialogue texts; the intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the plurality of dialogue texts; the dialogue texts with the same predicted intent in the intent segmentation hyperplane are located in the same region.
[0009] Based on the intent segmentation hyperplane, ambiguous texts with intent ambiguity are obtained from the plurality of dialogue texts, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplane and the ambiguous texts.
[0010] Eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
[0011] Secondly, this disclosure provides a dialog intent ambiguity resolution device, comprising:
[0012] The acquisition module is used to acquire multiple dialogue texts;
[0013] The processing module is used to perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text.
[0014] The segmentation module is used to perform intent segmentation based on the text representation vector and intent label corresponding to each dialogue text to obtain the intent segmentation hyperplane corresponding to the multiple dialogue texts; the intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the multiple dialogue texts; the dialogue texts with predicted intent in the intent segmentation hyperplane are located in the same region.
[0015] The acquisition module is used to obtain ambiguous text with intention ambiguity from the plurality of dialogue texts according to the intention segmentation hyperplane, and to obtain the reference text corresponding to the ambiguous text based on the intention segmentation hyperplane and the ambiguous text;
[0016] The elimination module is used to eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
[0017] In the dialogue intent ambiguity resolution method provided in this disclosure, after obtaining the corresponding text representation vector for each dialogue text, intent segmentation is performed based on the text representation vector and intent label of each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. Ambiguous texts with intent ambiguity are obtained from the multiple dialogue texts based on the intent segmentation hyperplanes, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplanes and the ambiguous texts. The intent ambiguity corresponding to the ambiguous texts is then eliminated based on the reference texts and intent labels corresponding to the reference texts. It should be understood that the text representation vector of each dialogue text can reflect each dialogue text, and the dialogue texts are continuous in the semantic space. Determining the intent segmentation hyperplane based on the text representation vector and intent label of each dialogue text essentially utilizes the continuity of the semantic space to determine the intent segmentation hyperplane.
[0018] Furthermore, the reference text is determined based on the intent segmentation hyperplane. This hyperplane reflects the predicted intent of each dialogue text in multiple dialogue texts, and dialogue texts with the same predicted intent are located within the same region. Based on this characteristic of the intent segmentation hyperplane and the continuity of the semantic space of the dialogue text, there is a certain relationship between the predicted intents of the determined reference text and the ambiguous text. Intent labels based on the reference text can eliminate intent ambiguity in the intent labels of the ambiguous text. In summary, this application, based on the continuity of semantic space and the characteristics of the intent segmentation hyperplane, can eliminate dialogue texts with ambiguous intents, improve the quality of the correspondence between dialogue texts and intents, thereby improving the accuracy of downstream intent recognition models and ultimately improving the accuracy of the entire dialogue system. Moreover, this method has good generalization and scalability and can be applied to different domains.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0020] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:
[0021] Figure 1 A flowchart of a dialogue intent ambiguity resolution method provided in this disclosure embodiment;
[0022] Figure 2A schematic flowchart of a model training method provided in an embodiment of this disclosure;
[0023] Figure 3 A flowchart of the model training method provided in the embodiments of this disclosure;
[0024] Figure 4 This is a flowchart of step S32 in one embodiment of the present disclosure;
[0025] Figure 5 This is a flowchart of step S32 in another embodiment of the present disclosure;
[0026] Figure 6 A schematic diagram of the structure of a dialogue intent ambiguity resolution device provided in the disclosed embodiments;
[0027] Figure 7 This embodiment of the disclosure also provides a flowchart of a dialogue intent recognition method;
[0028] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0029] Figure 9 This is a schematic diagram illustrating the intention to segment the hyperplane in the disclosed embodiment. Detailed Implementation
[0030] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0032] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0033] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of a feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded.
[0034] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0035] In related technical fields, text semantics exhibit continuity, but the semantic boundaries of intent can become unclear under certain tasks. For example, the sentences "Membership application failed, how do I apply?" and "How do I apply for membership?" have similar semantics, but the former's intent leans towards "application conditions," while the latter's intent leans towards "application methods." This results in two semantically identical dialogue texts being assigned different intent labels, negatively impacting the training of downstream intent recognition models and reducing the accuracy of the entire dialogue system.
[0036] In addition, although some methods for dialogue disambiguation have been disclosed in related technical fields, they are limited to specific domains and rely on specific classification models, making them unsuitable for general scenarios. Therefore, their generalization and scalability are poor.
[0037] This application, considering the continuity of semantic space, proposes a universal dialogue intent removal method applicable to any scenario. Specifically, after acquiring multiple dialogue texts, each dialogue text is first processed into a vector representation to obtain a text representation vector. Further, intent segmentation is performed based on the text representation vector and intent label of each dialogue text, resulting in multiple intent segmentation hyperplanes corresponding to the dialogue texts. These hyperplanes reflect the predicted intent of each dialogue text, and dialogue texts with the same predicted intent are located within the same region. Next, ambiguous texts with intent ambiguity and their corresponding reference texts are extracted from the multiple dialogue texts based on the intent segmentation hyperplanes. Finally, ambiguity removal processing is performed on the ambiguous texts based on the intent label of the reference texts. In the embodiments of this application, by accurately identifying ambiguous texts with intent ambiguity based on the continuity of semantic space and the characteristics of the intent segmentation hyperplanes, and performing ambiguity removal processing on them, the quality of the correspondence between dialogue texts and intents can be improved, thereby improving the accuracy of downstream intent recognition models and ultimately improving the accuracy of the entire dialogue system.
[0038] The dialogue disambiguation method provided in this disclosure can be used in intelligent dialogue systems. These intelligent dialogue systems include casual conversation systems and task-oriented dialogue systems, which can also be referred to as "digital personal assistants," "intelligent customer service," or "intelligent robots." In task-oriented dialogue systems, especially personalized task-oriented dialogue systems, it is necessary to train an intent recognition model using the input intent and related dialogue text. The intent recognition model then identifies the dialogue intent and finally executes the task at the corresponding dialogue flow node. It is easy to understand that the input intent and related dialogue text affect the accuracy of the intent recognition model. To improve the accuracy of the intent recognition model, intent disambiguation processing is required before training the model. Specifically, the dialogue intent disambiguation method described above can be used to disambiguate each dialogue text used as training text, and then the disambiguated dialogue text can be used to train the intent recognition model.
[0039] The dialogue intent ambiguity resolution method according to embodiments of this disclosure can be executed by electronic devices such as terminal devices or servers. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc. The server can be a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server capable of cloud computing. This method can be implemented by a processor calling computer-readable program instructions stored in memory.
[0040] Figure 1 A flowchart illustrating a dialogue intent ambiguity resolution method provided in this embodiment of the disclosure. (Refer to...) Figure 1 The method includes:
[0041] Step S101: Obtain multiple dialogue texts.
[0042] The dialogue text comes from a text intent library, which includes the dialogue text and its corresponding intent tags. The text intent library can be obtained by acquiring raw dialogue text from the intelligent dialogue system within any time period. This raw dialogue text includes both complete dialogue text (complete question and answer) and incomplete dialogue text (only a question, no answer). Therefore, incomplete dialogue text can be removed manually, and the remaining dialogue text can be labeled with intent tags. The dialogue text and its corresponding intent tags are then associated and stored to obtain the text intent library.
[0043] Intelligent dialogue systems can be natural language understanding-based question-and-answer systems, providing precise answers directly to user questions. For question-and-answer systems, dialogue text is generated based on a question-and-answer exchange. Intelligent dialogue systems can also be task-driven dialogue systems, where users come with a specific purpose, hoping to obtain information or services that meet certain constraints, such as ordering food, booking tickets, searching for music, movies, or certain products. For task-driven dialogue systems, the dialogue text includes the questions and answers, as well as the guiding dialogue from the system during the question-and-answer process.
[0044] Step S102: Perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text.
[0045] In some embodiments, a text representation model can be used to compute vector representation processing for each dialogue text to obtain a text representation vector corresponding to each dialogue text.
[0046] The text representation model can employ an existing LSTM (Long Short-Term Memory) model. Alternatively, it can be a model trained using dialogue data. Specifically, the text representation model can be obtained through the following steps: training the language model to be trained using the first dialogue data to obtain a first model; training the first model using the second dialogue data and the corresponding semantic labels to obtain the text representation model.
[0047] The first dialogue data can be multiple dialogue texts obtained from an intelligent dialogue system, including multiple dialogue texts. The language model to be trained includes, but is not limited to, a language model based on the Chinese language environment, namely the chinese-roberta-wwm-ext (Chinese, Robustly Optimized BERT Pretraining Approach, WholeWord Mask, extension) model. The text vectors obtained by the trained chinese-roberta-wwm-ext model can more completely preserve the semantic information and contextual information of the text.
[0048] In some embodiments, for different dialogue scenarios, a preset number of full dialogue texts can be selected from the first dialogue data on the user side of that dialogue scenario as the first training dialogue texts. For example, for a certain dialogue scenario, 5 million dialogue texts can be selected.
[0049] In some embodiments, after obtaining the first dialogue data, the dialogue text in the first dialogue data can be processed to obtain the first training dialogue text. For example, the dialogue text can be anonymized first, then "" and "" can be replaced with "" and "'" respectively, and "'" can be replaced with "'". Characters between non-whitespace characters in the text can be replaced with "," and text with a word abundance less than a preset number can be filtered out, where word abundance represents the richness of the dialogue text. For example, the dialogue text "I love my home" contains the three characters "I", "love", and "home", therefore, the word abundance of "I love my home" is 3. In some embodiments, text with a word abundance less than 3 is filtered out. Filtering out dialogue text with a word abundance less than a preset number can improve the effectiveness of the training data, thereby improving the accuracy of the first model.
[0050] The second type of dialogue data can also be multiple dialogue texts obtained from an intelligent dialogue system, which include dialogue texts and corresponding semantic annotations. The semantic annotations are the intent of the dialogue texts and can be manually annotated.
[0051] As can be seen from the above, the first dialogue data does not include semantic annotations. The first training dialogue text corresponding to the first dialogue data may include colloquial expressions, written language, speech-to-text errors, etc. Therefore, the first model is mainly used to learn knowledge about dialogue. The second training dialogue text corresponding to the second dialogue data includes text with similar expressions. Therefore, the text representation model learns similar expression knowledge, such as "how to buy" and "how to buy", on the basis of learning knowledge about dialogue, in order to improve the accuracy of semantic intent.
[0052] In other embodiments, each dialogue text can also be processed into a vector representation to obtain a text representation vector. For example, an N-gram model already trained in the relevant domain can be used to obtain the text representation vector.
[0053] Step S103: Perform intent segmentation based on the text representation vector and intent label corresponding to each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts.
[0054] Intent labels are annotations representing the intent corresponding to the dialogue text. Intent labels can be automatically added using a corresponding intent annotation model or manually. The intent segmentation hyperplane, based on intent labels, reflects the predicted intent of each dialogue text; dialogue texts with the same predicted intent are located within the same region of the intent segmentation hyperplane. For example... Figure 9 As shown, the intent segmentation hyperplane graph shows four regions, each corresponding to a predicted intent. Each dot in the graph represents a dialogue text, and dialogue texts in the same region have the same or similar intents.
[0055] In some embodiments, step S103, which involves performing intent segmentation based on the text representation vector and intent label corresponding to each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue text, includes: performing intent segmentation processing on the text representation vector and intent label corresponding to each dialogue text using a linear support vector machine algorithm to obtain multiple intent segmentation hyperplanes corresponding to the dialogue text.
[0056] Step S104: Obtain ambiguous texts with ambiguous intents from multiple dialogue texts based on the intent segmentation hyperplane.
[0057] Ambiguous text refers to text whose predicted intent does not match its intent label. For example, if the intent label of a dialogue text is "asking about the temperature," then the predicted intent of the dialogue text, determined by the intent segmentation hyperplane, is "asking about the weather," and thus the dialogue text is ambiguous text.
[0058] In the specific implementation, ambiguous texts with ambiguous intentions are obtained from multiple dialogue texts based on the intent segmentation hyperplane, including: predicting the predicted intent of the dialogue text based on the intent segmentation hyperplane, obtaining dialogue texts whose predicted intents are inconsistent with the intent labels, and using the obtained dialogue texts as ambiguous texts.
[0059] For example, for any given dialogue text, you can examine the region it belongs to in the segmentation hyperplane; the predicted intent corresponding to this region is taken as the predicted intent of the dialogue text. If the predicted intent does not match the intent label of the dialogue text, then the dialogue text is considered ambiguous text. It should be noted that for a dialogue text, only one predicted intent can be obtained based on the intent segmentation hyperplane; that is, the dialogue text exists only in one region of the intent segmentation hyperplane and cannot appear in two regions.
[0060] Step S105: Obtain the reference text corresponding to the ambiguous text based on the intention segmentation hyperplane and the ambiguous text.
[0061] The reference text refers to the dialogue text that has the same intent label as the ambiguous text; that is, the reference text and the ambiguous text are dialogue texts with the same intent label but different expressions.
[0062] In some embodiments, obtaining the reference text corresponding to the ambiguous text based on the intent segmentation hyperplane and the ambiguous text includes: selecting, according to the intent segmentation hyperplane, the unambiguous text located in the same region as the ambiguous text and having the closest Euclidean distance to the ambiguous text as the reference text corresponding to the ambiguous text. Here, Euclidean distance is the distance between two objects, which can be obtained using any calculation method in the relevant domain. Multiple dialogue texts exist in the same region as the ambiguous text in the intent segmentation hyperplane. The Euclidean distance between each dialogue text and the ambiguous text can be determined using the Euclidean distance formula. The reference text is the dialogue text with the closest Euclidean distance to the ambiguous text among the multiple dialogue texts.
[0063] In this context, the reference text is unambiguous text. When selecting a reference text, based on the intended segmentation hyperplane, the unambiguous text that resides in the same region as the ambiguous text and has the closest Euclidean distance is chosen as the reference text. Generally, there can be one or more unambiguous texts. When there is only one unambiguous text, if it and the ambiguous text are located in the same region of the intended segmentation hyperplane, then that unambiguous text is selected as the reference text. If the unambiguous text and the ambiguous text are located in different regions of the intended segmentation hyperplane, no reference text can be found. When there are multiple unambiguous texts, the unambiguous text located in the same region as the ambiguous text and having the closest Euclidean distance is selected as the reference text.
[0064] Step S106: Eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
[0065] In one embodiment, eliminating the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text can be understood as modifying the intent tag of the ambiguous text based on the intent tag corresponding to the reference text.
[0066] In a specific implementation, the intent tags of ambiguous text can be modified manually, that is, the ambiguous text and its corresponding predicted intent, the reference text and its corresponding intent tags are displayed differently, and then the intent tags of the ambiguous text are determined manually and the determination results are stored in a specified database.
[0067] For example, consider intent labels "check the weather" and "phone functions." The "check the weather" intent label contains two dialogue texts: "What's the weather like today?" and "How do I check the weather on my phone?". The "phone functions" intent label contains two dialogue texts: "How do I access the internet on my phone?" and "What are the AI functions on my phone?". According to the intent segmentation hyperplane, the predicted intent of the dialogue text "How do I check the weather on my phone?" is "phone functions," while the intent label is "check the weather." Therefore, the predicted intent and intent label of "How do I check the weather on my phone?" are inconsistent, making "How do I check the weather on my phone?" ambiguous text. In the intent segmentation hyperplane, the dialogue text located in the same region as "How do I check the weather on my phone?" and having the closest Euclidean distance is "How do I access the internet on my phone?". Therefore, "How do I access the internet on my phone?" is taken as the reference text. If manual deambiguity is required, the user interface will display the ambiguous text "How to check the weather on a mobile phone," with the intent label "check the weather" and the predicted intent "mobile phone function," as well as the reference text "How to access the internet on a mobile phone," with the intent label "mobile phone function." Deambiguity personnel can determine the intent of "How to check the weather on a mobile phone" as "mobile phone function" using the reference text. Without the reference text and corresponding intent label, deambiguity personnel will only see the dialogue text "How to check the weather on a mobile phone," the predicted intent "check the weather," and the intent label "mobile phone function" on the user interface. Without comparison, they cannot determine whether the intent of "How to check the weather on a mobile phone" is "check the weather" or "mobile phone function." Using the reference text and corresponding intent label facilitates the deambiguity of the ambiguous text's intent and reduces the difficulty of deambiguity resolution.
[0068] In the dialogue intent ambiguity resolution method provided in this disclosure, after obtaining the corresponding text representation vector for each dialogue text, intent segmentation is performed based on the text representation vector and intent label of each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. Ambiguous texts with intent ambiguity are obtained from the multiple dialogue texts based on the intent segmentation hyperplanes, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplanes and the ambiguous texts. The intent ambiguity corresponding to the ambiguous texts is then eliminated based on the reference texts and intent labels corresponding to the reference texts. It should be understood that the text representation vector of each dialogue text can reflect each dialogue text, and the dialogue texts are continuous in the semantic space. Determining the intent segmentation hyperplane based on the text representation vector and intent label of each dialogue text essentially utilizes the continuity of the semantic space to determine the intent segmentation hyperplane.
[0069] Furthermore, the reference text is determined based on the intent segmentation hyperplane. This hyperplane reflects the predicted intent of each dialogue text in multiple dialogue texts, and dialogue texts with the same predicted intent are located within the same region. Based on this characteristic of the intent segmentation hyperplane and the continuity of the semantic space of the dialogue text, there is a certain relationship between the predicted intents of the determined reference text and the ambiguous text. Intent labels based on the reference text can eliminate intent ambiguity in the intent labels of the ambiguous text. In summary, this application, based on the continuity of semantic space and the characteristics of the intent segmentation hyperplane, can eliminate dialogue texts with ambiguous intents, improve the quality of the correspondence between dialogue texts and intents, thereby improving the accuracy of downstream intent recognition models and ultimately improving the accuracy of the entire dialogue system. Moreover, this method has good generalization and scalability and can be applied to different domains.
[0070] based on Figure 1 The aforementioned dialogue intent ambiguity resolution method, in this embodiment, provides a model training method. This model training method mainly trains a model to be trained, which can refer to the language model to be trained or the first model in step S102. See also Figure 2 This is a flowchart illustrating a model training method provided in an embodiment of this disclosure. Figure 2 The model training method may include the following steps:
[0071] Step S201: Encode the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text.
[0072] As mentioned above, the target model can be the language model to be trained or the first model. Correspondingly, the target dialogue data is the first dialogue data or the second dialogue data. The current target training dialogue text in the first dialogue data can be the current first training dialogue text in the first dialogue data or the current second training dialogue text in the second dialogue data.
[0073] In one embodiment, encoding the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text includes:
[0074] Extract multiple current target training dialogue texts from the target dialogue data; segment the multiple current target training dialogue texts into words using a masking method to obtain the segmentation results; encode the segmentation results to obtain the target encoding corresponding to the current target training dialogue text.
[0075] If the model to be trained is a language model, and the target dialogue data is the first dialogue data, multiple current first training dialogue texts are extracted from the first dialogue data. These texts are then segmented using a masking method to obtain segmentation results. The segmentation results include the first and second segmentation results corresponding to the current first training dialogue text, with different mask positions. Additionally, a third segmentation result is obtained for the first training dialogue texts other than the current first training dialogue text. The first, second, and third segmentation results are then encoded to obtain target encodings. Target encodings include reference encodings, positive encodings, and negative encodings. Positive encodings include the encoding corresponding to the current target training dialogue text; reference encodings include the encodings corresponding to target training dialogue texts with the same predictive intent as the current target training dialogue text; and negative encodings include the encodings corresponding to target training dialogue texts with different predictive intents than the current target training dialogue text.
[0076] If the model to be trained is the first model, then the target dialogue data is the second dialogue data. Multiple current second training dialogue texts are extracted from the second dialogue data. These texts are then segmented using a masking method to obtain segmentation results. These segmentation results include the fourth and fifth segmentation results corresponding to the current second training dialogue texts, where the mask positions for the fourth and fifth segmentation results are different; the sixth segmentation result corresponding to the second training dialogue texts with different predicted intentions from the current second training dialogue texts; and the seventh segmentation result corresponding to a portion of the second training dialogue texts with different predicted intentions from the current second training dialogue texts. The fourth, fifth, sixth, and seventh segmentation results are then encoded to obtain target codes. These target codes include reference codes, positive codes, negative codes, and hard codes. Positive codes include the codes corresponding to the current target training dialogue texts; reference codes include the codes corresponding to target training dialogue texts with the same predicted intentions as the current target training dialogue texts; and negative codes include the codes corresponding to target training dialogue texts with different predicted intentions from the current target training dialogue texts. Difficult-sample encoding involves extracting the encoding corresponding to a portion of the target training dialogue text from target training dialogue texts that differ from the predicted intent of the current target training dialogue text.
[0077] In some embodiments, when segmenting any current first training dialogue text and current second training dialogue text, the original word order can be randomly masked, and the position of the mask and the original word order can be marked.
[0078] Step S202: Based on the target encoding and the model to be trained, the training steps are executed cyclically until the preset target termination condition is met to obtain the target model: the target model includes the first model or the text representation model.
[0079] In simple terms, if the model to be trained is a language model, then the target model obtained through steps S201-S202 refers to the first model; if the model to be trained is the first model, then the target model obtained through steps S201-S202 refers to the text representation model.
[0080] In a specific implementation, the training steps may include, for example: Figure 3 The steps shown are as follows:
[0081] Step S31: Process the target encoding using the model to be trained to obtain the target feature vector and the target sequence feature vector; Step S32: Calculate the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss; and calculate the loss based on the target sequence feature vector and the current target training dialogue text to obtain the second target loss; Step S33: Determine the training target loss based on the first target loss and the second target loss, and adjust the model parameters of the target model based on the training target loss.
[0082] In step S31, if the model to be trained is a language model to be trained, the target encoding includes reference encoding, positive encoding, and negative encoding; wherein, the positive encoding includes the encoding corresponding to the current target training dialogue text, the reference encoding includes the encoding corresponding to the target training dialogue text with the same predicted intent as the current target training dialogue text, and the negative encoding includes the encoding corresponding to the target training dialogue text with a different predicted intent than the current target training dialogue text. Accordingly, the target feature vector includes a first reference feature vector, a first positive feature vector, and a first negative feature vector corresponding to the reference encoding, positive encoding, and negative encoding, respectively, and the target sequence feature vector includes a first target reference sequence feature vector, a first target positive sequence feature vector, and a first target negative sequence feature vector corresponding to the reference encoding, positive encoding, and negative encoding, respectively.
[0083] In step S32, as Figure 4 As shown, loss is calculated based on the target feature vector and the current target training dialogue text to obtain the first target loss, including:
[0084] Step S401: Calculate the inner product of the first reference feature vector and the first positive feature vector to obtain the first score vector; and calculate the inner product of the first reference feature vector and the first negative feature vector to obtain the second score vector.
[0085] Step S402: After concatenating the first score vector and the second score vector, divide the concatenation with the preset first hyperparameter to obtain the third score vector.
[0086] The first hyperparameter can be preset based on experience; for example, the first hyperparameter is 0.06.
[0087] Step S403: Calculate the cross-entropy loss between the third score vector and the rank of the normal code to obtain the first target loss.
[0088] In some embodiments, a second target loss is obtained by calculating the loss based on the target sequence feature vector and the current target training dialogue text, including:
[0089] Step S404: Extract the mask feature vector from the first target sample sequence feature vector, and calculate the cross-entropy loss between the mask feature vector and the current target training dialogue text to obtain the second target loss; wherein, the mask feature vector is the feature vector of the target sample sequence feature vector at the mask position.
[0090] Among them, the mask feature vector is the feature vector of the first positive sequence feature vector at the mask position, and the original word order refers to the word order in the first training dialogue text. In other words, the first training dialogue text is composed of the original word order.
[0091] In some embodiments, step S33, determining the training target loss based on the first target loss and the second target loss, includes:
[0092] Step S405: Multiply the second target loss by the preset second hyperparameter to obtain the third target loss; add the first target loss and the third target loss to obtain the training target loss.
[0093] The second hyperparameter is preset by the user based on experience; for example, the second hyperparameter is 0.7. The parameters in the first model are adjusted based on the training target loss.
[0094] In this embodiment of the disclosure, the gradient of the training target loss in different loops can be determined using the training target loss, and the parameters of the representation layer in the first model can be determined based on the gradient. By adjusting the parameters of the representation layer, the first model can be made more accurate.
[0095] In this embodiment of the disclosure, the first model includes a first network layer, a first representation layer, a first pooling layer, and a first classification layer. The output data of the first network layer serves as the input data of the first representation layer, the output data of the first representation layer serves as the input data of the first pooling layer, and the output data of the first pooling layer serves as the input data of the first classification layer.
[0096] In some embodiments, the first network layer is composed of a pre-trained model, the first representation layer is composed of a feedforward neural network, the first pooling layer is composed of a fully spliced layer and an activation function, and the first classification layer is composed of a fully spliced layer and a softmax activation function.
[0097] In some embodiments, after adding the first target loss and the third target loss to obtain the training target loss, the method further includes: minimizing the training target loss using the Adam optimizer; wherein the learning rate is 3e-5 and the weight decay coefficient is 1e-2. The Adam optimizer is a commonly used optimizer in the art, and its principle will not be elaborated here.
[0098] In some embodiments, word segmentation is performed on multiple current target training dialogue texts using a masking method to obtain word segmentation results, including:
[0099] A preset number of segmented results are selected from the segmentation results as the segmentation results to be processed. Hyperparameters are set, and the segmentation results to be processed are processed as follows according to the hyperparameters: when the hyperparameter is lower than the first parameter value, the original word order is replaced with a mask word order; when the hyperparameter is lower than the second parameter value, the original word order is replaced with a random word order; when the hyperparameter is lower than the third parameter value, the original word order is kept; wherein, the first parameter value, the second parameter value, and the third parameter value decrease in sequence.
[0100] In this embodiment of the disclosure, the hyperparameters are preset, and their values can be determined empirically. For example, the values of the first parameter, the second parameter, and the third parameter are set to 75%, 15%, and 10%, respectively.
[0101] In this embodiment of the disclosure, the selected original words in the first training dialogue text can be used as prediction labels, and the original words in other positions can be masked with -100.
[0102] For example, the first target feature vector and the first target sequence feature vector are obtained in the following way:
[0103] The target encoding is input into the first network layer to obtain the first hidden vector; the first hidden vector corresponding to the last layer of the first network layer is input into the first representation layer to obtain the first representation vector; the first representation vector is normalized by L2 to obtain the first target feature vector; the first hidden vector corresponding to the last layer of the first network layer is input into the first pooling layer to obtain the first pooling vector; the first pooling vector is input into the first classification layer to obtain the first target sequence feature vector.
[0104] For example, in the first model, the network layer is the open-source language model chinese-roberta-wwm-ext to be trained, the pooling layer is a two-layer 768×768 multilayer neural network (MLP), and the hidden layer activation function is the Tanh function; the hidden layer size of the classification layer is 768-dimensional, and the softmax dimension is 21128; the hidden layer size of the representation layer is 768-dimensional, and the representation dimension size is 256-dimensional.
[0105] The first model inputs the target encoding into the network layer to obtain the latent vector of each word in the first training dialogue text. The latent vector at the first word is input into the representation layer, and its output is normalized by the L2 norm to obtain a 256-dimensional first target feature vector. The latent vector at the first word is input into the pooling layer to obtain a 768-dimensional first pooling vector, and then through the classification layer to obtain a 21128-dimensional first target sequence feature vector.
[0106] In step S31, if the model to be trained is the first model, the target encoding includes reference encoding, positive encoding, and negative encoding; wherein, the positive encoding includes the encoding corresponding to the current target training dialogue text, the reference encoding includes the encoding corresponding to the target training dialogue text with the same predicted intent as the current target training dialogue text, and the negative encoding includes the encoding corresponding to the target training dialogue text with a different predicted intent than the current target training dialogue text. The target feature vector includes a second target reference feature vector, a second target positive feature vector, a second target negative feature vector, and a second target difficult feature vector, respectively corresponding to the reference encoding, positive encoding, negative encoding, and difficult encoding. The target sequence feature vector includes a second target reference sequence feature vector, a second target positive sequence feature vector, a second target negative sequence feature vector, and a second target difficult sequence feature vector, respectively corresponding to the reference encoding, positive encoding, negative encoding, and difficult encoding.
[0107] In step S32, as Figure 5 As shown, loss is calculated based on the target feature vector and the current target training dialogue text to obtain the first target loss, including:
[0108] Step S501: Calculate the inner product of the second target reference feature vector and the second target positive sample feature vector to obtain the fourth score vector; calculate the inner product of the second target reference feature vector and the second target negative sample feature vector to obtain the fifth score vector; and calculate the inner product of the second target reference feature vector and the second target negative sample feature vector to obtain the sixth score vector.
[0109] Step S502: After concatenating the fourth, fifth, and sixth score vectors, divide the concatenation by the preset first hyperparameter to obtain the seventh score vector.
[0110] In this embodiment of the disclosure, the first hyperparameter can be set to 0.06 or other values.
[0111] Step S503: Calculate the cross-entropy loss between the seventh score vector and the rank of the current second training dialogue text to obtain the first target loss; and calculate the cross-entropy loss between the second target positive feature vector and the label corresponding to the current second training dialogue text to obtain the second target loss.
[0112] The training target loss is determined based on the first target loss and the second target loss, including:
[0113] Step S504: Multiply the second target loss by the preset sixth hyperparameter to obtain the third target loss.
[0114] In this embodiment of the disclosure, the sixth hyperparameter can be 0.5 or other values.
[0115] Step S505: Add the first target loss and the third target loss to obtain the training target loss, and adjust the parameters of the text representation model based on the training target loss.
[0116] In this embodiment of the disclosure, the text representation model includes a second network layer, a second representation layer, a second pooling layer, and a second classification layer; wherein, the second network layer is composed of a pre-trained model, the second representation layer is composed of a feedforward neural network, the pooling layer is composed of a feedforward neural network, and the classification layer is composed of a fully concatenated layer and a softmax function; that is, the second network layer and the second representation layer of the text representation model have the same structure and weights as the first network layer and the first representation layer in the first model;
[0117] For example, in the text representation model, the network structure and weights of the second network layer are consistent with those of the first model, i.e., the second network layer is composed of the open-source language model chinese-roberta-wwm-ext. The network structure and weights of the second representation layer are consistent with those of the first model, i.e., they are composed of a feedforward neural network. The second pooling layer is composed of a two-layer 768×768 MLP network layer and a hidden activation function, wherein the hidden activation function can be the Tanh function. The second classification layer is composed of a 768×8580 fully concatenated layer with a softmax activation function.
[0118] In some embodiments, after adjusting the parameters of the text representation model based on the training objective loss, dialogue intent ambiguity removal further includes:
[0119] The Adam optimizer is used to minimize the training objective loss, and the model parameters of the target model are adjusted based on the optimized training objective loss; the learning rate can be 1e-5, and the weight decay coefficient can be 1e-2.
[0120] Among them, the Adam optimizer is a commonly used optimizer in this field, and its principle will not be elaborated here.
[0121] In the dialogue intent ambiguity resolution method provided in this disclosure, after obtaining the corresponding text representation vector for each dialogue text, intent segmentation is performed based on the text representation vector and intent label of each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. Ambiguous texts with intent ambiguity are obtained from the multiple dialogue texts based on the intent segmentation hyperplanes, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplanes and the ambiguous texts. The intent ambiguity corresponding to the ambiguous texts is then eliminated based on the reference texts and intent labels corresponding to the reference texts. It should be understood that the text representation vector of each dialogue text can reflect each dialogue text, and the dialogue texts are continuous in the semantic space. Determining the intent segmentation hyperplane based on the text representation vector and intent label of each dialogue text essentially utilizes the continuity of the semantic space to determine the intent segmentation hyperplane.
[0122] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.
[0123] This disclosure also provides a dialog intent ambiguity resolution device. Figure 6 This is a schematic diagram of a dialogue intent ambiguity resolution device provided in a disclosed embodiment. Figure 6 As shown, the dialogue intent ambiguity resolution device 600 includes:
[0124] The acquisition module 601 is used to acquire multiple dialogue texts.
[0125] The processing module 602 is used to perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text.
[0126] The segmentation module 603 is used to perform intent segmentation based on the text representation vector and intent label corresponding to each dialogue text, and obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. The intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the multiple dialogue texts. Dialogue texts with the same predicted intent are located in the same region in the intent segmentation hyperplane.
[0127] The module 604 is used to obtain ambiguous text with intention ambiguity from multiple dialogue texts based on the intention segmentation hyperplane, and to obtain the reference text corresponding to the ambiguous text based on the intention segmentation hyperplane and the ambiguous text.
[0128] The elimination module 605 is used to eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
[0129] The dialogue intent ambiguity removal device provided in this embodiment includes an acquisition module for acquiring multiple dialogue texts, a processing module for processing each dialogue text to obtain a corresponding text representation vector, a segmentation module for performing intent segmentation based on the text representation vector and intent label of each dialogue text to obtain an intent segmentation hyperplane corresponding to the dialogue text, and an acquisition module for obtaining ambiguous texts with intent ambiguity from the multiple dialogue texts based on the intent segmentation hyperplane and obtaining reference texts corresponding to the ambiguous texts based on the intent segmentation hyperplane and the ambiguous texts. The device eliminates the intent ambiguity corresponding to the ambiguous texts based on the reference texts and intent labels corresponding to the reference texts. This device can eliminate ambiguity in dialogue texts, improve the quality of dialogue texts, thereby improving the accuracy of downstream dialogue intent recognition models and ultimately improving the accuracy of the entire dialogue system.
[0130] In some embodiments, when the segmentation module 603 performs intent segmentation based on the text representation vectors corresponding to multiple dialogue texts and the intent labels corresponding to each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to multiple dialogue texts, it performs the following steps: performing intent segmentation processing on the text representation vectors corresponding to each dialogue text and the intent labels corresponding to each dialogue text using the linear support vector machine algorithm to obtain multiple intent segmentation hyperplanes corresponding to multiple dialogue texts.
[0131] In some embodiments, when obtaining ambiguous text with ambiguous intent from multiple dialogue texts based on the intent segmentation hyperplane, the obtaining module 604 performs the following steps:
[0132] Based on the intent segmentation hyperplane, the predicted intent of each dialogue text is determined, and dialogue texts whose predicted intent does not match the intent label are obtained; the obtained dialogue texts are identified as ambiguous texts with intent ambiguity; and based on the intent segmentation hyperplane, the unambiguous text located in the same region as the ambiguous text and the closest to the ambiguous text is selected as the reference text corresponding to the ambiguous text.
[0133] This disclosure also includes a training module for training a text representation model that performs vector representation processing on each dialogue text.
[0134] In some embodiments, the training module is used to train the model to be trained using target dialogue data; wherein the target dialogue data includes first dialogue data or second dialogue data; and the model to be trained includes a language model to be trained or a first model.
[0135] When the training module trains the model to be trained using the target dialogue data, it performs the following steps: encodes the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text; and iteratively executes the training steps based on the target encoding and the model to be trained until the preset target termination condition is met to obtain the target model: the target model includes the first model or the text representation model.
[0136] The training steps include: processing the target encoding using the model to be trained to obtain the target feature vector and the target sequence feature vector; calculating the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss; calculating the loss based on the target sequence feature vector and the current target training dialogue text to obtain the second target loss; determining the training target loss based on the first target loss and the second target loss; and adjusting the model parameters of the target model based on the training target loss.
[0137] In some embodiments, if the model to be trained is a language model to be trained, the target model is a first model, the current target training dialogue text is the current first training dialogue text in the first dialogue data, the word segmentation result includes the first word segmentation result and the second word segmentation result corresponding to the current first training dialogue text, and the third word segmentation result corresponding to the first training dialogue text other than the current first training dialogue text in the first dialogue data; wherein, the mask positions corresponding to the first word segmentation result and the second word segmentation result are different; the target feature vector includes the first reference feature vector, the first positive feature vector, and the first negative feature vector corresponding to the reference encoding, the positive encoding, and the negative encoding, respectively.
[0138] The training module performs the following steps: Calculate the inner product of the first reference feature vector and the first positive sample feature vector to obtain the first score vector; calculate the inner product of the first reference feature vector and the first negative sample feature vector to obtain the second score vector; concatenate the first and second score vectors and divide them by a preset first hyperparameter to obtain the third score vector; calculate the cross-entropy loss of the third score vector and the rank of the positive encoding to obtain the first target loss. Extract the mask feature vector from the first target positive sequence feature vector and calculate the cross-entropy loss of the mask feature vector and the current target training dialogue text to obtain the second target loss; wherein, the mask feature vector is the feature vector of the target positive sequence feature vector at the mask position. Determine the training target loss based on the first and second target losses, and adjust the model parameters of the first model based on the training target loss.
[0139] In some embodiments, if the model to be trained is a first model, the target model is a text representation model, the current target training dialogue text is the current second training dialogue text in the second dialogue data, the word segmentation results include the fourth and fifth word segmentation results corresponding to the current second training dialogue text, wherein the mask positions corresponding to the fourth and fifth word segmentation results are different; the sixth word segmentation result corresponding to the second training dialogue text with a different intent from the current second training dialogue text, and the seventh word segmentation result corresponding to the extracted portion of the second training dialogue text with a different intent from the current second training dialogue text; the target feature vector includes the second target reference feature vector, the second target positive feature vector, the second target negative feature vector, and the second target hard feature vector corresponding to the reference encoding, positive encoding, negative encoding, and hard encoding, respectively.
[0140] The training module performs the following steps: Calculate the inner product of the second target reference feature vector and the second target positive sample feature vector to obtain the fourth score vector; calculate the inner product of the second target reference feature vector and the second target negative sample feature vector to obtain the fifth score vector; calculate the inner product of the second target reference feature vector and the second target negative sample feature vector to obtain the sixth score vector; concatenate the fourth, fifth, and sixth score vectors and divide them by the preset first hyperparameter to obtain the seventh score vector; calculate the cross-entropy loss value of the seventh score vector and the rank of the current second training dialogue text to obtain the first target loss; calculate the cross-entropy loss of the second target positive sample sequence feature vector and the label corresponding to the current second training dialogue text to obtain the second target loss; determine the training target loss based on the first and second target losses, and adjust the model parameters of the target model based on the training target loss.
[0141] It should be noted that the above-mentioned dialogue intent ambiguity resolution devices can all be used to implement any of the dialogue intent ambiguity resolution methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the relevant section on methods and will not be repeated here.
[0142] This disclosure also provides a dialogue intent recognition model, which is trained using the dialogue text after deambiguation and its corresponding intent labels provided in this disclosure.
[0143] The dialogue intent recognition model of this disclosure, trained using the deambiguous dialogue text and corresponding intent labels provided in this disclosure, can improve the accuracy of the entire dialogue system.
[0144] This disclosure also provides a method for dialogue intent recognition. Figure 7This embodiment of the disclosure also provides a flowchart of a dialogue intent recognition method. For example... Figure 7 Dialogue intent recognition methods include:
[0145] Step S701: Obtain the current dialogue text.
[0146] Among them, the current dialogue text is the dialogue text obtained by the dialogue system at the current moment.
[0147] Step S702: Input the dialogue text into the dialogue intent recognition model provided in this embodiment of the disclosure to obtain the intent corresponding to the current dialogue text.
[0148] The dialogue intent recognition method of this disclosure can improve the accuracy of the entire dialogue system by using the dialogue intent recognition model with high recognition accuracy provided in this disclosure.
[0149] It should be noted that the dialogue intent ambiguity resolution method and apparatus, dialogue intent recognition model and dialogue intent recognition method provided in the disclosed embodiments can be applied to customer service systems in industries such as insurance, banking, and government, reducing labor costs and improving service efficiency.
[0150] In addition, this disclosure also provides electronic devices and computer-readable storage media, all of which can be used to implement any of the dialogue intent ambiguity resolution methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding section of the method and will not be repeated here.
[0151] Figure 8 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0152] Reference Figure 8 This disclosure provides an electronic device, which includes: at least one processor 801; at least one memory 802; and one or more I / O interfaces 803, spliced between the processor 801 and the memory 802; wherein the memory 802 stores one or more computer programs that can be executed by the at least one processor 801, and the one or more computer programs are executed by the at least one processor 801 to enable the at least one processor 801 to perform the above-described dialogue intent ambiguity resolution method and dialogue intent recognition method.
[0153] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor 801, implements the aforementioned dialogue intent ambiguity resolution method and dialogue intent recognition method. The computer-readable storage medium may be volatile or non-volatile.
[0154] In one embodiment, the computer program implements the following when executed by processor 801:
[0155] Retrieve multiple dialogue texts;
[0156] Perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text;
[0157] Intent segmentation is performed based on the text representation vector and intent label corresponding to each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. The intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the multiple dialogue texts. Dialogue texts with the same predicted intent are located in the same region in the intent segmentation hyperplane.
[0158] Based on the intent segmentation hyperplane, ambiguous texts with intent ambiguity are obtained from multiple dialogue texts, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplane and the ambiguous texts.
[0159] Eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
[0160] In one embodiment, when processor 801 performs intent segmentation based on the text representation vector and intent label corresponding to each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to dialogue texts, it performs the following steps:
[0161] The intent segmentation hyperplanes corresponding to multiple dialogue texts are obtained by performing intent segmentation processing on the text representation vector and intent label corresponding to each dialogue text using the linear support vector machine algorithm.
[0162] In one embodiment, when processor 801 obtains ambiguous text with ambiguous intent from multiple dialogue texts based on the intent segmentation hyperplane, it performs the following steps:
[0163] Based on the intent segmentation hyperplane, the predicted intent of each dialogue text is determined, and dialogue texts whose predicted intents do not match the intent labels are obtained; the obtained dialogue texts are identified as ambiguous texts with intent ambiguity.
[0164] In one embodiment, when the processor 801 obtains the reference text corresponding to the ambiguous text based on the intent segmentation hyperplane and the ambiguous text, it performs the following steps:
[0165] Based on the intended segmentation hyperplane, select the unambiguous text that is located in the same region as the ambiguous text and is closest to it as the reference text corresponding to the ambiguous text.
[0166] In one embodiment, vector representation processing for each dialogue text is performed by calling a text representation model; the text representation model is obtained through the following steps: training a language model to be trained using first dialogue data to obtain a first model; training the first model using second dialogue data to obtain a text representation model; wherein, the second dialogue data includes second training dialogue text and corresponding semantic annotations.
[0167] In one embodiment, the processor 801 is further configured to: train a model to be trained using target dialogue data; the target dialogue data includes first dialogue data or second dialogue data; the model to be trained includes a language model to be trained or a first model.
[0168] In one embodiment, when the processor 801 trains the model to be trained using the target dialogue data, it performs the following steps:
[0169] Encode the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text.
[0170] The training steps are executed iteratively based on the target encoding and the model to be trained until the preset target termination condition is met, and the target model is obtained: the target model includes the first model or the text representation model.
[0171] Training steps include:
[0172] The target encoding is processed using the model to be trained to obtain the target feature vector and the target sequence feature vector;
[0173] The first target loss is obtained by calculating the loss based on the target feature vector and the current target training dialogue text; and the second target loss is obtained by calculating the loss based on the target sequence feature vector and the current target training dialogue text.
[0174] The training target loss is determined based on the first target loss and the second target loss, and the model parameters of the target model are adjusted based on the training target loss.
[0175] In one embodiment, when the processor 801 encodes the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text, it performs the following steps:
[0176] Extract multiple current target training dialogue texts from the target dialogue data;
[0177] The word segmentation results are obtained by segmenting multiple current target training dialogue texts using a masking method.
[0178] The word segmentation results are encoded to obtain the target encoding corresponding to the current target training dialogue text.
[0179] In one embodiment, the target encoding includes reference encoding, positive encoding, and negative encoding; wherein, the positive encoding includes the encoding corresponding to the current target training dialogue text, the reference encoding includes the encoding corresponding to the target training dialogue text with the same intent as the current target training dialogue text, and the negative encoding includes the encoding corresponding to the target training dialogue text with a different intent than the current target training dialogue text.
[0180] In one embodiment, if the model to be trained is a first model, the target encoding further includes hard-sample encoding, which includes extracting the encoding corresponding to a portion of the target training dialogue text from target training dialogue texts that have different intentions from the current target training dialogue text.
[0181] In one embodiment, if the model to be trained is a language model to be trained, the target model is a first model, the current target training dialogue text is the current first training dialogue text in the first dialogue data, and the word segmentation result includes the first word segmentation result and the second word segmentation result corresponding to the current first training dialogue text, and the third word segmentation result corresponding to the first training dialogue text other than the current first training dialogue text in the first dialogue data; wherein, the mask positions corresponding to the first word segmentation result and the second word segmentation result are different; the target feature vector includes the first reference feature vector, the first positive feature vector, and the first negative feature vector corresponding to the reference encoding, the positive encoding, and the negative encoding, respectively; when the processor 801 calculates the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss, it performs the following steps:
[0182] Calculate the inner product of the first reference feature vector and the first positive feature vector to obtain the first score vector;
[0183] Calculate the inner product of the first reference feature vector and the first negative sample feature vector to obtain the second score vector;
[0184] The first score vector and the second score vector are concatenated and then divided by the preset first hyperparameter to obtain the third score vector.
[0185] The first objective loss is obtained by calculating the cross-entropy loss between the third score vector and the rank of the normal code.
[0186] In one embodiment, the target sequence feature vector includes a first target reference sequence feature vector, a first target positive sequence feature vector, and a first target negative sequence feature vector, respectively corresponding to the reference encoding, positive encoding, and negative encoding; when the processor 801 calculates the loss based on the target sequence feature vector and the current target training dialogue text to obtain the second target loss, it performs the following steps:
[0187] Extract the mask feature vector from the first target sample sequence feature vector, and calculate the cross-entropy loss between the mask feature vector and the current target training dialogue text to obtain the second target loss; where the mask feature vector is the feature vector of the target sample sequence feature vector at the mask position.
[0188] In one embodiment, when the processor 801 determines the training target loss based on the first target loss and the second target loss, it performs the following steps: multiplying the second target loss by a preset second hyperparameter to obtain a third target loss; and adding the first target loss and the third target loss to obtain the training target loss.
[0189] In one embodiment, the model to be trained is a first model, the target model is a text representation model, the current target training dialogue text is the current second training dialogue text in the second dialogue data, the word segmentation results include the fourth and fifth word segmentation results corresponding to the current second training dialogue text, wherein the mask positions corresponding to the fourth and fifth word segmentation results are different; the sixth word segmentation result corresponding to the second training dialogue text with a different intent from the current second training dialogue text, and the seventh word segmentation result corresponding to a portion of the second training dialogue text extracted from the second training dialogue text with a different intent from the current second training dialogue text; the target feature vector includes the second target reference feature vector, the second target positive feature vector, the second target negative feature vector, and the second target hard feature vector corresponding to the reference encoding, positive encoding, negative encoding, and hard encoding, respectively; when the processor 801 calculates the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss, it performs the following steps:
[0190] The inner product of the second target reference feature vector and the second target positive sample feature vector is calculated to obtain the fourth score vector; the inner product of the second target reference feature vector and the second target hard sample feature vector is calculated to obtain the fifth score vector; the inner product of the second target reference feature vector and the second target negative sample feature vector is calculated to obtain the sixth score vector; the fourth, fifth, and sixth score vectors are concatenated and divided by the preset first hyperparameter to obtain the seventh score vector; the cross-entropy loss value of the seventh score vector and the rank of the current second training dialogue text is calculated to obtain the first target loss.
[0191] In one embodiment, the target sequence feature vector includes a second target reference sequence feature vector, a second target positive sequence feature vector, a second target negative sequence feature vector, and a second target hard sequence feature vector, respectively corresponding to the reference encoding, positive encoding, negative encoding, and hard encoding. When the processor 801 calculates the loss based on the target sequence feature vector and the current target training dialogue text to obtain the second target loss, it performs the following steps: calculates the cross-entropy loss between the second target positive sequence feature vector and the label corresponding to the current second training dialogue text to obtain the second target loss.
[0192] In the dialogue intent ambiguity resolution method provided in this disclosure, after obtaining the corresponding text representation vector for each dialogue text, intent segmentation is performed based on the text representation vector and intent label of each dialogue text to obtain multiple intent segmentation hyperplanes corresponding to the dialogue texts. Ambiguous texts with intent ambiguity are obtained from the multiple dialogue texts based on the intent segmentation hyperplanes, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplanes and the ambiguous texts. The intent ambiguity corresponding to the ambiguous texts is then eliminated based on the reference texts and intent labels corresponding to the reference texts. It should be understood that the text representation vector of each dialogue text can reflect each dialogue text, and the dialogue texts are continuous in the semantic space. Determining the intent segmentation hyperplane based on the text representation vector and intent label of each dialogue text essentially utilizes the continuity of the semantic space to determine the intent segmentation hyperplane.
[0193] Furthermore, the reference text is determined based on the intent segmentation hyperplane. This hyperplane reflects the predicted intent of each dialogue text in multiple dialogue texts, and dialogue texts with the same predicted intent are located within the same region. Based on this characteristic of the intent segmentation hyperplane and the continuity of the semantic space of the dialogue text, there is a certain relationship between the predicted intents of the determined reference text and the ambiguous text. Intent labels based on the reference text can eliminate intent ambiguity in the intent labels of the ambiguous text. In summary, this application, based on the continuity of semantic space and the characteristics of the intent segmentation hyperplane, can eliminate dialogue texts with ambiguous intents, improve the quality of the correspondence between dialogue texts and intents, thereby improving the accuracy of downstream intent recognition models and ultimately improving the accuracy of the entire dialogue system. Moreover, this method has good generalization and scalability and can be applied to different domains.
[0194] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0195] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0196] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0197] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is customized by utilizing the status information of the computer-readable program instructions to execute the computer-readable program instructions, thereby implementing various aspects of this disclosure.
[0198] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0199] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0200] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0201] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0202] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0203] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A method for resolving ambiguity in dialogue intent, characterized in that, include: Retrieve multiple dialogue texts; Perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text; Intent segmentation is performed based on the text representation vector and intent label corresponding to each dialogue text to obtain the intent segmentation hyperplane corresponding to the multiple dialogue texts; the intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the multiple dialogue texts. In the intent segmentation hyperplane, dialogue texts belonging to the same predicted intent are located in the same region; Based on the intent segmentation hyperplane, ambiguous texts with intent ambiguity are obtained from the plurality of dialogue texts, and reference texts corresponding to the ambiguous texts are obtained based on the intent segmentation hyperplane and the ambiguous texts; the ambiguous texts are dialogue texts in the plurality of dialogue texts where the predicted intent is inconsistent with the intent label; The reference text is the unambiguous text located in the same area as the ambiguous text and the closest to the ambiguous text; Eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
2. The dialogue intent ambiguity resolution method according to claim 1, characterized in that, The process of performing intent segmentation based on the text representation vector and intent label corresponding to each dialogue text to obtain the intent segmentation hyperplane corresponding to the plurality of dialogue texts includes: The intent segmentation hyperplane corresponding to the multiple dialogue texts is obtained by performing intent segmentation processing on the text representation vector and intent label corresponding to each dialogue text using the linear support vector machine algorithm.
3. The method for resolving dialogue intent ambiguity according to claim 1, characterized in that, The step of obtaining ambiguous text with intention ambiguity from the plurality of dialogue texts based on the intention segmentation hyperplane includes: Based on the intent segmentation hyperplane, the predicted intent of each dialogue text is determined, and dialogue texts whose predicted intent does not match the intent label are obtained. The obtained dialogue text was identified as ambiguous text with unclear intent.
4. The method for resolving dialogue intent ambiguity according to claim 1, characterized in that, The step of obtaining the reference text corresponding to the ambiguous text based on the intent segmentation hyperplane and the ambiguous text includes: Based on the stated intention to segment the hyperplane, select the unambiguous text that is located in the same region as the ambiguous text and is closest to the ambiguous text, as the reference text corresponding to the ambiguous text.
5. The method for resolving dialogue intent ambiguity according to claim 1, characterized in that, The vector representation processing of each dialogue text is performed by calling a text representation model; the text representation model is obtained through the following steps: The first model is obtained by training the language model to be trained using the first dialogue data; The first model is trained using the second dialogue data to obtain the text representation model; wherein, the second dialogue data includes the second training dialogue text and the corresponding semantic annotations.
6. The method for resolving dialogue intent ambiguity according to claim 5, characterized in that, The method further includes: The target dialogue data is used to train the model to be trained; the target dialogue data includes the first dialogue data or the second dialogue data; the model to be trained includes the language model to be trained or the first model. The step of training the model to be trained using the target dialogue data includes: Encode the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text; Based on the target encoding and the model to be trained, the training steps are executed cyclically until the preset target termination condition is met to obtain the target model: the target model includes the first model or the text representation model; The training steps include: The target encoding is processed using the model to be trained to obtain the target feature vector and the target sequence feature vector; A first target loss is obtained by calculating the loss based on the target feature vector and the current target training dialogue text; and a second target loss is obtained by calculating the loss based on the target sequence feature vector and the current target training dialogue text. The training target loss is determined based on the first target loss and the second target loss, and the model parameters of the target model are adjusted based on the training target loss.
7. The method according to claim 6, characterized in that, The step of encoding the current target training dialogue text in the target dialogue data to obtain the target encoding corresponding to the current target training dialogue text includes: Extract multiple current target training dialogue texts from the target dialogue data; The multiple current target training dialogue texts are segmented using a masking method to obtain the segmentation results; The word segmentation results are encoded to obtain the target encoding corresponding to the current target training dialogue text.
8. The method according to claim 7, characterized in that, The target encoding includes reference encoding, positive encoding, and negative encoding; wherein, the positive encoding includes the encoding corresponding to the current target training dialogue text, the reference encoding includes the encoding corresponding to the target training dialogue text with the same intent as the current target training dialogue text, and the negative encoding includes the encoding corresponding to the target training dialogue text with a different intent than the current target training dialogue text.
9. The method according to claim 8, characterized in that, If the model to be trained is a first model, the target encoding further includes hard-sample encoding, which includes extracting the encoding corresponding to a portion of the target training dialogue text from target training dialogue texts that have different intentions from the current target training dialogue text.
10. The method according to claim 8, characterized in that, If the model to be trained is the language model to be trained, the target model is the first model, the current target training dialogue text is the current first training dialogue text in the first dialogue data, and the word segmentation result includes the first word segmentation result and the second word segmentation result corresponding to the current first training dialogue text, as well as the third word segmentation result corresponding to the first training dialogue text in the first dialogue data other than the current first training dialogue text; wherein, the mask positions corresponding to the first word segmentation result and the second word segmentation result are different; The target feature vector includes a first reference feature vector, a first positive feature vector, and a first negative feature vector, which correspond to the reference code, the positive code, and the negative code, respectively. The step of calculating the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss includes: Calculate the inner product of the first reference feature vector and the first positive feature vector to obtain the first score vector; Calculate the inner product of the first reference feature vector and the first negative sample feature vector to obtain the second score vector; The first score vector and the second score vector are concatenated and then divided by a preset first hyperparameter to obtain the third score vector. The first target loss is obtained by calculating the cross-entropy loss between the third score vector and the rank of the normal code.
11. The method according to claim 10, characterized in that, The target sequence feature vector includes a first target reference sequence feature vector, a first target positive sequence feature vector, and a first target negative sequence feature vector, which correspond to the reference code, the positive code, and the negative code, respectively. The step of calculating the second target loss based on the target sequence feature vector and the current target training dialogue text includes: Extract the mask feature vector from the first target normal sequence feature vector, and calculate the cross-entropy loss between the mask feature vector and the current target training dialogue text to obtain the second target loss; wherein, the mask feature vector is the feature vector of the target normal sequence feature vector at the mask position.
12. The method according to claim 11, characterized in that, Determining the training target loss based on the first target loss and the second target loss includes: The third target loss is obtained by multiplying the second target loss by the preset second hyperparameter; The training target loss is obtained by adding the first target loss and the third target loss.
13. The method for resolving dialogue intent ambiguity according to claim 9, characterized in that, If the model to be trained is the first model, the target model is the text representation model, and the current target training dialogue text is the current second training dialogue text in the second dialogue data, the word segmentation result includes the fourth and fifth word segmentation results corresponding to the current second training dialogue text, wherein the mask positions corresponding to the fourth and fifth word segmentation results are different; the sixth word segmentation result corresponding to the second training dialogue text with a different intent from the current second training dialogue text; and the seventh word segmentation result corresponding to the portion of the second training dialogue text extracted from the second training dialogue text with a different intent from the current second training dialogue text. The target feature vector includes a second target reference feature vector, a second target positive sample feature vector, a second target negative sample feature vector, and a second target difficult sample feature vector, which correspond to the reference code, the positive sample code, the negative sample code, and the difficult sample code, respectively. The step of calculating the loss based on the target feature vector and the current target training dialogue text to obtain the first target loss includes: Calculate the inner product of the second target reference feature vector and the second target positive sample feature vector to obtain the fourth score vector; Calculate the inner product of the second target reference feature vector and the second target difficult sample feature vector to obtain the fifth score vector; Calculate the inner product of the second target reference feature vector and the second target negative sample feature vector to obtain the sixth score vector; The fourth, fifth, and sixth score vectors are concatenated and then divided by a preset first hyperparameter to obtain the seventh score vector. The first target loss is obtained by calculating the cross-entropy loss value between the seventh score vector and the rank of the current second training dialogue text.
14. The method for resolving dialogue intent ambiguity according to claim 13, characterized in that, The target sequence feature vector includes a second target reference sequence feature vector, a second target positive sequence feature vector, a second target negative sequence feature vector, and a second target difficult sequence feature vector, which correspond to the reference code, the positive sample code, the negative sample code, and the difficult sample code, respectively. The step of calculating the second target loss based on the target sequence feature vector and the current target training dialogue text includes: The cross-entropy loss between the feature vector of the second target sample sequence and the label corresponding to the current second training dialogue text is calculated to obtain the second target loss.
15. A device for resolving ambiguity in dialogue intent, characterized in that, include: The acquisition module is used to acquire multiple dialogue texts; The processing module is used to perform vector representation processing on each dialogue text to obtain the text representation vector corresponding to each dialogue text. The segmentation module is used to perform intent segmentation based on the text representation vector corresponding to each dialogue text and the intent label corresponding to each dialogue text, and to obtain the intent segmentation hyperplane corresponding to the multiple dialogue texts; the intent segmentation hyperplane is used to reflect the predicted intent of each dialogue text in the multiple dialogue texts. In the intent segmentation hyperplane, dialogue texts belonging to the same predicted intent are located in the same region; The acquisition module is used to obtain ambiguous text with intention ambiguity from the plurality of dialogue texts according to the intention segmentation hyperplane, and to obtain reference text corresponding to the ambiguous text based on the intention segmentation hyperplane and the ambiguous text; the ambiguous text is the dialogue text in the plurality of dialogue texts where the predicted intention is inconsistent with the intention label; The reference text is the unambiguous text located in the same area as the ambiguous text and the closest to the ambiguous text; The elimination module is used to eliminate the intent ambiguity corresponding to the ambiguous text based on the reference text corresponding to the ambiguous text and the intent tag corresponding to the reference text.
Citation Information
Patent Citations
Disambiguating user intent in conversational interactions
CN104769584A
Intention recognition model training method and device, intention recognition method and device, equipment and medium
CN113886548A