Lightweight electroencephalogram signal decoding method based on space grouping enhancement

By constructing a spatial grouping enhancement network model, using temporal convolution and depthwise separable convolution to extract the spatiotemporal features of EEG signals, and combining the importance coefficient for feature enhancement, the insufficient optimization of spatiotemporal characteristics and real-time problems of EEG signal decoding in the existing technology are solved, and efficient EEG signal decoding is achieved.

CN120705477APending Publication Date: 2025-09-26NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510866715.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-26
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing EEG signal decoding technology cannot effectively optimize the spatiotemporal characteristics of EEG signals, has poor performance, complex structure and high computational overhead, and is difficult to meet real-time requirements.

Method used

A spatial grouping enhancement network model is constructed, spatiotemporal features are extracted through temporal convolution and depthwise separable convolution, feature enhancement is performed in combination with importance coefficients, and classification is performed using fully connected layers to reduce the number of model parameters and computational complexity.

Benefits of technology

It significantly improves the decoding accuracy and real-time performance of motor imagery EEG signals, solves the balance problem between model complexity and classification accuracy of traditional methods, and meets the real-time requirements of brain-computer interface systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705477A_ABST
    Figure CN120705477A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of brain-computer interfaces and neural signals, in particular to a light-weight electroencephalogram signal decoding method based on spatial grouping enhancement, which comprises the following steps: acquiring motor imagery electroencephalogram signal data, and preprocessing the motor imagery electroencephalogram signal data; constructing a space grouping enhancement network model, inputting the preprocessed motor imagery electroencephalogram signal data for training, calculating an importance coefficient, determining a loss function, and marking a corresponding motor imagery category; and obtaining to-be-decoded motor imagery electroencephalogram signal data, inputting the to-be-decoded motor imagery electroencephalogram signal data into the trained space grouping enhancement network model, and performing decoding in combination with the importance coefficient to obtain a corresponding classification result. According to the space grouping enhancement network model, the space-time characteristics of the EEG signals can be synchronously optimized, coupling optimization of the space-time characteristics of the EEG signals is achieved, the technical problem that an existing EEG signal decoding method is difficult to balance between model complexity and classification precision is solved, and the decoding accuracy and real-time performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of brain-computer interface and neural signal processing technology, and in particular to a lightweight EEG signal decoding method based on spatial grouping enhancement. Background Art

[0002] Brain-Computer Interface (BCI) technology is a cutting-edge technology that enables human-computer interaction by decoding brain neural activity signals. It has received widespread attention in recent years. It establishes a direct communication channel between the brain and external devices by collecting and processing electrical signals generated by the brain. With the development of technology, the application scope of BCI technology has expanded to multiple fields. Among them, electroencephalography (EEG) decoding based on motor imagery (MI) has become an important research direction of BCI systems due to its advantages such as low cost and simple operation.

[0003] However, accurate decoding of motor imagery EEG signals still faces numerous challenges. First, EEG signals have low signal-to-noise ratios and strong nonstationarity, making them susceptible to electrode placement, physiological artifacts (such as myoelectric and electrooculographic signals), and environmental noise, which can degrade signal quality. Second, due to the brain's capacity as a volumetric conductor, EEG signals vary significantly between individuals, and even within the same individual at different time points, further complicating EEG signal decoding. To address these challenges, various machine learning and signal processing methods have been developed, such as filter banks, common spatial patterns (CSPs), and their improved algorithms (such as FBCSPs) to extract effective spatiotemporal and frequency domain features from noisy data. Traditional classifiers such as support vector machines (SVMs) and linear discriminant analysis (LDA) have also been widely used in motor imagery classification tasks.

[0004] In recent years, convolutional neural networks (CNN) have been introduced into EEG signal decoding research due to their outstanding performance in the field of computer vision. End-to-end models such as DeepConvNet (DeepConvolutional Network) and ShallowNet directly use raw EEG signals as input, which is superior to traditional methods. Among them, EEGNet has demonstrated good generalization ability in multiple BCI paradigms through lightweight designs such as deep separable convolution. In order to improve performance, improved models such as EEGNex have been proposed, which enhance the ability of temporal feature extraction by introducing void convolution and inverse bottleneck structure. However, there are still certain limitations. First, most models directly transfer the network architecture in the field of image processing and fail to optimize the spatiotemporal characteristics of EEG signals. Second, the model is not robust enough to noise interference, and its performance degrades significantly in complex scenarios. Third, high-performance models are often accompanied by complex structures and computational overheads, which make it difficult to meet real-time requirements. Summary of the Invention

[0005] In order to solve the technical problems that the existing EEG signal decoding technology has certain limitations, cannot optimize the spatiotemporal characteristics of EEG signals, has poor performance, complex structure and high computational overhead, and is difficult to meet real-time requirements, the purpose of the present invention is to provide a lightweight EEG signal decoding method based on spatial grouping enhancement. The technical solutions adopted are as follows:

