Complete end-to-end multi-modal dialogue emotion recognition method and system

Through the cross-modal fusion and attention mechanism of video, audio and text features, combined with low-rank tensor fusion, the problem of insufficient emotion recognition accuracy in multi-modal dialogue emotion recognition technology is solved, achieving higher accuracy and robustness.

CN118656701AActive Publication Date: 2024-09-17HUAZHONG NORMAL UNIV

Patent Information

Application Number
CN202410844155.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-17
Estimated Expiration
2044-06-27

AI Technical Summary

Technical Problem

The existing multi-modal dialogue emotion recognition technology has a low accuracy and cannot fully capture the speaker's own emotional changes and emotional migration, resulting in insufficient emotion recognition accuracy.

Method used

Adopting a completely end-to-end multi-modal dialogue emotion recognition method, through cross-modal fusion of video, audio and text features, combined with attention mechanism and low-rank tensor fusion, the speaker's self-history and other people's history discourse features are extracted to improve emotion Recognition accuracy and robustness.

Benefits of technology

It significantly improves the accuracy and robustness of emotion recognition, makes full use of multi-modal features, takes into account the speaker's internal emotional changes and emotional migration, and improves the effect of conversational emotion recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656701A
    Figure CN118656701A
Patent Text Reader

Abstract

The invention discloses a complete end-to-end multi-mode dialogue emotion recognition method and system. The method comprises the following steps of: performing utterance segmentation on a video file by taking an utterance as a unit to obtain a plurality of sub-videos; respectively extracting a video modal time sequence feature, an audio modal time sequence feature and a text modal time sequence feature of each sub-video from each sub-video; performing cross-modal fusion on the video modal time sequence feature, the audio modal time sequence feature and the text modal time sequence feature of each sub-video; and respectively carrying out time sequence modeling on the utterance of the target sub-video, the self historical utterance and the historical utterance of other people, and finally fusing the two to serve as final time sequence modeling feature output and subsequent linear classifier input. According to the method, the multi-modal features are fully utilized, the emotion change of the speaker and the emotion migration among the speakers are considered, and the accuracy and robustness of emotion recognition are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of emotion recognition, and more specifically, relates to a fully end-to-end multimodal dialogue emotion recognition method and system. Background Art

[0002] In the information age, the ways of human communication are becoming more and more diverse, especially online communication has become an important part of daily life. In recent years, the technological progress of artificial intelligence and the enhancement of the ability of intelligent devices to communicate with humans have made various intelligent interaction platforms such as intelligent voice assistants, online customer service support systems and automotive intelligent systems deeply integrated into people's lives. These advances have not only brought convenience and intelligent experience to our daily lives, but also significantly improved the efficiency of work and production. As a key factor, emotion recognition is gaining widespread attention in the industry and academia in improving the human-computer interaction interface and voice communication user experience. With the diversification of communication methods, people pay more attention not only to the content of the speech itself, but also to the emotional state of the speaker. Emotion is an indispensable part of human communication, which affects people's thinking, decision-making and behavior. Enabling machines to understand and gradually grasp people's emotional changes is the main research and development direction in the field of artificial intelligence.

[0003] Early research focused on text sentiment analysis, including rule-based methods and machine learning-based methods. Subsequently, with the rise of deep learning technology, researchers began to explore emotion recognition models based on deep neural networks. These models usually use recurrent neural networks (RNN) and convolutional neural networks (CNN) to process text data, and use long short-term memory networks (LSTM) and attention mechanisms to improve the accuracy of emotion recognition. In speech sentiment analysis, researchers identify the speaker's emotional state by extracting acoustic features of speech signals, such as pitch, energy, and frequency.

[0004] Considering the problem that feature information extracted based on a single modality is not comprehensive enough, recent research work has begun to consider multi-modal conversation emotion recognition. Multi-modal conversation emotion recognition is a cutting-edge research topic in the field of affective computing. It uses information from multiple modalities such as speech, text, and vision, combined with the context of the target utterance, to analyze the emotional state of the target utterance from a conversation. This method can capture user emotions more comprehensively and improve the accuracy and effect of emotion recognition. Multi-modal conversation emotion recognition has important research significance and broad application prospects in many fields such as dialogue systems, smart classrooms, and autism intervention. However, the existing multi-modal conversation emotion recognition technology has the problem of low accuracy. Summary of the invention

[0005] In response to the above defects or improvement needs of the prior art, the present invention provides a fully end-to-end multimodal dialogue emotion recognition method and system, which fully utilizes the multimodal characteristics and takes into account the speaker's own emotional changes and emotional migration between speakers, greatly improving the accuracy and robustness of emotion recognition.

[0006] To achieve the above object, according to one aspect of the present invention, a fully end-to-end multimodal conversation emotion recognition method is provided, comprising the steps of:

[0007] Obtain a video file in a dialogue scenario, segment the video file into utterances, and obtain multiple sub-videos, each of which is marked with a speaker identifier corresponding to the sub-video;

[0008] Extracting video modality temporal features, audio modality temporal features, and text modality temporal features of each sub-video from each sub-video respectively;

