An electroencephalogram signal-based emotion recognition method, system, device and medium

By employing adaptive brain region flow segmentation and hierarchical meta-learning mechanisms, combined with self-supervised contrastive learning and feature fusion, the problems of rigid brain region segmentation, individual difference adaptation, and feature fragmentation in EEG emotion recognition are solved, achieving high-accuracy emotion recognition.

CN121971107BActive Publication Date: 2026-05-29ANHUI AGRICULTURAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI AGRICULTURAL UNIVERSITY
Filing Date
2026-04-07
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing EEG emotion recognition technology suffers from limitations in brain region functional flow segmentation strategies, insufficient adaptability to individual differences, and a disconnect between local short-term features and global long-term trends in cross-subject scenarios, resulting in low recognition accuracy.

Method used

An adaptive brain region flow segmentation strategy based on affective neuroscience priors is adopted, combined with self-supervised contrastive learning and differentiable clustering. Through a hierarchical meta-learning mechanism, individual local and global features are dynamically adapted. A hybrid expert model and state space model are used to capture local details and global trends. Self-supervised alignment loss is introduced to ensure feature consistency. A hierarchical fusion strategy is adopted to improve recognition accuracy.

Benefits of technology

It significantly improves the accuracy and robustness of EEG emotion recognition across different subject scenarios, can quickly adapt to the EEG patterns of new users, enhances the richness and consistency of features, reduces feature conflicts, and improves the interpretability and generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121971107B_ABST
    Figure CN121971107B_ABST
Patent Text Reader

Abstract

The application provides an emotion recognition method and system based on electroencephalogram signals, a device and a medium, and belongs to the technical field of brain-computer interfaces and emotion computing. The method comprises the following steps: a double-layer strategy of prior macro brain region flow and self-supervised adaptive sub-flow division is adopted to divide brain region flow which takes physiological rationality and data adaptability into account. Then, a hierarchical meta-learning mechanism is introduced, and local meta-learners and global meta-learners are used to adapt to the local details and global trend differences of individuals respectively. Finally, a local and global feature alignment and cross-brain region fusion module is constructed to realize semantic consistency and complementary mining of local-global features. The method solves the problem of low EEG emotion recognition accuracy in the cross-subject scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of brain-computer interface and emotion computing technology, specifically relating to an emotion recognition method, system, device and medium based on electroencephalogram (EEG) signals. Background Technology

[0002] As a core driving force of human cognition and behavior, the accurate identification of emotion has significant application value in fields such as human-computer interaction, mental health monitoring, and intelligent education. Electroencephalography (EEG), due to its non-invasive nature, high temporal resolution, and ability to directly reflect brain neural activity, has become an ideal physiological signal source for emotion recognition. EEG-based emotion recognition technology has become a research hotspot in the field of affective computing.

[0003] In recent years, deep learning methods have made significant progress in EEG emotion recognition due to their powerful feature learning capabilities. Models such as convolutional neural networks (CNN), recurrent neural networks (RNN), and Transformers have achieved effective classification of emotional states such as positive, neutral, and negative by extracting the spatiotemporal features of EEG signals. However, existing methods still face three key challenges when dealing with the complexity and specificity of EEG signals: (1) The brain region functional flow segmentation strategy has limitations. Traditional methods either rely on fixed physiological priors, such as Broadman partitioning, to segment brain region flows, which is difficult to adapt to the differences in EEG data distribution among different subjects and under different tasks; or they adopt purely data-driven adaptive segmentation, which is easy to deviate from the physiological correlation of brain functions, resulting in fuzzy physical meaning of features, thereby affecting the interpretability and robustness of the model; (2) Insufficient adaptability to individual differences. EEG signals are significantly affected by individual factors such as age, gender, and physiological state, and there is obvious heterogeneity in the distribution of EEG features among different subjects. Existing models are mostly trained based on group data and lack dynamic adaptation mechanisms for individual details, resulting in a significant drop in generalization performance in new subjects or small sample scenarios; (3) There is a disconnect between local short-term features and global long-term trends. Emotional experience is the result of the combined effect of local neural activity and global long-term dynamics. Existing methods often model local or global features separately, ignoring the intrinsic relationship between the two, resulting in incomplete feature representation and limiting further improvement in recognition accuracy.

[0004] In summary, existing technologies suffer from problems such as rigid brain region segmentation strategies, weak adaptability to individual differences, and the separation of local and global features, resulting in low accuracy of EEG emotion recognition in cross-subject scenarios. Summary of the Invention

[0005] To address the issue of low accuracy in EEG emotion recognition across different subjects, this invention provides an emotion recognition method, system, device, and medium based on electroencephalogram (EEG) signals.

[0006] A first aspect of this invention provides an emotion recognition method based on electroencephalogram (EEG) signals, comprising the following steps:

[0007] Acquire electroencephalogram (EEG) signals and extract time-frequency features from multiple channels of the EEG signals;

[0008] The multiple channels are divided into predefined macroscopic brain region flows; within each macroscopic brain region flow, sub-flows are divided based on the time-frequency characteristics of each channel contained therein, resulting in multiple brain region functional sub-flows.

[0009] For each brain region functional sub-stream, sub-stream local features and sub-stream global features are extracted after individual difference adaptation. Specifically, a local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the individual's local feature statistics to adapt to individual local differences, and a global meta-learner dynamically adjusts the parameters of the global feature extraction network based on the individual's global feature statistics to adapt to individual global differences. The time-frequency features corresponding to each channel contained in the sub-stream are input into the parameter-adapted local feature extraction network and global feature extraction network to extract sub-stream local features and sub-stream global features, respectively.

[0010] By fusing the local features of the subflow with the global features of the subflow, the complete features of the subflow of the brain region are obtained;

[0011] Interactively fuse the complete features of all sub-flows belonging to the same macroscopic brain region to obtain the total features of the macroscopic brain region flow; fuse the total features of all macroscopic brain region flows across brain regions to obtain the global integrated features; and output the emotion recognition result based on the global integrated features.

[0012] Furthermore, the local feature extraction network after parameter adaptation extracts local features of the sub-stream, specifically including the following steps:

[0013] The time-frequency features are input into a pre-trained hybrid expert model, and local features are extracted from different time scales and frequency band interaction perspectives through multiple expert networks. Local spatiotemporal statistical information of the time-frequency features is extracted through a gating network, including the mean, variance, and correlation coefficient between frequency bands for each time window. Dynamic weights for each expert network are generated based on the local spatiotemporal statistical information. The outputs of the four expert networks are weighted and fused according to the dynamic weights to obtain multi-scale preliminary local features.

