Small sample electroencephalogram emotion recognition method and system based on time sequence diffusion enhancement and long sequence bidirectional feature extraction and storage device

Through temporal diffusion enhancement and long sequence bidirectional feature extraction methods, combined with category adaptive attention mechanism, the problems of data scarcity and category imbalance in small sample EEG emotion recognition are solved, achieving higher recognition accuracy and robustness.

CN120611235APending Publication Date: 2025-09-09UNIV OF SCI & TECH BEIJING
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510643702.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Existing EEG emotion recognition technology has problems in small sample scenarios, such as limited data enhancement effect, incomplete temporal feature extraction, and significant impact of category imbalance, making it difficult to achieve high accuracy and robustness in complex emotion classification.

Method used

A temporal diffusion enhanced method is used to generate diversified data through a fully connected layer architecture and a temporal encoding module. A long-sequence bidirectional GRU-Transformer hybrid architecture is combined to extract multi-scale features. The weights are dynamically adjusted through a category-adaptive attention mechanism to balance the contribution of samples of different categories.

Benefits of technology

It significantly improves the accuracy of EEG emotion recognition under small sample conditions, solves the problems of data scarcity and category imbalance, and achieves higher classification accuracy and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611235A_ABST
    Figure CN120611235A_ABST
Patent Text Reader

Abstract

The invention discloses a small sample electroencephalogram emotion recognition method and system based on time sequence diffusion enhancement and long sequence bidirectional feature extraction and a storage device, and belongs to the technical field of emotion recognition. The method comprises the following steps: S1, acquiring a brain wave mapping value data set; s2, performing data enhancement on the brain wave mapping value data set through a time sequence enhanced diffusion model to generate an enhanced sample; s3, extracting local features and global features from the enhanced sample by adopting a long-sequence bidirectional hybrid architecture, and fusing the local features and the global features to obtain multi-scale feature representation; and S4, processing the multi-scale feature representation through a category adaptive attention mechanism to complete emotion recognition. According to the technical scheme, the brain wave small sample emotion recognition method can effectively maintain time sequence correlation, enhance data diversity, consider long-term and short-term feature extraction capability and dynamically balance category sample contribution degree, so that the classification precision of the model under the small sample condition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of emotion recognition, 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 Art

[0002] As an important physiological indicator of human emotional state, electroencephalogram (EEG) signals have broad application prospects in areas such as mental health monitoring, human-computer interaction, and neurofeedback therapy. The core of emotion recognition lies in accurately extracting key features that represent emotional states from non-stationary, low-signal-to-noise ratio EEG time series data. However, emotion recognition technology in small sample scenarios is currently difficult due to problems such as scarce training data, uneven category distribution, and complex time series features.

[0003] Traditional EEG emotion recognition methods primarily rely on manually engineered features, such as statistical features like power spectral density and differential entropy, combined with machine learning models like support vector machines (SVMs) and random forests for classification. However, these methods suffer from limited feature representation and poor generalization, making them unsuitable for complex emotion classification in small sample sizes. With the advancement of deep learning technology, methods based on convolutional neural networks (CNNs), recurrent neural networks (RNNs), and their variants have been widely used for EEG time series feature extraction. While CNNs can capture local spatial features, they are less capable of modeling long-range temporal dependencies. While unidirectional RNNs and their improved models (such as LSTMs and GRUs) can process time series data, they suffer from the vanishing gradient problem when extracting features from long sequences and struggle to effectively integrate bidirectional time series information. Furthermore, existing methods generally suffer from insufficient data diversity and are prone to overfitting in small sample sizes. In particular, when the distribution of samples across emotion categories is uneven, the models tend to favor the majority class, significantly reducing the accuracy of minority class recognition.