[0009] Cross-modally fuse the video modality temporal features, audio modality temporal features, and text modality temporal features of each sub-video to obtain a first fused feature of each sub-video;

[0010] According to the speaker identification of each sub-video, the attention mechanism is used to obtain the self-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of the speaker of the sub-video. The attention mechanism is used to obtain the other-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of others other than the speaker of the sub-video. The self-historical discourse feature and the other-historical discourse feature of each sub-video are fused to obtain the second fusion feature.

[0011] The emotion recognition result of each sub-video is output according to the second fusion feature of each sub-video.

[0012] Further, the extracting of the video modality timing features, the audio modality timing features and the text modality timing features of each sub-video from each sub-video respectively comprises the steps of:

[0013] Extracting the corresponding audio file and text file from each sub-video respectively;

[0014] Extracting video features, audio features and text features from each sub-video and its corresponding audio file and text file respectively;

[0015] The video features, audio features and text features of each sub-video are respectively modeled at the discourse level to obtain the video modal temporal features, audio modal temporal features and text modal temporal features of each sub-video.

[0016] Furthermore, extracting video features, audio features and text features from each sub-video and its corresponding audio file and text file respectively comprises the steps of:

[0017] The RoBERTa pre-trained model is used to extract text features from the text files corresponding to each sub-video;

[0018] The Wav2Vec2.0 pre-trained model is used to extract audio features from the audio files corresponding to each sub-video;

[0019] The SwinTransformer pre-trained model is used to extract video features from each sub-video.

[0020] Furthermore, TransformerEncoder is used to perform discourse-level temporal modeling on the video features, audio features, and text features of each sub-video.

[0021] Furthermore, the fusing of the video modality temporal features, the audio modality temporal features and the text modality temporal features of each sub-video comprises the steps of:

[0022] The interaction features between each modality’s temporal features and the other two modal temporal features are calculated through the attention mechanism to obtain two interaction features of each modality.

[0023] The two interactive features of each modality are fused through low-rank tensor fusion to obtain the cross-modal features of each modality;

[0024] The cross-modal features of the three modalities are fused by direct concatenation and the dimension is reduced through a linear layer.

[0025] Furthermore, the calculation formula for calculating the interactive features of each modal temporal feature and the other two modal temporal features through the attention mechanism is:

[0026]

[0027] in, represents the interactive features of the text modality temporal features and the audio modality temporal features of the i-th sub-video, represents the interactive features of the text modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the text modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the video modality temporal features and the text modality temporal features of the i-th sub-video, represents the interactive features of the temporal features of the video modality and the temporal features of the audio modality of the i-th sub-video, Attention(.) represents the attention mechanism, Att-f ti represents the text modality temporal features of the i-th sub-video, Att-f ai represents the audio modality temporal features of the i-th sub-video, Att-f vi represents the video modality temporal features of the i-th sub-video;

[0028] The calculation formula for fusing the two interactive features of each modality through low-rank tensor fusion is:

[0029]

[0030] in, represents the cross-modal features of the text modality of the i-th sub-video, represents the cross-modal features of the audio modality of the i-th sub-video, represents the cross-modal features of the video modality of the i-th sub-video, and LMF(.) represents low-rank tensor fusion.

[0031] Furthermore, the calculation formula for obtaining the self-historical discourse feature by using the attention mechanism according to the first fusion feature of each sub-video and the speaker's own historical feature of the sub-video is:

[0032]

[0033] in, represents the self-historical discourse feature of the i-th sub-video, fuse i represents the first fusion feature of the i-th sub-video, represents the historical characteristics of the speaker of the i-th sub-video, and Attention(.) represents the attention mechanism;

[0034] The calculation formula for obtaining the historical discourse features of others by using the attention mechanism based on the first fusion feature of each sub-video and the historical features of others other than the speaker of the sub-video is:

[0035]

[0036] in, represents the historical discourse features of others in the i-th sub-video, Represents the historical features of others other than the speaker of the i-th sub-video.

[0037] Furthermore, the video file is segmented into speech units to obtain a plurality of sub-videos, each of which is marked with a speaker identifier corresponding to the sub-video, including the steps of:

[0038] The video file is segmented into utterances to obtain multiple sub-videos. The feature vector of each sub-video is input into the speaker classification auxiliary task module to obtain the speaker identification corresponding to each sub-video.

[0039] According to another aspect of the present invention, a fully end-to-end multimodal dialogue emotion recognition system is provided, comprising:

[0040] The dialogue video file upload module is used to obtain the video file in the dialogue scene;

[0041] The video speech segmentation module is used to segment the video file into speech units to obtain multiple sub-videos, each of which is marked with the speaker identifier corresponding to the sub-video;

[0042] An emotion recognition module, the emotion recognition module includes a feature extraction module, a first feature fusion module, a second feature fusion module and a prediction module;

[0043] A feature extraction module, for extracting video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video from each sub-video respectively;

[0044] A first feature fusion module, used to perform cross-modal fusion on the video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video to obtain a first fusion feature of each sub-video;

