A motor imagery classification method and system based on EEG signals

By adopting the classification model of multi-scale-spatial-temporal convolution feature extraction network and fully connected layer network in the classification of motor imagination EEG signals, combined with the optimization of the comparison loss function, the problems of poor generalization and low accuracy in the existing technology are solved. , achieving higher classification accuracy and generalization.

CN114997229BActive Publication Date: 2025-02-18BEIHANG UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210607100.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-02-18
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

The existing technology has problems of poor generalization and low accuracy in the classification of electroencephalogram signals. In particular, the co-spatial pattern algorithm does not consider the time domain characteristics, and the deep learning algorithm lacks the loss of feature extraction and intra-class aggregation that combines physiological significance. Function constraints.

Method used

The motion imagination classification model of multi-scale-spatial-temporal convolution feature extraction network and fully connected layer network is adopted. After preprocessing the EEG signal, the features are extracted through multi-scale time convolution and spatial convolution, and the comparison loss function is used for optimization. , to improve the distinction of eigenvectors.

Benefits of technology

It improves the classification generalization and accuracy of motor imagination signals, and can more effectively extract feature vectors with high discrimination from EEG signals, improving the accuracy of classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114997229B_ABST
    Figure CN114997229B_ABST
Patent Text Reader

Abstract

The present invention relates to a motor imagery classification method and system based on electroencephalogram signals. The motor imagery classification method based on electroencephalogram signals obtains electroencephalogram signals and preprocesses the electroencephalogram signals, then obtains a motor imagery classification model including a feature extraction model and a feature classification model, and then inputs the preprocessed electroencephalogram signals into the motor imagery classification model to obtain a classification result. It can be seen that the present invention processes electroencephalogram signals by using a motor imagery classification model including a feature extraction model and a feature classification model to obtain a classification result, which can improve the classification accuracy while improving the generalization of anchor point signal classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electroencephalogram (EEG) signal detection, and in particular to a method and system for classifying motor imagery based on EEG signals. Background Art

[0002] Brain-computer interface (BCI) technology establishes a direct path between the human brain and the computer, and is the next stage of development of human-computer interaction. The brain-computer interface system first collects brain activity data, then performs signal processing to decode the human brain's intentions, and finally transmits instructions to control external devices. In order to improve the quality of the EEG signals generated by the user, a variety of paradigms have been developed in practice, such as P300, visual steady-state induction, and motor imagery.

[0003] Motor imagery is a classic paradigm of brain-computer interface, in which users can issue control commands autonomously. Its physiological basis is that body movement can generate mu (8-12Hz) and beta (13-30Hz) rhythms in the motor sensory area of ​​the brain, and event-related synchronization and event-related desynchronization phenomena occur. Compared with other paradigms, it has the advantage of not requiring external stimulation to induce. Brain-computer interface systems based on motor imagery can be used for stroke rehabilitation, control of electric wheelchairs, text spellers, prostheses and other equipment. In addition to simplifying the process of normal human-machine interaction, it can also help disabled people improve their ability to take care of themselves. The classification accuracy of motor imagery EEG signals is difficult to reach a high value due to the influence of multiple factors such as signal characteristics and user cognition, and the classification accuracy of different users varies greatly. If the motor imagery system is to be applied in real time in practical problems, it must have high classification accuracy and fast response speed.

[0004] There are currently three methods for classifying motor imagery EEG signals:

[0005] Common spatial pattern algorithm: This method designs the optimal spatial filter by maximizing the variance of different motor imagery EEG signals. The filter is used to filter the EEG signals to obtain a feature vector with high discrimination, thereby classifying the motor imagery signals.

[0006] Convolutional Neural Network: This method uses a deep convolutional neural network to project high-dimensional raw signals into low-dimensional classification vectors to classify motor imagery signals.

[0007] Time-frequency graph representation: This method first uses fast Fourier transform, continuous wavelet transform and other methods to convert EEG signals into time-frequency graphs, and then uses computer vision algorithms to classify motor imagery signals.

[0008] However, the above-mentioned co-spatial pattern algorithm only considers the differences in the spatial distribution of different types of motor imagery EEG signals in the brain, and does not pay attention to the characteristics in the time domain. Therefore, it has the disadvantages of poor generalization and low accuracy. When designing the network structure for feature extraction, the existing deep learning algorithm does not take into account the physiological significance contained in the EEG signal, but imitates the classification network structure of natural images, which has poor interpretability and poor generalization of the extracted feature vector. When setting the loss function, the cross entropy function and the improved method based on cross entropy only play a role in constraining the separation between classes, and do not achieve intra-class aggregation, so there is also the problem of low classification accuracy. Summary of the invention