[0006] Obtain motor imagery EEG signal data and perform preprocessing;

[0007] Construct a spatial grouping enhancement network model, input the preprocessed motor imagery EEG signal data for training, calculate the importance coefficient, determine the loss function, and label the corresponding motor imagery category;

[0008] The motor imagery EEG signal data to be decoded is obtained and input into the trained spatial grouping enhancement network model. The data is decoded in combination with the importance coefficient to obtain the corresponding classification results.

[0009] Preferably, obtaining motor imagery EEG signal data and performing preprocessing include:

[0010] Bandpass filtering was used to remove noise from the motor imagery EEG signal data, and independent component analysis was used to decompose the mixed signals in the motor imagery EEG signal data to remove physiological artifacts.

[0011] The processed motor imagery EEG signal data were segmented and normalized.

[0012] Preferably, a spatial grouping enhancement network model is constructed, and the pre-processed motor imagery EEG signal data is input for training, the importance coefficient is calculated, and the loss function is determined, and the corresponding motor imagery category is marked, including:

[0013] The spatial grouping enhancement network model includes a feature extraction module, a spatial grouping enhancement module and a classification module which are arranged in sequence;

[0014] The pre-processed motor imagery EEG signal data is input into the feature extraction module, and the spatiotemporal features are obtained through temporal convolution and depthwise separable convolution to generate a feature map;

[0015] Based on the spatial grouping enhancement module, the feature map is grouped and the importance coefficient is calculated. All features in the feature map are enhanced by the importance coefficient.

[0016] The enhanced features are input into the classification module, the loss function is determined, the motor imagery categories are labeled, and the probability distribution is output.

[0017] Preferably, the pre-processed motor imagery EEG signal data is input into a feature extraction module, and spatiotemporal features are obtained through temporal convolution and depthwise separable convolution to generate a feature map, including:

[0018] The feature extraction module includes a convolution unit, an average pooling layer and a Dropout layer;

[0019] The pre-processed motor imagery EEG signal data is input into the convolution unit, the spatiotemporal features in the motor imagery EEG signal data are captured by sliding windows, and the spatiotemporal features are processed using depthwise separable convolution to generate the initial feature map;

[0020] The average pooling layer is used to average the local area in the initial feature map, and the dropout layer is used to randomly discard the spatiotemporal features in some of the initial feature maps;

[0021] The hole convolution is introduced to capture the long-range dependencies in the initial feature map after processing and generate a feature map.

[0022] Preferably, the spatial grouping enhancement module performs group attention calculation on the feature map, calculates the importance coefficient, and enhances all features in the feature map using the importance coefficient, including:

[0023] The feature maps are grouped along the channel dimension based on the spatial grouping enhancement module, and the global statistics are calculated based on the local features of each group of spatiotemporal features, which are recorded as global features;

[0024] The importance coefficient is calculated by the dot product of local features and global features, and then normalized;

[0025] Use learnable parameters to adjust the importance coefficient after normalization, and combine activation functions to enhance all features in the feature map.

[0026] Preferably, a global statistic is calculated based on the local features of each set of spatiotemporal features, which is recorded as a global feature. The corresponding calculation formula is:

[0027]

[0028] in, Represents global features; Indicates the spatial size corresponding to each set of spatiotemporal features, , Indicates height, Indicates width; Indicates the Local features in group spatiotemporal features.

[0029] Preferably, the importance coefficient is calculated by the dot product of the local feature and the global feature, and normalized, including:

[0030] The importance coefficient is calculated by the dot product of local features and global features. The corresponding calculation formula is:

[0031]

[0032] in, Indicates the Local features in group spatiotemporal features The corresponding importance coefficient; Represents global features; Indicates the Local features in group spatiotemporal features;

[0033] The importance coefficient of standardization is calculated as follows:

[0034]

[0035]

[0036]

[0037] in, Represents the importance coefficient The results after standardization; Indicates the current The mean of the importance coefficients of all corresponding spatial positions in the group's spatiotemporal features; Indicates the spatial size corresponding to each set of spatiotemporal features; Indicates the current Another group in the group's spatiotemporal features The importance coefficient corresponding to each local feature; Indicates the The variance of the importance coefficient of the group's spatiotemporal features; Indicates the Standard deviation of the importance coefficient of the group's spatiotemporal features; Represents a numerical stabilization term, used to prevent the denominator from being zero.

[0038] Preferably, the importance coefficient after normalization is adjusted using a learnable parameter and an activation function is combined to enhance all features in the feature map, including:

[0039] Use the learnable parameters to adjust the importance coefficient after normalization. The corresponding calculation formula is:

[0040]

[0041] in, represents the adjusted importance coefficient; Represents the importance coefficient The results after standardization; and represents a learnable parameter;

[0042] Combined with the activation function, all features in the feature map are enhanced. The corresponding calculation formula is:

[0043]

[0044] in, Representation characteristics Enhance the processed features; Indicates the first group spatiotemporal characteristics; Represents the activation function.