[0045] The second feature fusion module, according to the speaker identification of each sub-video, uses the attention mechanism to obtain the self-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of the speaker of the sub-video, uses the attention mechanism to obtain the other-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of others other than the speaker of the sub-video, and fuses the self-historical discourse feature and the other-historical discourse feature of each sub-video to obtain the second fusion feature;

[0046] The prediction module is used to output the emotion recognition result of each sub-video according to the second fusion feature of each sub-video.

[0047] In general, compared with the prior art, the above technical solution conceived by the present invention makes full use of the multimodal features and takes into account the speaker's own emotional changes and the emotional migration between speakers, which greatly improves the accuracy and robustness of emotion recognition, which is specifically reflected in the following aspects:

[0048] (1) The present invention makes full use of the features of the three modalities of text, voice and video, and adopts the segmented context modeling method to model the conversation sequence. By calculating the emotional relationship weights of the target speech's own historical speech and other people's historical speech, and fusing the calculated relationship features, the present invention can extract two types of conversation context emotional information, namely, the emotional changes within the speaker and the emotional migration between speakers.

[0049] (2) The present invention combines the advantages of multiple fusion methods to perform multimodal fusion. First, the interaction pairs of each modality are extracted through the Attention mechanism, then the interaction pairs of each modality are fused through LMF, and finally they are concat-joined as the final fusion feature, which fully considers the emotional features within the modality and the emotional association between the modalities.

[0050] (3) The present invention designs a speaker classification auxiliary task. During the training process, the model parameters are optimized through the sentiment classification task and the speaker auxiliary task. At the same time, the fully connected layer parameters of the discourse segmentation network are fine-tuned to help the discourse segmentation network more accurately identify the speaker identity, thereby reducing the error in distinguishing the self-historical discourse and the historical discourse of others when modeling the contextual time series.

[0051] (4) The present invention also uses a speaker segmentation network to segment the speech of the complete conversation video, realizing a complete task chain from the input of the conversation video to the output of the emotion prediction of each speech;

[0052] (5) The present invention also uses pre-trained models of various modalities to extract modal features, and fine-tunes the pre-trained models during the training process to obtain more effective emotional features. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 is a working principle diagram of a fully end-to-end multimodal conversation emotion recognition method according to an embodiment of the present invention;

[0054] Figure 2 is a network diagram of a fully end-to-end multimodal conversation emotion recognition method according to an embodiment of the present invention;

[0055] Figure 3 is a schematic diagram of a fully end-to-end multimodal conversation emotion recognition system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0057] In the description of the embodiments of the present application, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. "Multiple" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0058] Unless otherwise specified, "plurality" means two or more.

[0059] The terms "including" and "having" and any variations thereof in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or equipment comprising a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products or equipment.

[0060] The naming or numbering of the steps in the embodiments of the present invention does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The execution order of the named or numbered process steps can be changed according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.

[0061] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0062] The present invention provides a fully end-to-end multimodal dialogue emotion recognition method and system, which are described below respectively.

[0063] The working principle of a fully end-to-end multimodal conversation emotion recognition method according to an embodiment of the present invention is as follows: Figure 1 shown.

[0064] A fully end-to-end multimodal dialogue emotion recognition method according to an embodiment of the present invention includes steps 1 to 5.

[0065] Step 1: Obtain a video file in a dialogue scenario, segment the video file into utterances, and obtain multiple sub-videos, each of which is marked with a speaker identifier corresponding to the sub-video.

[0066] The dialogue video file Dialogue-Video and the dialogue audio file Dialogue-Audio are input into the speaker segmentation network AVR_Net to obtain the speaker speech segmentation information. The speech segmentation information obtained by AVR_Net can split the dialogue video file into independent speech video files Uttr-Video, also called sub-videos. For the AVR_Net network, the official API can be used. The API uses the AVR_Net network with pre-trained parameters loaded. The audio file Dialogue-Video can be extracted from the video file Dialogue-Video.

[0067] The obtained speaker utterance segmentation information includes: the start timestamp start, the end timestamp end and the speaker identifier speaker of each utterance, which can be expressed by the formula:

[0068] (Starts,Ends,Speakers,Fea)=AVR-Net(Dialogue-Audio,Dialogue-Video)

[0069] Among them, Starts represents the start timestamp of each utterance in the conversation video, Ends represents the end timestamp of each utterance in the conversation video, Speakers represents the speaker identifier of each utterance in the conversation video, and Fea represents the corresponding output feature of each utterance in the conversation video.

[0070] Furthermore, after the video file is segmented into utterances, multiple sub-videos, i.e., multiple utterances, are obtained. In order to help the utterance segmentation network to better classify the speaker, the output feature vector obtained by the utterance segmentation network can be input into the speaker classification auxiliary task module to obtain the classification prediction output. The speaker classification auxiliary task module consists of two fully connected layers, where the output feature dimension of the second layer represents the number of speakers in the conversation. If it is set to 2, it means a binary conversation, and the feature vector output corresponding to the i-th utterance is expressed by Fea. i It can be expressed by the formula:

[0071] speaker' i =argmax(softmax(Linear2(Linear1(Feai )))

[0072] Step 2: Extract the video modality temporal features, audio modality temporal features, and text modality temporal features from each sub-video respectively.

