Motor imagery electroencephalogram signal classification method, computer device and readable storage medium

By using techniques such as Sinc filters and multi-domain convolutional modules in the classification of motor imagery EEG signals, the problem of incomplete feature extraction in traditional methods is solved, and higher classification accuracy and robustness are achieved.

CN122432789APending Publication Date: 2026-07-21NANCHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANCHANG UNIV
Filing Date
2026-06-18
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In the classification of motor imagery EEG signals, traditional convolutional neural networks extract only single temporal and spatial information through convolution operations, resulting in insufficient feature comprehensiveness and limiting the classification performance of deep learning models.

Method used

The Sinc filter is used to filter the EEG signal, and multi-domain feature extraction and fusion are performed by combining a three-scale temporal convolution module, a spatiotemporal convolution module, a temporal attention module, and an efficient channel attention module.

Benefits of technology

It improves the classification accuracy of deep learning models, comprehensively extracts specific neurophysiological features, and enhances the accuracy and robustness of classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432789A_ABST
    Figure CN122432789A_ABST
Patent Text Reader

Abstract

The application discloses a motor imagery electroencephalogram signal classification method, a computer device and a readable storage medium, and belongs to the technical field of brain science. The method comprises the following steps: in response to obtaining an electroencephalogram (EEG), filtering the EEG based on a Sinc filter to obtain filtered EEG; performing feature extraction on the filtered EEG based on three parallel first convolution branches of a three-scale time convolution module to obtain first features; performing feature extraction on the first features based on three parallel second convolution branches of a space-time-frequency convolution module to obtain second features; performing feature extraction on the filtered EEG based on a time attention module to obtain third features; adding the second features and the third features element by element to obtain fourth features; and weighting the fourth features based on an efficient channel attention (ECA) module to obtain fifth features; and performing a classification operation on the fifth features based on a classification module to obtain a motor imagery category label corresponding to the EEG. The application improves the classification accuracy of a deep learning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of brain science technology, specifically relating to a method for classifying motor imagery EEG signals, a computer device, and a readable storage medium. Background Technology

[0002] Brain-Computer Interface (BCI) is an interdisciplinary technology that enables direct communication and control between the brain and external devices by collecting and analyzing brain neural activity, without relying on peripheral nerve and muscle pathways. BCI achieves direct interaction between the brain and external devices based on specific neural signals and through real-time signal processing and pattern recognition.

[0003] Specific neural signals originate from electroencephalography (EEG). Traditional techniques utilize convolutional neural networks (CNNs) for feature extraction, extracting specific neural signals (specific neurophysiological features) from the EEG. Specifically, EEG refers to Motor Imagery Electroencephalogram (MI-EEG), which is the EEG generated when a person imagines limb movements but does not actually perform them, resulting in activation of specific brain regions.

[0004] However, the convolution operation of CNNs extracts only temporal and spatial information, resulting in insufficient comprehensiveness of the extracted specific neurophysiological features, which severely limits the classification performance of deep learning models. Summary of the Invention

[0005] The purpose of this application is to provide a method for classifying motor imagery EEG signals, a computer device, and a readable storage medium, which can improve the classification accuracy of deep learning models.

[0006] To solve the above-mentioned technical problems, this application is implemented as follows: In a first aspect, embodiments of this application provide a method for classifying electroencephalogram (EEG) signals related to motor imagery, the method comprising: In response to the acquisition of EEG signals, the EEG is filtered based on the Sinc filter to obtain the filtered EEG; Based on a three-scale temporal convolution module, three parallel first convolutional branches extract features from the filtered EEG, and the outputs of the three first convolutional branches are concatenated to obtain a first feature; wherein each first convolutional branch includes Each first convolutional branch has a filter and a batch normalized (BN) layer, and the filters in each first convolutional branch have different scales. The three parallel second convolutional branches based on the spatiotemporal-frequency convolutional module extract features from the first feature, and the outputs of the three second convolutional branches are concatenated along the time dimension to obtain the second feature. The filtered EEG is used to extract features based on the time attention module to obtain a third feature; The second feature and the third feature are added element-wise to obtain the fourth feature; and the fourth feature is weighted based on the efficient channel attention (ECA) module to obtain the fifth feature. The fifth feature is classified based on the classification module to obtain the motion imagery category label corresponding to the EEG.