[0009] In order to solve the above problems existing in the prior art, the present invention provides a method and system for classifying motor imagery based on EEG signals.

[0010] To achieve the above object, the present invention provides the following solutions:

[0011] A motor imagery classification method based on electroencephalogram signals, comprising:

[0012] Acquiring an electroencephalogram signal and preprocessing the electroencephalogram signal;

[0013] Acquire a motor imagery classification model; the motor imagery classification model includes: a feature extraction model and a feature classification model; the feature extraction model is a trained multi-scale-spatiotemporal convolutional feature extraction network; the feature classification model is a trained fully connected layer network;

[0014] The preprocessed EEG signal is input into the motor imagery classification model to obtain a classification result.

[0015] Preferably, obtaining the motor imagery classification model further includes:

[0016] Obtain a first training set and a second training set;

[0017] Using the first training set to train a multi-scale-spatiotemporal convolutional feature extraction network based on a loss function to obtain the feature extraction model;

[0018] The second training set is used to train the fully connected layer network based on the cross entropy function to obtain the feature classification model.

[0019] Preferably, the multi-scale-temporal-spatial convolutional feature extraction network comprises: a first convolutional module, a second convolutional module, a third convolutional module and a fourth convolutional module;

[0020] The output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing.

[0021] Preferably, the first convolution module is a time convolution with a time domain convolution kernel size of a first preset value; the second convolution module is a time convolution with a time domain convolution kernel size of a second preset value; the third convolution module is a time convolution with a time domain convolution kernel size of a third preset value; the fourth convolution module is a spatial convolution with a spatial domain convolution kernel size of the number of channels.

[0022] Preferably, the first preset value is 10; the second preset value is 45; and the third preset value is 100.

[0023] Preferably, the Dropout probability of the first convolution module is 0.2; the Dropout probability of the second convolution module is 0.1; the Dropout probability of the third convolution module is 0.2; and the Dropout probability of the fourth convolution module is 0.2.

[0024] Preferably, the processing processes of the first convolution module, the second convolution module, the third convolution module and the fourth convolution module are all:

[0025] After 2D convolution of the EEG signal, batch normalization, ReLU activation function, average pooling, convolution, batch normalization, ReLU activation function and average pooling are performed in sequence.

[0026] Preferably, the fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence.

[0027] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0028] The motor imagery classification method based on EEG signals provided by the present invention processes EEG signals by adopting a motor imagery classification model including a feature extraction model and a feature classification model to obtain classification results, which can improve the classification accuracy while improving the generalization of anchor point signal classification.

[0029] In addition, corresponding to the above-mentioned motor imagery classification method based on EEG signals, the present invention also provides a motor imagery classification system based on EEG signals, the system comprising:

[0030] An EEG signal acquisition module, used to acquire EEG signals and pre-process the EEG signals;

[0031] A classification model acquisition module is used to acquire a motor imagery classification model; the motor imagery classification model includes: a feature extraction model and a feature classification model; the feature extraction model is a trained multi-scale-spatiotemporal convolutional feature extraction network; the feature classification model is a trained fully connected layer network; the multi-scale-spatiotemporal convolutional feature extraction network includes: a first convolution module, a second convolution module, a third convolution module and a fourth convolution module; the output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing; the fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence;

[0032] The classification result determination module is used to input the preprocessed EEG signal into the motor imagery classification model to obtain a classification result.

[0033] Since the technical effect achieved by the motor imagery classification system based on EEG signals provided by the present invention is the same as the technical effect achieved by the motor imagery classification method based on EEG signals provided above, they will not be described in detail here. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 creative work.

[0035] Figure 1 A flow chart of the motor imagery classification method based on EEG signals provided by the present invention;

[0036] Figure 2 A schematic diagram of electrode positions provided in an embodiment of the present invention;

[0037] Figure 3 A diagram showing the practical significance of the four convolution modules provided in the embodiment of the present invention;

[0038] Figure 4 A schematic diagram of the structure of a motor imagery classification model provided by an embodiment of the present invention;

[0039] Figure 5 A diagram showing the difference in optimization effect of contrast loss provided by an embodiment of the present invention;

[0040] Figure 6 A diagram showing the difference in optimization effects of the cross entropy provided by an embodiment of the present invention;