[0014] The multi-scale local preliminary features are input into the bilateral feature interaction and enhancement module. The multi-scale local preliminary features are mapped into query vector Q, key vector K and value vector V through linear projection. Temporal position encoding is added to Q and K to preserve the chronological order information of each time window. The interaction weights of local features are calculated using a scaling dot product attention mechanism and V is weighted and aggregated to obtain local interaction features.

[0015] By using residual connections and layer normalization operations, the multi-scale local preliminary features and local interaction features are added together and normalized to obtain the final adapted sub-flow local features.

[0016] Furthermore, the parameters of the local feature extraction network are dynamically adjusted based on the local feature statistics of each individual to adapt to individual local differences. This specifically includes the following steps:

[0017] The individual local feature statistics of the current subject are input into a pre-trained local meta-learner; the local meta-learner consists of a multi-layer fully connected network, and its output is the parameter adjustment amount for the local feature extraction network of the current sub-stream. ,in The parameter adjustment amount corresponding to the hybrid expert model. The parameter adjustment amount corresponds to the bilateral feature interaction and enhancement module; the individual local feature statistics are the DE mean of the subject's beta band;

[0018] Adjust the amount according to the parameters. The initial group training parameters for the hybrid expert model and the bilateral feature interaction and enhancement module. Perform individualized updates to obtain adapted network parameters. : ;in This is a preset adaptation coefficient used to control the extent of individualized adjustments.

[0019] Furthermore, the global feature extraction network with adapted parameters extracts global features of the sub-stream, specifically including the following steps:

[0020] The time-frequency features are serialized to obtain time-series sequence features;

[0021] The time-series features are input into a pre-trained state-space model, which adopts a Mamba structure and contains multiple layers of selective state-space blocks. Each selective state-space block projects the input time-series features into the state space through a selective state-space mechanism and dynamically selects information to be retained or forgotten based on the input features. After stacking multiple selective state-space blocks, the long-range dependencies spanning the entire time-series are captured, and the initial global features are output.

[0022] The time-series features and the intermediate hidden states of the state-space model are input into the context-time-series interaction relay module. The relay module includes a circular memory unit and a gating fusion mechanism. The circular memory unit is used to maintain the memory state of historical time windows. The memory state of the current moment is updated through the gating fusion mechanism. After traversing all time windows, the final memory state is used as the context-enhanced global feature and fused with the initial global feature to obtain the sub-stream global feature.

[0023] Furthermore, the step of dynamically adjusting the parameters of the global feature extraction network based on the global feature statistics of an individual to adapt to individual global differences specifically includes the following steps:

[0024] The individual global feature statistics of the current subject are input into a pre-trained global meta-learner; the global meta-learner consists of a multi-layer fully connected network, and its output is the parameter adjustment amount for the global feature extraction network of the current sub-stream. ,in The parameter adjustment amount corresponding to the state-space model. The parameter adjustment amount corresponds to the context-series interactive relay module; the global feature statistics are the moving average of the DE features of the five frequency bands;

[0025] Adjust the amount according to the parameters. The initial group training parameters of the state space model and the context-series interaction relay module are individually updated to obtain the adapted network parameters.

[0026] Furthermore, the step of fusing the local features of the sub-flow with the global features of the sub-flow to obtain the complete features of the sub-flow of the brain region flow specifically includes: concatenating and fusing the local features of the sub-flow with the global features of the sub-flow, mapping the local features of the sub-flow with the global features of the sub-flow to the same semantic space and introducing a self-supervised alignment loss to maximize their similarity, forcing the two to be semantically consistent, so as to output the complete features of the sub-flow of the brain region flow.

[0027] Furthermore, within each macroscopic brain region flow, sub-flows are divided based on the time-frequency characteristics of each channel contained therein to obtain multiple brain region functional sub-flows, including the following steps:

[0028] Generate an embedding representation of the time-frequency features of each channel within the current macroscopic brain region flow;

[0029] Based on self-supervised contrastive learning, positive sample pairs and negative sample pairs are constructed. Among them, the embedding representations of two channels randomly sampled from the same macroscopic brain region flow are used as positive sample pairs, and the embedding representations of one channel randomly sampled from different macroscopic brain region flows are used as negative sample pairs.

[0030] Based on the positive sample pairs and the negative sample pairs, a contrastive loss function is calculated; the contrastive loss function is defined as the negative logarithm of the ratio of the similarity of the positive sample pairs to the sum of the similarities of all sample pairs.

[0031] The contrastive loss function is minimized by the backpropagation algorithm to bring the positive sample pairs closer to each other in the feature space and push the negative sample pairs further apart, thus obtaining the contrastive learning channel embedding representation.

[0032] Based on the channel embedding representation after contrastive learning, the number of sub-flows and channel affiliation contained within each macroscopic brain region flow are dynamically determined by a differentiable clustering algorithm, forming the multiple brain region functional sub-flows.

[0033] A second aspect of this invention provides an emotion recognition system based on electroencephalogram (EEG) signals, comprising:

[0034] An extraction module is used to acquire electroencephalogram (EEG) signals and extract the time-frequency features of multiple channels in the EEG signals;

[0035] A partitioning module is used to divide the multiple channels into predefined macroscopic brain region flows; within each macroscopic brain region flow, sub-flows are partitioned based on the time-frequency characteristics of each channel contained therein to obtain multiple brain region functional sub-flows;

[0036] The feature modeling module is used to extract sub-stream local features and sub-stream global features adapted to individual differences for each brain region functional sub-stream. Specifically, a local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the individual's local feature statistics to adapt to individual local differences, and a global meta-learner dynamically adjusts the parameters of the global feature extraction network based on the individual's global feature statistics to adapt to individual global differences. The time-frequency features corresponding to each channel contained in the sub-stream are input into the parameter-adapted local feature extraction network and global feature extraction network to extract the sub-stream local features and sub-stream global features, respectively.

[0037] The fusion module is used to fuse the local features of the subflow with the global features of the subflow to obtain the complete features of the subflow of the brain region.

[0038] The recognition module is used to interactively fuse the complete features of all sub-flows belonging to the same macroscopic brain region to obtain the total features of the macroscopic brain region flow; to fuse the total features of all macroscopic brain region flows across brain regions to obtain the global integrated features; and to output the emotion recognition result based on the global integrated features.

[0039] A third aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0040] A fourth aspect of the present invention provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0041] The emotion recognition method based on electroencephalogram (EEG) signals provided by this invention has the following beneficial effects:

[0042] By defining macroscopic brain region flows based on prior knowledge of affective neuroscience and then adaptively partitioning them using self-supervised contrastive learning and differentiable clustering, this approach avoids the limitations of fixed physiological partitioning that struggles to adapt to individual EEG response specificities, and overcomes the drawbacks of purely data-driven partitioning that can lead to functional meaning disconnect and poor interpretability. The hierarchical meta-learning mechanism enables the model to quickly adapt to the EEG patterns of new users with only a small number of samples, significantly improving cross-subject generalization ability. Simultaneously, the collaborative design of local and global paths ensures that transient emotional fluctuations and long-term emotional states are represented completely and uniformly, enhancing feature richness and consistency. Self-supervised alignment loss guarantees semantic consistency between local details and global trends, reducing feature conflicts. The hierarchical fusion strategy simulates the hierarchical structure of brain information processing, fully exploring functional complementarity within brain regions and dynamic synergy between brain regions while avoiding computational redundancy caused by fully connected interactions, thus improving the accuracy and robustness of EEG emotion recognition in cross-subject scenarios. Attached Figure Description

[0043] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. 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 these drawings without creative effort.

[0044] Figure 1 This is a flowchart illustrating an emotion recognition method based on electroencephalogram (EEG) signals according to an exemplary embodiment of the present invention.

[0045] Figure 2 This is an overall framework diagram of HMABRF provided by the present invention according to an exemplary embodiment;

[0046] Figure 3 This is a schematic diagram of the HMABRF emotion recognition confusion matrix on SEED and SEED-IV according to an exemplary embodiment of the present invention, wherein... Figure 3(a) is a schematic diagram of the HMABRF emotion recognition confusion matrix on SEED, where Figure 3 (b) is a schematic diagram of the HMABRF emotion recognition confusion matrix on SEED-IV;

[0047] Figure 4 This is a training convergence curve of HMABRF on the SEED and SEED-IV datasets according to an exemplary embodiment of the present invention, wherein... Figure 4 (a) is the HMABRF result curve on the SEED dataset. Figure 4 (b) is a graph showing the results of HMABRF on the SEED-IV dataset. Detailed Implementation

[0048] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0049] EEG-based emotion recognition technology has attracted much attention in the field of emotion computing. However, existing advanced methods still face some challenges: 1) limitations in brain region functional flow segmentation strategies; 2) insufficient adaptability to individual differences; 3) semantic disconnect between local short-term features and global long-term trends. To address these challenges, this invention proposes an emotion recognition method based on EEG signals (HMABRF). First, this invention designs an adaptive brain region flow segmentation strategy constrained by physiological priors in emotion neuroscience, which combines self-supervised contrastive learning and differentiable Gumbel-Softmax to achieve dynamic subflow segmentation. Furthermore, relying on a hierarchical meta-learning mechanism, this invention accurately captures and adapts to individual local detail differences through a hybrid expert model and a bilateral feature interaction and enhancement module. Simultaneously, it optimizes the individual adaptability robustness of global long-term trends through a state-space model (Mamba) and a context-time interaction relay module. These two feature extraction paths synergistically enhance the model's adaptability to individual heterogeneity. Finally, by combining self-supervised local and global feature alignment losses, semantic consistency between local short-term features and global long-term trends is forced.

[0050] The technical solutions provided by the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0051] First, this invention provides an emotion recognition method based on electroencephalogram (EEG) signals, specifically as follows: Figure 1 As shown, it includes the following steps:

[0052] Signal preprocessing steps: The input EEG signal is preprocessed to obtain the time-frequency characteristics of multiple channels in the EEG signal.

[0053] Adaptive brain region segmentation steps: Based on prior knowledge of affective neuroscience, the multiple channels are divided into multiple predefined macroscopic brain region flows; for each macroscopic brain region flow, based on the time-frequency characteristics of its channel, the channels within the macroscopic brain region flow are adaptively segmented by combining self-supervised contrastive learning and differentiable clustering to form multiple brain region functional sub-flows.

[0054] Sub-stream hierarchical meta-adaptation feature extraction steps: For each functional sub-stream of the brain region, extract sub-stream local features and sub-stream global features adapted to individual differences; wherein, the parameters of the local feature extraction network are dynamically adjusted by the local meta-learner according to the individual's local feature statistics to adapt to individual local differences, and the parameters of the global feature extraction network are dynamically adjusted by the global meta-learner according to the individual's global feature statistics to adapt to individual global differences; the time-frequency features corresponding to each channel contained in the sub-stream are input into the local feature extraction network and the global feature extraction network adapted to the parameters to extract the sub-stream local features and sub-stream global features respectively.

[0055] Intraflow feature fusion step: The local intraflow features after individualized adaptation are fused with the global intraflow features, and a self-supervised alignment loss is introduced to constrain the semantic consistency of the two to obtain the complete subflow features corresponding to the functional subflow of the brain region.

[0056] Hierarchical sub-flow fusion steps: For all functional sub-flows of this brain region, firstly, the complete features of each sub-flow belonging to the same macroscopic brain region are interactively fused within the brain region, and then the fusion results of different macroscopic brain region flows are interactively fused across brain regions to obtain the globally integrated features.

[0057] Classification output steps: Based on the globally integrated feature, output the sentiment classification result.

[0058] 1. Adaptive brain region flow segmentation under macroscopic prior constraints:

[0059] Based on affective neuroscience, 62 EEG channels were artificially divided into three functionally defined macro-streams (prefrontal, temporal, and parieto-occipital). A dedicated embedding unit (1×1 convolution + LayerNorm) was designed for each channel to transform it into a semantic vector. A contrastive learning loss was used to ensure similar channel features within the same macro-stream and distinct features between different streams. Based on the embedding vectors, differentiable Gumbel-Softmax clustering was employed to dynamically determine and divide the number of sub-streams within each macro-stream according to data complexity (e.g., further dividing the prefrontal stream into three sub-streams).

[0060] It balances physiological rationality and data adaptability: it avoids the "functional disconnect" that may be caused by purely data-driven division (such as grouping unrelated brain regions together), and overcomes the rigidity of fixed physiological division that cannot adapt to individual differences in EEG response.

[0061] Improve feature discriminativeness and model interpretability: The segmentation results have both clear physiological meaning (such as "prefrontal cortex-emotion regulation") and can finely match specific data distributions, making the physical meaning of the extracted features clear and the discriminative power stronger.

[0062] 2. Dual-path feature extraction and hierarchical meta-learning adaptation:

[0063] Local details: A hybrid expert model (MoE) is used to extract local features at multiple time scales in parallel, and the features are dynamically weighted by a gating network; local interactions are enhanced by bilateral feature interaction and enhancement module (BIE); finally, the local meta-learner dynamically generates parameters based on the statistical characteristics of the current subject to fine-tune MoE and BIE.

[0064] Global Trends: The state-space model (Mamba) is used to capture the global dependencies of long sequences; a context-series interaction relay module (CIR) is introduced to store historical global trend information; parameters are dynamically generated by the global meta-learner to fine-tune Mamba and CIR.