[0045] Preferably, the enhanced features are input into a classification module to determine the loss function, label the motor imagery category, and output a probability distribution, including:

[0046] The classification module includes a first fully connected layer, a second fully connected layer and an output layer;

[0047] The enhanced features are input into the first fully connected layer for feature mapping. The corresponding calculation formula is:

[0048]

[0049] in, Indicates the output result after feature mapping is completed; represents the activation function; represents the convolution kernel; Represents the vector obtained by flattening the enhanced features; represents the bias term;

[0050] The output result after feature mapping is input into the second fully connected layer for feature compression. The corresponding calculation formula is:

[0051]

[0052] in, Indicates the output result after feature compression; represents the convolution kernel; represents the bias term;

[0053] The output result after feature compression is input to the output layer, the loss function is determined, the motor imagery category is labeled, and the probability distribution is obtained. The corresponding calculation formula is:

[0054]

[0055] in, represents a probability distribution; Represents the classifier function operation; represents the convolution kernel; represents the bias term.

[0056] Preferably, the calculation formula corresponding to the loss function is:

[0057]

[0058] in, represents the loss function; Represents the number of groups of spatiotemporal features in the feature map; Indicates the first kind; Indicates the The spatiotemporal features of the group belong to The true probability of the class; Indicates the The spatiotemporal features of the group belong to The predicted probability of the class.

[0059] The present invention has the following beneficial effects:

[0060] According to the spatial grouping enhancement network model, the spatiotemporal characteristics of EEG signals can be optimized synchronously; it groups multi-channel EEG signals according to brain area functions. In the spatial dimension, the module groups multi-channel EEG signals according to brain area functions, such as motor area, sensory area, etc., and calculates the importance coefficient through global-local feature interaction within the group, which significantly enhances the characteristic response of task-related brain areas; in the temporal dimension, while retaining the original signal, the long-term statistical features are captured through time-series global pooling, and dot product operations are performed with local time features, so that the importance coefficient implies a dynamic time series pattern, and adaptively adjusts the importance of different brain area features, effectively improving the characteristic representation ability of motor imagery EEG signals, realizing the coupled optimization of the spatiotemporal characteristics of EEG signals, significantly enhancing the characteristic response of task-related brain areas, and solving the problem of traditional methods being sensitive to noise.

[0061] The overall constructed spatial grouping enhancement network adopts a lightweight design of depthwise separable convolution and dilated convolution, which significantly reduces the number of model parameters and computational complexity while ensuring classification accuracy, meeting the real-time requirements of the brain-computer interface system; it then performs decoding to directly process the EEG signals, avoiding the complex manual feature extraction steps, and thus solving the technical problem of the existing EEG signal decoding methods that is difficult to balance between model complexity and classification accuracy, improving the decoding accuracy and real-time performance of motor imagery EEG signals, and providing an efficient technical solution for clinical rehabilitation and intelligent prosthetic control. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. 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 these drawings without paying any creative work.

[0063] Figure 1 A flowchart of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by one embodiment of the present invention;

[0064] Figure 2 A time paradigm of motor imagery EEG signal data in a lightweight EEG signal decoding method based on spatial grouping enhancement provided by one embodiment of the present invention;

[0065] Figure 3 A diagram of the training process of a spatial grouping enhancement network model of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0066] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features and effects of a lightweight EEG signal decoding method based on spatial grouping enhancement proposed by the present invention. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0067] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0068] The following describes in detail a specific solution of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by the present invention with reference to the accompanying drawings.

[0069] See also Figure 1 , which shows a flowchart of the steps of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by the first embodiment of the present invention, the method comprising:

[0070] Step S1: Acquire motor imagery EEG signal data and perform preprocessing;

[0071] Step S2: Construct a spatial grouping enhancement network model, input the preprocessed motor imagery EEG signal data for training, calculate the importance coefficient, determine the loss function, and label the corresponding motor imagery category;

[0072] Step S3: Obtain the motor imagery EEG signal data to be decoded, input it into the trained spatial grouping enhancement network model, and perform decoding in combination with the importance coefficient to obtain the corresponding classification result.

[0073] To better illustrate, efficient and accurate decoding of EEG signals can better understand and utilize brain activity information; however, traditional methods for decoding EEG signals have certain limitations, so the EEG signal decoding method of this application is proposed.

[0074] Furthermore, step S1 includes:

[0075] Step S11: removing noise from the motor imagery EEG signal data by bandpass filtering, and decomposing the mixed signal in the motor imagery EEG signal data by independent component analysis to remove physiological artifacts;

[0076] Step S12: Segment and standardize the processed motor imagery EEG signal data.

[0077] Preferably, the motor imagery EEG signal data is collected from the BCI Competition IV-2a standard dataset.