[0041] Figure 7A schematic diagram of the structure of a fully connected classifier provided in an embodiment of the present invention;

[0042] Figure 8 A schematic diagram of the structure of the motor imagery classification system based on EEG signals provided by the present invention. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0044] The purpose of the present invention is to provide a method and system for classifying motor imagery based on EEG signals, which can improve the classification accuracy while improving the generalization of anchor point signal classification.

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] like Figure 1 As shown, the motor imagery classification method based on EEG signals provided by the present invention comprises:

[0047] Step 100: Obtain an EEG signal and pre-process the EEG signal.

[0048] Step 101: Obtain a motor imagery classification model. The motor imagery classification model includes: a feature extraction model and a feature classification model. The feature extraction model is a trained multi-scale-temporal convolutional feature extraction network. The feature classification model is a trained fully connected layer network.

[0049] Among them, the multi-scale-temporal convolution feature extraction network includes: a first convolution module, a second convolution module, a third convolution module and a fourth convolution module. The output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing. The fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence.

[0050] In the multi-scale-spatiotemporal convolutional feature extraction network, the settings of each convolution module can be selected according to the actual EEG signal processing requirements, for example Figure 3As shown in the figure, the first convolution module is a time convolution with a time domain convolution kernel size of 10, that is, time convolution 10. The second convolution module is a time convolution with a time domain convolution kernel size of 45, that is, time convolution 45. The third convolution module is a time convolution with a time domain convolution kernel size of 100, that is, time convolution 100. The fourth convolution module is a spatial convolution with a spatial domain convolution kernel size of the number of channels.

[0051] Furthermore, to reduce the impact of overfitting, a different Dropout probability is set for each convolution module. For example, the Dropout probability of the first convolution module is 0.2. The Dropout probability of the second convolution module is 0.1. The Dropout probability of the third convolution module is 0.2. The Dropout probability of the fourth convolution module is 0.2.

[0052] In the process of processing EEG signals using the above multi-scale-time-space convolution feature extraction network, the physiological significance of time convolution 10 is the EEG signal within 0.1 seconds. First, the preprocessed EEG signal is subjected to 2D convolution, and the convolution kernel size of the 2D convolution is (1×10), the step size is 1, padding=0, and the number of channels is 4. Then, batch normalization (BN2D), ReLU activation function, and average pooling (AvgPool) of size (1×3) are performed. Repeat the above process once more to obtain the feature vector F1 extracted by time convolution 10.

[0053] The physiological significance of temporal convolution 45 is the EEG signal within 0.45 seconds. First, the preprocessed EEG signal is subjected to 2D convolution, and the convolution kernel size of the 2D convolution is (1×45), the step size is 1, padding=0, and the number of channels is 16. Then, batch normalization, ReLU activation function, and average pooling of size (1×3) are performed. Repeat the above process once more to obtain the feature vector F2 extracted by temporal convolution 45.

[0054] The physiological significance of the temporal convolution 100 is the EEG signal within 1 second. First, the preprocessed EEG signal is subjected to 2D convolution with a convolution kernel size of (1×100), a step size of 1, padding=0, and a channel number of 4. Then, batch normalization, ReLU activation function, and average pooling of size (1×3) are performed. The above process is repeated once more to obtain the feature vector F3 extracted by the temporal convolution 100.

[0055] Spatial convolution refers to a convolution module whose spatial domain convolution kernel size is the number of channels. Its physiological significance is to perform weighted averaging of EEG signals of each channel. First, 2D convolution is performed on the preprocessed EEG signal, with a convolution kernel size of (C×1), a step size of 1, padding=0, and 16 channels. Then, batch normalization, ReLU activation function, and average pooling of size (1×3) are performed. Repeat the above process once more to obtain the feature vector F4 extracted by spatial convolution.

[0056] The above EEG signal processing process corresponds to Figure 4 The motor imagery classification model shown in Figure 1, where Conv represents the convolution operation, @* represents the number of channels selected, and Dense represents the fully connected layer.

[0057] In the process of training the multi-scale-spatiotemporal convolutional feature extraction network provided above, it is implemented through the contrast loss function, and in the process of training the fully connected layer network, it is mainly implemented based on the cross entropy function.

[0058] Step 102: Input the preprocessed EEG signal into the motor imagery classification model to obtain a classification result.

[0059] An embodiment is provided below to illustrate the specific implementation process of the above-mentioned motor imagery classification method based on EEG signals provided by the present invention. In actual application, the specific numerical values ​​given in this embodiment are not used as specific limitations of the technical solution provided by the present invention.