[0073] Step 2 includes sub-steps 2.1 to 2.3.

[0074] Step 2.1: Extract the corresponding audio file and text file from each sub-video respectively.

[0075] Specifically, the open source tool FFmpeg can be used to obtain the speech audio file of each speech video file, and the Baidu speech recognition open API can be used to obtain the text content of each audio file, which can be expressed by the formula:

[0076] Uttr-Audio i =FFmpeg(Uttr-Video i )

[0077] Uttr-Text i = Baidu-Aip(Uttr-Audio i )

[0078] Among them, Uttr-Video i Indicates the i-th sub-video, Uttr-Audio i Indicates the audio corresponding to the i-th sub-video, Uttr-Text i It represents the text corresponding to the ith sub-video, and Baidu-Aip() represents the open API through Baidu speech recognition.

[0079] In this way, the audio, text and video files of each utterance are obtained through the conversation video file. Next, the corresponding modal feature information of each utterance is extracted through the pre-trained models of each modality.

[0080] Step 2.2: Extract video features, audio features, and text features from each sub-video and its corresponding audio file and text file respectively.

[0081] Specifically, the RoBERTa pre-trained model can be used for text. RoBERTa (Robustlyoptimized BERT approach) is a pre-trained language model proposed by Facebook AI in 2019. The output feature obtained is the text feature f of the i-th sub-video ti , f ti The shape is (B, S1, D1), where B is the number of samples, S1 is the length of the text, and D1 is the hidden layer output dimension of the pre-trained model. It is expressed by the following formula:

[0082] f ti =RoBERTa(Uttr-Text i )

[0083] For audio, you can use the Wav2Vec2.0 pre-trained model. Wav2Vec 2.0 is a speech recognition model developed by Facebook AI Research (FAIR). The core idea of ​​Wav2Vec 2.0 is to learn the representation of speech signals through self-supervised learning methods. The output feature obtained is the audio feature f of the i-th sub-video. ai , f ai The shape is (B, S2, D2), where B is the number of samples, S2 is the audio length, and D2 is the hidden layer output dimension of the pre-trained model. It is expressed by the following formula:

[0084] f ai =Wav2Vec2(Uttr-Audio i )

[0085] For videos, the Swin Transformer pre-trained model can be used. Swin Transformer is a new type of visual Transformer proposed by Microsoft Research. The main idea of ​​Swin Transformer is to improve the traditional Transformer model to adapt to the characteristics of computer vision tasks. The output feature obtained is the video feature f of the i-th sub-video vi , f vi The shape is (B, S3, D3), where B is the number of samples, S3 is the number of video frames, and D3 is the hidden layer output dimension of the pre-trained model. It is expressed by the following formula:

[0086] f vi =SwinTransformer(Uttr-Video i )

[0087] Step 2.3: Perform discourse-level temporal modeling on the video features, audio features, and text features of each sub-video, and obtain the video modal temporal features, audio modal temporal features, and text modal temporal features of each sub-video.

[0088] Then, for each modality, a TransformerEncoder can be used to perform discourse-level temporal modeling, which can be expressed as follows:

[0089] Att-f ti = TransformerEncoder(f ti )

[0090] Att-f ai = TransformerEncoder(f ai )

[0091] Att-f vi = TransformerEncoder(f vi )

[0092] Among them, Att-f vi 、Att-f ai 、Att-f ti They are respectively the video modality temporal features, audio modality temporal features and text modality temporal features of the i-th sub-video.

[0093] You can take the special mark of the beginning word of the input <cls>Corresponding output.

[0094] A core challenge of conversation emotion recognition is how to understand and model the temporal relationship and contextual information in the conversation. The emotional state in the conversation is not only affected by the current speech, but also closely related to the previous communication history. The same sentence may express completely different meanings in different contexts. Similarly, for a given single speech, it is sometimes difficult to make an accurate emotional judgment on the speech without considering the context in which it is located. Therefore, conversation context temporal modeling is crucial for multimodal emotion recognition. At present, the mainstream methods of conversation context temporal modeling include: recurrent neural network (RNN), long short-term memory network (LSTM), gated recurrent unit (GRU), and graph convolutional network (GNN). However, traditional RNN faces some limitations in practical applications, especially when processing long sequence data. In the case of long sequences, RNN is prone to gradient vanishing or gradient exploding problems during back propagation, which makes it difficult for the network to learn long-distance dependencies. In addition, RNN usually has a fixed-size hidden state, which means that all information must be compressed into this state, which may lead to information loss. Traditional RNNs are usually unidirectional, and they can only capture contextual information from the front to the back, while for emotion recognition tasks, bidirectional context (i.e., considering the previous and the next context) is usually more important. Although this problem can be solved by bidirectional RNN (Bi-RNN), it still faces the limitations of other RNNs. Although the gating mechanism of LSTM is effective, it also makes the model calculation more complex and time-consuming. Each time step involves complex matrix operations, which may cause efficiency problems on long sequences and large-scale datasets; and although LSTM is designed to handle long-term dependency problems, in the case of extremely long sequences, even LSTM may find it difficult to capture all dependencies. Especially in emotion recognition tasks, emotional clues may be distributed throughout the conversation or text, and LSTM may still not be able to fully capture this scattered information. GRU is another improved RNN. The model structure of GRU is simpler than LSTM, and it requires fewer parameters, so the time cost of training and inference is lower; and like LSTM, GRU can also effectively solve the gradient disappearance and gradient explosion problems. However, since GRU simplifies the gating mechanism of LSTM, its memory capacity may not be as good as LSTM in some tasks; and GRU also needs to be calculated in chronological order and cannot be parallelized. GNN is not good at capturing this kind of linear temporal dependency because it is mainly used to capture non-serialized structural information. In addition, the conversation is dynamic, new sentences are constantly added, and the context of the conversation changes accordingly. GNN is more suitable for processing relatively static graph structures. For dynamically changing sequence data, GNN may not be flexible enough.At the same time, GNN updates the feature representation of nodes by aggregating the features of neighboring nodes. This mechanism may not be suitable for capturing the emotional dynamics in conversations, because the emotional state is not only affected by direct neighbors (i.e., previous and next sentences), but may also be affected by more distant sentences. This influence may not be effectively captured in the traditional structure of GNN.