[0078] Specifically, motor imagery EEG signal data from a public standard EEG dataset is obtained and bandpass filtered to allow signals within a specific frequency range to pass. In this embodiment, the specific frequency range is set to 4-40 Hz to ensure that the effective components in the motor imagery EEG signal data are retained, thereby removing noise and filtering out high-frequency noise or low-frequency interference. Independent Component Analysis (ICA) is then used to remove physiological artifacts to further purify the signal. ICA decomposes mixed signals, identifies independent components, and classifies these components according to their sources, thereby removing components unrelated to EEG activity. Components unrelated to EEG activity are selected and removed. Physiological artifacts are typically signal interference caused by non-EEG activities such as blinking, eye movements, and muscle activity. The signal is then segmented and normalized. This means that the continuous EEG signal is divided into shorter time segments to facilitate subsequent analysis. Normalization is performed to eliminate the effects of different experimental conditions or individual differences, adjusting the EEG signal to a specific value to ensure comparability across different conditions. Preprocessing ensures the quality and reliability of the EEG signal.

[0079] Furthermore, step S2 includes:

[0080] The spatial grouping enhancement network model includes a feature extraction module, a spatial grouping enhancement module and a classification module which are arranged in sequence.

[0081] It can be explained that the feature extraction module uses temporal convolution and depthwise separable convolution technology to deeply explore the spatiotemporal features in the pre-processed motor imagery EEG signal data, that is, it captures the changes and distribution of EEG signals in the time and spatial dimensions, generates feature maps, and effectively extracts key information that is helpful for subsequent tasks; the spatial grouping enhancement module uses the grouping attention mechanism to perform weighted calculations on different areas of the feature map, highlighting important features and suppressing irrelevant noise, that is, combining the importance coefficient to focus on features that contribute to the classification task, improve the overall performance, and enhance the features; the classification module uses a fully connected layer to map the enhanced features to the final output space, and then outputs the probability distribution of each motor imagery category to provide a basis for subsequent decision-making; that is, through spatial grouping enhancement, the collaborative work of the network model can be accurately identified and classified into motor imagery categories in EEG signals.

[0082] Step S21: The pre-processed motor imagery EEG signal data is input into the feature extraction module, and the spatiotemporal features are obtained through temporal convolution and depthwise separable convolution to generate a feature map.

[0083] Furthermore, step S21 includes:

[0084] The feature extraction module includes convolutional units, average pooling layers and Dropout layers.

[0085] To illustrate, in this embodiment, the convolution unit is two two-dimensional convolution units, the number of filters is 8 and 32 respectively, and the kernel size is ; The size of the average pooling layer is ; The Dropout layer is set to 0.5.

[0086] Step S211: input the preprocessed motor imagery EEG signal data into the convolution unit, capture the spatiotemporal features in the motor imagery EEG signal data through a sliding window, and use depthwise separable convolution to process the spatiotemporal features to generate an initial feature map.

[0087] Specifically, in this embodiment, the preprocessed motor imagery EEG signal data is 1000 time points, and the number of channels is 22, the step size is set to 1, the EEG signal is input into each convolution unit, the step size is set to 1, and each convolution unit can cover a time window of 128ms to calculate the dot product between the EEG signal and the convolution kernel, and then generate spatiotemporal features with a size of 22×969×8. The time points are reduced from the original 1000 time points to 969 time points to adapt to the coverage of the convolution kernel and ensure that the spatiotemporal features can focus on different frequency band features; then the depthwise separable convolution is used to convolution the time. The empty features are processed to achieve space and channel decoupling. First, a 22×1 convolution kernel is used to process each spatial position, that is, the electrode channel, separately to generate an intermediate feature map with a size of 22×969×16 and a depth multiplier of 2, which doubles the number of channels. Due to different channels, the weight distribution is different. For example, the weight of the C3 or C4 channel is as high as 0.78, while the weight of the FP1 or FP2 channel is only 0.12. Then, the channel information is integrated and a 1×1 convolution kernel is used for point convolution operation to compress the spatial dimension to obtain the final output initial feature map with a size of 1×969×16 to reduce the number of parameters.

[0088] Step S212: Use the average pooling layer to perform an average operation on the local area in the initial feature map, and use the Dropout layer to randomly discard some of the spatiotemporal features in the initial feature map; that is, the average pooling layer and the Dropout layer are used to prevent overfitting and improve generalization ability.

[0089] Step S213: Introduce the dilated convolution to capture the long-range dependencies in the initial feature map after processing to generate a feature map.

[0090] Specifically, the processed initial feature map is passed through the first layer of dilated convolution to obtain a feature map of size 1×939×32, where the receptive field is 31 points, equivalent to 248ms, which can effectively capture the movement preparation potential (BP, i.e. Binding Potential). At t=200ms, a negative wave appears with an amplitude of Then, through the second layer of dilated convolution, a feature map of size 1×891×8 is obtained, in which the receptive field is further expanded to 61 points, equivalent to 488ms, which can effectively capture the motor-related potential (MRP). In the time range of 1-4s, the positive slow wave is sustained, and its amplitude is ; Then, the output of the dilated convolution is downsampled to obtain a feature map of size 1×222×8, that is, a feature map is generated, and the temporal resolution is reduced from 891 time points to 222 time points, but the potential information related to the key events is still retained, providing a basis for subsequent classification tasks.