[0060] This embodiment uses a 10-20 standard lead system to collect EEG signals. During the collection process, the specific placement positions of the 20 electrodes used, namely FC3, FC1, FCz, FC2, FC4, C5, C3, C1, Cz, C2, C4, C6, CP3, CP1, CPz, CP2, CP4, P1, Pz and P2, are as follows: Figure 2 In this embodiment, in order to meet the requirement of downsampling the EEG signal to 100 Hz in the signal preprocessing process so that the algorithm setting has a unified actual physical meaning, the sampling rate should be greater than or equal to 100 Hz.

[0061] In order to eliminate the influence of different EEG signal acquisition parameter settings, improve classification accuracy, and improve the versatility of feature extraction and classification models, it has high efficiency and ease of use. In this embodiment, it is necessary to preprocess the EEG signals obtained by electrode collection to obtain processed signals with the same input size and sampling frequency. Among them, the width of the time window is set to T seconds. First, the original EEG signal is filtered using a 5th-order Butterworth bandpass filter with a frequency band of 8 to 32 Hz, and then the filtered signal is downsampled to 100 Hz. After preprocessing, all EEG signals can be represented by a space-time signal matrix where the number of channels is multiplied by 100T.

[0062] In order to increase the number of samples available for training, this embodiment adopts a noise-data mixing data enhancement method, which adds Gaussian noise to the real EEG data to obtain the same type of enhanced data. The data mixing method obtains new enhanced data by combining two different signals. The specific method is as follows: first, randomly select two data segments X1 and X2, and randomly generate a ratio value lam between 0 and 1. The newly generated data X mix =X1+(1-lam)X2. The loss function is designed to be L(x), then the loss of the newly generated data is L mix =L(X1)+(1-lam)L(X2). The ratio of data enhancement can be set by using the noise and data mixing methods respectively. Based on this, the real data and the enhanced data are combined as the training set.

[0063] Based on the above description, the multi-scale-temporal spatial convolution network (MS-TSNet) used in this embodiment is composed of convolution modules connected in series, and the input EEG signal is passed through the convolution module to obtain a feature vector. The convolution module is composed of four parallel time convolutions, three of which are time convolutions and one is spatial convolution.

[0064] In the multi-scale-time-space convolution feature extraction network, the input EEG signal is respectively convolved through time convolution 10, time convolution 45, time convolution 100 and space convolution to obtain four feature vectors F1, F2, F3 and F4. These four feature vectors are connected together to obtain the feature vector F representing the input EEG signal. The length of the feature vector F varies with the input size. For example, when the number of input channels is 20 and the time window is 4 seconds, the length of the feature vector F is 2020. The fully connected layer network projects the feature vector F into a 128-dimensional vector, such as Figure 7 As shown in Figure 1, the fully connected layer network consists of the first fully connected layer, the ReLU activation function, and the second fully connected layer. The first fully connected layer projects F into a 512-dimensional vector, and the second fully connected layer projects the 512-dimensional vector into a 128-dimensional vector P.

[0065] The initial parameters of the multi-scale-spatiotemporal convolutional feature extraction network provided in the present embodiment are randomly generated. In order to extract a feature vector with high discrimination, the initial parameters need to be optimized. The parameter optimization direction is determined by the gradient of the loss function. When implemented, the following steps are performed:

[0066] 1. Calculate the gradient of the loss function of the output features of the feature extraction network.

[0067] 2. Then send it back to the feature extraction network to optimize the parameters.

[0068] 3. After repeating steps 1-2 several times (for example, 200 times), a feature extraction network capable of extracting feature vectors with high discrimination can be obtained.

[0069] This embodiment uses a supervised contrast loss function, the input of which is the extracted features and the corresponding motor imagery category labels. Through the constrained optimization of the contrast loss function, the features extracted from the same type of motor imagery signals can be brought closer, and the features extracted from different types of motor imagery signals can be pushed away, such as Figure 5 and Figure 6 The specific calculation method is as follows:

[0070] ① Calculate the cosine similarity between all positive pairs and negative pairs in a batch. Positive pairs refer to data of the same category, and negative pairs refer to data of different categories.

[0071]

[0072] In the formula, A and B represent two different feature vectors, and their dimensions are n. i With B i Represents the i-th dimension in the feature vectors A and B.

[0073] ② Calculate the average value S of the cosine similarity of all positive and negative pairs p , S n .