[0004] In recent years, diffusion models have demonstrated powerful data augmentation capabilities in generative tasks. However, their traditional architectures (such as the 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 inadequate modeling of temporal correlations. Combining the generative advantages of diffusion models with the characteristics of EEG time-series data to achieve effective data augmentation in small sample sizes remains a pressing technical challenge. Furthermore, EEG signals exhibit both long-term discontinuities and short-term continuity (local neural activity exhibits temporal correlations), making it difficult for existing single-architecture models to efficiently extract both transient local features and long-term global features. Furthermore, to address uneven data distribution, traditional data-level processing methods such as oversampling and undersampling can easily lead to information distortion or feature loss. Model-level improvements (such as class-weighted loss functions) lack the ability to dynamically adjust the attention mechanism, making it difficult to accurately balance the contributions of different class samples in feature learning.

[0005] In summary, existing EEG emotion recognition technologies suffer from limited data augmentation effectiveness, incomplete temporal feature extraction, and significant class imbalance in small sample scenarios. There is an urgent need to propose an EEG emotion recognition method for small sample sizes that effectively maintains temporal correlation, enhances data diversity, balances long-term and short-term feature extraction capabilities, and dynamically balances the contribution of class samples. This approach can improve the classification accuracy and robustness of the model under small sample conditions. Summary of the Invention

[0006] The technical problem to be solved by the present invention is that the existing EEG emotion recognition technology has problems such as limited data enhancement effect, incomplete time series feature extraction, and significant impact of category imbalance in small sample scenarios. The present invention provides an EEG small sample emotion recognition method that can effectively maintain time series correlation, enhance data diversity, take into account long-term and short-term feature extraction capabilities, and dynamically balance the contribution of category 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 brain wave mapping value dataset; S2: performing data enhancement on the EEG mapping value dataset using a time series enhanced diffusion model to generate enhanced samples; S3: A long sequence bidirectional hybrid architecture is used to extract local features and global features from the enhanced samples, and the two are fused to obtain a multi-scale feature representation; S4: Processing the multi-scale feature representation through a category-adaptive attention mechanism to complete emotion recognition.

[0008] Furthermore, the S2 specifically includes: S21: constructing a simplified network architecture based on a fully connected layer to adapt to the one-dimensional time series characteristics of the EEG mapping value dataset; S22: embedding a temporal coding module to nonlinearly couple the time step information with the feature dimension of the EEG mapping value dataset to generate temporal correlation features; S23: adding noise to the temporal correlation feature by using a forward diffusion process, and recovering the signal from the noise by using a reverse denoising process to generate the enhanced sample.

[0009] Furthermore, the S22 specifically includes: S221: Generate a time step encoding vector through the sine cosine function; S222: After mapping the time step encoding vector through a multi-layer perceptron, perform element-by-element addition or concatenation with the feature vectors extracted from each layer of the simplified network architecture to achieve nonlinear coupling and generate temporal 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 recurrent unit and a Transformer encoder.

[0011] Furthermore, the S3 specifically includes: S31: performing preliminary processing on the enhanced sample by the bidirectional gated recurrent 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: Fusing the local feature representation and the global feature representation through a hierarchical connection method to form a multi-scale feature representation.

[0012] Furthermore, the S31 specifically includes: The time series of the enhanced samples are processed simultaneously by the forward and backward processing units, the bidirectional transient local features on the time axis are captured, the dynamic change pattern of the neural electrical activity in a short time window is extracted, and the local feature representation is generated.

[0013] Furthermore, the S4 specifically includes: S41: Real-time statistics of feature distribution information of each emotion category in the multi-scale feature representation to construct a category feature statistics matrix; S42: Generate an adjustment factor according to the category feature statistic matrix, dynamically adjust the attention weight, and balance the contribution of samples of different categories; S43: Further constraining the adjustment of the attention weight through a weighted loss function to generate a classification feature representation and complete emotion recognition.

[0014] Furthermore, the S42 specifically includes: According to the category label of the input sample, obtaining the prior information of the corresponding category from the category feature statistics matrix; Processing the prior information through a gating mechanism to generate the regulating factor; The attention weight is dynamically adjusted according to the adjustment factor to balance the contribution of samples of different categories.

[0015] According to the second aspect of the technical solution 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 comprising: a processor and a memory for storing executable instructions; wherein the processor is configured to execute the executable instructions to execute 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.

[0016] According to a third aspect of the technical solution of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, wherein when the computer program is executed by a processor, 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 is implemented.

[0017] Beneficial effects of the present invention: Targeted breakthrough of the time-series enhanced 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 EEG signal feature dimension, the diffusion model is efficiently adapted to non-image table-type time series data. Traditional convolutional structures have problems with structural redundancy and feature extraction mismatch when processing one-dimensional time series data such as EEG signals, while the fully connected layer architecture can directly perform feature learning based on the sequence characteristics of EEG signals; the nonlinear coupling mechanism of time step embedding enables the model to accurately capture and maintain the temporal correlation of EEG signals during forward diffusion and reverse denoising. Therefore, this method effectively enhances data diversity while avoiding the loss of temporal information due to data enhancement, providing richer training samples with complete temporal features for subsequent feature extraction modules, laying the foundation for improving the overall model performance. The synergistic effect of a long-sequence bidirectional GRU-Transformer hybrid architecture: The bidirectional GRU captures transient local features of the signal, while the Transformer model enhances long-term global feature extraction, fully leveraging the advantages of both network structures. The bidirectional GRU processes EEG signals in both positive and negative directions, quickly capturing local changes and dynamic features in the signal over short periods of time, compensating for the Transformer's shortcomings in local feature extraction. The Transformer, with its powerful self-attention mechanism, can model global feature correlations in EEG signals over long time spans, addressing the bidirectional GRU's limitations in processing long-sequence dependencies. The combination of the two effectively resolves the contradiction between long-term discontinuity and short-term continuity in EEG signals, enabling multi-level feature extraction from EEG signals, from local details to global trends. This hybrid architecture is more adaptable to the diverse data generated by the time-series enhanced DDIM method, extracting more comprehensive and representative features from the enhanced data, further improving the model's ability to represent 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 problem caused by uneven data distribution is significantly alleviated. This mechanism introduces a category-adaptive adjustment factor into the Transformer's self-attention calculation, 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 exploring the key features of minority class samples; for majority class samples, their weight is appropriately suppressed to prevent the model parameters from 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 previous data enhancement and feature extraction steps. The diverse data generated by the time-series enhanced DDIM method provides a richer feature foundation for the category-adaptive attention mechanism, enabling it to adjust weights more accurately; and 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 the three enables the model to effectively improve the recognition accuracy of minority emotions in EEG emotion recognition tasks with small samples and unbalanced data, greatly improving the overall classification accuracy and robustness of the model, and has significant technical advantages over traditional methods. The overall performance leap of multi-technology collaboration: The three core technologies of the present invention do not operate independently, but through a layer-by-layer progressive and mutually reinforcing approach, a complete and efficient EEG small sample emotion recognition system is constructed. The time series enhanced DDIM method solves the data scarcity problem in small sample scenarios and ensures the time series quality of the data; the long sequence bidirectional GRU-Transformer hybrid architecture performs deep feature mining on the enhanced data to extract comprehensive long-term and short-term features; the category adaptive attention mechanism optimizes the uneven distribution of data to ensure that the model learns all kinds of emotional features in a balanced way. This collaborative mechanism enables the model to optimize the entire process from data generation, feature extraction to classification decision-making when facing complex and changeable EEG signals, effectively overcoming the multiple difficulties of existing technologies in small sample EEG emotion recognition, and showing higher practical value and application potential in actual application scenarios such as mental health monitoring and human-computer interaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0019] Figure 1 This is a flow chart 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 purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0021] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0022] The terms "first," "second," and the like in the description and claims of the present disclosure are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present disclosure described herein can, for example, be implemented in orders other than those illustrated or described herein.