[0065] Hierarchical meta-coordination: Local and global meta-learners work independently but with a collaborative goal, quickly adapting to individual differences in detail and trends.

[0066] 3. Multi-level feature fusion and semantic alignment mechanism:

[0067] Intraflow fusion (alignment): After concatenating local and global features, a self-supervised alignment loss function is used to force the two to maximize their similarity in the projected semantic space.

[0068] Inter-flow fusion (interaction): adopts a hierarchical fusion strategy of "first within macroscopic brain regions, then across macroscopic brain regions".

[0069] Multi-objective loss function: The total loss function integrates classification loss, alignment loss, regularization loss, and supervised loss specifically for the two meta-learners to achieve multi-objective collaborative optimization.

[0070] Based on the above inventive concept, this invention proposes an embodiment comprising the overall architecture, core module design, and training strategy of a hierarchical meta-learning driven adaptive brain region flow fusion network (HMABRF) based on electroencephalography (EEG). The core objective of HMABRF is to address the contradictions between physiological rationality and data adaptability, the generalization of individual differences, and feature fragmentation in EEG emotion recognition through three mechanisms: adaptive brain region flow segmentation, hierarchical meta-learning adaptation, and local-global feature fusion. Its overall framework is as follows: Figure 2 As shown, it is divided into six modules: input preprocessing, adaptive brain region flow segmentation, intra-subflow feature modeling, inter-subflow fusion within macro-flow, cross-macro-brain region flow fusion, and emotion classification. It includes the following steps:

[0071] S1, Input preprocessing.

[0072] S1.1 Sliding window segmentation:

[0073] Sliding window segmentation is a crucial step in the preprocessing of EEG emotion signals, with the core objective of expanding the sample size while preserving the temporal continuity of emotion-related neural activity. This invention employs an overlapping sliding window strategy to expand the sample size and preserve temporal continuity for EEG signals from the SEED and SEED-IV datasets. Each segmented sample corresponds to a continuous segment of EEG, mathematically represented as a two-dimensional tensor. Where i = 1, 2, ..., N (N is the total number of samples), C = 62 is the number of EEG channels, and T = 1200 is the number of time points. All samples ultimately constitute the input dataset for subsequent time-frequency feature extraction. Its two-dimensional channel and time structure not only preserves the spatial distribution information of EEG signals, but also fully covers the neural response in the local time dimension, laying a high-quality data foundation for subsequent differential entropy time-frequency feature extraction.

[0074] S1.2 Time-frequency feature extraction:

[0075] Emotion-related information in EEG signals is mainly concentrated in specific frequency bands. Short-Time Fourier Transform (STFT) combined with Differential Entropy (DE) is used to extract time-frequency features. First, the time-domain signal of each channel is transformed into a two-dimensional time-frequency matrix using STFT. Then, DE features are extracted from five core frequency bands: delta (1-4Hz), theta (4-8Hz), alpha (8-13Hz), beta (13-30Hz), and gamma (30-45Hz). DE, as an indicator reflecting the probability distribution characteristics of EEG signals, is highly sensitive to changes in emotional state and has been widely validated as an effective feature for EEG emotion recognition. Finally, each sample is transformed into... The feature tensor, where F=5 is the number of frequency bands and T'=16 is the number of sub-time windows for the time-frequency feature.

[0076] S1.3, Two-layer division of brain regions:

[0077] To balance the core contradiction between physiological rationality and data adaptability in brain region segmentation—that is, traditional fixed physiological segmentation, such as Broadman partitioning, is difficult to adapt to the differences in EEG data distribution among different subjects, while purely data-driven segmentation is prone to deviating from actual brain function and leading to ambiguity in physical meaning—this invention designs a two-layer strategy of macroscopic brain region prior constraints and adaptive sub-flow segmentation. The macroscopic brain region flow determines core functional partitions based on affective neuroscience theory, anchoring the segmentation results to a biological basis; the adaptive sub-flow dynamically optimizes the partitioning details through a data-driven method, accurately matching the specificity of individual EEG data.

[0078] (1) Macroscopic brain region flow division:

[0079] Based on the theory of functional zoning of the cerebral cortex, 62 EEG channels were first divided into three macroscopic brain region functional flows to ensure that the division results conform to neurophysiological mechanisms. Flow 1 is the prefrontal cortex macroscopic flow, which includes 18 channels such as Fp1, Fp2, F3, F4, F7, F8, FC1, and FC2. Its core functions are emotion regulation, decision-making, and working memory, making it the core brain region for emotional processing. Flow 2 is the temporal lobe macroscopic flow, which includes 16 channels such as T7 and T8. Its core functions are emotional memory encoding, auditory information processing, and emotional semantic integration. Flow 3 is the parieto-occipital lobe macroscopic flow, which includes 28 channels such as P3, P4, O1, O2, PO3, PO4, CP1, and CP2. Its core functions are multimodal perception integration, spatial attention allocation, and the visualization of emotional experience. This division references the international 10-20 system channel localization standard and classic research conclusions in affective neuroscience, avoiding functional disconnect problems caused by purely data-driven division.

[0080] (2) Adaptive subflow partitioning:

[0081] Within each macroscopic brain region flow, adaptive subflow partitioning is implemented through a progressive process of channel-specific embedding, self-supervised contrastive learning, and differentiable clustering. First, an independent embedder consisting of a 1×1 convolutional layer and LayerNorm is designed for each EEG channel to embed the time-frequency features of a single channel. Transformed into a 128-dimensional semantic vector This preserves the specificity of neural responses in different channels; then, self-supervised contrastive learning is introduced, constructing positive sample pairs by randomly sampling channels from the same macro-flow and constructing negative sample pairs by sampling channels from different macro-flows, so as to enhance the semantic consistency of features of channels with the same function through contrast loss; finally, differentiable Gumbel-Softmax is used for clustering, and the information entropy of feature distribution is calculated for different numbers of sub-flows N, as shown in formula (1):

[0082] (1)

[0083] in, For the feature in the first i The probability distribution in each subflow Let H(N) be the number of substreams. The information entropy H(N) reflects the uncertainty of feature distribution within a substream. The smaller H(N) is, the stronger the semantic consistency of features within a substream, while also balancing computational redundancy and feature underfitting. Finally, the N corresponding to the minimum H(N) is selected as the optimal number of substreams, forming an adaptive brain region stream set F, which both conforms to the distribution characteristics of individual EEG data and does not deviate from the logic of neurophysiological function.

[0084] S2, Sub-flow feature modeling.

[0085] The core of substream feature modeling is to address the disconnect between local short-term features and global long-term trends, while adapting to individual differences. Each substream executes independently according to the process of local feature extraction, global feature extraction, hierarchical meta-learning adaptation, and substream fusion.