[0074] ③ Calculate contrast loss. pos The default value of the alignment margin is 1, m neg The default value of the negative pair margin is 0. Under the default setting, the optimization direction of the contrast loss function constrains the model so that the feature vectors extracted from the same type of motor imagery EEG signals are in the same direction, and the feature vectors extracted from different types of EEG signals are perpendicular to each other. By adjusting the two margins, the weights of the positive and negative pairs and the model optimization direction L can be controlled. Contrastive .

[0075] L Contrastive =|m pos -sp |+|m neg -s n |

[0076] For the obtained feature vector F, a fully connected layer network (FC-Net) is used as a classifier. The first fully connected layer in the fully connected layer network projects the feature vector F into a 512-dimensional vector, and the second fully connected layer projects the 512-dimensional vector into an n-dimensional vector N (n = the number of motor imagination categories). The dimension of the maximum value in the n-dimensional vector N is used as the label for classifier discrimination. For example, when the number of motor imagination categories is 2, set the imagined right hand to category 1 and the imagined left hand to category 2. The result output by the classifier for a certain section of EEG signal is (0.3, 0.7), that is, the classifier believes that the EEG signal is the EEG when imagining the left hand. The cross entropy loss function is used for the training of the fully connected layer classifier. By reducing the cross entropy, the classification model can be optimized so that the classification result output by the model is the same as the true category of the training set.

[0077] Assuming that probability distribution p is the expected output, probability distribution q is the actual output, and Lce is the cross entropy, then

[0078]

[0079] In the formula, p(x) is the probability distribution of the real sample, q(x) is the probability distribution predicted by the model, and L ce is the cross entropy, and log is the common logarithmic function.

[0080] Based on the above description, the classification method proposed in this embodiment consists of two models, so it can be trained in stages. The training of the multi-scale-space-time convolution extraction network is trained using the training set data of all users, and a pre-trained feature extraction network is obtained after the model is stabilized. The model is directly used to extract features from the processed EEG signal to obtain a feature vector with good discrimination. Then, a small amount of training set data of a specific user is used to fine-tune the pre-trained feature extraction network to obtain a personalized feature extraction network for each subject, and the distinguishability of the obtained feature vector is further improved.

[0081] For the extracted feature vectors, the fully connected layer network only needs to use a small amount of training data from a specific user to achieve the best performance. The absolute values ​​of EEG signals of different users are different, so using the training set of all users will cause the model classification effect to deteriorate.

[0082] After obtaining the trained multi-scale-spatiotemporal convolutional feature extraction network and fully connected layer network, they are used as feature extraction model and feature classification model respectively to form a motor imagery classification model. Then, the original motor imagery EEG signal to be classified is collected and input into the motor imagery classification model, and the motor imagery classification result corresponding to the current original EEG signal can be obtained.

[0083] Based on the above description, compared with the prior art, the present invention has the following advantages:

[0084] 1. The present invention sets up a preprocessing process for EEG signals. Bandpass filtering can reduce the impact of random noise, and downsampling to 100Hz can unify the actual meaning of the input signal. The time interval between two sampling points is 0.01. Therefore, under different acquisition conditions, the physical meaning represented by the processed signal is the same, which improves the versatility of the model.

[0085] 2. The present invention sets up a multi-scale-time-space convolution feature extraction network based on the physiological characteristics of EEG signals. Different time convolution kernel sizes of 0.1s, 0.45s and 1s provide a variety of time domain feature extraction scales. Therefore, the extracted features can represent different properties of the processed signal. The 0.1s convolution kernel refers to the fact that the power spectrum density of the motor imagery EEG signals of most users will be significantly larger at 10Hz. The 0.45s convolution kernel was tested by gradient experiments and had the best comprehensive performance under the condition of using a single-size convolution kernel. The 1s convolution kernel has a large scale, so it can provide the user's EEG signal baseline information. Spatial convolution performs weighted averaging on the potentials sampled by each electrode at each sampling point, which can comprehensively consider the activity status of different brain regions. Because the network structure is set with reference to the physiological characteristics of EEG signals, this model can effectively extract feature vectors with good discrimination from EEG signals.

[0086] 3. The present invention uses a contrast loss function. At present, the loss function generally uses cross entropy as the loss function, which can only optimize the separation between classes and has poor performance for signals that are difficult to distinguish. The contrast loss function can achieve the effect of both separation between classes and aggregation within classes, so that the extracted feature vector has better discrimination, so higher classification accuracy can be achieved.