[0007] In a second aspect, embodiments of this application provide a computer device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0008] Thirdly, embodiments of this application provide a computer-readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0009] Fourthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0010] In this embodiment, in response to acquiring an EEG signal, the EEG is filtered using a Sinc filter to obtain a filtered EEG; features are extracted from the filtered EEG using three parallel first convolution branches of a three-scale temporal convolution module, and the outputs of the three first convolution branches are concatenated to obtain a first feature; wherein each first convolution branch includes The system employs a filter and a batch normalized (BN) layer, with each first convolutional branch having a different filter scale. Three parallel second convolutional branches based on the spatiotemporal-frequency convolution module extract features from the first feature, and the outputs of the three second convolutional branches are concatenated to obtain a second feature. A temporal attention module extracts features from the filtered EEG to obtain a third feature. The second and third features are added element-wise to obtain a fourth feature. The fourth feature is weighted using an efficient channel attention (ECA) module to obtain a fifth feature. Finally, a classification module performs a classification operation on the fifth feature to obtain the corresponding motion imagery category label for the EEG. In essence, the Sinc filter preserves specific neural signals in the EEG while effectively suppressing other signals. The combination of the three-scale temporal convolution module, the spatiotemporal-frequency convolution module, the temporal attention module, and the ECA module effectively extracts and fuses spatiotemporal-frequency features, thereby comprehensively extracting specific neurophysiological features and improving the classification accuracy of the deep learning model. Attached Figure Description

[0011] Figure 1 This application provides a network architecture to which the motor imagery EEG signal classification method provided in some embodiments can be applied; Figure 2 This is a flowchart illustrating a method for classifying motor imagery EEG signals according to some embodiments of this application; Figure 3 This is a network structure diagram of a time attention module provided in some embodiments of this application; Figure 4 This is a comparison diagram of classification results of two training methods trained on different training sets, provided by some embodiments of this application; Figure 5 These are internal structural diagrams of a computer device provided in some embodiments of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0014] In one exemplary embodiment, this application proposes a method for classifying motor imagery EEG signals.

[0015] In one exemplary embodiment, such as Figure 1 As shown, Figure 1 A network architecture, named SincMDANet, can be applied to a method for classifying motor imagery EEG signals. This network consists of Sinc filters, multi-domain convolutional modules, a time attention (TA) module, an efficient channel attention (ECA) module, and a classification module. Table 1 shows the network parameter configurations for each component in a feasible specific structure of SincMDANet.

[0016] Table 1: Network parameters of SincMDANet.

[0017] The method for classifying motor imagery EEG signals provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0018] Reference Figure 2 The method includes steps 202-212. Wherein: Step 202: In response to acquiring the EEG signal, the EEG is filtered based on the Sinc filter to obtain the filtered EEG.

[0019] In some embodiments, the Sinc filter is used to adaptively filter the EEG signal to preserve the signal within a specific frequency range and suppress high-frequency noise. The specific frequency range refers to the 4-38Hz frequency range corresponding to the EEG signal.

[0020] Specifically, the original EEG signal is processed using the following formula (1). With the group function of the Sinc filter Perform convolution to obtain the filtered output signal. .

[0021] in, It is a length of The input signal, It is a length of The output signal; Represents the convolution kernel. and These are the learnable low cutoff frequency and high cutoff frequency, respectively.

[0022] In the frequency domain, the expression for the filter is given by the following formula (2).

[0023] in, Indicates a filter. The input frequency variable is used to calculate the response at each frequency point; This is a rectangle function.

[0024] The time-domain expression of the Sinc filter, i.e. the expression of the convolution kernel, is obtained by Fourier transform, as shown in formula (3).

[0025] in, , express or .