[0086] S2.1 Local Feature Extraction:

[0087] Local features correspond to instantaneous neural responses in emotional events, such as a sudden increase in energy in a specific frequency band or an instantaneous change in the activation intensity of a specific brain region during an emotional outburst. It is necessary to capture local dependencies and channel interactions at different time scales and adapt to individual differences through the collaborative design of hybrid expert models (MoE), bilateral feature interaction and enhancement (BIE) modules, and local meta-learners. First, a MoE hybrid expert model is constructed, with four specialized expert networks focusing on local features at different time scales. Expert1 uses a 1×1 convolutional layer to capture inter-band correlations within a single sub-time window; Expert2 uses a 1×3 convolutional layer to capture temporal dependencies across three consecutive time windows; Expert3 uses a 3×3 depthwise separable convolutional layer to capture cross-band and cross-time local interaction features; and Expert4 uses a channel attention module to adaptively weight the local responses of key channels within a sub-stream. This is combined with a gating network activated by two fully connected layers and Softmax. The input is the local spatiotemporal statistics of the sub-stream features (mean, variance, and frequency band correlation for each sub-time window), and the output is the weights of the four experts. The gating network input includes local dynamic information to ensure that the expert weights are adjusted in real time according to emotional states (e.g., the weight of Expert2 dynamically increases during sudden emotional changes). In a stable state, the weight of Expert1 dominates, as shown in the following equation:

[0088] (2)

[0089] in, For sub-stream input features, The weighted fusion features output by the hybrid expert model. Let be the weight of the i-th expert network. This is the function mapping for the i-th expert network. Subsequently, an intra-flow BIE module is introduced to enhance the interaction and complementarity of local features within the sub-flow. First, [the following is a partial translation of the original text, which is incomplete and requires further context]. The query vector, key vector, and value vector, each with a dimension of 128, are decomposed using linear projection. Sine temporal positional encoding is then added to Q and K. As shown in formulas (3) and (4):

[0090] (3)

[0091] (4)

[0092] Where d=128 is the feature dimension and k is the dimension index. This encodes the order of the sub-time windows, and then scaled dot product attention is used to calculate local interaction features, as shown in formula (5):

[0093] (5)

[0094] Finally, residual connections and LayerNorm are used to optimize training stability. As shown in formula (6):

[0095] (6)

[0096] Subsequently, a parameterized local meta-learner consisting of two fully connected layers and ReLU activations is designed to adapt to individual differences in local features. The individual feature statistics of the input substream, such as the DE mean of a subject's beta band, are used as the output parameter adjustment. And the parameters of the local feature extraction module are updated using formula (7), as shown in the following formula:

[0097] (7)

[0098] in, These are the initial parameters for group training. =0.15 is the adaptation coefficient. The final output is the local features of the adapted subflow. .

[0099] S2.2 Global Feature Extraction:

[0100] Global features correspond to the long-term dynamic trends of emotional states, such as the sustained suppression of alpha waves under sustained positive emotions. This requires the collaborative design of Mamba global experts, context-series interaction relay (CIR) modules, and global meta-learners to capture long-range dependencies across time windows and adapt to individual differences.

[0101] Contextual Temporal Interaction Relay Module: Stores temporal context information within substreams through a circular memory unit, assisting the Mamba layer in extracting coherent global features. Simultaneously, it relays temporal memory information to the cross-brain region fusion layer, ensuring the long-term consistency of emotional dynamic features.

[0102] First, we introduce the Mamba global expert as an efficient state-space model with linear complexity. With long-range dependency capture capabilities, adapting to the long-sequence characteristics of EEG time series features, sub-stream features are flattened into The sequence is then input into a 2-layer Mamba block with hidden layer dimensions of 256 and expansion factors of 2. A selective state-space mechanism filters redundant information and preserves core long-term trends, outputting the initial global features. Subsequently, a Context-Time Interaction Relay (CIR) module was designed to assist in coherent Mamba modeling. This module memorizes key information from the previous t-1 sub-time windows through a cyclic update mechanism, including global feature statistics, trend change markers, and meta-learning adaptation parameters. It also fuses the Mamba output of the current sub-time window with the CIR memory through a gating mechanism.

[0103] 1. Trend abrupt change is labeled as "probability value of beta peak (0-1)", "global feature statistics" is "moving mean of DE features in 5 frequency bands (window size = 3)", and meta-learning parameters are... Store directly as a vector to ensure computability;

[0104] 2. Mamba's hidden state It already contains long-term information, allowing CIR and Linkage, the formula is:

[0105] (8)