[0091] Step S22: Perform group attention calculation on the feature map based on the spatial grouping enhancement module, calculate the importance coefficient, and enhance all features in the feature map through the importance coefficient.

[0092] Furthermore, step S22 includes:

[0093] Step S221: The feature maps are grouped along the channel dimension based on the spatial grouping enhancement module, and global statistics are calculated based on the local features of each group of spatiotemporal features, which are recorded as global features.

[0094] It is explained that in this embodiment, the feature maps are grouped along the channel dimension, that is, the feature maps are evenly divided according to the channel dimension. For example, if the channel dimension of the feature map is 64, it is divided into 32 groups, and each group contains 2 channels; the spatiotemporal features in any group are recorded as local features, and each group of channels is processed independently, and its corresponding semantic information is represented by global features, thereby improving the flexibility and computational efficiency of data analysis.

[0095] Furthermore, in step S221, a global statistic is calculated based on the local features of each set of spatiotemporal features, which is recorded as a global feature. The corresponding calculation formula is:

[0096]

[0097] in, Represents global features; Indicates the spatial size corresponding to each set of spatiotemporal features, , Indicates height, Indicates width; Indicates the Local features in group spatiotemporal features.

[0098] Step S222: Calculate the importance coefficient by the dot product of the local feature and the global feature, and perform normalization.

[0099] It is explained that the attention weight is generated by the dot product of local features and global features, that is, the importance coefficient is calculated to quantify the similarity between local features and global features, which facilitates the screening of task-related spatiotemporal features and enhancement processing.

[0100] Furthermore, step S222 includes:

[0101] The importance coefficient is calculated by the dot product of local features and global features. The corresponding calculation formula is:

[0102]

[0103] in, Indicates the Local features in group spatiotemporal features The corresponding importance coefficient; Represents global features; Indicates the Local features in group spatiotemporal features;

[0104] The importance coefficient of standardization is calculated as follows:

[0105]

[0106]

[0107]

[0108] in, Represents the importance coefficient The results after standardization; Indicates the current The mean of the importance coefficients of all corresponding spatial positions in the group's spatiotemporal features; Indicates the spatial size corresponding to each set of spatiotemporal features; Indicates the current Another group in the group's spatiotemporal features The importance coefficient corresponding to each local feature; Indicates the The variance of the importance coefficient of the group's spatiotemporal features; Indicates the Standard deviation of the importance coefficient of the group's spatiotemporal features; Represents a numerical stabilization term, used to prevent the denominator from being zero.

[0109] It can be explained that the standardization based on the importance coefficient is to prevent bias between samples and ensure the fairness and comparability of the data.

[0110] Step S223: Use the learnable parameters to adjust the importance coefficient after normalization, and combine the activation function to enhance all features in the feature map.

[0111] Furthermore, step S223 includes:

[0112] Use the learnable parameters to adjust the importance coefficient after normalization. The corresponding calculation formula is:

[0113]

[0114] in, represents the adjusted importance coefficient; Represents the importance coefficient The results after standardization; and represents a learnable parameter;

[0115] Combined with the activation function, all features in the feature map are enhanced. The corresponding calculation formula is:

[0116]

[0117] in, Representation characteristics Enhance the processed features; Indicates the first group spatiotemporal characteristics; Represents the activation function.

[0118] It is explained that the importance coefficient is dynamically adjusted through the learnable parameters, that is, the attention weight distribution is dynamically adjusted; the features are enhanced using the adjusted importance coefficient, where Indicates the first A group of spatiotemporal features, that is, each group of local features is integrated to form a feature , integrate all enhanced spatiotemporal features and get , Represents all enhanced spatiotemporal features in the feature map; Representation characteristics Enhance the processed features; Indicates the total number of channels corresponding to the feature map; Indicates the number of groups corresponding to the feature map; Indicates the spatial size corresponding to each set of spatiotemporal features; Indicates height, Indicates width.

[0119] See also Figure 2 Preferably, it shows the time paradigm of motor imagery EEG signal data of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by the first embodiment of the present invention; wherein, the difference in neural activation intensity of different motor imagery task categories is represented by the depth, which reflects the continuous physiological response quantified by the standardized power change, that is, based on the event-related desynchronization (ERD, Event-Related Desynchronization) and event-related synchronization (ERS, Event-Related Synchronization) phenomena, ERD reflects the activation state of cortical neurons, indicating Rhythm 8-12Hz or The power of neural oscillations in any specific frequency range of 13-30 Hz was significantly reduced during task execution, for example, the power of the C3 channel in the left motor cortex during right-hand motor imagery was significantly reduced. The rhythmic power decreases by 40%; while ERS reflects the inhibition or functional reorganization of neural activity, which means that the power in a specific frequency band increases after a task or in an inhibitory state. For example, the power of the ipsilateral motor cortex increases by 15-20%. Among them, the deep degree corresponds to a strong ERD, which means a negative value and a decrease in power; the shallow degree corresponds to a weak ERD or ERS, which means a positive value and an increase in power. The two together constitute a complete neural activation-inhibition dynamic process.