[0023] In addition, the terms "comprises" and "having" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product or apparatus.

[0024] Multiple includes two or more.

[0025] It should be understood that the term "and / or" used in this disclosure simply describes an association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. This reduces manpower and facilitates business automation, offering universal, efficient, and high-precision features.

[0026] The technical solution of the present invention first provides a small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction, comprising: (I) Construction of timing-enhanced DDIM method: In view of the non-image table characteristics of EEG time series data, a diffusion model architecture suitable for 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 dimensionality 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 in multiple fully connected layers, avoiding the adaptability issues of convolution operations on non-grid data.

[0027] Temporal Encoding Module Embedding: A temporal encoding module is introduced into the denoising diffusion implicit model (DDIM), nonlinearly coupling the time step embedding with the EEG signal feature dimension. Specifically, a time step encoding vector is generated using sine and cosine functions. After mapping through a multi-layer perceptron (MLP), it is element-wise added or concatenated with the feature vectors extracted from each layer of the UNet to explicitly model the temporal dependencies in the diffusion process. This effectively addresses the problem of temporal information loss in traditional diffusion models when processing non-image time series data, enhancing data diversity while maintaining the temporal dependencies of the original signal.

[0028] Data enhancement mechanism: Gaussian noise is gradually added to destroy the EEG signal through the forward diffusion process, and then the mapping relationship of recovering the original signal from the noise is learned through the reverse denoising process, generating enhanced samples with consistent distribution with the original data but diverse features, alleviating the data scarcity problem in small sample scenarios.

