Small sample eeg emotion recognition method, system and storage device based on timing diffusion enhancement and long sequence bidirectional feature extraction
Patent Information
- Application Number
- CN202510643702.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2045-05-19
AI Technical Summary
[0006]本发明要解决的技术问题是现有脑电情绪识别技术在小样本场景下存在的数据增强效果有限、时序特征提取不全面、类别不平衡影响显著等问题,提供一种能够有效保持时序相关性、增强数据多样性、兼顾长短期特征提取能力,并动态平衡类别样本贡献度的脑电波小样本情绪识别方法,以提升模型在小样本条件下的分类精度
时序增强型 DDIM 方法的针对性突破:通过设计基于全连接层的简化 UNet 架构替代传统卷积结构,并将时间步嵌入与 EEG 信号特征维度进行非线性耦合,实现了扩散模型对非图像表格型时序数据的高效适配。传统卷积结构在处理脑电信号这类一维时序数据时存在结构冗余和特征提取不匹配的问题,而全连接层架构能直接针对脑电信号的序列特性进行特征学习;时间步嵌入的非线性耦合机制,使得模型在正向扩散和反向去噪过程中能够精准捕捉并保持脑电信号的时序相关性。由此,该方法在有效增强数据多样性的同时,避免了因数据增强导致的时序信息丢失,为后续的特征提取模块提供了更丰富且时序特征完整的训练样本,为整体模型性能提升奠定基础。
Smart Images