[0120] It can be explained that the effective time window corresponding to the Motor imagery stage represents the data segment actually used for model training. The overlapping part of the approximately 200ms with the adjacent solid box, the Cue prompt stage, is the physiological compensation of the paradigm design to reflect the delayed response of the human brain to visual cues. The dotted border indicates that the time window adopts soft truncation, that is, Hamming window weighting, to avoid spectral leakage, thereby ensuring that the EEG signal in the motor imagery stage is complete and reliable.

[0121] It is noted that the inter-frame overlap design in the temporal paradigm complies with the recommendations of IEEE Standard 306-2020 (Institute of Electrical and Electronics Engineers Standard 306-2020) for the BCI paradigm, in which the front overlap, i.e., Cue→Motor imagery, compensates for the conduction delay from the visual cortex to the motor cortex; the back overlap, i.e., Motor imagery→Break, is used to capture the aftereffect of motor imagery; by analyzing 5-7s of data and starting 0.5s in advance, the decay process of the motor afterpotential (MRP) can be covered.

[0122] Step S23: Input the enhanced features into the classification module, determine the loss function, label the motor imagery category, and output the probability distribution.

[0123] Furthermore, step S23 includes:

[0124] The classification module includes a first fully connected layer, a second fully connected layer, and an output layer. It can be explained that, in this embodiment, the first fully connected layer includes 128 neurons to fuse the enhanced features; the second fully connected layer includes 64 neurons to compress the fused features to facilitate better classification tasks; the output layer uses The activation function adjusts the boundary offset to ensure that the output is within a reasonable range, thereby reflecting the probability distribution of different motor imagery categories.

[0125] Step S231: Input the enhanced features into the first fully connected layer for feature mapping. The corresponding calculation formula is:

[0126]

[0127] in, Indicates the output result after feature mapping is completed; represents the activation function; represents the convolution kernel; Represents the vector obtained by flattening the enhanced features; represents the bias term;

[0128] Step S232: Input the output result after feature mapping to the second fully connected layer for feature compression. The corresponding calculation formula is:

[0129]

[0130] in, Indicates the output result after feature compression; represents the convolution kernel; represents the bias term;

[0131] Step S233: Input the output result after feature compression to the output layer, determine the loss function, label the motor imagery category, and obtain the probability distribution. The corresponding calculation formula is:

[0132]

[0133] in, represents a probability distribution; Represents the classifier function operation; represents the convolution kernel; represents the bias term.

[0134] To illustrate, the fully connected layer uses the activation function Its core logic is to connect the input features with the weight matrix through matrix multiplication, and add the bias term. The calculation process is clear and easy to understand and implement. Compared with other existing solutions, the fully connected layer is relatively easy to use for task positioning and optimization. It can directly globally associate and integrate all input features. Each output neuron is connected to all input neurons, and it has a stronger advantage in capturing complex nonlinear relationships between features. That is, for tasks with low feature dimensions or strong correlation between features, the fully connected layer can more directly map features to the classification space. In addition, the fully connected layer has a large number of mature parameter adjustment strategies and optimization methods, richer practical experience, and can obtain better classification results.

[0135] Specifically, the classification module receives the features output by the spatial grouping enhancement module and maps them to a 128-dimensional space through the first fully connected layer, that is, the enhanced spatiotemporal features are fused and encoded into high-order semantic representations to better capture and understand the complex patterns in the data; then the spatiotemporal features are compressed to 64 dimensions through the second fully connected layer, that is, , to avoid over-compression, and 64 dimensions are sufficient to distinguish the information of the four categories of motor imagery: left hand, right hand, feet and tongue; then the activation function of the output layer is combined with the bias term Adjust the offset of the motor imagery category and transform it into a probability distribution to prevent the influence of linear transformation, where the bias term Baseline activation offset for each of the four motor imagery categories, represents the convolution kernel, , that is, the 64-dimensional output of the second fully connected layer is projected into 4 dimensions, corresponding to four categories of motor imagination; through the synergistic effect of various structures in the classification module, the enhanced features input by the spatial grouping enhancement module are effectively mapped to the corresponding motor imagination categories to achieve accurate classification.

[0136] Furthermore, in step S233, the calculation formula corresponding to the loss function is:

[0137]

[0138] in, represents the loss function; Represents the number of groups of spatiotemporal features in the feature map; Indicates the first kind; Indicates the The spatiotemporal features of the group belong to The true probability of the class; Indicates the The spatiotemporal features of the group belong to The predicted probability of the class.