[0026] To ensure during model training and The two actual cutoff frequencies in formula (3) must satisfy the following conditions. , This represents the bandwidth of the bandpass filter.

[0027] In some embodiments, since the ideal bandpass filter has an infinite impulse response in the time domain, a window function truncation method is typically used to truncate the Sinc filter, thereby obtaining a finite-length impulse response, suppressing the Gibbs phenomenon, and realizing a practically applicable bandpass filter. For example, the Hamming window is used to truncate the Sinc filter to obtain a finite-length bandpass filter, resulting in a windowed bandpass filter. The truncation process can be achieved using the following formula (4).

[0028] in, The length of the Hamming window, i.e., the window size. For Hamming window functions; and Random initialization was performed using a uniform distribution within the frequency range of 4Hz-38Hz.

[0029] Step 204: Based on the three parallel first convolutional branches of the three-scale temporal convolution module, feature extraction is performed on the filtered EEG, and the outputs of the three first convolutional branches are concatenated to obtain the first feature; wherein, each first convolutional branch includes Each convolutional branch has one filter and one batch normalized (BN) layer, and the filters in each of the first convolutional branches have different scales. It is a positive integer.

[0030] In some embodiments, It is 6.

[0031] In some embodiments, the filters of each of the first convolutional branches are: a filter with a kernel size of (1,3), a stride of (1,1), and zero padding valid; a filter with a kernel size of (1,15), a stride of (1,1), and zero padding valid; and a filter with a kernel size of (1,63), a stride of (1,1), and zero padding valid.

[0032] Step 206: Based on the three parallel second convolution branches of the spatiotemporal convolution module, feature extraction is performed on the first feature, and the outputs of the three second convolution branches are concatenated along the time dimension to obtain the second feature.

[0033] The second feature is that the number of channels is The feature map has the same dimensions as the filtered EEG.

[0034] In some embodiments, the three parallel second convolutional branches include one spatial convolutional branch and two time-frequency convolutional branches at different scales; each second convolutional branch includes one convolutional layer, one batch normalization (BN) layer, one ELU layer, one variance layer, and one dropout layer. The BN layer normalizes the convolutional output, the ELU layer performs non-linear activation, the Dropout layer reduces overfitting, and the variance layer performs feature extraction and dimensionality compression on the time dimension of the first feature.

[0035] In some embodiments, the convolutional layer corresponding to the spatial convolutional branch includes The core size is A filter with a step size of (1,1) and zero padding valid, wherein, The number of electrode channels in the EEG; The convolutional layers corresponding to the time-frequency convolution branches respectively include The core size is Step size is A filter with an expansion ratio of (1,2), and The core size is Step size is A filter with an expansion ratio of (1,4) and a padding of (0,6); where, The frequency band dimension of the EEG is given. Before the features pass through the filter, a transpose operation is required; this transpose operation is used to exchange the frequency and channel dimensions. and All are positive integers.

[0036] In some embodiments, the mathematical expression for the variance layer is as shown in formula (5).

[0037] Among them, among them, For the number of time points, This represents the total number of non-overlapping windows. The length of the window; For window index, the value range is: , Indexed by time point; Indicates the first The variance calculation results for each window; Where S is the number of feature channels and S is the number of electrode channels; express In each feature map, The electrode channel in the first The signal values ​​at each sampling time; express Under each feature map The electrode channel in the first The average signal value within each window.

[0038] Step 208: Extract features from the filtered EEG based on the time attention module to obtain the third feature.

[0039] In some embodiments, such as Figure 3 As shown, based on Each convolutional kernel is The channel convolution is applied to compress the channel dimension of the filtered EEG, followed by a BN layer and an ELU layer, and then an average pooling (Avg Pool) layer with a kernel size of (1,33) and a stride of (1,33) to reduce the temporal feature dimension. The pooled EEG is then divided into... Group, The number of attention heads is denoted by . Each group corresponds to one convolutional kernel, and one-dimensional (1D) grouped convolutions are used as parallel attention heads.