Figure CN120611235B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of emotion recognition technology, and more specifically, to a small-sample EEG emotion recognition method, system, and storage device based on temporal diffusion enhancement and long-sequence bidirectional feature extraction. Background Technology
[0002] Electroencephalography (EEG), as an important physiological indicator reflecting human emotional states, has broad application prospects in fields such as mental health monitoring, human-computer interaction, and neurofeedback therapy. The core of emotion recognition lies in accurately extracting key features representing emotional states from non-stationary, low signal-to-noise ratio EEG temporal data. However, emotion recognition technology in small-sample scenarios has become a research challenge in this field due to problems such as scarce training data, uneven class distribution, and complex temporal features.
[0003] Traditional EEG emotion recognition methods primarily rely on manually designed feature engineering, such as statistical features like power spectral density and differential entropy, combined with machine learning models like Support Vector Machines (SVM) and Random Forests for classification. However, these methods suffer from limited feature representation capabilities and insufficient generalization performance, making them ill-suited for complex emotion classification needs in small-sample scenarios. With the development of deep learning technology, methods based on Convolutional Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and their variants have been widely applied to EEG temporal feature extraction. While CNNs can capture local spatial features, their ability to model long-distance temporal dependencies is weak; unidirectional RNNs and their improved models (such as LSTM and GRU) can handle temporal data, but they suffer from the vanishing gradient problem in long-sequence feature extraction and struggle to effectively integrate bidirectional temporal information. Furthermore, existing methods generally face problems of insufficient data diversity and model overfitting in small-sample scenarios, especially when the distribution of samples from different emotion categories is uneven, the model tends to favor the majority class, leading to a significant decrease in minority class recognition accuracy.
[0004] In recent years, diffusion models have demonstrated powerful data augmentation capabilities in generative tasks. However, their traditional architectures (such as convolution-based UNet) are primarily designed for image data. When directly applied to non-image, tabular time-series data such as EEG, they suffer from poor structural adaptability and insufficient modeling of temporal correlations. How to combine the generative advantages of diffusion models with the characteristics of EEG time-series data to achieve effective data augmentation in small-sample scenarios remains a pressing technical challenge. Furthermore, EEG signals possess the dual characteristics of long-term discontinuity and short-term continuity (local neural electrical activity exhibits temporal correlation), making it difficult for existing single-architecture models to simultaneously and efficiently extract both transient local features and long-term global features. In addition, traditional data layer processing methods such as oversampling and undersampling can easily lead to information distortion or feature loss due to uneven data distribution. Meanwhile, improved model-level methods (such as class-weighted loss functions) lack sufficient dynamic adjustment capabilities for attention mechanisms and cannot accurately balance the contributions of different categories of samples in feature learning.
[0005] In summary, existing EEG emotion recognition technologies suffer from limitations in small-sample scenarios, including limited data augmentation, incomplete temporal feature extraction, and significant impact from class imbalance. There is an urgent need to propose an EEG small-sample emotion recognition method that can effectively maintain temporal relevance, enhance data diversity, balance long-term and short-term feature extraction capabilities, and dynamically balance the contribution of class samples, thereby improving the model's classification accuracy and robustness under small-sample conditions. Summary of the Invention
[0006] The technical problem to be solved by this invention is that existing EEG emotion recognition technologies suffer from limited data augmentation effects, incomplete temporal feature extraction, and significant impact from class imbalance in small sample scenarios. This invention provides an EEG small sample emotion recognition method that can effectively maintain temporal relevance, enhance data diversity, take into account both long-term and short-term feature extraction capabilities, and dynamically balance the contribution of class samples, so as to improve the classification accuracy of the model under small sample conditions.
[0007] According to a first aspect of the technical solution of the present invention, a small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction is provided, comprising: S1: Obtain the EEG mapping value dataset; S2: The EEG mapping value dataset is augmented using a temporal augmentation diffusion model to generate augmented samples; S3: A long-sequence bidirectional hybrid architecture is used to extract local and global features from the enhanced samples, and the two are fused to obtain a multi-scale feature representation; S4: The multi-scale feature representation is processed through a category-adaptive attention mechanism to complete emotion recognition.
[0008] Furthermore, S2 specifically includes: S21: Construct a simplified network architecture based on a fully connected layer to adapt to the one-dimensional temporal characteristics of the EEG mapping value dataset; S22: An embedded temporal coding module is used to non-linearly couple the time step information with the feature dimensions of the EEG mapping value dataset to generate temporal correlation features; S23: Noise is added to the time-series correlation features using a forward diffusion process, and the signal is recovered from the noise using a reverse denoising process to generate the enhanced sample.
[0009] Furthermore, S22 specifically includes: S221: Generate time step encoding vectors using sine and cosine functions; S222: After mapping the time step encoding vector through a multilayer perceptron, it is added or concatenated element-wise with the feature vectors extracted from each layer of the simplified network architecture to achieve nonlinear coupling and generate time-series correlation features.
[0010] Furthermore, in S3, the long-sequence bidirectional hybrid architecture is a long-sequence bidirectional GRU-Transformer hybrid architecture, including a bidirectional gated loop unit and a Transformer encoder.
[0011] Furthermore, S3 specifically includes: S31: The enhanced sample is preliminarily processed by the bidirectional gated loop unit to capture transient local features within a short time window and generate a local feature representation; S32: Input the local feature representation into the Transformer encoder, use the multi-head attention mechanism to model long-distance temporal dependencies, and generate a global feature representation; S33: The local feature representation and the global feature representation are fused through a hierarchical connection method to form a multi-scale feature representation.
[0012] Furthermore, S31 specifically includes: The time series of the enhanced sample is processed simultaneously by forward and backward processing units to capture bidirectional transient local features on the time axis, extract dynamic change patterns of neural electrical activity within a short time window, and generate the local feature representation.
[0013] Furthermore, S4 specifically includes: S41: Real-time statistical analysis of the feature distribution information of each emotion category in the multi-scale feature representation, and construction of a category feature statistics matrix; S42: Generate adjustment factors based on the category feature statistics matrix to dynamically adjust the attention weights and balance the contributions of samples from different categories; S43: Further constrain the adjustment of the attention weights through a weighted loss function to generate a classification feature representation and complete emotion recognition.
[0014] Furthermore, S42 specifically includes: Based on the category label of the input sample, the prior information of the corresponding category is obtained from the category feature statistics matrix; The prior information is processed through a gating mechanism to generate the adjustment factor; The attention weights are dynamically adjusted based on the aforementioned adjustment factor to balance the contributions of samples from different categories.
[0015] According to a second aspect of the present invention, a small-sample EEG emotion recognition system based on temporal diffusion enhancement and long-sequence bidirectional feature extraction is provided. The system includes: a processor and a memory for storing executable instructions; wherein the processor is configured to execute the executable instructions to perform the small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in any of the preceding aspects.
[0016] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in any of the preceding aspects.
[0017] The beneficial effects of this invention are: A breakthrough in the temporal augmentation-based DDIM method: By designing a simplified UNet architecture based on fully connected layers to replace the traditional convolutional structure, and nonlinearly coupling the time step embedding with the feature dimension of EEG signals, the diffusion model achieves efficient adaptation to non-image tabular temporal data. Traditional convolutional structures suffer from structural redundancy and feature extraction mismatch when processing one-dimensional temporal data such as EEG signals, while the fully connected layer architecture can directly learn features based on the sequence characteristics of EEG signals. The nonlinear coupling mechanism of the time step embedding enables the model to accurately capture and maintain the temporal correlation of EEG signals during forward diffusion and backward denoising. Therefore, this method effectively enhances data diversity while avoiding the loss of temporal information caused by data augmentation, providing richer and more complete training samples for subsequent feature extraction modules, laying the foundation for improved overall model performance. Synergistic Effect of the Long-Sequence Bidirectional GRU-Transformer Hybrid Architecture: This architecture leverages the advantages of both network structures by utilizing a bidirectional GRU to capture transient local features of signals and combining it with a Transformer model to enhance long-term global feature extraction. The bidirectional GRU processes EEG signals from both directions, quickly capturing local changes and dynamic features within a short timeframe, compensating for the Transformer's shortcomings in local feature extraction. Meanwhile, the Transformer, with its powerful self-attention mechanism, can model global feature associations of EEG signals over long time spans, overcoming the limitations of the bidirectional GRU in handling long-sequence dependencies. This combination effectively resolves the contradiction between the long-term discontinuity and short-term continuity of EEG signals, enabling multi-level feature extraction from local details to global trends. This hybrid architecture is better adapted to the diverse data generated by the temporally enhanced DDIM method, extracting more comprehensive and representative features from the enhanced data, further improving the model's feature representation ability for complex EEG signals. Dynamic optimization of the category-adaptive attention mechanism: By dynamically adjusting the distribution of attention weights to balance the contributions of samples from different categories, the model bias caused by uneven data distribution is significantly alleviated. This mechanism introduces a category-adaptive adjustment factor into the self-attention calculation of the Transformer, dynamically adjusting the attention weights based on the feature distribution of samples from different emotion categories. For minority class samples, their weight in the attention calculation is increased, allowing the model to focus more on mining the key features of minority class samples; for majority class samples, their weight is appropriately suppressed to avoid the model parameters being overly dominated by the majority class. This dynamic adjustment not only optimizes the feature learning process but also forms a closed loop with the preceding data augmentation and feature extraction stages. The diverse data generated by the temporal augmentation-based DDIM method provides a richer feature foundation for the category-adaptive attention mechanism, enabling it to adjust weights more accurately; while the multi-level features extracted by the long-sequence bidirectional GRU-Transformer hybrid architecture also provide a more reliable basis for the weight adjustment of the attention mechanism. The synergistic effect of these three factors enables the model to effectively improve the recognition accuracy of minority emotions in EEG emotion recognition tasks with small samples and imbalanced data, significantly improving the overall classification accuracy and robustness of the model, and demonstrating significant technical advantages compared to traditional methods. A leap in overall performance through multi-technology collaboration: The three core technologies of this invention do not operate independently, but rather work in a progressive and mutually reinforcing manner to construct a complete and efficient EEG-based small-sample emotion recognition system. The temporally enhanced DDIM method solves the data scarcity problem in small-sample scenarios and ensures the temporal quality of the data; the long-sequence bidirectional GRU-Transformer hybrid architecture performs deep feature mining on the enhanced data, extracting comprehensive long- and short-term features; and the category-adaptive attention mechanism optimizes for uneven data distribution, ensuring that the model learns various emotional features in a balanced way. This collaborative mechanism enables the model to optimize the entire process from data generation and feature extraction to classification decision-making when facing complex and variable EEG signals, effectively overcoming multiple challenges of existing technologies in small-sample EEG emotion recognition, and demonstrating higher practical value and application potential in real-world application scenarios such as mental health monitoring and human-computer interaction. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0019] Figure 1 This is a flowchart of the small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction of the present invention.
[0020] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0022] The terms "first," "second," etc., used in this disclosure are for distinguishing similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of terms can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented, for example, in orders other than those illustrated or described herein.
[0023] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.
[0024] Multiple, including two or more.
[0025] And / or, it should be understood that, for the purposes of this disclosure, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. This reduces manpower input and facilitates business automation, featuring versatility, efficiency, and high precision.
[0026] The technical solution of this invention first provides a small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction, including: (I) Construction of a temporally enhanced DDIM method: To address the non-image-table nature of EEG time-series data, a diffusion model architecture adapted to EEG mapping value data is designed: Simplified UNet architecture design: A simplified UNet based on fully connected layers replaces the traditional convolutional structure, eliminating the spatial dimension dependency specific to image data and adapting to the one-dimensional temporal characteristics of EEG signals. This architecture achieves hierarchical extraction of temporal data features through nonlinear transformations of multiple fully connected layers, avoiding the adaptability problem of convolutional operations in non-grid data.
[0027] Temporal coding module embedding: A temporal coding module is introduced into the Denoising Diffusion Implicit Model (DDIM) to nonlinearly couple the time step embedding with the EEG signal feature dimension. Specifically, a time step encoded vector is generated using sine and cosine functions, mapped by a multilayer perceptron (MLP), and then element-wise added or concatenated with the feature vectors extracted from each layer of UNet to achieve explicit modeling of temporal correlations during diffusion. This effectively solves the problem of temporal information loss in traditional diffusion models when processing non-image temporal data, preserving the temporal dependencies of the original signal while enhancing data diversity.
[0028] Data augmentation mechanism: Gaussian noise is gradually added to destroy EEG signals through a forward diffusion process, and then the mapping relationship of the original signal is learned from the noise through a reverse denoising process, generating augmented samples with the same distribution as the original data but with diverse features, thus alleviating the data scarcity problem in small sample scenarios.
[0029] (II) Long-sequence bidirectional GRU-Transformer hybrid architecture design: To address the dual characteristics of long-term discontinuity and short-term continuity in EEG signals, a hierarchical feature extraction network is constructed: Bidirectional GRU Layer Transient Feature Capture: First, preliminary feature extraction is performed on the preprocessed EEG mapping values using a bidirectional gated recurrent unit (Bi-GRU). Bi-GRU processes the sequence simultaneously through two GRU units (forward and backward) to capture bidirectional transient local features of the signal on the time axis, effectively extracting dynamic patterns of neural electrical activity within short time windows and addressing the problems of gradient vanishing and temporal information loss in unidirectional RNNs.
[0030] Global Feature Enhancement in Transformer Layers: The hidden state sequence output by the Bi-GRU is input into the Transformer encoder, and a self-attention mechanism is used to model long-distance temporal dependencies. By using a multi-head attention mechanism to compute the attention distribution in different subspaces in parallel, the global feature associations of the signal over a long time span are captured, overcoming the limitations of traditional recurrent neural networks in processing long sequences.
[0031] Hybrid architecture fusion: A hierarchical connection method is used to combine Bi-GRU and Transformer, with the output of Bi-GRU serving as the input of Transformer, achieving complementary fusion of short-term local features and long-term global features. This architecture retains the transient dynamic characteristics of EEG signals while enhancing the ability to integrate cross-time-period emotion-related features, adapting to the non-stationary and long-term-varying characteristics of EEG signals.
[0032] (III) Construction of Category Adaptive Attention Mechanism: To address the model bias caused by uneven data distribution, a class-adaptive mechanism that dynamically adjusts attention weights is designed: Category feature statistics: During training, the mean and variance of the features of each emotion category sample are statistically analyzed in real time to construct a category feature statistics matrix, which reflects the distribution differences of different categories in the feature space.
[0033] Dynamic adjustment of attention weights: In the self-attention calculation of the Transformer, a class-adaptive adjustment factor is introduced. This factor obtains prior information about the corresponding class from the class feature statistics matrix based on the class label of the current input sample, and adjusts the attention weights through a gating mechanism. For minority class samples, their weight in the attention calculation is increased to enhance the model's attention to scarce class features; for majority class samples, their weight is appropriately suppressed to avoid feature learning being excessively influenced by the dominant class.
[0034] Loss function optimization: By combining category-adaptive attention output, a weighted cross-entropy loss function is designed to further balance the training contributions of samples from different categories. Through dynamically adjusting the dual constraints of attention and loss functions, the model bias caused by uneven data distribution is significantly mitigated, improving the recognition accuracy of minority emotions.
[0035] The present invention also provides a small-sample EEG emotion recognition system based on temporal diffusion enhancement and long-sequence bidirectional feature extraction. The system includes a processor and a memory for storing executable instructions. The processor is configured to execute the executable instructions to perform the small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in any of the above aspects.
[0036] The present invention also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the small sample EEG emotion recognition method based on temporal diffusion enhancement and long sequence bidirectional feature extraction as described in any of the above aspects.
[0037] Example This embodiment is based on a small-sample EEG emotion recognition scenario. The specific steps include time-enhanced DDIM data generation, long-sequence bidirectional GRU-Transformer feature extraction, category-adaptive attention mechanism optimization, and classification decision. The specific implementation process is as follows: Implementation of the time-enhanced DDIM method (first step: concrete implementation): The UNet architecture uses a 3-layer fully connected encoder-decoder to replace the traditional convolutional network, adapting to the one-dimensional temporal characteristics of EEG signals. It achieves hierarchical feature extraction through nonlinear transformation of multiple fully connected layers, and the intermediate layers enhance gradient propagation through residual connections. The encoder and decoder use the ReLU activation function, and the output layer is linearly activated.
[0038] For each time step of the diffusion process (set to 100 steps), a time-encoded vector is generated using sine and cosine functions. After mapping through a multilayer perceptron, this vector is fused with features from the intermediate layers of UNet to explicitly model the temporal dependencies in the diffusion process. The formula is as follows: For timing coding mapping functions, Features extracted by UNet.
[0039] The forward diffusion process gradually adds Gaussian noise to disrupt the EEG signal, and the noise variance is dynamically adjusted through cosine scheduling. The reverse denoising process trains the network to predict noise and optimizes it using the mean squared error loss function to generate enhanced samples that are consistent with the original data distribution, thus alleviating the problem of scarce small sample data.
[0040] Implementation of a long-sequence bidirectional GRU-Transformer hybrid architecture (second step of implementation): A two-layer bidirectional gated recurrent unit (Bi-GRU) is employed, with 256 hidden units per layer. Sequences are processed simultaneously using forward and backward GRUs to capture bidirectional transient local features within a short time window, outputting spliced features containing both forward and backward hidden states. The channel dimension and sample dimension of the EEG signal are merged and input into the Bi-GRU to extract the temporal dynamic change pattern of each channel.
[0041] It contains a 4-layer Transformer encoder, each layer models long-range temporal dependencies through multi-head self-attention (8 heads) and feedforward neural networks, and uses layer normalization and residual connections to enhance training stability; The self-attention mechanism captures global feature associations of a signal over a long time span by calculating a similarity matrix of query (Q), key (K), and value (V). The formula is as follows: The local features of Bi-GRU and the global features of Transformer are fused by concatenation or weighted summation to form a multi-scale feature representation.
[0042] Implementation of Category Adaptive Attention Mechanism (Step 3: Specific Implementation): During the training phase, the mean and standard deviation of the features of each emotion category are statistically analyzed in real time. The category feature statistics are dynamically updated through exponential moving average to reflect the distribution differences of different categories in the feature space.
[0043] Based on the current sample's category label, prior information is obtained from category feature statistics. A gating mechanism is used to generate adjustment factors to dynamically adjust the self-attention weights: increasing the weight ratio of minority class samples, suppressing the excessive influence of majority class samples, and balancing the contributions of different categories in feature learning.
[0044] The weighted cross-entropy loss function is adopted, and the class weights are calculated based on the reciprocal of the sample frequency. This further constrains the model's focus on minority class features, alleviates the classification bias caused by uneven data distribution, and completes emotion recognition.
[0045] To verify the advancement of the technical solution of this invention, and addressing the technical problem of EEG emotion recognition, the technical solution of this invention is compared with other existing methods, and the results are as follows: Table 1 SVM 78.33 LSTM 75 Transformer 87.5 LSTM+Transformer 83.33 BiLSTM+Transformer 85 GRU+Transformer 82.5 BiGRU+Transformer 88.33 Reweighted Attention 81.67 Hard Attention 80 Technical solution of the present invention 91.67 As shown in Table 1, the experimental results show that the method proposed in this invention has an accuracy of 91.67% on a small sample EEG mapping value dataset, which far exceeds other methods in the prior art.
[0046] In summary, this invention discloses a method, system, and storage device for small-sample EEG emotion recognition based on temporal diffusion enhancement and long-sequence bidirectional feature extraction. It provides a solution for emotion recognition of small-sample datasets of EEG mapping values, mainly addressing the problem of uneven dataset distribution and ensuring extremely high recognition accuracy.
[0047] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0048] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0049] Through the above description of the embodiments, those skilled in the art can clearly understand that the above implementation methods can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0050] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other modifications under the guidance of the present invention without departing from the spirit and scope of the claims. All of these modifications are within the protection scope of the present invention.
Claims
1. A small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction, characterized in that, include: S1: Obtain the EEG mapping value dataset; S2: The EEG mapping value dataset is augmented using a temporal augmentation diffusion model to generate augmented samples; Specifically, it includes: S21: Construct a simplified network architecture based on a fully connected layer to adapt to the one-dimensional temporal characteristics of the EEG mapping value dataset; S22: An embedded temporal coding module is used to non-linearly couple the time step information with the feature dimensions of the EEG mapping value dataset to generate temporal correlation features; S23: Noise is added to the time-series correlation features using a forward diffusion process, and the signal is recovered from the noise using a reverse denoising process to generate the enhanced sample; S3: A long-sequence bidirectional hybrid architecture is used to extract local and global features from the enhanced samples, and the two are fused to obtain a multi-scale feature representation; wherein, the long-sequence bidirectional hybrid architecture is a long-sequence bidirectional GRU-Transformer hybrid architecture, including a bidirectional gated recurrent unit and a Transformer encoder; S4: Process the multi-scale feature representation using a category-adaptive attention mechanism to complete emotion recognition; specifically including: S41: Real-time statistical analysis of the feature distribution information of each emotion category in the multi-scale feature representation, and construction of a category feature statistics matrix; S42: Generate adjustment factors based on the category feature statistics matrix to dynamically adjust the attention weights and balance the contributions of samples from different categories; S43: Further constrain the adjustment of the attention weights through a weighted loss function to generate a classification feature representation and complete emotion recognition.
2. The method for small-sample EEG emotion recognition based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in claim 1, characterized in that, S22 specifically includes: S221: Generate time step encoding vectors using sine and cosine functions; S222: After mapping the time step encoding vector through a multilayer perceptron, it is added or concatenated element-wise with the feature vectors extracted from each layer of the simplified network architecture to achieve nonlinear coupling and generate time-series correlation features.
3. The method for small-sample EEG emotion recognition based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in claim 1, characterized in that, S3 specifically includes: S31: The enhanced sample is preliminarily processed by the bidirectional gated loop unit to capture transient local features within a short time window and generate a local feature representation; S32: Input the local feature representation into the Transformer encoder, use the multi-head attention mechanism to model long-distance temporal dependencies, and generate a global feature representation; S33: The local feature representation and the global feature representation are fused through a hierarchical connection method to form a multi-scale feature representation.
4. The method for small-sample EEG emotion recognition based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in claim 3, characterized in that, S31 specifically includes: The time series of the enhanced sample is processed simultaneously by forward and backward processing units to capture bidirectional transient local features on the time axis, extract dynamic change patterns of neural electrical activity within a short time window, and generate the local feature representation.
5. The method for small-sample EEG emotion recognition based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in claim 4, characterized in that, S42 specifically includes: Based on the category label of the input sample, the prior information of the corresponding category is obtained from the category feature statistics matrix; The prior information is processed through a gating mechanism to generate the adjustment factor; The attention weights are dynamically adjusted based on the aforementioned adjustment factor to balance the contributions of samples from different categories.
6. A small-sample EEG emotion recognition system based on temporal diffusion enhancement and long-sequence bidirectional feature extraction, the system comprising: A processor and a memory for storing executable instructions; characterized in that the processor is configured to execute the executable instructions to perform the small-sample EEG emotion recognition method based on temporal diffusion enhancement and long-sequence bidirectional feature extraction as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the small sample EEG emotion recognition method based on temporal diffusion enhancement and long sequence bidirectional feature extraction as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Long-time electroencephalogram emotion recognition method based on electroencephalogram micro-state
CN117609863A
Method and system for training electroencephalogram signal enhancement model based on diffusion model
CN118606707A