[0029] (2) Long Sequence Bidirectional GRU-Transformer Hybrid Architecture Design: In order to cope with the dual characteristics of EEG signals, which are long-term discontinuity and short-term continuity, a hierarchical feature extraction network is constructed: Bidirectional GRU layer transient feature capture: A bidirectional gated recurrent unit (Bi-GRU) performs preliminary feature extraction on the preprocessed EEG mapping values. The Bi-GRU simultaneously processes the sequence using two GRU units, forward and backward, capturing bidirectional transient local features of the signal along the time axis. This effectively extracts dynamic patterns of neural electrical activity within short time windows, addressing the vanishing gradient and missing temporal information issues inherent in unidirectional RNNs.

[0030] Transformer layer global feature enhancement: The hidden state sequence output by the Bi-GRU is fed into the Transformer encoder, where a self-attention mechanism is used to model long-range temporal dependencies. This multi-head attention mechanism concurrently computes attention distributions across different subspaces, capturing global feature correlations over long time spans and addressing the limitations of traditional recurrent neural networks in processing long sequences.

[0031] Hybrid Architecture Fusion: This approach combines the Bi-GRU and Transformer architectures using hierarchical connections. The Bi-GRU output serves as the Transformer input, achieving a complementary fusion of short-term local features and long-term global features. This architecture preserves the transient dynamics of EEG signals while enhancing the ability to integrate emotion-related features across time periods, adapting to the non-stationary and long-term variations of EEG signals.

[0032] (3) Construction of Category Adaptive Attention Mechanism: To address the model bias problem caused by uneven data distribution, a category-adaptive mechanism is designed to dynamically adjust attention weights: Category feature statistics: During the training process, the feature mean and variance of each emotion category sample are counted in real time to construct a category feature statistics matrix to reflect the distribution differences of different categories in the feature space.

[0033] Dynamic Adjustment of Attention Weights: A category-adaptive adjustment factor is introduced into the Transformer's self-attention calculation. This factor uses the category label of the current input sample and the corresponding category prior information from the category feature statistics matrix to adjust the attention weights through a gating mechanism. For minority class samples, their weight in the attention calculation is increased, enhancing the model's focus on features from scarce categories. For majority class samples, their weight is appropriately suppressed to prevent feature learning from being overly influenced by dominant categories.

[0034] Loss function optimization: Combining class-adaptive attention output with a weighted cross-entropy loss function, we further balance the training contributions of samples from different classes. By dynamically adjusting the dual constraints of attention and loss functions, we significantly mitigate model bias caused by uneven data distribution and improve the recognition accuracy of minority emotions.

