A spatio-temporal domain joint-based dynamic electroencephalogram network emotion state recognition method
By constructing a dynamic emotion EEG network and combining a lightweight graph attention network and a deep graph convolutional network, the nonlinear complexity and scene adaptability problems of existing EEG emotion recognition technologies are solved, achieving efficient emotion state recognition and quantification output, and improving the accuracy and practicality of EEG emotion recognition.
Patent Information
- Application Number
- CN202611503351.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-24
AI Technical Summary
Existing EEG emotion recognition technologies are unable to fully characterize the nonlinear complexity of EEG signals, cannot effectively capture the dynamic changes in brain emotional information, and lack flexible processing solutions adapted to different application scenarios, resulting in insufficient recognition accuracy and practicality.
A dynamic EEG network-based emotion state recognition method based on spatiotemporal domain integration is adopted. By acquiring multi-channel EEG signals, a dynamic emotion EEG network is constructed. It combines a lightweight graph attention network with a simplified long short-term memory network or a deep graph convolutional network with a bidirectional long short-term memory network to achieve both real-time and offline processing modes. It captures the temporal and spatial dependencies of EEG signals and performs emotion classification or quantification intensity output.
It improves the accuracy and efficiency of emotion state recognition, adapts to the needs of different application scenarios, and achieves simultaneous capture of the temporal and spatial dependencies of dynamic emotion EEG networks, thereby enhancing the flexibility and practicality of emotion recognition.
Smart Images