[0095] Transformer is a neural network model based on the self-attention mechanism, which has achieved great success in the field of natural language processing (NLP). It abandons the structure of RNN and CNN and relies entirely on the self-attention mechanism for calculation. Transformer uses the self-attention mechanism to process sequence data, allowing the model to directly focus on elements at any position in the sequence, which enables it to capture long-distance dependencies and is very suitable for a comprehensive understanding of contextual information in sentiment recognition tasks. Unlike traditional RNN and GRU, Transformer allows data to be processed in parallel in the model, which greatly improves training efficiency, especially when dealing with large-scale data sets. The Transformer model can be easily extended to larger models and more complex tasks. For example, by increasing the number of layers and adjusting the model size, the expressiveness and performance of the model can be improved. RNN and GRU usually rely on local context, while Transformer can capture global context through the self-attention mechanism, which is very important for understanding the overall meaning and sentiment of the text. Its multi-head attention layer is composed of multiple self-attention layers, and the self-attention layer is the focus of the Transformer model. It is mainly composed of a scaled dot-product attention unit and a multi-headed attention mechanism, which can capture the attention scores of correlation coefficients between vectors in multiple dimensions. At the same time, Transformer does not require a fixed-length sequence input, which makes it more flexible to process text data of various lengths, which is very beneficial for diversified texts in emotion recognition tasks. Based on this, the present invention proposes a self-listener relation attention calculation module based on the Transformer's Attention mechanism to model the temporal relationship of the dialogue context, so as to fully extract the emotional information of the context.

[0096] Step 3: Perform cross-modal fusion on the video modality temporal features, audio modality temporal features, and text modality temporal features of each sub-video to obtain the first fusion features of each sub-video.

[0097] Specifically, step 3 may include steps 3.1 to 3.3.

[0098] Step 3.1: Calculate the interaction features of each modality’s temporal features and the other two modal temporal features through the attention mechanism.

[0099] The attention weights of cross-modal attention are calculated through the attention mechanism to obtain the interaction pairs of each modality with respect to the other two modalities. The cross-modal interaction pairs of the text modality are expressed by the following formula:

[0100]

[0101] The cross-modal interaction pair of speech modality is expressed by the following formula:

[0102]

[0103] The cross-modal interaction pair of visual modality is expressed by the following formula:

[0104]

[0105] in, represents the interactive features of the text modality temporal features and the audio modality temporal features of the i-th sub-video, represents the interactive features of the text modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the text modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the video modality temporal features and the text modality temporal features of the i-th sub-video, Represents the interactive features of the video modality temporal features and the audio modality temporal features of the i-th sub-video.

[0106] Step 3.2: Fuse the two interactive features of each modality through low-rank tensor fusion to obtain the cross-modal features of each modality.

[0107] It is expressed by the following formula:

[0108]

[0109] At this point, we have obtained the feature vectors of each modality that contain cross-modal information.

[0110] in, represents the cross-modal features of the text modality of the i-th sub-video, represents the cross-modal features of the audio modality of the i-th sub-video, represents the cross-modal features of the video modality of the i-th sub-video, and LMF(.) represents low-rank tensor fusion.

[0111] Step 3.3: The cross-modal features of the three modalities are fused by direct concatenation and the dimension is reduced by a linear layer.

[0112] It is expressed by the following formula:

[0113]

[0114] Among them, fuse i Represents the first fusion feature of the i-th sub-video.