[0139] Make an explanation, Indicates the first class, which corresponds to the four categories of motor imagination given above; a loss function is used to train the entire spatial grouping enhancement network model. In this embodiment, the cross entropy loss function and the Adam optimizer are used, and the learning rate is set to 0.001. Compared with the MSE (Mean Squared Error) loss function based on EEG signals, the convergence is faster and more suitable for the current classification scenario; wherein, the batch size is set to 64, the early stopping strategy is adopted, and the patience value is set to 20 to prevent the model from overfitting and improve the generalization ability of the model on unknown data; the maximum training cycle is 200, which ensures that the model is fully learned while avoiding too long training time; 5-fold cross validation is used to evaluate the performance of the spatial grouping enhancement network model to ensure that the model is trained and verified on different data subsets so as to more accurately evaluate the generalization ability of the model.

[0140] See also Figure 3 For better explanation, it shows a training process diagram of the spatial grouping enhancement network model of a lightweight EEG signal decoding method based on spatial grouping enhancement provided by the first embodiment of the present invention; wherein, the training loss stably converges to below 0.2 after 150 rounds, and the accuracy rate simultaneously rises to a stable state. The stability of the spatial grouping enhancement module is demonstrated based on the smooth convergence curve, and the grouping attention mechanism avoids the gradient explosion / vanishing problem through normalization processing; and the overall curve does not show violent oscillations, indicating that the spatial grouping enhancement module has strong anti-interference ability. The small fluctuations in the epochs 50-100 range correspond to the noise suppression process, indicating that noise such as electromyographic artifacts is effectively filtered out through the importance coefficient.

[0141] It can be understood that the spatial grouping enhancement network model can simultaneously optimize the spatiotemporal characteristics of EEG signals; it groups multi-channel EEG signals according to brain area functions. In the spatial dimension, the module groups multi-channel EEG signals according to brain area functions, such as motor area, sensory area, etc., and calculates the importance coefficient through global-local feature interaction within the group, which significantly enhances the feature response of task-related brain areas; in the temporal dimension, while retaining the original signal, it captures long-term statistical features through time-series global pooling, and performs dot product operations with local time features, so that the importance coefficient implies a dynamic time series pattern, and adaptively adjusts the importance of different brain area features, effectively improving the feature representation ability of motor imagery EEG signals, realizing the coupled optimization of the spatiotemporal characteristics of EEG signals, significantly enhancing the feature response of task-related brain areas, and solving the problem of traditional methods being sensitive to noise.

[0142] The overall constructed spatial grouping enhancement network adopts a lightweight design of depthwise separable convolution and dilated convolution, which significantly reduces the number of model parameters and computational complexity while ensuring classification accuracy, meeting the real-time requirements of the brain-computer interface system; it then performs decoding to directly process the EEG signals, avoiding the complex manual feature extraction steps, and thus solving the technical problem of the existing EEG signal decoding methods that is difficult to balance between model complexity and classification accuracy, improving the decoding accuracy and real-time performance of motor imagery EEG signals, and providing an efficient technical solution for clinical rehabilitation and intelligent prosthetic control.

[0143] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0144] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. A lightweight EEG signal decoding method based on spatial grouping enhancement, characterized in that: The method comprises: Obtain motor imagery EEG signal data and perform preprocessing; Construct a spatial grouping enhancement network model, input the preprocessed motor imagery EEG signal data for training, calculate the importance coefficient, determine the loss function, and label the corresponding motor imagery category; The motor imagery EEG signal data to be decoded is obtained and input into the trained spatial grouping enhancement network model. The data is decoded in combination with the importance coefficient to obtain the corresponding classification results.

2. The method for decoding lightweight EEG signals based on spatial grouping enhancement according to claim 1, characterized in that: Obtain motor imagery EEG signal data and perform preprocessing, including: Bandpass filtering was used to remove noise from the motor imagery EEG signal data, and independent component analysis was used to decompose the mixed signals in the motor imagery EEG signal data to remove physiological artifacts. The processed motor imagery EEG signal data were segmented and normalized.

3. The lightweight EEG signal decoding method based on spatial grouping enhancement according to claim 1, characterized in that: Construct a spatial grouping enhancement network model, input the preprocessed motor imagery EEG signal data for training, calculate the importance coefficient, determine the loss function, and label the corresponding motor imagery categories, including: The spatial grouping enhancement network model includes a feature extraction module, a spatial grouping enhancement module and a classification module which are arranged in sequence; The pre-processed motor imagery EEG signal data is input into the feature extraction module, and the spatiotemporal features are obtained through temporal convolution and depthwise separable convolution to generate a feature map; Based on the spatial grouping enhancement module, the feature map is grouped and the importance coefficient is calculated. All features in the feature map are enhanced by the importance coefficient. The enhanced features are input into the classification module, the loss function is determined, the motor imagery categories are labeled, and the probability distribution is output.