[0087] 4. The classification method proposed in the present invention consists of two models. One is a feature extraction network that extracts highly distinguishable feature vectors from EEG signals. The other is a classification based on the extracted feature vectors. Compared with the currently commonly used end-to-end deep learning model, it has the characteristics of good interpretability and can optimize parameters for specific problems.

[0088] In addition, corresponding to the above-mentioned motor imagery classification method based on EEG signals, the present invention also provides a motor imagery classification system based on EEG signals, such as Figure 8 As shown, the system includes:

[0089] The EEG signal acquisition module 800 is used to acquire EEG signals and pre-process the EEG signals.

[0090] The classification model acquisition module 801 is used to obtain the motor imagery classification model. The motor imagery classification model includes: a feature extraction model and a feature classification model. The feature extraction model is a trained multi-scale-space-time convolution feature extraction network. The feature classification model is a trained fully connected layer network. The multi-scale-space-time convolution feature extraction network includes: a first convolution module, a second convolution module, a third convolution module and a fourth convolution module. The output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing. The fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence.

[0091] The classification result determination module 802 is used to input the preprocessed EEG signal into the motor imagery classification model to obtain the classification result.

[0092] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0093] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A motor imagery classification method based on EEG signals, characterized in that: include: Acquiring an electroencephalogram signal and preprocessing the electroencephalogram signal; Obtaining a motor imagery classification model; The motor imagery classification model includes: a feature extraction model and a feature classification model; the feature extraction model is a trained multi-scale-spatiotemporal convolutional feature extraction network; the feature classification model is a trained fully connected layer network; Inputting the preprocessed EEG signal into the motor imagery classification model to obtain a classification result; The multi-scale-temporal-spatial convolutional feature extraction network includes: a first convolutional module, a second convolutional module, a third convolutional module and a fourth convolutional module; The output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing; The first convolution module is a time convolution with a time domain convolution kernel size of 10; the second convolution module is a time convolution with a time domain convolution kernel size of 45; the third convolution module is a time convolution with a time domain convolution kernel size of 100; the fourth convolution module is a spatial convolution with a spatial domain convolution kernel size equal to the number of channels.

2. The motor imagery classification method based on EEG signals according to claim 1, characterized in that: Get the motor imagery classification model, which previously also includes: Obtain a first training set and a second training set; Using the first training set to train a multi-scale-spatiotemporal convolutional feature extraction network based on a loss function to obtain the feature extraction model; The second training set is used to train the fully connected layer network based on the cross entropy function to obtain the feature classification model.

3. The motor imagery classification method based on EEG signals according to claim 1, characterized in that: The Dropout probability of the first convolution module is 0.2; the Dropout probability of the second convolution module is 0.1; the Dropout probability of the third convolution module is 0.2; and the Dropout probability of the fourth convolution module is 0.

2.

4. The motor imagery classification method based on EEG signals according to claim 1, characterized in that: The processing processes of the first convolution module, the second convolution module, the third convolution module and the fourth convolution module are all: After 2D convolution of the EEG signal, batch normalization, ReLU activation function, average pooling, convolution, batch normalization, ReLU activation function and average pooling are performed in sequence.

5. The motor imagery classification method based on EEG signals according to claim 1, characterized in that: The fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence.

6. A motor imagery classification system based on EEG signals, characterized in that: The system is used to implement the motor imagery classification method based on EEG signals as described in any one of claims 1 to 5; the system comprises: An EEG signal acquisition module, used to acquire EEG signals and pre-process the EEG signals; A classification model acquisition module is used to acquire a motor imagery classification model; the motor imagery classification model includes: a feature extraction model and a feature classification model; the feature extraction model is a trained multi-scale-spatiotemporal convolutional feature extraction network; the feature classification model is a trained fully connected layer network; the multi-scale-spatiotemporal convolutional feature extraction network includes: a first convolution module, a second convolution module, a third convolution module and a fourth convolution module; the output of the first convolution module, the output of the second convolution module, the output of the third convolution module and the output of the fourth convolution module are input into the feature classification model after weighted processing; the fully connected layer network includes: a first fully connected layer, an activation function and a second fully connected layer connected in sequence; The classification result determination module is used to input the preprocessed EEG signal into the motor imagery classification model to obtain a classification result.

Citation Information

Patent Citations

  • Motor imagery electroencephalogram signal classification method based on channel attention and multi-scale time domain convolution

    CN114266276A