[0040] To achieve multi-head attention, the weights of the 1D grouped convolutions are shared across different groups. Finally, feature extraction is performed in the time dimension using a softmax operation. indivual( The temporal attention features obtained from the feature channels are shown in formula (6), where, The total number of channels for the input features. For channel indexing.

[0041] in, The weights represent the weights of the 1D grouped convolution. The kernel size is [size]. The number of padding units for the convolution kernel, and , The expression "mod" indicates rounding down to the nearest integer, used to ensure that the input and output sizes remain unchanged; "mod" indicates modulo operation. Indicates the first Each input channel is ranked by the number of attention heads. Perform group index mapping to assign corresponding convolutional kernel weights to different channel groups; Indicates the first Each input channel, in the time dimension, After filling and aligning, with Within the centered sliding window The feature values ​​at each position.

[0042] Step 210: Add the second feature and the third feature element by element to obtain the fourth feature; and weight the fourth feature based on the ECA module to obtain the fifth feature.

[0043] The ECA module captures global contextual information through a one-dimensional convolution, and adjusts the weights according to the importance of the information contained in each channel.

[0044] First, global average pooling (GAP) is used to aggregate the spectral temporal information of each channel in the fourth feature, so that the input feature map of size (C,S,T) yields an output of size (C,1,1), where C, S, and T represent the number of feature channels, the number of spatial features, and the number of temporal features, respectively.

[0045] Then, adaptive one-dimensional convolutional kernels are used to model the channel features and generate channel attention weights. Kernel size of one-dimensional convolution The calculation formula (7) is as follows.

[0046] in, Indicates take and take The closest odd number, and These are hyperparameters used to change the ratio of channels to kernels; in this embodiment, they are set to 2 and 1, respectively. It is an identity mapping and no additional scaling is performed.

[0047] Finally, use channel weights. The fifth feature is obtained by weighting each channel of the fourth feature and capturing global contextual information.

[0048] Step 212: Perform a classification operation on the fifth feature based on the classification module to obtain the motion imagery category label corresponding to the EEG.

[0049] In some embodiments, the motion imagery category labels may include, but are not limited to: left hand, right hand, foot, and tongue.

[0050] The classification module contains fully connected (FC) layers and a softmax function.

[0051] The fifth feature output by the ECA module is used as the input to the classification module, which is fed into an FC layer with linear activation. The output of the FC layer is converted into class probabilities through the Softmax function.

[0052] To prevent overfitting, regularization is performed on the weights of the FC layer by imposing a maximum norm constraint of 0.5. The predicted label corresponding to the highest probability value is obtained. .

[0053] This embodiment preserves specific neural signals in EEG and effectively suppresses other signals through the Sinc filter. By combining the three-scale temporal convolution module, the spatiotemporal-frequency convolution module, the temporal attention module, and the ECA module, it effectively extracts and fuses spatiotemporal-frequency features, thereby comprehensively extracting specific neurophysiological features and improving the classification accuracy of the deep learning model.

[0054] In some embodiments, a joint supervision method combining cross-entropy loss and center loss is used to train and optimize the model parameters.

[0055] Using cross-entropy loss and central loss The linear combination of these is the total loss function, as shown in formula (8).

[0056] in, For regularization parameters (e.g.) ); This represents the total loss.

[0057] Among them, cross-entropy loss The mathematical expression is shown in formula (9).

[0058] in, and These are the real labels and the predicted labels. This represents the number of categories.

[0059] Among them, the central loss The mathematical expression is shown in formula (10).

[0060] in, The L2 norm represents the squared value, which is the squared Euclidean distance between the predicted and actual values. For the first training batch The feature vector of each sample The feature center of the class to which this sample belongs. This refers to the batch size.

[0061] In some embodiments, model training employs a two-stage training strategy. In the first stage, the model is trained using only the training set, and performance is monitored using the validation set. An early stopping strategy is used to prevent overfitting (e.g., stopping if validation set accuracy does not improve after 200 consecutive epochs). In the second stage, the training and validation sets are merged, and training begins again from the optimal parameters of the first stage. Training stops when the average loss on the validation set falls below that of the first stage. The maximum number of epochs for the two stages is set to 1500 and 600 respectively to avoid infinite training.