[0035] The technical solution of 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 comprising: a processor and a memory for storing executable instructions; wherein, the processor is configured to execute the executable instructions to execute 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 technical solution of the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, it implements the small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction as described in any of the above aspects.

[0037] Example This example is based on a small-sample EEG emotion recognition scenario. The specific steps include generating time-series enhanced DDIM data, extracting long-sequence bidirectional GRU-Transformer features, optimizing the category-adaptive attention mechanism, and making classification decisions. The specific implementation process is as follows: Implementation of the timing-enhanced DDIM method (first step implementation): The UNet architecture uses a three-layer fully connected encoder-decoder to replace the traditional convolutional network, adapting to the one-dimensional temporal characteristics of EEG signals. It realizes hierarchical feature extraction through nonlinear transformation of multiple layers of fully connected layers, and enhances gradient conduction through residual connections in the middle layer. The encoder and decoder use the ReLU activation function, and the output layer is linearly activated.

[0038] For the time step of the diffusion process (set to 100 steps), the time encoding vector is generated by the sine-cosine function, mapped by the multi-layer perceptron, and fused with the UNet intermediate layer features to explicitly model the temporal dependency in the diffusion process. The formula is: is the temporal coding mapping function, Features extracted by UNet.

[0039] The forward diffusion process gradually adds Gaussian noise to destroy the EEG signal, and the noise variance is dynamically adjusted through cosine scheduling; the reverse denoising process trains the network to predict noise, uses the mean square error loss function for optimization, and generates enhanced samples that are consistent with the original data distribution, alleviating the problem of scarcity of small sample data.

[0040] Implementation of long-sequence bidirectional GRU-Transformer hybrid architecture (second step specific implementation): A two-layer bidirectional gated recurrent unit (Bi-GRU) is used, with 256 hidden units per layer. The forward and backward GRUs simultaneously process the sequence, capturing bidirectional transient local features within a short time window and outputting a concatenated feature consisting of both the forward and backward hidden states. The channel and sample dimensions of the EEG signal are combined and fed into the Bi-GRU to extract the temporal dynamics of each channel.

[0041] It contains a 4-layer Transformer encoder. Each layer uses multi-head self-attention (8 heads) and a feedforward neural network to model long-distance temporal dependencies, and uses layer normalization and residual connections to enhance training stability. The self-attention mechanism captures the global feature correlation of the signal over a long time span by calculating the similarity matrix of query (Q), key (K), and value (V). The formula is: The local features of Bi-GRU and the global features of Transformer are fused through splicing or weighted summation to form a multi-scale feature representation.

[0042] Implementation of the category-adaptive attention mechanism (specific implementation of the third step): During the training phase, the feature mean and standard deviation of each emotion category are counted in real time, and the category feature statistics are dynamically updated through exponential moving average to reflect the distribution differences of different categories in the feature space.

[0043] According to the category label of the current sample, prior information is obtained from the category feature statistics, and a regulation factor is generated through a gating mechanism to dynamically adjust the self-attention weight: increasing the weight of minority class samples, suppressing the excessive influence of majority class samples, and balancing the contribution of different categories in feature learning.

[0044] A weighted cross-entropy loss function is used, and the category weight is calculated based on the inverse of the sample frequency, which further constrains the model's focus on minority class features, alleviates classification bias caused by uneven data distribution, and completes emotion recognition.

[0045] To verify the advanced nature of the technical solution of the present invention, the technical solution of the present invention was compared with other existing methods to address the technical issues of EEG emotion recognition. The results are as follows: Table 1 Method Name Accuracy (%) Support Vector Machine 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 accuracy of the method proposed in the present invention in a small sample EEG mapping value dataset is 91.67%, far exceeding other methods in the prior art.