[0106] in, This refers to the hidden output state of Mamba. For adaptive gating weights ( (For the Sigmoid function), leveraging Mamba's selective state space characteristics to improve the accuracy of long-term trend capture.

[0107] 3. The CIR is initialized as an all-zero vector and updated once every time window is slid to avoid trend interference across emotional segments (e.g., the CIR of positive emotions does not affect the calculation of negative emotions).

[0108] Finally, a global meta-learner with the same structure as the local meta-learner is introduced. It takes as input the global feature statistics of an individual, such as the full-time gamma wave trend of a subject, and outputs the parameter adjustments for the Mamba and CIR modules. As shown in formula (9):

[0109] (9)

[0110] in, For the parameter adjustments of the Mamba module, The parameter tuning amount for the CIR module is updated in the same way as that for the local meta-learner, i.e., by adjusting the initial parameters of the group training and the parameter tuning amount. The update is completed by weighted summation based on the adaptation coefficient, and the final output is the global feature of the subflow after adaptation for individual differences. .

[0111] S2.3, Intra-stream fusion:

[0112] To ensure semantic consistency between local short-term features and global long-term trends, feature concatenation and self-supervised alignment loss are used to achieve intra-flow fusion. First, local intra-flow features are... Intraflow global features Direct concatenation, followed by a 1×1 convolutional layer to reduce the dimension from 256 to 128, yields preliminary fused features. Simultaneously, a projection head containing two fully connected layers and a BN layer is designed to... and Mapping to the same semantic space, the cosine similarity between the two is maximized through self-supervised alignment loss, which forces local details to be consistent with the global trend semantics, such as the local beta peak needing to correspond to the global positive sentiment trend, as shown in formula (10):

[0113] (10)

[0114] in, This represents the projection head mapping. Since the self-supervised alignment loss inversely optimizes the parameters of local features, global features, and the 1×1 convolutional layer, ultimately... The semantic consistency requirement has been met, therefore the complete features of the output substream are obtained. .

[0115] S3, Sub-stream fusion.

[0116] The core of inter-substream fusion is to mine complementary information from different brain region streams while avoiding computational redundancy caused by full interaction. This invention adopts a hierarchical strategy of first performing interactions within macroscopic brain regions, and then performing interactions across macroscopic brain regions. Specifically, a multi-head self-attention mechanism is first used to assign weights to all substream features belonging to the same macroscopic brain region stream and then aggregate them into macroscopic brain region-level features. ∈ Then, adaptive attention fusion is repeated on the three macroscopic brain region-level features to generate comprehensive whole-brain features. ∈ Finally, a lightweight classification head consisting of two fully connected layers and Dropout will... Mapped to the emotion category space, the probability distribution is output via Softmax, and the category with the highest probability is the prediction result.

[0117] S4, Training Strategy.

[0118] To optimize the model's classification performance and individual generalization ability, a multi-objective loss function and a meta-training and meta-testing process are designed, as follows.

[0119] S4.1 Total Loss Function:

[0120] The total loss function includes classification loss, alignment loss, regularization loss, and hierarchical meta-learning loss, which collaboratively optimize the discriminativeness, feature consistency, and generalization of the model. The formula is as follows:

[0121] ;

[0122] The loss terms are defined as follows: It is cross-entropy loss, used in supervised sentiment classification tasks to calculate the difference between predicted probabilities and true labels; It is the alignment loss between local and global features within the subflow; It is L2 regularization loss, which constrains the model parameters. The L2 norm is used to prevent overfitting; It is the local meta-learning loss, which calculates the detailed matching loss between local features and emotion labels after adaptation, such as the accuracy of the correspondence between local beta wave mutations and positive labels. It is the global meta-learning loss, which calculates the trend consistency loss between global and local features after adaptation, such as the overlap between the global beta rise and the local mutation.

[0123] S4.2 Meta-training and Meta-testing Process: The meta-training and meta-testing paradigm is adopted to enable the model to learn individual adaptation strategies and quickly adapt to new subjects.

[0124] (1) Meta-training phase

[0125] First, the 15 participants in the two datasets are considered as 15 sub-tasks. In each training iteration, 10 sub-tasks are randomly sampled as meta-training tasks, 3 as meta-validation tasks, and the remaining 2 are unsampled tasks for that iteration. During the iteration process, all participants will participate in training and validation rounds. For each meta-training task, the training samples of the participant are input, and adaptation parameters are generated through local and global meta-learners. Update the parameters of the feature modeling module within the sub-flow to calculate Based on meta-verification tasks Backpropagation updates the parameters of the hierarchical meta-learner itself, such as the weights of the fully connected layers of the meta-learner, enabling the model to learn a general strategy for quickly adapting to new individuals.

[0126] (2) Meta-testing phase: The meta-testing phase adopts leave-one-out cross-validation (LOSO), that is, 15 subjects are used as test subjects in turn, and the remaining 14 subjects are used as training subjects. For test subjects, only 10 samples are input, covering three types of emotions. The hierarchical meta-learner can quickly generate adaptation parameters and update the model module. In the evaluation phase, adaptation only requires 1-2 epochs. Then, the classification performance is evaluated on the remaining samples of the test subjects to verify the model's generalization ability to new subjects.

[0127] Experimental verification:

[0128] S1, Experimental dataset.

[0129] This invention utilizes the publicly available EEG emotion dataset SEED (SJTU Emotion EEG Dataset), which is widely used in benchmark testing in the field of emotion recognition, and its data quality and annotation reliability have been recognized by the academic community. The dataset includes 15 participants: 7 males and 8 females, aged 22 to 25 years, with no history of mental illness, normal vision or corrected vision, and who signed informed consent forms before the experiment. In the experimental design, each participant watched 15 emotion-inducing videos, including 5 positive, 5 neutral, and 5 negative videos, each approximately 4 minutes long. The video content has been psychologically validated to effectively induce the target emotion. Data acquisition employed an ESI neural scanning system with a sampling rate of 200Hz and 62 EEG channels conforming to the international 10-20 system. During the acquisition process, participants remained resting, avoiding head movement and muscle activity. The SEED-IV dataset is an evolved version of the SEED dataset, also containing 15 participants. All participants had no history of mental illness, normal vision or corrected vision, and signed informed consent forms before the experiment. In terms of experimental design, 72 psychologically validated emotion-evoking videos were selected and conducted in three experimental phases. In each phase, participants watched 24 videos covering four emotion categories: happiness, sadness, fear, and neutrality, with 6 videos for each emotion category. The data collection process was consistent with the SEED dataset, using an ESI neuroscanning system to collect EEG signals. The 62 EEG channels conformed to the international 10-20 system, with an original sampling rate of 1000Hz, which was uniformly reduced to 200Hz after experimental preprocessing. During the acquisition process, participants were required to remain at rest to avoid signal interference caused by head movement, muscle activity, etc.

[0130] S2, Experimental Setup.

[0131] S2.1 Experimental parameter settings:

[0132] The hardware environment used in the experiment of this invention was an Intel Xeon Gold 6248 CPU, an NVIDIA RTX 4090 GPU, and 64GB of DDR4 memory; the software environment was Python 3.9, PyTorch 2.0, MNE 1.3.1, Scikit-learn 1.2.2, and Matplotlib 3.7.1.

[0133] S3. Experimental Results and Analysis.

[0134] S3.1 Overall Performance Comparison:

[0135] To verify the advantages of HMABRF in emotion recognition accuracy, this study selected advanced methods with different technical approaches as baselines and conducted cross-subject emotion recognition experiments on the SEED and SEED-IV datasets. The recognition accuracy of each method was obtained using the leave-one-out cross-validation paradigm, and the results are shown in Table 1.

[0136] Table 1. Comparison of sentiment recognition accuracy of different methods on the SEED and SEED-IV datasets.

[0137]

[0138] As shown in Table 1, HMABRF achieves state-of-the-art performance on both datasets. On the SEED dataset, its accuracy reaches 85.17% ± 6.83%, a 1.18 percentage point improvement over the second-best method, SVM. On the SEED-IV dataset, its accuracy is 76.32% ± 7.28%, a 4.14 percentage point improvement over EEGNet, significantly outperforming all comparable methods. Among the baseline methods, DAN relies solely on a domain adaptation strategy, failing to effectively capture the spatiotemporal features of EEG emotion, resulting in lower performance. While DeepConvNet and EEGNet can extract local spatiotemporal features from EEG, they lack adaptive brain region segmentation and long-term modeling capabilities, limiting their performance. HMABRF, through adaptive brain region flow segmentation combining physiological priors and data-driven approaches, coupled with a hierarchical meta-learning local-global feature co-adaptation module, effectively addresses the pain points of existing methods, achieving a performance breakthrough.

[0139] S3.2 Performance Analysis of Emotion Category Recognition:

[0140] To further analyze the specificity of HMABRF in recognizing different emotion categories, its confusion matrix on the SEED and SEED-IV datasets was plotted. The recognition performance and confusion patterns of various emotions were quantified at the category level. Specific results are as follows: Figure 3 As shown.

[0141] from Figure 3 The confusion matrix shows that the proportion of emotion confusion across arousal levels in SEED is extremely low, demonstrating that the model accurately captures the differentiated EEG patterns of high / low arousal emotions through adaptive brain region flow segmentation. In SEED-IV, confusion is concentrated on emotions with similar valence or arousal levels, further confirming that the features extracted by the model fit the neural processing logic of emotions. This regular low proportion of confusion reflects both the model's targeted capture of core emotional features and its feature generalization ability across subject scenarios.

[0142] S3.3 Verification of model training convergence and generalization ability:

[0143] To verify the stability of the HMABRF training process and its cross-subject generalization ability, the loss value and recognition accuracy of the model in each training round on the SEED and SEED-IV datasets were recorded, and a training convergence curve was plotted, as shown below. Figure 4 As shown.

[0144] from Figure 4 The convergence curves show that the training loss of HMABRF on both datasets decreases rapidly with the number of training epochs, stabilizing around 80 epochs without significant increase or oscillation. This indicates that the model's network structure, loss function design, and hyperparameter configuration ensure training stability and effectively avoid gradient vanishing or exploding problems. Simultaneously, the model's training accuracy increases synchronously with the number of training epochs and stabilizes, showing no obvious signs of overfitting. This lays a solid foundation for the model's excellent performance on the test set. Ultimately, the model achieved cross-subject recognition accuracy of 85.17% and 76.32% on the SEED and SEED-IV test sets, respectively. The core reason for the model's stable convergence during training and excellent generalization ability during the testing phase lies in the self-supervised contrastive learning and local-global alignment loss, which enhance the semantic consistency and robustness of features; the hierarchical meta-learning's local and global meta-learners dynamically adapt to individual differences, reducing the heterogeneity of cross-subject feature distribution; and lightweight designs such as deep separable convolution and residual connections effectively suppress overfitting, enabling the features learned by the model to have strong cross-subject generalization ability.

[0145] Compared with the prior art, the present invention has the following advantages:

[0146] This invention focuses on the problems of individual difference adaptation and feature fusion in EEG emotion recognition, proposing a novel EEG emotion recognition framework, HMABRF. First, this invention proposes an adaptive brain region flow partitioning strategy, balancing physiological rationality and data adaptability through a two-layer partitioning approach, effectively improving feature discriminativeness. Second, a hierarchical meta-learner structure is designed, with local meta-learners capturing individual local feature differences and global meta-learners adapting to global long-term trends, achieving accurate adaptation to individual differences. Third, intra-flow BIE and CIR modules are introduced to strengthen local interaction and long-term memory, respectively. Fourth, a self-supervised alignment loss is proposed to promote semantic consistency between local and global features and reduce feature conflicts. Experimental results show that HMABRF achieves classification accuracy of 85.17% and 76.32% on the SEED and SEED-IV public datasets, respectively, significantly outperforming baseline models. This method provides a new solution for cross-subject EEG emotion recognition, revealing activation patterns in emotion-related brain regions consistent with neuroscientific cognition, and bridging the gap between model interpretability and research on brain functional mechanisms. Future research could explore multimodal emotion data fusion, lightweight model design, and applications in real-time emotion monitoring scenarios.

[0147] Based on the above-mentioned inventive concept, the present invention also provides an emotion recognition system based on electroencephalogram (EEG) signals, comprising:

[0148] The extraction module is used to acquire EEG signals and extract the time-frequency features of multiple channels in the EEG signals.

[0149] The partitioning module is used to divide multiple channels into predefined macroscopic brain region flows; within each macroscopic brain region flow, sub-flows are partitioned based on the time-frequency characteristics of each channel contained therein, resulting in multiple brain region functional sub-flows.

[0150] The feature modeling module is used to extract sub-stream local features and sub-stream global features adapted to individual differences for each brain region functional sub-stream. Specifically, a local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the individual's local feature statistics to adapt to individual local differences, and a global meta-learner dynamically adjusts the parameters of the global feature extraction network based on the individual's global feature statistics to adapt to individual global differences. The time-frequency features corresponding to each channel contained in the sub-stream are input into the parameter-adapted local feature extraction network and global feature extraction network to extract the sub-stream local features and sub-stream global features, respectively.

[0151] The fusion module is used to fuse the local features of the subflow with the global features of the subflow to obtain the complete features of the subflow of the brain region.

[0152] The recognition module is used to interactively fuse the complete features of all sub-flows belonging to the same macro brain region to obtain the total features of the macro brain region flow; to fuse the total features of all macro brain region flows across brain regions to obtain the global integrated features; and to output the emotion recognition result based on the global integrated features.

[0153] The present invention also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The steps of the provided emotion recognition method based on electroencephalogram (EEG) signals.

[0154] This invention also provides a computer device. At the hardware level, the computer device includes a processor, an internal bus, a network interface, memory, and non-volatile memory, and may also include other hardware required for various operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then executes it to achieve the above-mentioned functions. Figure 1 The steps of the provided emotion recognition method based on electroencephalogram (EEG) signals.

[0155] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0156] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0157] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0158] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0159] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the patent of the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. An emotion recognition method based on electroencephalogram (EEG) signals, characterized in that, Includes the following steps: Acquire electroencephalogram (EEG) signals and extract time-frequency features from multiple channels of the EEG signals; The multiple channels are divided into predefined macroscopic brain region flows; within each macroscopic brain region flow, sub-flows are divided based on the time-frequency characteristics of each channel contained therein, resulting in multiple brain region functional sub-flows. For each brain region functional sub-stream, sub-stream local features and sub-stream global features are extracted after individual difference adaptation. Specifically, a local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the individual's local feature statistics to adapt to individual local differences, and a global meta-learner dynamically adjusts the parameters of the global feature extraction network based on the individual's global feature statistics to adapt to individual global differences. The time-frequency features corresponding to each channel contained in the sub-stream are input into the parameter-adapted local feature extraction network and global feature extraction network to extract sub-stream local features and sub-stream global features, respectively. By fusing the local features of the subflow with the global features of the subflow, the complete features of the subflow of the brain region are obtained; Interactively fuse the complete features of all sub-flows belonging to the same macroscopic brain region to obtain the total features of the macroscopic brain region flow; fuse the total features of all macroscopic brain region flows across brain regions to obtain the global integrated features; and output the emotion recognition result based on the global integrated features.