[0062] To evaluate the performance of the SincMDANet network-based MI-based BCI system, this embodiment uses four metrics for evaluation: classification accuracy (Avg), standard deviation (std), F1 score, and Kappa coefficient. The method of this embodiment is compared with six other advanced and classic model methods. Avg is defined as the ratio of the number of experiments correctly classified to the total number of experiments; the mathematical expression for std is shown in formula (11).

[0063] Where N is the number of samples, For a single data point, This represents the data mean.

[0064] The mathematical expression for the Kappa coefficient is shown in formula (12).

[0065] in, For classification accuracy, This is a random guess of the probability.

[0066] The following is a performance evaluation of SincMDANet: Comparison with baseline methods: Table 2 shows the experimental results of SincMDANet and six baseline methods on the BCIC-IV2a dataset. SincMDANet achieved an average accuracy of 82.33% on the BCIC-IV2a dataset, representing improvements of 9.14%, 6.75%, 7.64%, 11.19%, 3.28%, and 3.74% respectively compared to ShallowConvNet, Deep ConvNet (p<0.05), EEGNet (p<0.01), FBCNet (p<0.01), FBMSNet (p<0.01), and SMANet (p<0.01). An asterisk indicates a statistically significant difference between SincMDANet and other baseline methods (i.e., p-value obtained from paired t-tests): * p<0.05; ** p<0.01. Simultaneously, the SincMDANet method has the highest Kappa coefficient, indicating good predictive consistency. Furthermore, it exhibits low variance, suggesting robustness while maintaining high accuracy.

[0067] Table 2. Experimental results of SincMDANet and six baseline methods on the BCIC-IV2a dataset. Table 3 presents the experimental results of SincMDANet and six baseline methods on the BCIC-IV2b dataset. SincMDANet achieves an average accuracy of 86.94% on the BCIC-IV2b dataset, representing improvements of 3.46%, 2.23%, 2.84%, 8.3%, 4.77%, and 2.25% respectively compared to Shallow ConvNet (p<0.05), Deep ConvNet (p<0.05), EEGNet, FBCNet (p<0.01), FBMSNet (p<0.05), and SincMDANet. It also boasts the highest Kappa coefficient.

[0068] Table 3. Experimental results of SincMDANet and six baseline methods on the BCIC-IV2b dataset. Table 4 shows the experimental results of SincMDANet and six baseline methods on the OpenBMI dataset. The proposed method achieves the highest average classification accuracy of 73.95% and the highest Kappa coefficient among all the compared algorithms. Compared with ShallowConvNet (p<0.01), Deep ConvNet (p<0.01), EEGNet (p<0.01), FBCNet (p<0.01), FBMSNet (p<0.01), and SMANet, the accuracy is improved by 3.45%, 5.91%, 2.87%, 4.17%, 3.08%, and 1.54%, respectively.

[0069] Table 4. Experimental results of SincMDANet and six baseline methods on the OpenBMI dataset. Impact of Training Schemes: Different training methods have a significant impact on the decoding accuracy of deep learning (DL) networks. The following classification experiments were conducted on the SincMDANet model using single-stage and two-stage training schemes, respectively.

[0070] In single-stage training, the model undergoes only one stage of training on the training set, with performance monitoring and early stopping using the validation set to prevent overfitting. In two-stage training, after the first stage of training, a second stage is performed, further optimizing the model by combining data from both the training and validation sets, thereby improving its performance on the validation set. The model's classification results are as follows: Figure 4 As shown in the figure, the classification accuracy of the model using the two-stage training strategy is significantly better than that of the single-stage training strategy on all three datasets, fully demonstrating the superiority of this strategy.

[0071] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0072] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a method for classifying motor imagery EEG signals.

[0073] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0074] In one embodiment, a computer-readable storage medium is provided, on which a program or instructions are stored, which, when executed by a processor, implement the steps in the above-described method embodiments.