[0115] In terms of multimodal fusion, currently, the commonly used methods of multimodal fusion include: direct splicing, gating mechanism fusion, low-rank tensor fusion, and graph convolution fusion. Direct splicing is the simplest multimodal fusion method. It directly splices feature vectors from different modalities together to form a comprehensive feature representation. It is simple to implement and has low computational cost. It retains the complete features of each modality and does not lose information due to the fusion process. However, it cannot automatically adjust the importance of different modal features and is easily affected by the imbalance of feature dimensions. It also ignores the interaction effect between modalities, which may lead to the loss of information on the interaction between features. The gating mechanism weights different modal features so that the model can focus on more important information. The gating mechanism can provide interpretability of model decisions through weight distribution. In this way, the weights of different modal features can be adaptively adjusted to strengthen important information and suppress unimportant information. However, when the number of modalities is large, the computational complexity of this method increases, which may lead to reduced efficiency. At the same time, a large amount of data is required for training in order to learn effective weight distribution. Low-rank tensor fusion captures the interaction between different modalities by constructing a low-rank tensor, aiming to reduce the number of parameters while retaining important interaction information. This method explicitly models the interaction between modalities and can capture richer feature combinations. Moreover, due to its low rank, it has relatively few parameters and high computational efficiency. However, tensor decomposition may lose some complex interaction information between modalities and is sensitive to the choice of tensor rank. The choice of rank needs to be determined through experiments and may require more parameter tuning. Graph convolutional networks aggregate and update node features by performing convolution operations on the nodes of the graph and propagating node information in the graph structure. Graph convolutional network fusion can capture the dependencies between nodes and has good generalization ability when processing graph structured data. It is suitable for situations where there is a clear relationship between modalities. However, current research shows that GCN is more suitable for data with obvious graph structure and may not be as direct and effective as other fusion methods in some multimodal tasks.

[0116] Compared with the cross-modal fusion in the existing patents, the cross-modal fusion proposed in the present invention extracts the interaction pair information of each modality about the other two modalities through the Attention mechanism, and then fuses the interaction pairs of each modality obtained through the LMF method, and finally splices them as the final fusion feature. By combining multiple fusion methods for multimodal fusion, the advantages of each fusion method can be fully utilized to effectively extract the emotional information within the modality and the emotional association between the modalities.

[0117] Step 4: According to the speaker identification of each sub-video, the attention mechanism is used to obtain the self-historical discourse feature based on the first fusion feature of each sub-video and the historical features of the speaker of the sub-video. The attention mechanism is used to obtain the other-historical discourse feature based on the first fusion feature of each sub-video and the historical features of others other than the speaker of the sub-video. The self-historical discourse feature and the other-historical discourse feature of each sub-video are fused to obtain the second fusion feature.

[0118] After obtaining the multimodal fusion feature vector, we start to model the conversation context temporal sequence. First, the self-history discourse relationship calculation part obtains the self-history discourse relationship weight by performing attention on the self-history discourse. It is expressed by the formula:

[0119]

[0120] represents the self-historical discourse feature of the i-th sub-video, fuse i represents the first fusion feature of the i-th sub-video, represents the historical features of the speaker of the ith sub-video, that is, the first fusion feature of the speaker history of the ith sub-video, and k represents the size of the historical discourse window.

[0121] Then, the calculation part of other people’s historical discourse relationship is to obtain the weight of other people’s historical discourse relationship by paying attention to other people’s historical discourse. It is expressed by the following formula:

[0122]

[0123] in, represents the historical discourse features of others in the i-th sub-video, Represents the historical features of others other than the speaker of the i-th sub-video, that is, the first fused features of the history of speakers other than the speaker of the i-th sub-video.

[0124] For example: Suppose a conversation has 5 utterances and there are two speakers, A and B. Please use examples to supplement the specific meaning of your own historical characteristics and their historical characteristics.

[0125] Assume that A said the 1st, 3rd, and 5th sentences, and B said the 2nd and 4th sentences. For the 5th sentence, k is 2, which indicates the size of the historical utterance window used. Then It represents the first fusion feature of the other person’s most recent two historical utterances. The fifth sentence was said by A, so the other person refers to B, which is the first fusion feature of the second and fourth sentences. The first fusion feature of the two most recent historical utterances representing the self, namely the first and third sentences.

[0126] If it is a three-way dialogue, for the three-way dialogue of A, B, and C, when the target discourse is what C said, then the k self-historical discourses are C's most recent k historical discourses, and the k other-historical discourses are the k most recent historical discourses of other people, including A and B.

[0127] Next, the historical discourse relationship information of the self and others is fused by direct splicing to obtain the fusion vector Att-fuse i , expressed by the formula:

[0128]

[0129] Step 5: Based on the second fusion feature Att-fuse of each sub-video i Output the emotion recognition result of each sub-video.

[0130] Finally, we get the conversation context fusion vector Att-fuse i Throw it into the linear classifier to get the final sentiment classification prediction y′ i , expressed by the formula:

[0131]

[0132] Among them, softmax(.) represents the Softmax function, argmax(.) represents the argmax function, Represents the parameter matrix of a linear layer. A linear layer can be represented by a matrix vector and an offset.

[0133] Figure 2 4 is a network diagram of a fully end-to-end multimodal conversation emotion recognition method according to an embodiment of the present invention.

[0134] The training process of the above network is described in detail below.

[0135] A training data sample set is obtained, wherein the sample set includes a conversation video file, a conversation audio file, and an emotion label y of each utterance in the conversation.