2. The method according to claim 1, characterized in that, The local feature extraction network, after parameter adaptation, extracts local features of the sub-stream, specifically including the following steps: The time-frequency features are input into a pre-trained hybrid expert model, and local features are extracted from different time scales and frequency band interaction perspectives through multiple expert networks. Local spatiotemporal statistical information of the time-frequency features is extracted through a gating network, including the mean, variance, and correlation coefficient between frequency bands for each time window. Dynamic weights for each expert network are generated based on the local spatiotemporal statistical information. The outputs of the four expert networks are weighted and fused according to the dynamic weights to obtain multi-scale preliminary local features. The multi-scale local preliminary features are input into the bilateral feature interaction and enhancement module. The multi-scale local preliminary features are mapped into query vector Q, key vector K and value vector V through linear projection. Temporal position encoding is added to Q and K to preserve the chronological order information of each time window. The interaction weights of local features are calculated using a scaling dot product attention mechanism and V is weighted and aggregated to obtain local interaction features. By using residual connections and layer normalization operations, the multi-scale local preliminary features and local interaction features are added together and normalized to obtain the final adapted sub-flow local features.

3. The method according to claim 2, characterized in that, The local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the local feature statistics of an individual to adapt to individual local differences. This involves the following steps: The individual local feature statistics of the current subject are input into a pre-trained local meta-learner; the local meta-learner consists of a multi-layer fully connected network, and its output is the parameter adjustment amount for the current local feature extraction network. ,in The parameter adjustment amount corresponding to the hybrid expert model. The parameter adjustment amount corresponds to the bilateral feature interaction and enhancement module; the individual local feature statistics are the DE mean of the subject's beta band; Adjust the amount according to the parameters. The initial group training parameters for the hybrid expert model and the bilateral feature interaction and enhancement module. Perform individualized updates to obtain adapted network parameters. : ;in This is a preset adaptation coefficient used to control the extent of individualized adjustments.

