Motor imagery decoding method and device based on brain region channel weight saturation and storage medium

By adopting the brain region channel weight saturation method in EEG decoding, using global temporal pooling and local spatial pooling to extract features, and allocating weights according to the importance of electrodes, the poor EEG decoding performance and data problems in the existing technology are solved. The problem of long acquisition time is solved, and more efficient decoding and lower fatigue are achieved.

CN118643385APending Publication Date: 2024-09-13SHANGHAI SHULI INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410691086.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing EEG decoding algorithms directly process signals from electrodes in different brain regions with the same weight, resulting in poor decoding performance and subject fatigue due to long data collection time.

Method used

The motor imagery decoding method based on brain area channel weight saturation is used to extract features through global temporal pooling and local spatial pooling, and is combined with the electrode saturation weight allocation function to assign appropriate weights to each electrode to optimize the processing of EEG data.

Benefits of technology

It improves the accuracy and robustness of decoding, reduces noise interference, improves the learning and generalization capabilities of the model, and reduces the fatigue of the subjects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643385A
    Figure CN118643385A
Patent Text Reader

Abstract

The invention discloses a motor imagery decoding method and device based on brain region channel weight saturation and a storage medium, and the method comprises the steps: carrying out the global time pooling of to-be-decoded electroencephalogram data, carrying out the local space pooling according to brain regions based on the global time features, and carrying out the same space pooling operation in the same brain region. Obtaining spatial features of each brain region; connecting and fusing the global time feature and the space pooling features of all brain regions, then performing nonlinear activation, and splitting into two sub-vectors according to two dimensions of time and space; respectively utilizing an electrode saturation weight distribution function to obtain two weight vectors corresponding to each electrode channel; respectively obtaining a time dimension weight and a space dimension weight according to the two weight vectors, adding the time dimension weight and the space dimension weight, and multiplying an addition result by the electroencephalogram data to be decoded to obtain the electroencephalogram data after electrode saturation weight distribution; and decoding the electroencephalogram data after the electrode saturation weight distribution to obtain a classification result. According to the method and the device, the proper weight can be automatically distributed to each electrode according to the importance of each electrode in the time and space characteristics, so that the effect of a key electrode can be highlighted, the interference of a secondary electrode can be inhibited, and the accuracy and the robustness of decoding can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of brain-computer interface technology, and in particular to a method for decoding motor imagery based on brain region channel weight saturation. Background Art

[0002] Most current motor imagery decoding methods are based on machine learning methods, that is, dividing the training set, using the data in the training set to build a feature extraction model, and then sending the features to the classifier for classification. EEG signals are collected by EEG acquisition equipment composed of signal acquisition electrodes distributed in different areas of the brain. Different brain signal decoding tasks use different brain areas.

[0003] Most of the current EEG decoding algorithms directly process the signals of electrodes in different brain regions with the same weight, which results in poor performance of the trained model. At the same time, since the EEG decoding model requires more data to train the model and the single data collection time is long, it will cause the subjects to be more tired when using it. Summary of the invention

[0004] The technical purpose of this application is to solve the technical problem that most of the current EEG decoding algorithms directly process the signals of electrodes in different brain regions with the same weights, resulting in poor decoding performance, and to provide a motor imagery decoding method based on brain region channel weight saturation to specify different electrode weights for different tasks.

[0005] In order to achieve the above technical objectives, this application adopts the following technical solutions.

[0006] In a first aspect, the present application provides a method for decoding motor imagery based on brain region channel weight saturation, characterized in that it includes:

[0007] Perform global time pooling on the EEG data to be decoded to obtain global time features;

[0008] Based on the global temporal features, local spatial pooling is performed according to the brain regions, and the same spatial pooling operation is performed on the same brain region to obtain the spatial features of each brain region;

[0009] The global time feature and the spatial pooling features of all the brain regions are connected and fused to obtain a feature fusion result; the feature fusion result is nonlinearly activated, and then split into two sub-vectors according to the time and space dimensions;