Figure CN123147933A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of biomedical information technology, and in particular to a method for identifying emotional states based on a dynamic EEG network with spatiotemporal domain integration. Background Technology
[0002] Emotions play a crucial role in human-computer interaction, and their recognition enables computer systems to provide more humanized and intelligent services. Emotion recognition can be achieved through the identification of external expressions and internal signals. External expressions include behavioral signals such as facial expressions, verbal communication, and body posture; however, these non-physiological signals are often subject to noise and spoofing. In contrast, internal physiological signals, including electroencephalograms (EEGs) and electromyograms (EMGs), can directly reflect an individual's emotional state. Among these, EEG signals have the advantages of being non-invasive, easy to operate, and readily available for acquisition; therefore, increasing research focuses on using EEG signals for emotion recognition.
[0003] While significant progress has been made in EEG-based emotion recognition research, several bottlenecks remain in practical applications, including: Current mainstream time-domain and frequency-domain feature extraction methods for EEG emotion recognition struggle to fully capture the nonlinear complexity of EEG signals, resulting in insufficient feature descriptions; using CNNs as the primary EEG emotion recognition method requires image or vectorization of EEG signals, leading to the loss of original spatial structural information such as brain region connectivity and information flow between nodes, hindering the effective capture of brain region connections and information flow; more importantly, the brain's processing of emotional information is a complex process of dynamic interaction across multiple brain regions, with the collaborative patterns between different brain regions closely linked to an individual's emotional state. However, existing methods struggle to effectively capture the dynamic changes in this cognitive processing using EEG. Furthermore, current technologies are largely limited to discrete emotion classification, failing to achieve continuous quantitative description of emotion intensity and lacking flexible processing solutions adapted to different application scenarios—real-time interactive scenarios have stringent requirements for processing latency, while offline analysis scenarios prioritize recognition accuracy. A single processing mode cannot satisfy both needs, thus affecting the practicality and adaptability of emotion recognition. Summary of the Invention
[0004] Therefore, this application is proposed to address the problems and needs existing in the prior art. The purpose of this application is to provide a method for emotion state recognition based on a dynamic EEG network with spatiotemporal domain integration, capable of simultaneously capturing the temporal and spatial dependencies of dynamic emotion EEG networks, thereby improving the accuracy and efficiency of emotion state recognition based on dynamic EEG networks. This purpose is achieved through the following technical solution:
[0005] This application provides a method for identifying emotion states using dynamic EEG networks based on spatiotemporal domain integration, comprising the following steps:
[0006] Acquire multi-channel EEG signals and preprocess the EEG signals;
[0007] Frequency domain features of preprocessed EEG signals are extracted, and continuous EEG signals are divided into multiple dynamic EEG signal segments based on a sliding time window; for training data, an original emotion label is assigned to each dynamic EEG signal segment.
[0008] Based on preprocessed multi-channel EEG signal data, with EEG electrodes as nodes, extracted frequency domain features as node features, the connection relationship between electrodes as edges, and the connection strength between electrodes and the physical distance relationship between channels as edge weights, a dynamic emotion EEG network corresponding to each EEG segment is dynamically constructed based on a method including phase synchronization index and Euclidean distance relationship.
[0009] Using training data, the first dynamic graph representation learning framework in real-time processing mode and the second dynamic graph representation learning framework in offline processing mode were trained respectively to obtain emotion recognition models corresponding to the two modes. The first dynamic graph representation learning framework adopts a lightweight graph attention network and a simplified long short-term memory network, while the second dynamic graph representation learning framework adopts a deep graph convolutional network and a bidirectional long short-term memory network. Both frameworks have graph pooling modules based on self-attention mechanism and global response modules for local perturbations.
[0010] During the usage phase, the processing mode is determined based on the user-selected scenario configuration or the processing requirements automatically determined by the system. The real-time collected unlabeled EEG data is preprocessed, frequency domain features are extracted, EEG segments are divided, and a dynamic emotion EEG network is constructed. The data is then input into the corresponding pattern recognition model, and the emotion classification result or the continuous quantitative intensity value of the emotion is output according to the selected pattern or the user-preset output type.
[0011] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain synergy, the determination of the processing mode specifically involves: the system pre-defining at least one real-time scenario configuration and one offline scenario configuration, with each scenario configuration pre-associated with a processing mode; the user selects an option from the scenario configurations, and the system automatically maps it to the corresponding processing mode; or, the system collects the current available computing power, memory occupancy rate, and expected response latency threshold in real time, and automatically determines the processing mode after matching them with the preset conditions of each scenario configuration.
[0012] In the aforementioned method for emotion state recognition based on a dynamic EEG network with spatiotemporal domain integration, the dynamic construction of the dynamic emotion EEG network corresponding to each EEG segment includes:
[0013] For each EEG signal segment within a sliding window, the phase synchronization index between pairs of EEG channel signals is calculated using a weighted phase delay index to obtain the first EEG functional connectivity matrix.
[0014] Calculate the Gaussian kernel function of the Euclidean distance between EEG channels to obtain the second EEG functional connectivity matrix based on the spatial distance similarity between EEG signals;
[0015] The first EEG functional connectivity matrix and the second EEG functional connectivity matrix are fused to obtain the final adjacency matrix;
[0016] Based on the final adjacency matrix and the extracted frequency domain features of EEG signals, a temporally continuous multilayer dynamic functional connectivity graph network is constructed.
[0017] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain joint, the lightweight graph attention network of the first dynamic graph representation learning framework adopts two graph attention layers, each layer has 4 attention heads, and each attention head outputs a feature dimension of 16; the simplified long short-term memory network adopts a single-layer LSTM structure with 64 hidden units, retaining only the input gate, forget gate and output gate, and does not use stacked LSTM or bidirectional structure to ensure that the processing delay is less than the preset real-time response time threshold.
[0018] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain joint, the deep graph convolutional network of the second dynamic graph representation learning framework adopts two graph convolutional layers. Each layer aggregates the features of neighbor nodes by graph convolution operation and uses a learnable adjacency matrix to replace the fixed physical distance matrix. The bidirectional long short-term memory network simultaneously captures forward and backward temporal dependencies. The deep graph convolutional network and the bidirectional long short-term memory network are coupled by sharing graph structure information.
[0019] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain fusion, the graph pooling module adopts self-attention graph pooling, retains the top 50% of nodes according to their attention scores from high to low, and performs two downsampling operations in both the first and second dynamic graph representation learning frameworks. After each downsampling, the number of nodes is halved to achieve the stepwise fusion of multi-scale spatiotemporal features.
[0020] In the aforementioned dynamic EEG network emotion state recognition method based on spatiotemporal domain integration, the global response module for local perturbations is configured to: monitor the change in differential entropy features of each brain region in a preset target frequency band in real time; when the change in any brain region exceeds a preset dynamic threshold, the brain region is marked as a perturbation source; calculate the weighted phase delay exponent change rate between the perturbation source and the remaining brain regions to determine the set of affected brain regions; multiply the graph attention coefficients of the perturbation source and the affected brain regions by a gain factor greater than one, and the attention coefficients of the remaining brain regions are correspondingly attenuated; the preset target frequency band is a frequency band whose correlation with emotion exceeds a preset correlation threshold, including but not limited to the Gamma frequency band.
[0021] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain integration, the global response module of local perturbation is cascaded with the attention layer of the lightweight graph attention network or the deep graph convolutional network, so that the gain factor directly acts on the calculation process of attention weight, thereby realizing the real-time adjustment of global graph attention allocation by local brain region feature changes.
[0022] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain integration, the output type is determined as follows: when the selected mode is real-time processing mode, the default output is discrete emotion classification results; when the selected mode is offline processing mode, the default output is continuous quantized intensity values of two dimensions: pleasure and arousal; or, the user can preset the output type independently of the mode selection in the system interface.
[0023] In the above-mentioned dynamic EEG network emotion state recognition method based on spatiotemporal domain integration, the continuous quantitative intensity value of the emotion, including regression values of two dimensions: pleasure and arousal, is realized through an architecture composed of graph convolutional network, LSTM network and fully connected regression head.
[0024] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0025] This application constructs a dynamic graph representation learning framework by fusing graph convolutional networks and long short-term memory (LSTM) networks, and designs a dual-processing mode for real-time and offline processing, significantly improving the emotion recognition capability and scene adaptability of dynamic EEG networks. For different application needs, the real-time processing mode combines a lightweight graph attention network with a simplified LSTM to ensure processing latency is below a threshold, meeting the response requirements of real-time human-computer interaction scenarios. The offline processing mode combines a deep graph convolutional network with a bidirectional LSTM, enabling recognition accuracy to exceed the probability threshold and adapting to high-precision emotion analysis scenarios (clinical emotion assessment, psychological analysis, etc.). Graph networks are used to model the spatial connectivity of EEG electrodes, combined with LSTM to mine temporal dynamic patterns, simultaneously capturing the spatial and temporal dependencies of EEG signals, avoiding the loss of spatial structural information inherent in CNN-like methods. Adaptive attention adjustment is performed for signal mutations in local brain regions caused by emotions, conforming to the physiological laws of human brain emotional activation, enhancing feature effectiveness, and improving the ability to recognize complex emotions. Meanwhile, this application breaks through the limitations of traditional discrete classification. Through a combination architecture of graph convolutional network, LSTM and fully connected regression head, it realizes the output of emotion quantification intensity in two dimensions: pleasure and arousal. It can not only support clear emotion category judgment, but also accurately characterize the degree of continuous change of emotion.
[0026] Compared with traditional methods, this method achieves simultaneous capture of the temporal and spatial dependencies of dynamic emotion EEG networks. It not only solves the problems of insufficient characterization and loss of spatial structural information in traditional feature extraction methods, but also makes up for the shortcomings of existing methods in capturing dynamic changes of EEG, limited scene adaptation, and lack of emotion quantification capabilities. It significantly improves the accuracy, flexibility and practicality of emotion state recognition, and provides a brand-new technical approach and practical solution for the application of EEG emotion recognition technology in different scenarios. Attached Figure Description
[0027] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The accompanying drawings are used to provide a further understanding of the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof.
[0028] Figure 1 This is a schematic diagram illustrating the steps of a dynamic EEG network-based emotion state recognition method based on spatiotemporal domain integration, as provided in an embodiment of this application. Detailed Implementation
[0029] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only a part of the embodiments of this application, and this application is not limited to the exemplary embodiments described herein. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this invention.
[0030] Example 1
[0031] To address the problems existing in the prior art, this embodiment provides a dynamic EEG network-based emotion state recognition method based on spatiotemporal domain integration, such as... Figure 1 As shown, it includes steps S100-S500.
[0032] In step S100, multi-channel EEG signals are acquired and preprocessed.
[0033] Multichannel EEG signals can be obtained from the publicly available dataset DEAP (Dataset for Emotion Analysis using EEG, Physiological, and Video Signals). Multiple (32-channel in this example, 32-channel in this example, with equal numbers of males and females, and different ages, e.g., 19-37 years old) subjects were collected while watching multiple (e.g., 40) emotion-evoking videos, each with a predetermined duration (e.g., 60 seconds). Alternatively, a 32-lead BrainProducts EEG acquisition system (using 32 channels for 32-channel and 64 leads for 64-channel) system can be used to collect EEG signals from multiple (same as the publicly available DEAP dataset) subjects while watching emotion-evoking video clips (multiple (e.g., 40) segments, each with a predetermined duration (e.g., 60 seconds)) at a sampling rate of 1000Hz. The acquired EEG signals are then preprocessed.
[0034] The preprocessing of EEG signals includes: channel localization (removing channels with abnormal positions, such as channels with excessive impedance or invalid electrode channels with positional deviations), filtering (using a 0.1-45Hz bandpass filter (4th-order Butterworth filter) to remove low-frequency drift and high-frequency noise, and using a 50Hz notch filter to eliminate power line interference), downsampling (unifying the sampling rate of the DEAP dataset or 32 leads to 250Hz to reduce the amount of data computation), segmentation and baseline correction (segmenting the continuous EEG signal into 40 trials (60 seconds per trial) starting from the video start time, and using the resting state signal 1 or 2 seconds before the start of each trial as the baseline for correction), artifact removal (automatically identifying and removing artifacts such as electrooculography (EOG) and electromyography (EMG) using independent component analysis (ICA)), and rereference (using the whole-brain average reference method to calculate the mean of the 32 channel signals, subtracting the mean from each channel signal to eliminate the bias caused by the reference electrodes).
[0035] This step completes the acquisition and standardized preprocessing of raw EEG signals, eliminating noise and artifacts, and laying the foundation for subsequent feature extraction.
[0036] In step S200, the frequency domain features of the preprocessed EEG signal are extracted, and the continuous EEG signal is divided into multiple dynamic EEG signal segments based on a sliding time window; wherein, for the training data, an original emotion label is assigned to each dynamic EEG signal segment.
[0037] Specifically, step S200 includes:
[0038] Determine the length T of the sliding time window (ranging from 2 to 4 seconds; in this example, T = 2 seconds is used, corresponding to 250Hz * 2 = 500 data points) and the window overlap range m (taking half of T; in this example, m = 1 second is used).
[0039] Based on the sliding time window length T and the overlap range m, the preprocessed EEG signal in step S100 is divided into N (a complete trial is 60 seconds, that is, it is divided into N=59 segments) continuous and overlapping dynamic EEG signal segments.
[0040] When EEG signals are used as training data, each dynamic EEG signal segment is assigned its corresponding original EEG emotion label (each dynamic EEG signal segment inherits the emotion label of its respective experimental trial, labeled using a dimensional model, including two dimensions: valence (pleasure level, 1-9 points, low=1-4, high=5-9) and arousal (low=1-4, high=5-9) (using a 9-point self-rating scale), ultimately divided into 4 discrete emotion categories: high Valence-high Arousal, high Valence-low Arousal, low Valence-high Arousal, and low Valence-low Arousal); in the actual application stage, unlabeled data is used, only segmentation is performed, and no emotion labels are assigned.
[0041] For each 2-second dynamic EEG signal segment, a short-time Fourier transform was performed using a Hanning window (window length 256 points, step size 128 points) to decompose it into five different frequency bands: Delta (1-4Hz), Theta (4-8Hz), Alpha (8-13Hz), Beta (13-30Hz), and Gamma (30-45Hz). Frequency domain features, including EEG signal differential entropy (DE) features and power spectral density (PSD) features, were extracted for each frequency band to capture the frequency domain information of EEG emotional signals.
[0042] The formula for calculating differential entropy (DE) is as follows:
[0043] ;
[0044] In the above formula, It is a random variable (a segment of EEG signal in a specific frequency band). For random variables The probability density function, To support centralized elements ( (elements in a set greater than 0);
[0045] For those following a Gaussian distribution The formula for calculating the differential entropy of EEG signals is:
[0046] ;
[0047] In the above formula, For random variables Mean (the average amplitude or energy level of the EEG signal in that frequency band) For random variables Variance (the degree of fluctuation of the EEG signal in this frequency band);
[0048] The formula for calculating power spectral density (PSD) is:
[0049] ;
[0050] In the formula, N is the number of sampling points (N consecutive sampling points are extracted from this segment of EEG signal for power spectrum analysis), and i is the index variable. Let be the amplitude of the EEG signal at the i-th sampling point, j be the imaginary unit used to construct the complex form of the Fourier transform; w be the frequency index (different values of w correspond to different frequency components).
[0051] Ultimately, each channel generates 10 features (5 frequency bands) per time segment. (2 features / bands); for a 32-channel segment, the dimension of its node feature matrix is 32. 10. Standardize each feature dimension, for example, by using Z-score standardization, to eliminate the impact of differences in the units and ranges of different features.
[0052] Next, in step S300, based on the preprocessed multi-channel EEG signal data, in order to extract more emotional information from the EEG signals, the EEG electrodes are used as nodes in the network (the 32 EEG channels are defined as the 32 nodes in the diagram), and the extracted frequency domain features (DE features and PSD features) are used as the features of the EEG network nodes (i.e., using the 32 features extracted in the previous step). A 10-dimensional feature matrix is used as the feature vector of the node. The connection relationship between electrodes is used as the edge of the network. The connection strength between electrodes and the physical distance relationship between channels are used as the weight of the network edge. Based on the method including phase synchronization index and Euclidean distance relationship, a dynamic emotion EEG network corresponding to each EEG segment is dynamically constructed.
[0053] Specifically, the dynamic construction of a dynamic emotional EEG network corresponding to each EEG segment includes:
[0054] For each 2-second EEG signal segment within a sliding window, the phase synchronization index between pairs of EEG channels is calculated using the weighted phase delay index (wPLI) at each time-frequency point. This transforms the EEG signal segment data into a corresponding brain network connectivity matrix. The weighted phase delay index (wPLI) represents the functional connectivity strength between EEG signals from different brain regions. Then, a threshold (95th percentile threshold, retaining the top 5% of connections by wPLI value and setting the rest to 0) is used to binarize the weighted phase delay index, yielding the first EEG functional connectivity matrix. (32) (a symmetric matrix of size 32); where the weighted phase delay index wPLI is calculated using the following formula:
[0055]
[0056] In the above formula, N is the number of data points (the number of sampling points within the sliding window, N=T). f, T are the sliding window lengths, f is the sampling rate (N=500 after downsampling), and k is the data point index. For signal The imaginary part (i.e., the signal at the kth sampling point) (The imaginary part of the Fourier transform), sign is the sign function. If the phase difference between the EEG signals is positive, the sign function value is 1; if the phase difference between the EEG signals is negative, the sign function value is -1; if the phase difference between the EEG signals is 0, the sign function value is 0; x and y represent different EEG channels. , The phases of EEG channels x and y at the k-th data point are respectively (calculated by Fourier transform); for each frequency band of each segment, the phase signals of 32 channels are extracted by Hilbert transform;
[0057] Following the 10-20 international standard lead system, the location information of the EEG channels is mapped onto a three-dimensional spatial coordinate system, and a second EEG functional connectivity matrix based on the spatial distance similarity between EEG signals is calculated. A second EEG functional connectivity matrix based on spatial distance similarity between EEG signals. The calculation is mainly performed by calculating the Gaussian kernel function of the Euclidean distance between brainwave channels, as shown in the following formula:
[0058]
[0059] In the above formula, m and n are EEG channel indices. Let be the Euclidean distance between channels m and n. (The bandwidth or scaling parameter of the Gaussian kernel function is set to 0.2 times the average distance between electrodes.) (Distance threshold; when the distance exceeds this threshold, the connection weight is 0. In this embodiment, the value is 80% of the maximum physical distance between the electrodes.) It is a natural exponential function;
[0060] EEG function connection matrix and Linear fusion, which simultaneously incorporates functional and structural information, yields an adjacency matrix. , , The fusion coefficient is set to 0.7.
[0061] Define the feature dimension of EEG signals as C (10-dimensional), based on the EEG signal features extracted in step S200. ( For set The nth element in the matrix represents the feature matrix of a specific "segment" of the EEG signal. The set of real numbers is represented by M, where M is the number of channels (e.g., 32 channels in this example); N is the number of segments into which the EEG signal is divided (N=59 in this example) and the functional connectivity matrix. ( For set The nth functional connectivity matrix (adjacency matrix) is used to construct the EEG dynamic functional connectivity graph network (where M is the number of channels and N is the number of "segments" into which the EEG signal is divided). (Multi-layered (corresponding to 59 EEG signal segments) dynamic emotional EEG network, each layer being a set of 5 frequency band sub-graphs corresponding to the segment), the formula is as follows:
[0062] ;
[0063] In the above formula, V represents the set of N EEG channels. N represents the number of EEG channels, with a value of 32 (corresponding to 32 leads); E represents the connection relationship between the electrodes. The set of feature vectors of the nodes. The set of eigenvectors of the edges;
[0064] In step S400, using training data, the first dynamic graph representation learning framework in real-time processing mode (low latency, adapted to real-time human-computer interaction scenarios) and the second dynamic graph representation learning framework in offline processing mode (high accuracy, adapted to offline analysis and precise evaluation scenarios) are trained respectively to obtain emotion recognition models corresponding to the two modes (multi-layer dynamic graph networks and corresponding emotion labels are input into the two frameworks, iterative training and parameter tuning are performed, and after convergence, the real-time pattern recognition model and the offline pattern recognition model are saved respectively); wherein, the first dynamic graph representation learning framework adopts a lightweight graph attention network and a simplified long short-term memory network, and the second dynamic graph representation learning framework adopts a deep graph convolutional network and a bidirectional long short-term memory network, and both frameworks are equipped with a graph pooling module based on a self-attention mechanism and a global response module for local perturbation (to realize multi-scale feature fusion and global adaptive adjustment of local brain region perturbation).
[0065] The first dynamic graph represents the lightweight graph attention network of the learning framework, which adopts two graph attention layers, each with four attention heads. Each attention head outputs a feature dimension of 16. The two-layer structure aggregates the features of adjacent nodes layer by layer, retaining only the core spatial association information and reducing computational overhead. The simplified long short-term memory network adopts a single-layer LSTM structure with 64 hidden units. The structure is pruned and optimized: the three core gates of the standard LSTM are retained: input gate, forget gate, and output gate. Stacked LSTM or bidirectional structure is not used, which greatly reduces the amount of temporal computation. The overall framework computation time is less than the preset real-time response time threshold, meeting the requirements of real-time human-computer interaction.
[0066] The second dynamic graph representation learning framework employs a deep graph convolutional network with two graph convolutional layers to enhance spatial feature mining capabilities. Each layer aggregates neighbor node features through graph convolution operations, fully learning spatial dependencies between brain regions. A learnable adjacency matrix replaces the fixed physical distance matrix, and the matrix parameters are dynamically optimized during model training to adapt to the EEG connectivity patterns of different subjects and under different emotions, resulting in stronger feature representation capabilities. The bidirectional long short-term memory network simultaneously captures forward temporal dependencies (forward evolution of signals over time) and backward temporal dependencies (reverse influence of historical signals on the current state), fully mining dynamic temporal features of EEG. The deep graph convolutional network and the bidirectional long short-term memory network are coupled through shared graph structure information, deeply fusing spatial and temporal features to avoid feature fragmentation.
[0067] The graph pooling module employs self-attention graph pooling, sorting nodes by their attention scores from highest to lowest. In each round of downsampling, the top 50% of nodes are retained, while low-attention nodes are discarded. Furthermore, two downsampling operations are performed in both the first and second dynamic graph representation learning frameworks, halving the number of nodes after each downsampling (first downsampling: original 32 nodes → retained 16 nodes; second downsampling: 16 nodes → retained 8 nodes). Through these two progressive downsampling operations, multi-scale spatiotemporal feature fusion of EEG signals is achieved: shallow nodes correspond to detailed features of local brain regions, while deep nodes correspond to comprehensive features of global brain regions, balancing detailed and global information and improving model robustness.
[0068] In this network, the input, hidden state, and unit memory are all graph structures, and the state is updated through input gates, forget gates, and output gates that contain graph structure information.
[0069] The components of a Long Short-Term Memory (LSTM) network are represented as follows:
[0070] Input Gate: In the formula, The input gate output is at time t. For activation function, This is the weight matrix for the graph convolution at the current time step. For graph convolution operations, Let be the EEG network feature matrix at time t. To The prediction / estimation results (the predicted EEG network matrix output by the model). The "current EEG network features" learned by the model The connection weights between the input gate and the input gate The number of hidden units skipped. The hidden state of the LSTM at time tp. This is the bias term for the input gate;
[0071] Forgotten Gate: In the formula, The output of the forget gate at time t. This is the weight matrix of the current EEG network features. The "adaptive weight matrix" represents the historical hidden states. This is the bias term for the forget gate; the meanings of the other parameters are the same as those in the input gate.
[0072] Output gate: In the formula, The output of the gate at time t is the output of the gate. This is the weight matrix of the current EEG network features. The "adaptive weight matrix" represents the historical hidden states. This is the bias term for the output gate;
[0073] Input modulation: In the formula, Let be the intermediate feature matrix after graph convolution and activation at time t, and let ReLU be the linear rectified function. This is the graph convolution weight matrix of the current EEG network features. The graph convolution weight matrix represents the historical hidden states. This is a bias term used to adjust the output offset after graph convolution and linear transformation, thereby improving the model's ability to fit the distribution of EEG data.
[0074] Memory cells: In the formula, The state of the memory cells (cell state matrix) is updated at time t. The hyperbolic tangent activation function is used. Let be the output matrix of the input gate at time t. Let be the intermediate feature matrix after graph convolution and activation at time t. Let be the forget gate output matrix at time t. The state of the historical memory cell at time tp;
[0075] Output: In the formula, Let be the LSTM hidden state at time t. The output of the gate at time t is the output of the gate. The memory cell state (cell state matrix) is updated at time t; using Cell state To perform nonlinear enhancement (highlighting the differences in EEG network characteristics), use an output gate. Information filtering (retaining only brain region connectivity information crucial to the current task) is performed, ultimately generating... It is an EEG feature that includes both long-term memory and current task focus, and can be used for emotion recognition (input classifier, to determine the current emotional state).
[0076] Finally, in step S500, during the usage phase, the processing mode (real-time processing mode or offline processing mode) is determined according to the user-selected scenario configuration or the processing requirements automatically determined by the system. The unlabeled EEG data collected in real time is preprocessed, frequency domain features are extracted, EEG segments are divided, and a dynamic emotion EEG network is constructed. The data is then input into the recognition model of the corresponding mode, and the emotion classification result or the continuous quantitative intensity value of the emotion is output according to the selected mode or the output type preset by the user.
[0077] Specifically, determining the processing mode involves: the system pre-defining at least one real-time scenario configuration and one offline scenario configuration, with each scenario configuration pre-associated with a processing mode; the user selecting one of the scenario configurations, and the system automatically mapping it to the corresponding processing mode; or, the system collecting the current available computing power, memory usage, and expected response latency threshold in real time, matching them with the preset conditions of each scenario configuration, and automatically selecting the optimal processing mode.
[0078] The output type is determined as follows: when the selected mode is real-time processing mode, the default output is discrete emotion classification results. The model is connected to a Softmax classifier, which outputs the predicted probabilities of four emotion categories. The maximum probability is taken as the final emotion classification result. When the selected mode is offline processing mode, the default output is continuous quantitative intensity values of two dimensions: pleasure and arousal, to achieve refined emotion assessment. Alternatively, the user can preset the output type independently of the mode selection in the system interface (manually preset output type, unaffected by the processing mode).
[0079] The continuous quantitative intensity value of emotion, including regression values of two dimensions: pleasure and arousal, is implemented through an architecture consisting of a graph convolutional network, an LSTM network, and a fully connected regression head.
[0080] Example 2
[0081] The global response module for local perturbations is configured to: monitor the change in differential entropy characteristics of each brain region in a preset target frequency band in real time; when the change in any brain region exceeds a preset dynamic threshold, mark the brain region as a perturbation source; calculate the weighted phase delay exponent change rate between the perturbation source and the other brain regions to determine the set of affected brain regions; multiply the graph attention coefficients of the perturbation source and the affected brain regions by a gain factor greater than one, and correspondingly reduce the attention coefficients of the other brain regions; the preset target frequency band is a frequency band whose correlation with emotion exceeds a preset correlation threshold, including but not limited to the Gamma frequency band.
[0082] When the brain experiences emotional fluctuations, signals in local brain regions undergo abrupt changes (local perturbations), which then spread throughout the entire brain via neural connections. This application sets up a global response module specifically to capture this physiological characteristic and adjust graph attention weights in real time. Target frequency band: Selects frequency bands with a correlation to emotions exceeding a preset threshold; in this embodiment, the Gamma frequency band is preferentially selected (as it has the strongest correlation with emotional activation). Monitoring object: Real-time monitoring of the differential entropy characteristic changes of all brain regions in the Gamma frequency band. Perturbation source determination: When the differential entropy change of any brain region exceeds a preset dynamic threshold, that brain region is marked as a perturbation source, and the module activates the global response logic.
[0083] The complete global response calculation process is as follows: Step 1, calculate the correlation range: calculate the rate of change of the weighted phase delay index (wPLI) between the perturbation source brain region and all other brain regions (calculate the difference of the weighted phase delay index of the current window relative to the previous window, divide by the time interval to obtain the rate of change), and delineate the set of affected brain regions according to the magnitude of the rate of change (the higher the rate of change, the stronger the impact of the perturbation); Step 2, adjust the attention coefficient: set a fixed gain factor greater than 1: for the perturbation source brain region + affected brain regions: graph attention coefficient × gain factor, increase the weight ratio of the nodes in this part; for other unperturbed brain regions: the attention coefficient is correspondingly reduced to reduce the interference of invalid information.
[0084] The global response module for local perturbation is cascaded with the attention layer of the lightweight graph attention network or deep graph convolutional network (connected after the attention layer of the graph attention network / deep graph convolutional network), so that the gain factor and attenuation coefficient directly affect the real-time calculation process of attention weights without the need for an additional intermediate layer; thereby realizing the real-time adjustment of global graph attention allocation based on changes in local brain region features, accurately focusing on emotion-related brain region activities, and significantly improving the recognition accuracy under complex emotions.
[0085] The training and optimization of the first and second dynamic graph representation learning frameworks specifically includes:
[0086] S410. Data Preparation: The extracted emotional features are used as input data for the graph neural network. Different emotional states are labeled with corresponding category labels or continuous value labels. (The EEG data of multiple test subjects are randomly divided into training, validation, and test sets at a ratio of 75%, 15%, and 10%, respectively, with a sample size of 40 trials for each test subject.) 59 segments = 2360, training set sample size is 24 2360; Feature extraction and emotional state labeling were performed on the data (the four emotional labels (HVHA, HVLA, LVHA, LVLA) were converted into 4-dimensional vectors using One-Hot encoding, and the continuous value labels directly adopted the original scores of pleasure and arousal); Data partitioning followed the principle of subject independence, that is, all data samples of the same test subject only appeared in one of the training set, validation set or test set to avoid data leakage).
[0087] S420. Model Training and Optimization: Using labeled training data, the first dynamic graph representation learning framework and the second dynamic graph representation learning framework are trained separately. Optimization algorithms such as stochastic gradient descent, Adam, or mini-batch training are used to adjust network parameters (e.g., using the Adam optimizer, with a learning rate of 0.001 and a batch size of 32). The goal is to minimize the loss function (cross-entropy loss function for classification tasks and mean squared error loss function for regression tasks). An early stopping strategy is adopted during training. Training is stopped when the validation set loss does not decrease for 10 consecutive rounds to avoid overfitting, improve the accuracy of emotion recognition, and continuously optimize network performance.
[0088] S430. Model Evaluation and Tuning: During training, the model performance is comprehensively evaluated using four evaluation metrics, including accuracy, confusion matrix, recall, and F1 score (performance is evaluated separately on the test set for classification and regression tasks; this application achieves superior recognition performance compared to traditional methods on the arousal classification task). Based on the evaluation results, the network structure, hyperparameters (such as sliding window length, overlap duration, Gaussian kernel parameters, learning rate, fusion coefficient, number of attention heads, etc.), and training strategies of the dynamic graph representation learning framework are adjusted and optimized.
[0089] The hyperparameters mentioned above, such as the sliding window length T, overlap range m, Gaussian kernel parameter θ, fusion coefficient λ, number of network layers, and learning rate, are illustrative examples and are not intended to limit this application. Their optimal values can be determined on the validation set using hyperparameter optimization techniques such as grid search, random search, or Bayesian optimization.
[0090] The basic principles of this application have been described above with reference to specific embodiments. It should be understood that the specific details disclosed above are for illustrative and illustrative purposes only, and are not intended to limit the scope of protection of this invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for identifying emotion states using dynamic EEG networks based on spatiotemporal domain integration, characterized in that, Includes the following steps: Acquire multi-channel EEG signals and preprocess the EEG signals; Frequency domain features of preprocessed EEG signals are extracted, and continuous EEG signals are divided into multiple dynamic EEG signal segments based on a sliding time window; for training data, an original emotion label is assigned to each dynamic EEG signal segment. Based on preprocessed multi-channel EEG signal data, with EEG electrodes as nodes, extracted frequency domain features as node features, the connection relationship between electrodes as edges, and the connection strength between electrodes and the physical distance relationship between channels as edge weights, a dynamic emotion EEG network corresponding to each EEG segment is dynamically constructed based on a method including phase synchronization index and Euclidean distance relationship. Using training data, the first dynamic graph representation learning framework in real-time processing mode and the second dynamic graph representation learning framework in offline processing mode were trained respectively to obtain emotion recognition models corresponding to the two modes. The first dynamic graph representation learning framework adopts a lightweight graph attention network and a simplified long short-term memory network, while the second dynamic graph representation learning framework adopts a deep graph convolutional network and a bidirectional long short-term memory network. Both frameworks have graph pooling modules based on self-attention mechanism and global response modules for local perturbations. During the usage phase, the processing mode is determined based on the user-selected scenario configuration or the processing requirements automatically determined by the system. The real-time collected unlabeled EEG data is preprocessed, frequency domain features are extracted, EEG segments are divided, and a dynamic emotion EEG network is constructed. The data is then input into the corresponding pattern recognition model, and the emotion classification result or the continuous quantitative intensity value of the emotion is output according to the selected pattern or the user-preset output type.
2. The method as described in claim 1, characterized in that, The determination of the processing mode specifically involves: the system pre-defining at least one real-time scenario configuration and one offline scenario configuration, with each scenario configuration pre-associated with a processing mode; the user selects one of the scenario configurations, and the system automatically maps it to the corresponding processing mode; or, the system collects the current available computing power, memory usage rate, and expected response latency threshold in real time, and automatically determines the processing mode after matching them with the preset conditions of each scenario configuration.
3. The method as described in claim 1, characterized in that, The dynamic construction of the dynamic emotion EEG network corresponding to each EEG segment includes: For each EEG signal segment within a sliding window, the phase synchronization index between pairs of EEG channel signals is calculated using a weighted phase delay index to obtain the first EEG functional connectivity matrix. Calculate the Gaussian kernel function of the Euclidean distance between EEG channels to obtain the second EEG functional connectivity matrix based on the spatial distance similarity between EEG signals; The first EEG functional connectivity matrix and the second EEG functional connectivity matrix are fused to obtain the final adjacency matrix; Based on the final adjacency matrix and the extracted frequency domain features of EEG signals, a temporally continuous multilayer dynamic functional connectivity graph network is constructed.
4. The method as described in claim 1, characterized in that, The first dynamic graph represents the lightweight graph attention network of the learning framework, which uses two graph attention layers, each with four attention heads, and each attention head outputs a feature dimension of 16. The simplified long short-term memory network uses a single-layer LSTM structure with 64 hidden units, retaining only the input gate, forget gate, and output gate, without using stacked LSTM or bidirectional structures, to ensure that the processing latency is less than the preset real-time response time threshold.
5. The method as described in claim 1, characterized in that, The second dynamic graph representation learning framework uses a deep graph convolutional network with two graph convolutional layers. Each layer aggregates the features of neighboring nodes through graph convolution operations and uses a learnable adjacency matrix instead of a fixed physical distance matrix. The bidirectional long short-term memory network simultaneously captures forward and backward temporal dependencies. The deep graph convolutional network and the bidirectional long short-term memory network are coupled by sharing graph structure information.
6. The method as described in claim 1, characterized in that, The graph pooling module adopts a self-attention graph pooling method, retaining the top 50% of nodes according to their attention scores from high to low. It performs two downsampling operations in both the first and second dynamic graph representation learning frameworks, halving the number of nodes after each downsampling, in order to achieve the stepwise fusion of multi-scale spatiotemporal features.
7. The method as described in claim 1, characterized in that, The global response module for local disturbances is configured to: monitor the change in differential entropy characteristics of each brain region in a preset target frequency band in real time, and mark the brain region as a disturbance source when the change in any brain region exceeds a preset dynamic threshold. Calculate the weighted phase delay exponential change rate between the perturbation source and the remaining brain regions to determine the set of affected brain regions; The graph attention coefficients of the disturbance source and the affected brain region are multiplied by a gain factor greater than one, and the attention coefficients of the remaining brain regions are correspondingly attenuated; the preset target frequency band is a frequency band whose correlation with emotion exceeds a preset correlation threshold, including but not limited to the Gamma frequency band.
8. The method as described in claim 7, characterized in that, The global response module for local perturbation is cascaded with the attention layer of the lightweight graph attention network or the deep graph convolutional network, so that the gain factor directly affects the calculation of attention weights, thereby realizing real-time adjustment of global graph attention allocation based on changes in local brain region features.
9. The method as described in claim 1, characterized in that, The output type is determined as follows: when the selected mode is real-time processing mode, the default output is discrete emotion classification results; when the selected mode is offline processing mode, the default output is continuous quantitative intensity values of two dimensions: pleasure and arousal; or, the user can preset the output type independently of the mode selection in the system interface.
10. The method as described in claim 1, characterized in that, The continuous quantitative intensity value of the emotion, including regression values of two dimensions: pleasure and arousal, is implemented through an architecture consisting of a graph convolutional network, an LSTM network, and a fully connected regression head.