[0136] The training data sample set may include two data sample sets, namely, IEMOCAP and MELD, two public data sets; the IEMOCAP data sample set includes expression samples of six categories: happy, neutral, angry, excited, frustrated and sad; the MELD data sample set includes expression samples of seven categories: surprised, happy, neutral, angry, disgusted, fearful and sad.

[0137] Use the above steps 1 to 5 to obtain the sentiment classification prediction y′ i .

[0138] The speaker classification auxiliary task module and the emotion recognition module are trained as a whole, and the cross-entropy function is used as the loss function of the network. n represents the number of samples, represents the true emotion category, emotion-loss represents the emotion classification loss, and speaker-loss represents the speaker classification loss. Both losses are calculated by the cross-entropy loss function, and the calculation formulas are expressed as follows:

[0139]

[0140] In the formula, speaker i The true label of the speaker identification of the training sample, speaker′ i Denotes the predicted label of the speaker identity of the training sample, y i The true label of the speaker identification of the training sample, y′ i The predicted labels representing the speaker identity of the training examples.

[0141] The overall loss of the model is obtained by taking the weighted sum of the two, which can be expressed as follows:

[0142] loss=a*emotion-loss+b*speaker-loss

[0143] Furthermore, the value of a is set to 1, and the value of b is set to 0.1;

[0144] The algorithm of the present invention can achieve a maximum accuracy of 71.94% for six-category emotion classification in the IEMOCAP training sample data set, and a maximum accuracy of 68.08% for seven-category emotion classification in the MELD training sample data set, which is better than most mainstream models.

[0145] A fully end-to-end multimodal conversation emotion recognition system according to an embodiment of the present invention comprises a conversation video file uploading module, a video speech segmentation module and an emotion recognition module. The emotion recognition module comprises a feature extraction module, a first feature fusion module, a second feature fusion module and a prediction module.

[0146] The video speech segmentation module is used to segment the video file into speech units to obtain multiple sub-videos, each of which is marked with the speaker identifier corresponding to the sub-video;

[0147] An emotion recognition module, the emotion recognition module includes a feature extraction module, a first feature fusion module, a second feature extraction module and a prediction module;

[0148] A feature extraction module, for extracting video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video from each sub-video respectively;

[0149] A first feature fusion module, used to perform cross-modal fusion on the video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video to obtain a first fusion feature of each sub-video;

[0150] The second feature fusion module, according to the speaker identification of each sub-video, uses the attention mechanism to obtain the self-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of the speaker of the sub-video, uses the attention mechanism to obtain the other-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of others other than the speaker of the sub-video, and fuses the self-historical discourse feature and the other-historical discourse feature of each sub-video to obtain the second fusion feature;

[0151] The prediction module is used to output the emotion recognition result of each sub-video according to the second fusion feature of each sub-video.

[0152] The emotion recognition module can predict the emotion of each utterance in the complete conversation video file, and can also output the emotion change curve of each utterance. It can also output the emotion change curves of different speakers according to the speaker ID. Specifically, the voice, text and video file information of each utterance obtained above is input into the aforementioned end-to-end multimodal conversation emotion recognition network to obtain the emotion prediction output of each utterance, and the emotion change in the conversation is displayed in the form of a line graph.

[0153] Furthermore, a fully end-to-end multimodal conversation emotion recognition system may also include a speaker classification auxiliary task module for identifying the speaker identifier corresponding to each sub-video after speech segmentation.

[0154] The implementation principle and technical effect of the fully end-to-end multimodal conversation emotion recognition system are the same as the above-mentioned fully end-to-end multimodal conversation emotion recognition method, which will not be repeated here.

[0155] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.< / cls>

Claims

1. A fully end-to-end multimodal conversation emotion recognition method, characterized in that: Includes steps: Obtain a video file in a dialogue scenario, segment the video file into utterances, and obtain multiple sub-videos, each of which is marked with a speaker identifier corresponding to the sub-video; Extracting video modality temporal features, audio modality temporal features, and text modality temporal features of each sub-video from each sub-video respectively; Cross-modally fuse the video modality temporal features, audio modality temporal features, and text modality temporal features of each sub-video to obtain a first fused feature of each sub-video; According to the speaker identification of each sub-video, the attention mechanism is used to obtain the self-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of the speaker of the sub-video. The attention mechanism is used to obtain the other-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of others other than the speaker of the sub-video. The self-historical discourse feature and the other-historical discourse feature of each sub-video are fused to obtain the second fusion feature. The emotion recognition result of each sub-video is output according to the second fusion feature of each sub-video.

2. The fully end-to-end multimodal dialogue emotion recognition method according to claim 1, characterized in that: The step of extracting the video modality temporal features, the audio modality temporal features and the text modality temporal features of each sub-video from each sub-video comprises the following steps: Extracting the corresponding audio file and text file from each sub-video respectively; Extracting video features, audio features and text features from each sub-video and its corresponding audio file and text file respectively; The video features, audio features and text features of each sub-video are respectively modeled at the discourse level to obtain the video modal temporal features, audio modal temporal features and text modal temporal features of each sub-video.