4. The method according to claim 1, characterized in that, The global feature extraction network, after parameter adaptation, extracts global features of the sub-stream, specifically including the following steps: The time-frequency features are serialized to obtain time-series sequence features; The time-series features are input into a pre-trained state-space model, which adopts a Mamba structure and contains multiple layers of selective state-space blocks. Each selective state-space block projects the input time-series features into the state space through a selective state-space mechanism and dynamically selects information to be retained or forgotten based on the input features. After stacking multiple selective state-space blocks, the long-range dependencies spanning the entire time-series are captured, and the initial global features are output. The time-series features and the intermediate hidden states of the state-space model are input into the context-time-series interaction relay module. The relay module includes a circular memory unit and a gating fusion mechanism. The circular memory unit is used to maintain the memory state of historical time windows. The memory state of the current moment is updated through the gating fusion mechanism. After traversing all time windows, the final memory state is used as the context-enhanced global feature and fused with the initial global feature to obtain the sub-stream global feature.

5. The method according to claim 4, characterized in that, The process of dynamically adjusting the parameters of the global feature extraction network based on the global feature statistics of an individual to adapt to individual global differences specifically includes the following steps: The individual global feature statistics of the current subject are input into a pre-trained global meta-learner; the global meta-learner consists of a multi-layer fully connected network, and its output is the parameter adjustment amount for the current global feature extraction network. ,in The parameter adjustment amount corresponding to the state-space model. The parameter adjustment amount corresponds to the context-series interactive relay module; the global feature statistics are the moving average of the DE features of the five frequency bands; Adjust the amount according to the parameters. The initial group training parameters of the state space model and the context-series interaction relay module are individually updated to obtain the adapted network parameters.

6. The method according to claim 1, characterized in that, The process of fusing the local features of the sub-flow with the global features of the sub-flow to obtain the complete features of the sub-flow of the brain region flow specifically includes: concatenating and fusing the local features of the sub-flow with the global features of the sub-flow, mapping the local features of the sub-flow with the global features of the sub-flow to the same semantic space and introducing a self-supervised alignment loss to maximize their similarity, forcing the two to be semantically consistent, so as to output the complete features of the sub-flow of the brain region flow.

7. The method according to claim 1, characterized in that, Within each macroscopic brain region stream, substreams are divided based on the time-frequency characteristics of each channel contained therein to obtain multiple brain region functional substreams, including the following steps: Generate an embedding representation of the time-frequency features of each channel within the current macroscopic brain region flow; Based on self-supervised contrastive learning, positive sample pairs and negative sample pairs are constructed. Among them, the embedding representations of two channels randomly sampled from the same macroscopic brain region flow are used as positive sample pairs, and the embedding representations of one channel randomly sampled from different macroscopic brain region flows are used as negative sample pairs. Based on the positive sample pairs and the negative sample pairs, a contrastive loss function is calculated; the contrastive loss function is defined as the negative logarithm of the ratio of the similarity of the positive sample pairs to the sum of the similarities of all sample pairs. The contrastive loss function is minimized by the backpropagation algorithm to bring the positive sample pairs closer to each other in the feature space and push the negative sample pairs further apart, thus obtaining the contrastive learning channel embedding representation. Based on the channel embedding representation after contrastive learning, the number of sub-flows and channel affiliation contained within each macroscopic brain region flow are dynamically determined by a differentiable clustering algorithm, forming the multiple brain region functional sub-flows.

8. An emotion recognition system based on electroencephalogram (EEG) signals, characterized in that, include: An extraction module is used to acquire electroencephalogram (EEG) signals and extract the time-frequency features of multiple channels in the EEG signals; A partitioning module is used to divide the multiple channels into predefined macroscopic brain region flows; within each macroscopic brain region flow, sub-flows are partitioned based on the time-frequency characteristics of each channel contained therein to obtain multiple brain region functional sub-flows; The feature modeling module is used to extract sub-stream local features and sub-stream global features adapted to individual differences for each brain region functional sub-stream. Specifically, a local meta-learner dynamically adjusts the parameters of the local feature extraction network based on the individual's local feature statistics to adapt to individual local differences, and a global meta-learner dynamically adjusts the parameters of the global feature extraction network based on the individual's global feature statistics to adapt to individual global differences. The time-frequency features corresponding to each channel contained in the sub-stream are input into the parameter-adapted local feature extraction network and global feature extraction network to extract the sub-stream local features and sub-stream global features, respectively. The fusion module is used to fuse the local features of the subflow with the global features of the subflow to obtain the complete features of the subflow of the brain region. The recognition module is used to interactively fuse the complete features of all sub-flows belonging to the same macroscopic brain region to obtain the total features of the macroscopic brain region flow; to fuse the total features of all macroscopic brain region flows across brain regions to obtain the global integrated features; and to output the emotion recognition result based on the global integrated features.

9. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 7.

10. A readable storage medium storing a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 7.