[0010] Using the electrode saturation weight allocation function for the two sub-vectors respectively, two weight vectors corresponding to each electrode channel are obtained, wherein the electrode saturation weight allocation function is used to allocate saturation weights to the EEG data of each channel electrode; and the time dimension weight and the space dimension weight are obtained respectively according to the two weight vectors;

[0011] Adding the time dimension weight and the space dimension weight, and multiplying the addition result by the EEG data to be decoded, to obtain the EEG data after the electrode saturation weight is allocated;

[0012] The EEG data after the electrode saturation weights are assigned is decoded to obtain a classification result.

[0013] As a possible implementation manner, the electrode saturation weight allocation function is to maximize the weight allocated to the optimal saturation electrode in the pre-selected optimal brain region.

[0014] As a possible implementation, the electrode saturation weight allocation function expression is as follows:

[0015]

[0016] where w i is the original weight of the ith electrode channel, is the weight of the C3 electrode channel, is the weight of the C4 electrode channel, W i is the final weight of the ith electrode channel.

[0017] As a possible implementation, the method further includes acquiring original EEG data, normalizing the original EEG data, obtaining normalized EEG data, and using the normalized EEG data as the EEG data to be decoded, and the expression is as follows:

[0018]

[0019] where x raw represents the original EEG data signal, μ is the mean value of the original EEG data signal, δ is the standard deviation of the original EEG data signal, and X is the EEG data after normalization.

[0020] As a possible implementation, the method further includes: after normalizing the original EEG data, filtering the signal using a 5th-order Butterworth filter to obtain the EEG data to be decoded.

[0021] As a possible implementation, decoding the EEG data after the electrode saturation weights are assigned to obtain a classification result includes:

[0022] The EEG data after the electrode saturation weight distribution is evenly divided into first data and second data, represented as x N =[x',x''], x N The EEG data after the electrode saturation weights are assigned;

[0023] Perform an initial convolution operation on the second data x″, and connect the result of the convolution operation with the second data x″;

[0024] The convolution result obtained by the convolution operation is iterated, and the result of each convolution is connected with the result of the previous convolution to obtain the first output result, which represents x i =Cov i *x i-1 , where x i represents the i-th data, x i-1 Indicates the i-1th data, Conv i is the i-th convolution operation,

[0025] After convolving the first data, a second output result is obtained;

[0026] Connecting the first output result and the second output result to obtain a third output result;

[0027] The third output result is passed through a 1x1 convolution and a fully connected layer in sequence to obtain the classification result.

[0028] In a second aspect, an embodiment of the present application provides a motor imagery decoding device based on brain region channel weight saturation, the device comprising:

[0029] A global time feature extraction unit is used to perform global time pooling on the EEG data to be decoded to obtain global time features;

[0030] A local spatial feature extraction unit, configured to perform local spatial pooling according to brain regions based on the global temporal features, perform the same spatial pooling operation on the same brain region, and obtain spatial features of each brain region;

[0031] A spatiotemporal feature fusion unit, used for connecting and fusing the global temporal feature and the spatial pooling features of all the brain regions to obtain a feature fusion result;

[0032] A spatiotemporal feature activation and splitting unit, used for performing nonlinear activation on the feature fusion result, and then splitting it into two sub-vectors according to the two dimensions of time and space;

[0033] A spatiotemporal weight allocation unit, used to respectively use an electrode saturation weight allocation function for the two sub-vectors to obtain two weight vectors corresponding to each electrode channel, wherein the electrode saturation weight allocation function is used to perform saturation weight allocation for the EEG data of each channel electrode; and to respectively obtain a time dimension weight and a space dimension weight according to the two weight vectors;

[0034] An EEG data weighting unit, used for adding the time dimension weight and the space dimension weight, multiplying the addition result by the EEG data to be decoded, and obtaining the EEG data after the electrode saturation weight is allocated;

[0035] The EEG data decoding module is used to decode the EEG data after the electrode saturation weight is assigned to obtain a classification result.

[0036] As a possible implementation, the EEG data decoding module is configured to perform the following steps:

[0037] The EEG data after the electrode saturation weight distribution is evenly divided into first data and second data, represented as x n =[x',x''], x n The EEG data after the electrode saturation weights are assigned;

[0038] Perform an initial convolution operation on the second data x″, and connect the result of the convolution operation with the second data x″;

[0039] The convolution result obtained by the convolution operation is iterated, and the result of each convolution is connected with the result of the previous convolution to obtain the first output result, which represents x i =Cov i *x i-1 , where x i represents the i-th data, x i-1 Indicates the i-1th data, Conv i is the i-th convolution operation, and the initial value of i is 2;

[0040] After convolving the first data, a second output result is obtained;

[0041] Connecting the first output result and the second output result to obtain a third output result;

[0042] The third output result is passed through a 1x1 convolution and a fully connected layer in sequence to obtain the classification result.

[0043] As a possible implementation, the motor imagery decoding device is generated by training using training data in advance, and the training data is generated as follows:

[0044] Acquire historical EEG data, and assign different training weights to the historical EEG data according to the date, wherein the longer the historical EEG data is from the current time, the smaller the training weight is;

[0045] Assigning a confidence level to each piece of EEG data in the historical EEG data;

[0046] The product of the training weight and the confidence level is used as a selection confidence index;

[0047] The selection confidence indexes are arranged from large to small, and according to the size of the selection confidence, a set proportion of data is selected from the historical EEG data as the training data.

[0048] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the program implements the steps of a motor imagery decoding method based on brain region channel weight saturation as provided in any possible implementation of the first aspect.

[0049] Compared with the prior art, the motor imagery decoding method and device based on brain region channel weight saturation disclosed in the embodiment of the present application can extract the key temporal and spatial features in the signal by performing global time pooling and local space pooling on the EEG signal, reduce the interference of noise and irrelevant information, and thus improve the quality of the signal. The electrode saturation weight allocation can further optimize the expression of these features and improve the learning and generalization ability of the model. The present application can automatically assign appropriate weights to each electrode according to the importance of each electrode in the temporal and spatial features. This helps to highlight the role of key electrodes and suppress the interference of secondary electrodes, thereby improving the accuracy and robustness of decoding. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The drawings described herein are for explanation purposes only and are not intended to limit the scope of the present application in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only for illustration purposes and are used to help understand the present application. They do not specifically limit the shapes and proportional dimensions of the components of the present application. Under the guidance of the present application, those skilled in the art can select various possible shapes and proportional dimensions to implement the present application according to specific circumstances. In the drawings:

[0051] Figure 1 A schematic diagram of the flow of a motor imagery decoding method based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a process for obtaining EEG data after electrode saturation weight allocation in a motor imagery decoding method based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of brain region division in a motor imagery decoding method based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of electrode channel weight allocation in a motor imagery decoding method based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0055] Figure 5 A block diagram of a motor imagery decoding device based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of the structure of an EEG data decoding module in a motor imagery decoding device based on brain region channel weight saturation disclosed in an embodiment of the present application;

[0057] Reference numerals:

[0058] 100-motor imagery decoding device, 10-channel weight allocation module, 20-EEG data decoding module, 101-global time feature extraction unit, 102-local space feature extraction unit, 103-space-time feature fusion unit, 104-space-time feature activation and splitting unit, 105-space-time weight allocation unit, 106-EEG data weighting unit. DETAILED DESCRIPTION

[0059] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

[0060] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more features.

[0061] Embodiment 1

[0062] Figure 1 is a flow chart of a method for decoding motor imagery based on brain region channel weight saturation disclosed in an embodiment of the present application; Figure 1 As shown, the method includes:

[0063] Step S1: Perform global time pooling on the EEG data to be decoded to obtain global time features;

[0064] Step S2: Based on the global temporal features, local spatial pooling is performed according to the brain region, and the same spatial pooling operation is performed on the same brain region to obtain the spatial features of each brain region;

[0065] Step S3: connect and fuse the global temporal features and the spatial pooling features of all brain regions to obtain feature fusion results;

[0066] Step S4: Perform nonlinear activation on the feature fusion result, and then split it into two sub-vectors according to the time and space dimensions;

[0067] Step S5: using the electrode saturation weight allocation function for the two sub-vectors respectively to obtain two weight vectors corresponding to each electrode channel, the electrode saturation weight allocation function is used to allocate saturation weights to the EEG data of each channel electrode; and obtaining the time dimension weight and the space dimension weight respectively according to the two weight vectors;

[0068] Step S6: adding the time dimension weight and the space dimension weight, and multiplying the addition result with the EEG data to be decoded to obtain the EEG data after the electrode saturation weight is allocated;

[0069] Step S7: Decode the EEG data after the electrode saturation weights are assigned to obtain the classification result.

[0070] The motor imagery decoding method provided in this embodiment can combine the spatial and temporal information of EEG data to automatically adjust the electrode signal weights according to the task, improve the effective feature extraction capability, and the decoding performance for the task.

[0071] In the specific implementation, an EEG signal acquisition device is used to collect the original EEG signals of the subjects. Electrodes are installed on the scalp of the subjects using the standard international 10-20 system. The electrodes are fixed to the head through an electrode cap or an electrode disk to ensure that they remain stable and are correctly placed in the corresponding position.

[0072] In some embodiments, the original EEG data is normalized to obtain normalized EEG data, and the normalized EEG data is used as the EEG data to be decoded, and the expression is as follows:

[0073]

[0074] where x raw represents the original EEG data signal, μ is the mean value of the original EEG data signal, δ is the standard deviation of the original EEG data signal, and x is the EEG data after normalization.

[0075] Normalization makes the mean of each electrode channel data zero, and the amplitude range is within a certain range based on the standard deviation. The normalized data has zero mean and unit variance, which helps the algorithm converge faster, reduces training time, and may improve the prediction performance of the model.

[0076] In some embodiments, the motor imagery decoding method based on brain region channel weight saturation also includes normalizing the original EEG data, and then filtering the signal using a 5th-order Butterworth filter to obtain the EEG data to be decoded. The filtering range is 5Hz to 30Hz. Motor imagery EEG signals are most active in the 5Hz to 30Hz frequency band. Signals greater than 30Hz are likely to be myoelectric interference signals, and signals less than 5Hz are likely to be acquisition drift signals. Therefore, this patent uses a 5-30Hz filter to remove interference signals and retain the optimal motor imagery frequency band signal.

[0077] In some embodiments, the flowchart of obtaining EEG data after electrode saturation weight allocation is as follows: Figure 2 shown.

[0078] The global temporal pooling in step S1 refers to the pooling operation along the time dimension, so that the features of each time step are compressed into a single feature value.

[0079] Optionally, step S2 performs pooling on the electrodes in the brain regions, each brain region defines an area, and the electrodes can be grouped into different brain regions. In the same brain region, the EEG signals of the electrode channels therein are pooled, and the spatial pooling results of the electrodes in the same brain region are the same. In some embodiments, the EEG electrodes are placed based on the international 10-20 system, and the EEG partitioning example is as follows Figure 3 and Figure 4 shown.

[0080] Optionally, step S3 includes connecting the global temporal features and the spatial pooling features of all brain regions to obtain a first feature vector; the connection operation combines the temporal and spatial features into a longer feature vector that contains both temporal information and spatial information.

[0081] The first feature vector is passed through a 1x1 convolution operation. The 1x1 convolution does not change the spatial size of the feature vector, but can adjust its depth (i.e., the number of feature channels). The 1x1 convolution can fuse different features or perform feature transformations while maintaining the spatiotemporal dimensions of the features. After the 1x1 convolution, the feature vector is then subjected to a batch normalization operation to obtain the feature fusion result. Batch normalization is used to accelerate training, improve model generalization, and may alleviate overfitting to a certain extent.

[0082] Optionally, step S4 applies a LeakyReLU activation function to the batch-normalized feature vector to increase the nonlinear expression capability of the model. The LeakyReLU activation function is as follows:

[0083]

[0084] The feature vector after nonlinear activation is split into two sub-vectors in time and space dimensions.

[0085] Optionally, step S5 applies the electrode saturation weight allocation function to the convolution results of the two dimensions respectively. Step S5 specifically includes: performing 1x1 convolution operations on the two sub-vectors to obtain corresponding convolution results, applying the electrode saturation weight allocation function to the two convolution results to obtain two weight vectors corresponding to each electrode channel, and the electrode saturation weight allocation function is used to allocate saturation weights to the EEG signals of the electrodes of each channel; and passing the two weight vectors through the sigmoid function to obtain the time dimension weight and the space dimension weight.

[0086] In some embodiments, the electrode saturation weight allocation function is that the weight allocated to the electrode channel located in the left brain area is less than or equal to the weight of the C3 electrode channel, and the weight allocated to the electrode channel located in the right brain area is less than or equal to the weight of the C4 electrode channel.

[0087] According to prior knowledge, in the motor imagery task, the EEG cortical discharge in the parietal area of ​​the brain is more active, while the discharge in other areas is relatively weak. Therefore, the parietal area is selected as the optimal brain area electrode. Then, in the optimal brain area, select C3 and C4 electrodes as the optimal saturation electrodes, such as Figure 4 As shown, it means that in the process of automatic weight allocation, the surrounding electrodes are not allowed to exceed the weights of these two electrodes.

[0088] Optionally, the formula of the electrode saturation weight distribution function is as follows:

[0089]

[0090] where w i is the original weight of the ith electrode channel, is the weight of the C3 electrode channel, is the weight of the C4 electrode channel, W i is the final weight of the ith electrode channel.

[0091] The embodiment of the present application involves designing an automatic weight saturation allocation method determined by brain regions and electrode positions based on time features and spatial features, automatically allocating weights to electrode channels, and improving the feature extraction capability of the decoding method. By setting a priori electrodes to achieve weight saturation of electrodes around the priori electrodes, the weight training process can be guided to a certain extent, reducing the weight training time while improving the decoding accuracy.

[0092] Some embodiments implement the above step S7 by: decoding the EEG data after the electrode saturation weight allocation to obtain the classification result, including: dividing the EEG data after the electrode saturation weight allocation into first data and second data on an average basis, expressed as xn =[x',x''], x n is the EEG data after the electrode saturation weight is assigned; an initial convolution operation is performed on the second data x", and the result after the convolution operation is connected with the second data x"; an iterative convolution operation is performed on the convolution result obtained by the convolution operation, and the result of each convolution is connected with the result of the previous convolution to obtain the first output result, which represents x i =Cov i *x i-1 , where x i represents the i-th data, x i-1 Indicates the i-1th data, Conv i This is the i-th convolution operation. After convolving the first data, the second output result is obtained. The first output result is connected with the second output result to obtain the third output result. The third output result passes through the 1x1 convolution and the fully connected layer in sequence to obtain the classification result.

[0093] Embodiment 2

[0094] Corresponding to the motor imagery decoding method based on brain region channel weight saturation provided in the present embodiment provided in the above embodiment, the present embodiment provides a motor imagery decoding device 100 based on brain region channel weight saturation, such as Figure 5 As shown, it includes: a global time feature extraction unit 101, a local space feature extraction unit 102, a spatiotemporal feature fusion unit 103, a spatiotemporal feature activation and splitting unit 104, a spatiotemporal weight allocation unit 105, an EEG data weighting unit 106 and an EEG data decoding module 20.

[0095] The global time feature extraction unit 101 , the local space feature extraction unit 102 , the spatiotemporal feature fusion unit 103 , the spatiotemporal feature activation and splitting unit 104 , the spatiotemporal weight allocation unit 105 , and the EEG data weighting unit 106 form a channel weight allocation module 10 .

[0096] The global time feature extraction unit 101 is used to perform global time pooling on the EEG data to be decoded to obtain global time features.

[0097] A local spatial feature extraction unit 102 is used to perform local spatial pooling according to brain regions based on global temporal features, and perform the same spatial pooling operation on the same brain region to obtain spatial features of each brain region;

[0098] The spatiotemporal feature fusion unit 103 is used to connect and fuse the global temporal features and the spatial pooling features of all brain regions to obtain a feature fusion result.

[0099] The spatiotemporal feature activation and splitting unit 104 is used to perform nonlinear activation on the feature fusion result, and then split it into two sub-vectors according to the two dimensions of time and space.

[0100] The spatiotemporal weight allocation unit 105 is used to use the electrode saturation weight allocation function to respectively apply the two sub-vectors to obtain two weight vectors corresponding to each electrode channel. The electrode saturation weight allocation function is used to perform saturation weight allocation for the EEG data of each channel electrode; and obtain the time dimension weight and the space dimension weight according to the two weight vectors.

[0101] The EEG data weighting unit 106 is used to add the time dimension weight and the space dimension weight, and multiply the addition result with the EEG data to be decoded to obtain the EEG data after the electrode saturation weight is allocated.

[0102] The EEG data decoding module 20 is used to decode the EEG data after the electrode saturation weights are allocated to obtain a classification result.

[0103] In some embodiments, the EEG data decoding module 20 is a cross-layer convolutional neural network, and the network structure is as follows: Figure 6 As shown in the figure, the cross-layer convolutional neural network performs convolution operation on the EEG data after the electrode saturation weight assignment to obtain the input signal X N , the input signal X N Divide into two parts (e.g. average), X N = [x', x"], the second part of the signal x" is convolved, and the result after the convolution operation is connected with the first part of the signal x'. The data after a single convolution is x i =Cov i *x i-1 , where Conv i is the i-th convolution operation. The convolution operation is continued. As an example, the final output result is as follows:

[0104] x a =[x″,x1,x2,x3].

[0105] Figure 6 The output result x in the middle and lower parts b =Conv b *x′, and finally connect the upper and lower parts to get x c =[x a ,x b ]. Finally, a 1x1 convolution is used to convert the data into a one-dimensional vector for classification in the fully connected layer.

[0106] The embodiment of the present application uses a cross-layer convolutional neural network to perform multi-layer convolution on a part of the basic features and single-layer convolution on the other part, which can reduce the convolution operation of the features and thus reduce the training time of the model. This parallel processing method can make full use of the information in the original data, avoid information loss, and further improve the accuracy of classification.

[0107] It is understandable that the motor imagery decoding device is generated by pre-training using training data. During the training process, a cross entropy loss function is used, the learning rate is set to 0.001, and the optimizer uses stochastic gradient descent to achieve reverse update of the parameters of the cross-layer convolutional neural network. The cross entropy loss function is as follows:

[0108]

[0109] Afterwards, the data and the corresponding confidence can be uploaded to the cloud platform for storage. The confidence is the probability output by the classification model.

[0110] In some embodiments, the training data is generated as follows:

[0111] Obtain historical EEG data, assign different training weights to the historical EEG data according to the date, the longer the historical EEG data is from the current time, the smaller the training weight; assign confidence to each EEG data in the historical EEG data; take the product of the training weight and the confidence as the selection confidence index; arrange the selection confidence indexes from large to small, and according to the size of the selection confidence, select the data with a set proportion from the historical EEG data as the training data.

[0112] As an example, the weight distribution formula is as follows:

[0113]

[0114] where k i is the weight of the training data on the i-th day, h is the intensity adjustment coefficient, and the formula is as follows:

[0115]

[0116] Where T is the total number of training days, and i is the training day number starting from the start day of training. For example, if it is the first training day, i is 1; if it is the fifth training day, i is 5; and if it is the tenth training day, i is 10.

[0117] Each piece of data uploaded to the cloud platform has a confidence coefficient, which is obtained by model training on that day. The final selected confidence of historical data is k′=k i *conf ij , where ij is the confidence level of the j-th data on the i-th day.

[0118] Sort the confidence of historical data and select the top 20% of data with the highest confidence to add to the model training of the day.

[0119] By assigning different training weights to historical EEG data according to the date, the model can focus more on recent data. Since the physiological state of an organism may change over time, this weighting method helps to improve the adaptability of the model to the latest trends. Assigning confidence to each EEG data in the historical EEG data can effectively deal with the problem of inconsistent data quality. Confidence can be used as a measure of data quality to ensure that the model relies more on high-quality data during training.

[0120] The embodiment of the present application was tested on a data set. The data set used a 16-lead EEG cap with a sampling rate of 250 Hz to collect 4 seconds of left and right hand movement imagery data. Each subject performed 50 common movement imageries. A total of 5 subjects participated in the experiment.

[0121] This application example uses four models for comparison:

[0122] Co-spatial patterns (CSP) were used for feature extraction and random forest (RF) classifier was used for classification method;

[0123] Common spatial patterns (CSP) were used for feature extraction and support vector machine (SVM) classifier was used for classification method;

[0124] Classification model method that does not use channel weight saturation and historical data (M1);

[0125] A classification model method that uses channel weight saturation and does not use historical data (M2);

[0126] Using channel weight saturation, classification model method using historical data (M3).

[0127] The accuracy rates of the five subjects are shown in Table 1. From Table 1, it can be seen that the motor imagery decoding method proposed in this application has greatly improved accuracy compared with the basic method of machine learning.

[0128] Table 1 Comparison of classification accuracy of different methods

[0129]

[0130] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the steps of the motor imagery decoding method based on brain region channel weight saturation as provided in the above embodiment are implemented.

[0131] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device 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 description.

[0132] The above is a detailed introduction to the motor imagery decoding method, device and storage medium based on brain area channel weight saturation provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the concept of the present application and should not be understood as limiting the scope of protection of the present application.

Claims

1. A motor imagery decoding method based on brain area channel weight saturation, characterized in that: include: Perform global time pooling on the EEG data to be decoded to obtain global time features; Based on the global temporal features, local spatial pooling is performed according to the brain regions, and the same spatial pooling operation is performed on the same brain region to obtain the spatial features of each brain region; Connecting and fusing the global temporal features and the spatial pooling features of all the brain regions to obtain a feature fusion result; Nonlinear activation is performed on the feature fusion result, and then the result is split into two sub-vectors according to the time and space dimensions; Using the electrode saturation weight allocation function for the two sub-vectors respectively, two weight vectors corresponding to each electrode channel are obtained, wherein the electrode saturation weight allocation function is used to allocate saturation weights to the EEG data of each channel electrode; and the time dimension weight and the space dimension weight are obtained respectively according to the two weight vectors; Adding the time dimension weight and the space dimension weight, and multiplying the addition result by the EEG data to be decoded, to obtain the EEG data after the electrode saturation weight is allocated; The EEG data after the electrode saturation weights are assigned is decoded to obtain a classification result.

2. The method for decoding motor imagery based on brain region channel weight saturation according to claim 1, characterized in that: The electrode saturation weight allocation function is to maximize the weight allocated to the optimal saturation electrode in the pre-selected optimal brain region.

3. The method for decoding motor imagery based on brain region channel weight saturation according to claim 1, characterized in that: The electrode saturation weight distribution function expression is as follows: where w i is the original weight of the ith electrode channel, is the weight of the C3 electrode channel, is the weight of the C4 electrode channel, W i is the final weight of the i-th electrode channel.

4. The method for decoding motor imagery based on brain region channel weight saturation according to claim 1, characterized in that: The method further includes acquiring original EEG data, normalizing the original EEG data, obtaining normalized EEG data, and using the normalized EEG data as the EEG data to be decoded, and the expression is as follows: where x raw represents the original EEG data signal, μ is the mean value of the original EEG data signal, δ is the standard deviation of the original EEG data signal, and X is the EEG data after normalization.

5. The method for decoding motor imagery based on brain region channel weight saturation according to claim 4, characterized in that: The method further includes: after normalizing the original EEG data, filtering the signal using a 5th-order Butterworth filter to obtain the EEG data to be decoded.

6. The method for decoding motor imagery based on brain region channel weight saturation according to claim 1, characterized in that: Decoding the EEG data after the electrode saturation weights are assigned to obtain a classification result, including: The EEG data after the electrode saturation weight distribution is evenly divided into first data and second data, represented as x N =[x',x''], x N The EEG data after the electrode saturation weights are assigned; Perform an initial convolution operation on the second data x″, and connect the result of the convolution operation with the second data x″; The convolution result obtained by the convolution operation is iterated, and the result of each convolution is connected with the result of the previous convolution to obtain the first output result, which represents x i =Cov i *x i-1 , where x i represents the i-th data, x i-1 Indicates the i-1th data, Conv i is the i-th convolution operation, After convolving the first data, a second output result is obtained; Connecting the first output result and the second output result to obtain a third output result; The third output result is passed through a 1x1 convolution and a fully connected layer in sequence to obtain the classification result.

7. A motor imagery decoding device based on brain area channel weight saturation, characterized in that: The device comprises: A global time feature extraction unit is used to perform global time pooling on the EEG data to be decoded to obtain global time features; A local spatial feature extraction unit, configured to perform local spatial pooling according to brain regions based on the global temporal features, perform the same spatial pooling operation on the same brain region, and obtain spatial features of each brain region; A spatiotemporal feature fusion unit, used for connecting and fusing the global temporal feature and the spatial pooling features of all the brain regions to obtain a feature fusion result; A spatiotemporal feature activation and splitting unit, used for performing nonlinear activation on the feature fusion result, and then splitting it into two sub-vectors according to the two dimensions of time and space; A spatiotemporal weight allocation unit, used to respectively use an electrode saturation weight allocation function for the two sub-vectors to obtain two weight vectors corresponding to each electrode channel, wherein the electrode saturation weight allocation function is used to perform saturation weight allocation for the EEG data of each channel electrode; and to respectively obtain a time dimension weight and a space dimension weight according to the two weight vectors; An EEG data weighting unit, used for adding the time dimension weight and the space dimension weight, multiplying the addition result by the EEG data to be decoded, and obtaining the EEG data after the electrode saturation weight is allocated; The EEG data decoding module is used to decode the EEG data after the electrode saturation weight is assigned to obtain a classification result.

8. The motor imagery decoding device based on brain region channel weight saturation according to claim 7, characterized in that: The EEG data decoding module is configured to perform the following steps: The EEG data after the electrode saturation weight distribution is evenly divided into first data and second data, represented as x n =[x',x''], x n The EEG data after the electrode saturation weights are assigned; Perform an initial convolution operation on the second data x″, and connect the result of the convolution operation with the second data x″; The convolution result obtained by the convolution operation is iterated, and the result of each convolution is connected with the result of the previous convolution to obtain the first output result, which represents x i =Cov i *x i-1 , where x i represents the i-th data, x i-1 Indicates the i-1th data, Conv i is the i-th convolution operation, and the initial value of i is 2; After convolving the first data, a second output result is obtained; Connecting the first output result and the second output result to obtain a third output result; The third output result is passed through a 1x1 convolution and a fully connected layer in sequence to obtain the classification result.

9. The motor imagery decoding device based on brain region channel weight saturation according to claim 7, characterized in that: The motor imagery decoding device is generated by training using training data in advance, and the training data is generated in the following manner: Acquire historical EEG data, and assign different training weights to the historical EEG data according to the date, wherein the longer the historical EEG data is from the current time, the smaller the training weight is; Assigning a confidence level to each piece of EEG data in the historical EEG data; The product of the training weight and the confidence level is used as a selection confidence index; The selection confidence indexes are arranged from large to small, and according to the size of the selection confidence, a set proportion of data is selected from the historical EEG data as the training data.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the motor imagery decoding method based on brain region channel weight saturation as described in any one of claims 1 to 6 are implemented.