3. The fully end-to-end multimodal dialogue emotion recognition method as claimed in claim 2, characterized in that: The extracting of video features, audio features and text features from each sub-video and its corresponding audio file and text file comprises the following steps: The RoBERTa pre-trained model is used to extract text features from the text files corresponding to each sub-video; The Wav2Vec2.0 pre-trained model is used to extract audio features from the audio files corresponding to each sub-video; The SwinTransformer pre-trained model is used to extract video features from each sub-video.

4. The fully end-to-end multimodal dialogue emotion recognition method as claimed in claim 2, characterized in that: TransformerEncoder is used to perform discourse-level temporal modeling on the video features, audio features, and text features of each sub-video.

5. The fully end-to-end multimodal dialogue emotion recognition method according to claim 1, characterized in that: The step of fusing the video modality temporal features, the audio modality temporal features and the text modality temporal features of each sub-video comprises the following steps: The interaction features between each modality’s temporal features and the other two modal temporal features are calculated through the attention mechanism to obtain two interaction features of each modality. The two interactive features of each modality are fused through low-rank tensor fusion to obtain the cross-modal features of each modality; The cross-modal features of the three modalities are fused by direct concatenation and the dimension is reduced through a linear layer.

6. The fully end-to-end multimodal dialogue emotion recognition method according to claim 1, characterized in that: The calculation formula for calculating the interactive features of each modal temporal feature and the other two modal temporal features through the attention mechanism is: in, represents the interactive features of the text modality temporal features and the audio modality temporal features of the i-th sub-video, represents the interactive features of the text modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the text modality temporal features of the i-th sub-video, represents the interactive features of the audio modality temporal features and the video modality temporal features of the i-th sub-video, represents the interactive features of the video modality temporal features and the text modality temporal features of the i-th sub-video, represents the interactive features of the temporal features of the video modality and the temporal features of the audio modality of the i-th sub-video, Attention(.) represents the attention mechanism, Att-f ti represents the text modality temporal features of the i-th sub-video, Att-f ai represents the audio modality temporal features of the i-th sub-video, Att-f vi represents the video modality temporal features of the i-th sub-video; The calculation formula for fusing the two interactive features of each modality through low-rank tensor fusion is: in, represents the cross-modal features of the text modality of the i-th sub-video, represents the cross-modal features of the audio modality of the i-th sub-video, represents the cross-modal features of the video modality of the i-th sub-video, and LMF(.) represents low-rank tensor fusion.

7. The fully end-to-end multimodal dialogue emotion recognition method according to claim 1, characterized in that: The calculation formula for obtaining the self-historical discourse feature by using the attention mechanism based on the first fusion feature of each sub-video and the speaker's own historical features of the sub-video is: in, represents the self-historical discourse feature of the i-th sub-video, fuse i represents the first fusion feature of the i-th sub-video, represents the historical characteristics of the speaker of the i-th sub-video, and Attention(.) represents the attention mechanism; The calculation formula for obtaining the historical discourse features of others by using the attention mechanism based on the first fusion feature of each sub-video and the historical features of others other than the speaker of the sub-video is: in, represents the historical discourse features of others in the i-th sub-video, Represents the historical features of others other than the speaker of the i-th sub-video.

8. The fully end-to-end multimodal dialogue emotion recognition method according to claim 1, characterized in that: The method of segmenting the video file into speech units to obtain a plurality of sub-videos, each of which is marked with a speaker identifier corresponding to the sub-video, comprises the following steps: The video file is segmented into utterances to obtain multiple sub-videos. The feature vector of each sub-video is input into the speaker classification auxiliary task module to obtain the speaker identification corresponding to each sub-video.

9. A fully end-to-end multimodal conversation emotion recognition system, characterized in that: include: The dialogue video file upload module is used to obtain the video file in the dialogue scene; The video speech segmentation module is used to segment the video file into speech units to obtain multiple sub-videos, each of which is marked with the speaker identifier corresponding to the sub-video; An emotion recognition module, the emotion recognition module includes a feature extraction module, a first feature fusion module, a second feature fusion module and a prediction module; A feature extraction module, for extracting video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video from each sub-video respectively; A first feature fusion module, used to perform cross-modal fusion on the video modality temporal features, audio modality temporal features and text modality temporal features of each sub-video to obtain a first fusion feature of each sub-video; The second feature fusion module, according to the speaker identification of each sub-video, uses the attention mechanism to obtain the self-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of the speaker of the sub-video, uses the attention mechanism to obtain the other-historical discourse feature according to the first fusion feature of each sub-video and the historical feature of others other than the speaker of the sub-video, and fuses the self-historical discourse feature and the other-historical discourse feature of each sub-video to obtain the second fusion feature; The prediction module is used to output the emotion recognition result of each sub-video according to the second fusion feature of each sub-video.

Citation Information

Patent Citations

  • Multi-mode dialogue emotion recognition method based on multi-model voting

    CN117407486A

  • Method and system for realizing dialogue emotion recognition based on dynamically extracting sub-dialogues

    CN117473091A

  • Dialogue sentiment analysis method based on graph attention mechanism multi-view perception

    CN117972512A

Cited By

  • Emotion recognition method based on multi-mode split attention fusion

    CN119559473A

  • Session track division method and device, electronic equipment and storage medium

    CN121545506A