4. The lightweight EEG signal decoding method based on spatial grouping enhancement according to claim 3, characterized in that: The pre-processed motor imagery EEG signal data is input into the feature extraction module, and the spatiotemporal features are obtained through temporal convolution and depthwise separable convolution to generate a feature map, including: The feature extraction module includes a convolution unit, an average pooling layer and a Dropout layer; The pre-processed motor imagery EEG signal data is input into the convolution unit, the spatiotemporal features in the motor imagery EEG signal data are captured by sliding windows, and the spatiotemporal features are processed using depthwise separable convolution to generate the initial feature map; The average pooling layer is used to average the local area in the initial feature map, and the dropout layer is used to randomly discard the spatiotemporal features in some of the initial feature maps; The hole convolution is introduced to capture the long-range dependencies in the initial feature map after processing and generate a feature map.

5. The method for decoding lightweight EEG signals based on spatial grouping enhancement according to claim 3, characterized in that: Based on the spatial grouping enhancement module, the feature map is grouped and attention is calculated, and the importance coefficient is calculated. All features in the feature map are enhanced by the importance coefficient, including: The feature maps are grouped along the channel dimension based on the spatial grouping enhancement module, and the global statistics are calculated based on the local features of each group of spatiotemporal features, which are recorded as global features; The importance coefficient is calculated by the dot product of local features and global features, and then normalized; Use learnable parameters to adjust the importance coefficient after normalization, and combine activation functions to enhance all features in the feature map.

6. The method for decoding lightweight EEG signals based on spatial grouping enhancement according to claim 5, characterized in that: The global statistics are calculated based on the local features of each set of spatiotemporal features, which are recorded as global features. The corresponding calculation formula is: ; in, Represents global features; Indicates the spatial size corresponding to each set of spatiotemporal features, , Indicates height, Indicates width; Indicates the Local features in group spatiotemporal features.

7. The method for decoding lightweight EEG signals based on spatial grouping enhancement according to claim 6, characterized in that: The importance coefficient is calculated by the dot product of local features and global features, and normalized, including: The importance coefficient is calculated by the dot product of local features and global features. The corresponding calculation formula is: ; in, Indicates the Local features in group spatiotemporal features The corresponding importance coefficient; Represents global features; Indicates the Local features in group spatiotemporal features; The importance coefficient of standardization is calculated as follows: ; ; ; in, Represents the importance coefficient The results after standardization; Indicates the current The mean of the importance coefficients of all corresponding spatial positions in the group's spatiotemporal features; Indicates the spatial size corresponding to each set of spatiotemporal features; Indicates the current Another group in the group's spatiotemporal features The importance coefficient corresponding to each local feature; Indicates the The variance of the importance coefficient of the group's spatiotemporal features; Indicates the Standard deviation of the importance coefficient of the group's spatiotemporal features; Represents a numerical stabilization term, used to prevent the denominator from being zero.

8. The lightweight EEG signal decoding method based on spatial grouping enhancement according to claim 7, characterized in that: Use learnable parameters to adjust the importance coefficient after normalization and combine activation functions to enhance all features in the feature map, including: Use the learnable parameters to adjust the importance coefficient after normalization. The corresponding calculation formula is: ; in, represents the adjusted importance coefficient; Represents the importance coefficient The results after standardization; and represents a learnable parameter; Combined with the activation function, all features in the feature map are enhanced. The corresponding calculation formula is: ; in, Representation characteristics Enhance the processed features; Indicates the first group spatiotemporal characteristics; Represents the activation function.

9. The method for decoding lightweight EEG signals based on spatial grouping enhancement according to claim 3, characterized in that: The enhanced features are input into the classification module to determine the loss function, label the motor imagery category, and output the probability distribution, including: The classification module includes a first fully connected layer, a second fully connected layer and an output layer; The enhanced features are input into the first fully connected layer for feature mapping. The corresponding calculation formula is: ; in, Indicates the output result after feature mapping is completed; represents the activation function; represents the convolution kernel; Represents the vector obtained by flattening the enhanced features; represents the bias term; The output result after feature mapping is input into the second fully connected layer for feature compression. The corresponding calculation formula is: ; in, Indicates the output result after feature compression; represents the convolution kernel; represents the bias term; The output result after feature compression is input to the output layer, the loss function is determined, the motor imagery category is labeled, and the probability distribution is obtained. The corresponding calculation formula is: ; in, represents a probability distribution; Represents the classifier function operation; represents the convolution kernel; represents the bias term.

10. The lightweight EEG signal decoding method based on spatial grouping enhancement according to claim 9, characterized in that: The calculation formula corresponding to the loss function is: ; in, represents the loss function; Represents the number of groups of spatiotemporal features in the feature map; Indicates the first kind; Indicates the The spatiotemporal features of the group belong to The true probability of the class; Indicates the The spatiotemporal features of the group belong to The predicted probability of the class.

Citation Information

Cited By

  • Motor imagery electroencephalogram signal classification method and device, terminal and storage medium

    CN121434917A

  • Electroencephalogram signal decoding method and system based on characteristic decomposition and adversarial training

    CN121456673A

  • Preprocessing method based on high-pollution child electroencephalogram data

    CN122132690A