Emotion recognition method and system based on dialogue situation knowledge base and comparative learning
By constructing a dialogue situation knowledge base and comparison learning method, combining large language model and LSTM model, dynamically adjusting the emotional anchor distance, the problem of insufficient accuracy of emotion recognition in dialogue situations in the existing technology is solved, and higher emotion recognition is achieved Accuracy and robustness.
Patent Information
- Application Number
- CN202411671898.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing emotion recognition methods are not accurate enough when talking in dialogue situations, complex emotional transfer and scene understanding, and it is difficult to fully capture the deep information behind emotional transformation.
Using a method based on dialogue situation knowledge base and contrast learning, a large language model generates dialogue location, character relationship, theme and initial emotions, builds a strip-like situation knowledge base, and introduces anchor technology to dynamically adjust the emotional anchor distance, combining with the LSTM model Capture affective propagation and transfer characteristics, and use emotion perception enhancement modules and pre-trained language models for prediction and contrast learning.
It improves the accuracy and robustness of emotional recognition, can more accurately capture emotional changes and transfers in complex dialogue scenes, and improves the accuracy of emotional recognition.
Smart Images

Figure CN119202854A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to an emotion recognition method and system based on a dialogue context knowledge base and comparative learning. Background Art
[0002] With the rapid development of artificial intelligence technology, the field of emotional computing has gradually become an important research direction in natural language processing. As an important part of emotional computing, emotion recognition aims to accurately judge the emotional state expressed by the speaker by analyzing text, speech or multimodal information. In a dialogue scenario, emotion recognition needs to understand the subtle changes in the speaker's emotions in different situations. However, existing emotion recognition methods often face the problem of insufficient accuracy when dealing with multiple speakers, complex emotional transfer and scene understanding in dialogue scenarios, and it is difficult to fully capture the deep information behind the emotional transformation.
[0003] In response to this challenge, technologies based on large language models have made significant progress in recent years, especially in processing language context and capturing semantics. However, how to further improve the accuracy of emotion recognition, especially in terms of emotion transfer in dynamic dialogue situations, remains a difficult problem to be solved. Summary of the invention
[0004] In order to make up for the shortcomings of the prior art, the present invention aims to provide an emotion recognition method and system based on a conversation context knowledge base and contrastive learning, which fully utilizes the advantages of a large language model in semantic understanding and contextual reasoning, constructs a strip context knowledge base, and provides richer background information for emotion recognition. In addition, by introducing the anchor point technology in contrastive learning, the distance between emotion anchor points is dynamically adjusted to effectively cope with the complexity of emotion transfer in the conversation, so as to improve the accuracy and robustness of emotion recognition.
[0005] The technical problem solved by the present invention can be achieved through the following technical solutions: On the one hand, a method for emotion recognition based on a conversation context knowledge base and contrastive learning is provided, comprising the following steps: Step 1: Use the large language model to generate the conversation location, character relationship, topic, and initial emotion, and build a strip-shaped situational knowledge base; Step 2: Add a mask to each conversation round of the target person, and concatenate the initial emotion obtained by the retrieval module to the front of the data to obtain training data; Step 3: Input the initial emotion in step 2 and all mask sequences before the predicted target utterance into the emotion perception enhancement module for prediction; Step 4: Use the LSTM model to calculate and predict the mask emotion label of the target speech; Step 5: Pass the emotion label of the target person's speech into the pre-trained model to obtain the emotion label anchor point, compare the predicted emotion label with the emotion label, and adjust the distance between the two anchor points.
[0006] Furthermore, in step 1, for the data in any dialogue data set, a large language model is used to process each dialogue to generate the location, character relationships, topic, and initial emotion of the dialogue. These information labels are sequentially spliced together to form a piece of contextual knowledge. The large language model calls the collection of contextual knowledge after processing the dialogue of the entire data set a strip contextual knowledge base.
[0007] Furthermore, in step 2, a mask is added to each dialogue round of the target person, and for each speech round of the target person, an emotion sample is constructed by splicing the speeches in which the target person participates and the emotional state of the target person in each round, and the emotion sample is used to predict the emotion of the target speech; wherein, the number of speech rounds to be spliced is determined by dynamically setting hyperparameters, and the formula can be expressed as: , in, Refers to the speaker of the current conversation, The target person's speech and emotional state are spliced together in each round, and the emotional state label is masked Label to indicate.
[0008] Furthermore, the initial emotional features obtained by the retrieval module in step 2 are used to provide contextual knowledge in the conversation, including the following parts: (a) Input the initial training data into the large language model and let it analyze the location, character relationships and topics of the conversations in the training data; (b) searching the strip context knowledge base according to the location, character relationship and theme of the training data processed above, obtaining the same location, character relationship and theme, and recording the initial emotion in the current context; (c) Perform frequency statistics on the initial emotion categories obtained, and use the initial emotion category with the highest frequency as the initial emotion of the current training data and as the category label of the training data. The formula is expressed as: , The model input sample x contains part or all of the conversation speech. , is the retrieved initial state sentiment feature label.
[0009] Furthermore, the emotion perception enhancement module in step 3 uses the auxiliary task added in the training stage to predict the emotion information of the mask in the sample to enhance the model's perception of emotion; wherein the cross entropy loss function is used to optimize the prediction of the mask emotion in the sample and enhance the emotion perception ability of the model, and the formula is expressed as: , in, Refers to the vocabulary list The total number of words in It is indivual emotional state, is the word vector corresponding to the sentiment, is a vocabulary Middle The word vector of each word.
[0010] Furthermore, the LSTM model in step 4 uses memory cells and different gating mechanisms to process each sample. The emotional state emotion is used to capture the propagation and transfer of emotions in the conversation, and finally generate the emotional transfer feature. The formula can be expressed as: , , , , , , in, , , They are forget gate, input gate and output gate. Represents the parameters of the gating mechanism, the input gate and the forget gate output the current memory state The output at the current moment is ,and represents the candidate memory state, Represents element-wise multiplication, the final sentiment transfer feature .
[0011] Furthermore, in step 5, the target sentence emotion transfer feature and the initial emotion feature obtained by the emotion perception module are compared. After concatenation, the concatenation is passed into the pre-trained language model to obtain the predicted emotional anchor point of the conversation. The formula can be expressed as: , in, represents the final sentiment transfer feature obtained through the temporal transfer model, represents the initial emotional characteristics, is the weight coefficient, Indicates the current utterance anchor to be predicted.
[0012] Furthermore, the emotion label anchor point in step 5 mainly includes the following aspects: (a) For emotional labels , and the pre-trained language model is also passed in for training, and the encoding is obtained , after further comparison and learning, we get the emotional label anchor of the dialogue , the formula is: , , (b) Merge the predicted emotion anchors of all conversations with the emotion label anchor set , R is the set of all dialogue emotion anchor points, A is the set of all emotion label anchor points, and for all anchor points , perform the following comparative learning, the formula can be expressed as: , , in, Indicates Anchor points With Anchor points The similarity between is the temperature hyperparameter used for contrast loss calculation; represents the supervision loss for contrastive learning; Indicates that all The sum of samples, is the number of positive samples, is the number of negative samples; are anchors with the same label, molecules Indicates all The exponential sum of the similarities of samples with the same label (i.e. positive samples), the denominator Represents the similarity index and of all samples, and To normalize, to predict the relationship between the discourse sentiment anchor points or to predict the relationship between the discourse sentiment anchor points and the sentiment label anchor points; Indicates the number of positive samples with the same label; (c) Calculate the cross entropy loss between the predicted emotion anchor point of the conversation and the emotion label anchor point of the conversation to improve the accuracy of conversation emotion recognition. The formula is expressed as: , , in, represents the predicted utterance label, and Represents the true emotional label of the speech. For the emotional label anchor points with similar semantics, it is necessary to pull away the semantic anchor points of the emotional label with similar semantics. The relevant loss function is designed, and the formula is expressed as: , in, Represents different emotional anchor points, and uses the above formula to increase the distance between semantically similar emotional anchor points; (d) Based on the above loss function, it is necessary to minimize the comprehensive loss function to improve the accuracy of emotion recognition. The formula is as follows: , in, is the weight hyperparameter.
[0013] On the other hand, an emotion recognition system based on a conversation context knowledge base and contrastive learning is provided, which is used to execute the above-mentioned emotion recognition method based on a conversation context knowledge base and contrastive learning, and includes the following modules: The initial emotion retrieval module is used to process the initial data and retrieve the initial emotion features of the initial data dialogue; The emotion perception enhancement module adds a mask to the data and passes it into the LSTM model to predict the emotion transfer characteristics of the target sentence; The anchor point dynamic adjustment module uses the anchor point technology in contrastive learning to dynamically adjust the distance between the predicted emotion anchor point and the emotion label anchor point of the conversation to cope with the complexity of emotion transfer in the conversation.
[0014] Compared with the prior art, the present invention has the following advantages: (1) The present invention makes full use of the powerful capabilities of large language models in semantic understanding and contextual reasoning. By constructing a strip-like contextual knowledge base, it systematically captures and introduces the location, character relationships, topics and initial emotional states in the conversation, providing rich background information for emotion recognition, enabling the model to more accurately predict the emotions in the conversation. This method of combining semantic reasoning with contextual knowledge can accurately capture emotional changes in complex conversation scenarios and improve the accuracy of emotion recognition in conversations.
[0015] (2) During the training process, the present invention uses prompt learning and the method of adding masks to the prediction samples to effectively improve the model's perception of different emotional states using the emotion perception enhancement module, so as to better capture subtle emotional changes, especially in emotional transfer and complex dialogue situations. The model can improve its ability to perceive dialogue emotions in context.
[0016] (3) The present invention uses the LSTM model to capture the propagation and transfer of emotions in conversations. Combined with memory units and gating mechanisms, it can effectively process the flow of emotions in conversations and generate emotion transfer features. This enables the model to handle complex emotional changes in long-term conversations and further improve the accuracy of emotion recognition.
[0017] (4) By introducing the anchor point technology in contrastive learning, the present invention can dynamically adjust the distance between the predicted emotion anchor point and the emotion in the conversation to adapt to the complexity of emotion transfer in the conversation. This technology enables the model to not only recognize the current emotion, but also capture the changing trend of emotion, further improving the accuracy and robustness of emotion recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flow chart of the conversation context knowledge base and the emotion recognition method based on comparative learning of the present invention; Figure 2 A schematic diagram of the processing and retrieval of the initial emotion retrieval module constructed by the present invention; Figure 3 This is a schematic diagram of the structure of the emotion perception enhancement module for predicting labels of the present invention; Figure 4 A schematic diagram of comparative learning of the anchor point dynamic adjustment module of the present invention; Figure 5 This is a block diagram of the emotion recognition system of the dialogue context knowledge base and comparative learning of the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0020] Example 1
[0021] like Figure 1 As shown, this embodiment provides an emotion recognition method based on a conversation context knowledge base and contrastive learning, comprising the following steps: Step 1: Use a large language model to generate conversation locations, character relationships, topics, and initial emotions, and build a strip-shaped situational knowledge base.
[0022] In this embodiment, for the data in any dialogue data set, a large language model is used to process each dialogue, and a strip context knowledge base is constructed through the large language model. Since the large language model has general knowledge and dialogue recognition capabilities, it can identify the location, character relationships, topics, and initial emotions of the dialogue, and these information tags are sequentially spliced to form a piece of context knowledge. The large language model is called a strip context knowledge base after processing the entire data set dialogue.
[0023] Step 2: Add a mask to each conversation round of the target character, and concatenate the initial emotion obtained by the retrieval module to the front of the data to obtain training data.
[0024] In this embodiment, a mask is added to each dialogue round of the target person. For each round of speech of the target person, an emotion sample is constructed by splicing the speeches in which the target person participates and the emotional state of the target person in each round, and the emotion sample is used to predict the emotion of the target speech. The number of speech rounds to be spliced is determined by dynamically setting hyperparameters. The formula can be expressed as: , in, Refers to the speaker of the current conversation, The target person’s speeches and emotional states in each round are spliced together, and the emotional state labels are represented by masks.
[0025] like Figure 2 As shown in FIG. 1 , it is a schematic diagram of processing and searching by the initial emotion retrieval module constructed by the present invention. The initial emotion retrieval module constructed in this embodiment processes the initial training data, uses the large language model to extract the conversation location, the speaker's character relationship, and the conversation topic of the conversation data set, and then obtains the search strip context knowledge base in step 1 to obtain the initial emotion label. The initial emotion feature obtained by the retrieval module is used as , including the following parts: (a) Input the initial training data into the large language model to analyze the location, character relationships, and topics of the conversations in the training data; (b) searching the strip context knowledge base according to the location, character relationship and theme of the training data processed above, obtaining the same location, character relationship and theme, and recording the initial emotion in the current context; (c) Perform frequency statistics on the obtained initial emotion categories, and use the initial emotion category with the highest frequency as the initial emotion of the current training data and as the category label of the training data. The formula is expressed as: , The model input sample x contains part or all of the conversation speech. , is the retrieved initial state sentiment feature label.
[0026] Step 3: Input the initial emotion in step 2 and all mask sequences before the predicted target utterance into the emotion perception enhancement module for prediction.
[0027] In this embodiment, the emotion perception enhancement module uses auxiliary tasks added in the training stage to predict the emotion information of the mask in the sample to enhance the model's perception of emotion; wherein, the cross entropy loss function is used to optimize the prediction of the mask emotion in the sample and enhance the model's emotion perception ability, and the formula is expressed as: , in, Refers to the vocabulary list The total number of words in It is indivual emotional state, is the word vector corresponding to the sentiment, is a vocabulary Middle The word vector of each word.
[0028] Step 4: Use the LSTM model to calculate and predict the masked sentiment label of the target utterance.
[0029] like Figure 3 As shown in the figure, the emotion perception enhancement module of the prediction label of the present invention is shown. The LSTM model uses memory units and different gating mechanisms (forget gate, input gate, output gate) to process the emotion state emotion of the mask in each sample to capture the propagation and transfer of emotions in the conversation, and finally generates the emotion transfer feature, which can be expressed as follows: , , , , , , in, , , They are forget gate, input gate and output gate. Represents the parameters of the gating mechanism, the input gate and the forget gate output the current memory state The output at the current moment is ,and represents the candidate memory state, Represents element-wise multiplication, the final sentiment transfer feature .
[0030] This implementation case refers to the method of "EmoTrans: Emotional Transition-based Model forEmotion Recognition in Conversation". It performs time series prediction on the vector representation of the predicted emotional results. Based on the transferability of the emotions of the interlocutors in the conversation, it selects the LSTM time series model suitable for processing long sequence data and strong time dependence.
[0031] Step 5: Pass the emotion label of the target person's speech into the pre-trained model to obtain the emotion label anchor point, compare the predicted emotion label with the emotion label, and adjust the distance between the two anchor points.
[0032] This embodiment refers to the pre-trained language model provided in the paper "Emotion-Anchored Contrastive Learning Framework for Emotion Recognition in Conversation", converts emotion labels into anchor points, and compares emotion predictions with emotion label anchor points to effectively improve the discrimination between similar emotion labels.
[0033] like Figure 4 As shown in the figure, the anchor point dynamic adjustment module of the present invention compares and learns the target sentence emotion transfer features and the initial emotion features obtained by the emotion perception module in step 4. After concatenation, the concatenation is passed into the pre-trained language model to obtain the predicted emotional anchor point of the conversation. The formula can be expressed as: , in, represents the final sentiment transfer feature obtained through the temporal transfer model, represents the initial emotional characteristics, is the weight coefficient, Indicates the current utterance anchor to be predicted.
[0034] In this embodiment, the emotion tag anchor points mainly include the following aspects: (a) For emotional labels , and also pass it into the pre-trained language model for training, encoding the emotional label anchor point of the conversation , after further comparison and learning, we get the emotional label anchor of the dialogue , the formula is: , .
[0035] (b) Merge the predicted emotion anchors of all conversations with the emotion label anchor set , R is the set of all dialogue emotion anchor points, A is the set of all emotion label anchor points, and for all anchor points , perform the following comparative learning, the formula can be expressed as: , , in, Indicates Anchor points With Anchor points The similarity between is the temperature hyperparameter used for contrast loss calculation; represents the supervision loss for contrastive learning; Indicates that all The sum of samples, is the number of positive samples, is the number of negative samples; are anchors with the same label, molecules Indicates all The exponential sum of the similarities of samples with the same label (i.e. positive samples), the denominator Represents the similarity index and of all samples, and To normalize, it can be to predict the relationship between the emotion anchor points of the discourse or to predict the relationship between the emotion anchor points of the discourse and the emotion label anchor points; Indicates the number of positive samples with the same label.
[0036] (c) Calculate the cross entropy loss between the predicted emotion anchor point of the conversation and the emotion label anchor point of the conversation to improve the accuracy of conversation emotion recognition. The formula is expressed as: , , in, represents the predicted utterance label, and Represents the true emotional label of the speech. For emotional label anchors with similar semantics, it is necessary to pull away the semantic anchors of emotional labels with similar semantics, and design a related loss function, which is expressed as follows: , in, Represents different emotional anchor points, and the distance between semantically similar emotional anchor points is increased through the above formula.
[0037] Based on the above loss function, it is necessary to minimize the comprehensive loss function to improve the accuracy of emotion recognition. The formula is as follows: , in, is the weight hyperparameter.
[0038] Example 2
[0039] like Figure 5 The present embodiment provides an emotion recognition system based on a conversation context knowledge base and contrastive learning, which is used to execute the emotion recognition method based on a conversation context knowledge base and contrastive learning described in Example 1, and provides an initial emotion state for emotion recognition by using the general knowledge of the conversation context of a large language model to identify the emotion state of the interlocutor in the conversation, including three stages: Data processing stage: including the initial emotion retrieval module. Through a large amount of basic knowledge in the large language model, the relationship between the dialogue context and the initial emotion is mined, which is used to process the initial data and retrieve the initial emotion features of the initial data dialogue to build a strip context knowledge base.
[0040] Emotional transfer detection stage: It includes the emotion perception enhancement module. Mask labels are added to the data and the emotional transfer predicted by the time series model is used to capture the emotional transfer characteristics in the conversation.
[0041] Conversation emotion recognition stage: including the anchor point dynamic adjustment module. Through comparative learning, anchor points are set for emotion labels, and the distance between the predicted emotion anchor point and the emotion label anchor point of the conversation is dynamically adjusted to achieve more accurate classification and cope with the complexity of emotion transfer in the conversation.
[0042] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An emotion recognition method based on dialogue context knowledge base and contrastive learning, characterized in that: The following steps are involved: Step 1: Use the large language model to generate the conversation location, character relationship, topic, and initial emotion, and build a strip-shaped situational knowledge base; Step 2: Add a mask to each conversation round of the target person, and concatenate the initial emotion obtained by the retrieval module to the front of the data to obtain training data; Step 3: Input the initial emotion in step 2 and all mask sequences before the predicted target utterance into the emotion perception enhancement module for prediction; Step 4: Use the LSTM model to calculate and predict the mask emotion label of the target speech; Step 5: Pass the emotion label of the target person's speech into the pre-trained model to obtain the emotion label anchor point, compare the predicted emotion label with the emotion label, and adjust the distance between the two anchor points.
2. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 1, characterized in that: In step 1, for the data in any dialogue data set, a large language model is used to process each dialogue to generate the location, character relationships, topic, and initial emotion of the dialogue. These information labels are sequentially spliced together to form a piece of contextual knowledge. The large language model refers to the collection of contextual knowledge after processing the dialogue of the entire data set as a strip contextual knowledge base.
3. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 1, characterized in that: In step 2, a mask is added to each dialogue round of the target person, and for each speech round of the target person, an emotion sample is constructed by splicing the speech in which the target person participates and the emotional state of the target person in each round, and the emotion sample is used to predict the emotion of the target speech; wherein, the number of speech rounds to be spliced is determined by dynamically setting hyperparameters, and the formula can be expressed as: , in, Refers to the speaker of the current conversation, The target person’s speeches and emotional states in each round are spliced together, and the emotional state labels are represented by masks.
4. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 3 is characterized in that: The initial sentiment features obtained by the retrieval module in step 2 are used to provide contextual knowledge in the conversation, including the following parts: (a) Input the initial training data into the large language model and let it analyze the location, character relationships and topics of the conversations in the training data; (b) searching the strip context knowledge base according to the location, character relationship and theme of the training data processed above, obtaining the same location, character relationship and theme, and recording the initial emotion in the current context; (c) Perform frequency statistics on the initial emotion categories obtained, and use the initial emotion category with the highest frequency as the initial emotion of the current training data and as the category label of the training data. The formula is expressed as: , The model input sample x contains part or all of the conversation speech. , is the retrieved initial state sentiment feature label.
5. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 1, characterized in that: The emotion perception enhancement module in step 3 uses auxiliary tasks added in the training phase to predict the emotion information of the mask in the sample to enhance the model's perception of emotion; wherein the cross entropy loss function is used to optimize the prediction of the mask emotion in the sample and enhance the model's emotion perception ability, and the formula is expressed as: , in, Refers to the vocabulary list The total number of words in It is indivual emotional state, is the word vector corresponding to the sentiment, is a vocabulary Middle The word vector of each word.
6. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 1, characterized in that: The LSTM model in step 4 uses memory cells and different gating mechanisms to process each sample. The emotional state emotion is used to capture the propagation and transfer of emotions in the conversation, and finally generate the emotional transfer feature. The formula can be expressed as: , , , , , , in, , , They are forget gate, input gate and output gate. Represents the parameters of the gating mechanism, the input gate and the forget gate output the current memory state The output at the current moment is ,and represents the candidate memory state, Represents element-wise multiplication, the final sentiment transfer feature .
7. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 1, characterized in that: In step 5, the target sentence emotion transfer feature and the initial emotion feature obtained by the emotion perception module are After concatenation, the concatenation is passed into the pre-trained language model to obtain the predicted emotional anchor point of the conversation. The formula can be expressed as: , in, represents the final sentiment transfer feature obtained through the temporal transfer model, represents the initial emotional characteristics, is the weight coefficient, Indicates the current utterance anchor to be predicted.
8. The emotion recognition method based on dialogue context knowledge base and contrastive learning according to claim 7, characterized in that: The emotional label anchor points in step 5 mainly include the following aspects: (a) For emotional labels , and the pre-trained language model is also passed in for training, and the encoding is obtained , after further comparison and learning, we get the emotional label anchor of the dialogue , the formula is: , , (b) Merge the predicted emotion anchors of all conversations with the emotion label anchor set , R is the set of all dialogue emotion anchor points, A is the set of all emotion label anchor points, and for all anchor points , perform the following comparative learning, the formula can be expressed as: , , in, Indicates Anchor points With Anchor points The similarity between is the temperature hyperparameter used for contrast loss calculation; represents the supervision loss for contrastive learning; Indicates that all The sum of samples, is the number of positive samples, is the number of negative samples; are anchors with the same label, molecules Represents the exponential sum of all similarities with the same sample label as i, and the denominator Represents the similarity index and of all samples, and To normalize, to predict the relationship between the discourse sentiment anchor points or to predict the relationship between the discourse sentiment anchor points and the sentiment label anchor points; Indicates the number of positive samples with the same label; (c) Calculate the cross entropy loss between the predicted emotion anchor point of the conversation and the emotion label anchor point of the conversation to improve the accuracy of conversation emotion recognition. The formula is expressed as: , , in, represents the predicted utterance label, and Represents the true emotional label of the speech. For the emotional label anchor points with similar semantics, it is necessary to pull away the semantic anchor points of the emotional label with similar semantics. The relevant loss function is designed, and the formula is expressed as: , in, Represents different emotional anchor points, and uses the above formula to increase the distance between semantically similar emotional anchor points; (d) Based on the above loss function, it is necessary to minimize the comprehensive loss function to improve the accuracy of emotion recognition. The formula is as follows: , in, is the weight hyperparameter.
9. An emotion recognition system based on a conversation context knowledge base and contrastive learning, used to execute an emotion recognition method based on a conversation context knowledge base and contrastive learning as claimed in any one of claims 1 to 8, characterized in that: Includes the following modules: The initial emotion retrieval module is used to process the initial data and retrieve the initial emotion features of the initial data dialogue; Emotion perception enhancement module, adding <mask> And pass it into the LSTM model to predict the sentiment transfer characteristics of the target sentence;< / mask> The anchor point dynamic adjustment module uses the anchor point technology in contrastive learning to dynamically adjust the distance between the predicted emotion anchor point and the emotion label anchor point of the conversation to cope with the complexity of emotion transfer in the conversation.
Citation Information
Patent Citations
Method and device for automatically identifying user emotion on the basis of computer
CN107491435A
Fine-grained viewpoint mining method for comprehensive integration discussion scene
CN113836911A
Conversation emotion recognition method based on common sense perception and hierarchical multi-task learning
CN114722838A
Text analysis method, device and equipment based on human-computer interaction and storage medium
CN115129821A
Topic sentiment identification and analysis
US20150193482A1
Cited By
Conversation emotion and behavior combined recognition method and system based on hierarchical interactive learning
CN119939522A
Dialogue emotion recognition method combining character clues and emotion uncertainty
CN120277215A
Intelligent agent-based spoken dialogue data processing method
CN120726996A