[0075] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0076] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0077] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0078] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0079] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for classifying EEG signals related to motor imagery, characterized in that, The method for classifying EEG signals related to motor imagery includes: In response to the acquisition of EEG signals, the EEG is filtered based on the Sinc filter to obtain the filtered EEG; Based on a three-scale temporal convolution module, three parallel first convolutional branches extract features from the filtered EEG, and the outputs of the three first convolutional branches are concatenated to obtain a first feature; wherein each first convolutional branch includes Each first convolutional branch has a filter and a batch normalized (BN) layer, and the filters in each first convolutional branch have different scales. The three parallel second convolutional branches based on the spatiotemporal-frequency convolutional module extract features from the first feature, and the outputs of the three second convolutional branches are concatenated along the time dimension to obtain the second feature. The filtered EEG is used to extract features based on the time attention module to obtain a third feature; The second feature and the third feature are added element-wise to obtain the fourth feature; and the fourth feature is weighted based on the efficient channel attention (ECA) module to obtain the fifth feature. The fifth feature is classified based on the classification module to obtain the motion imagery category label corresponding to the EEG.

2. The method for classifying motor imagery EEG signals according to claim 1, characterized in that, The step of filtering the EEG using a Sinc filter to obtain the filtered EEG includes: Based on the Sinc filter, signals within a specific frequency range are retained to obtain the filtered EEG; wherein, the Sinc filter is a finite-length bandpass filter truncated by the window function truncation method.

3. The method for classifying motor imagery EEG signals according to claim 1, characterized in that, The filters for each of the first convolutional branches are: a filter with a kernel size of (1,3), a stride of (1,1), and zero padding valid; a filter with a kernel size of (1,15), a stride of (1,1), and zero padding valid; and a filter with a kernel size of (1,63), a stride of (1,1), and zero padding valid.

4. The method for classifying motor imagery EEG signals according to claim 1, characterized in that, The three parallel second convolutional branches include one spatial convolutional branch and two time-frequency convolutional branches of different scales; each second convolutional branch includes one convolutional layer, one batch normalization (BN) layer, one ELU layer, one variance layer, and one dropout layer.

5. The method for classifying motor imagery EEG signals according to claim 4, characterized in that, The convolutional layer corresponding to the spatial convolutional branch includes The core size is A filter with a step size of (1,1) and zero padding valid, wherein, The number of electrode channels in the EEG; The convolutional layers corresponding to the time-frequency convolution branches respectively include The core size is Step size is A filter with an expansion ratio of (1,2), and The core size is Step size is A filter with an expansion ratio of (1,4) and a padding of (0,6); where, The frequency band dimension of the EEG is given. Before the features pass through the filter, they need to be transposed. The transpose operation is used to exchange the frequency and channel dimensions.

6. The method for classifying motor imagery EEG signals according to claim 5, characterized in that, The mathematical expression for the variance layer is as follows: in, For the number of time points, This represents the total number of non-overlapping windows. The length of the window; For window index, the value range is: , Indexed by time point; Indicates the first The variance calculation results for each window; Where S is the number of feature channels and S is the number of electrode channels; express In each feature map, The electrode channel in the first The signal values ​​at each sampling time; express Under each feature map The electrode channel in the first The average signal value within each window.

7. The method for classifying motor imagery EEG signals according to claim 1, characterized in that, The time attention module includes at least: Each convolutional kernel is The filter consists of channel convolution, one batch normalization (BN) layer, and one exponential linear unit (ELU) layer. The time attention module is used to extract features from the filtered EEG to obtain a third feature, including: based on Each convolutional kernel is The channel convolution is used to compress the channel dimension of the filtered EEG, followed by a BN layer and an ELU layer, and then an average pooling layer with a kernel size of (1,33) and a stride of (1,33) to obtain the pooled EEG. Based on the pooled EEG, a third feature is obtained.

8. A computer device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the motor imagery EEG signal classification method as described in any one of claims 1-7.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the motor imagery EEG signal classification method as described in any one of claims 1-7.