[0046] In summary, the present invention discloses a small-sample EEG emotion recognition method, system, and storage device based on time-series diffusion enhancement and long-sequence bidirectional feature extraction, which provides a solution for emotion recognition in small-sample EEG mapping value datasets, mainly solving the problem of uneven distribution of datasets and ensuring extremely high recognition accuracy.

[0047] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0048] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0049] Through the above description of the embodiments, those skilled in the art will clearly understand that the above-mentioned implementation methods can be implemented using software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases, the former is the more preferred implementation method. Based on this understanding, the technical solution of the present invention, or the portion 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, or optical disk) and includes a number of instructions for enabling a terminal (such as a mobile phone, computer, server, air conditioner, or network device) to execute the methods described in various embodiments of the present invention.

[0050] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.

Claims

1. A small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction, characterized by: include: S1: Obtain EEG mapping value dataset; S2: performing data enhancement on the EEG mapping value dataset using a time series enhanced diffusion model to generate enhanced samples; S3: A long-sequence bidirectional hybrid architecture is used to extract local features and global features from the enhanced samples, and the two are fused to obtain a multi-scale feature representation; S4: Processing the multi-scale feature representation through a category-adaptive attention mechanism to complete emotion recognition.

2. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 1, characterized in that: The S2 specifically includes: S21: constructing a simplified network architecture based on a fully connected layer to adapt to the one-dimensional time series characteristics of the EEG mapping value dataset; S22: embedding a temporal coding module to nonlinearly couple the time step information with the feature dimension of the EEG mapping value dataset to generate temporal correlation features; S23: adding noise to the temporal correlation feature by using a forward diffusion process, and recovering the signal from the noise by using a reverse denoising process to generate the enhanced sample.

3. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 2, characterized in that: The S22 specifically includes: S221: Generate a time step encoding vector through the sine cosine function; S222: After mapping the time step encoding vector through a multi-layer perceptron, perform element-by-element addition or concatenation with the feature vectors extracted from each layer of the simplified network architecture to achieve nonlinear coupling and generate temporal correlation features.

4. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 1, characterized in that: In S3, 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.

5. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 4, characterized in that: The S3 specifically includes: S31: performing preliminary processing on the enhanced sample by the bidirectional gated recurrent 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: Fusing the local feature representation and the global feature representation through a hierarchical connection method to form a multi-scale feature representation.

6. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 5, characterized in that: The S31 specifically includes: The time series of the enhanced samples are processed simultaneously by the forward and backward processing units, the bidirectional transient local features on the time axis are captured, the dynamic change pattern of the neural electrical activity in a short time window is extracted, and the local feature representation is generated.

7. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 1, characterized in that: The S4 specifically includes: S41: Real-time statistics of feature distribution information of each emotion category in the multi-scale feature representation to construct a category feature statistics matrix; S42: Generate an adjustment factor according to the category feature statistic matrix, dynamically adjust the attention weight, and balance the contribution of samples of different categories; S43: Further constraining the adjustment of the attention weight through a weighted loss function to generate a classification feature representation and complete emotion recognition.

8. The small sample EEG emotion recognition method based on time series diffusion enhancement and long sequence bidirectional feature extraction according to claim 6, characterized in that: The S42 specifically includes: According to the category label of the input sample, obtaining the prior information of the corresponding category from the category feature statistics matrix; Processing the prior information through a gating mechanism to generate the regulating factor; The attention weight is dynamically adjusted according to the adjustment factor to balance the contribution of samples of different categories.

9. 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 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the small sample EEG emotion recognition method based on temporal diffusion enhancement and long sequence bidirectional feature extraction as described in any one of the above aspects is implemented.

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

  • Electroencephalogram signal anxiety emotion assessment method based on unbalanced data driving

    CN119170276A

  • Emotion recognition method, device and equipment based on electroencephalogram signals and medium

    CN119700110A

  • Method for realizing a multi-channel convolutional recurrent neural network EEG emotion recognition model using transfer learning

    US20230039900A1