Electroencephalogram signal classification method and device, electronic equipment and medium
By using a one-to-many filter bank co-space pattern network and a residual convolutional neural network for parallel feature extraction, combined with dynamic graph convolutional neural networks and gated recurrent neural networks for feature relearning, and using an attention network for feature fusion, the problem of limited feature selection in traditional methods is solved, and the accuracy of EEG signal classification is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING NORMAL UNIV AT ZHUHAI
- Filing Date
- 2023-09-07
- Publication Date
- 2026-06-26
Smart Images

Figure CN117251778B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of electroencephalogram (EEG) signal processing technology, and more specifically, to an EEG signal classification method, apparatus, electronic device, and medium. Background Technology
[0002] Brain-computer interface (BCI) is an emerging interdisciplinary field at the intersection of neuroscience and information science. It establishes a direct communication and control channel between the brain and external devices, enabling information exchange between them. Motor imagery (MI) is a key paradigm in BCI, generating intentional actions through imagined movements without actually performing them. The activated brain regions and the resulting electroencephalogram (EEG) signals bear a certain similarity to the EEG signals generated by actual movement. Feature extraction and classification of EEG signals are crucial in BCI research.
[0003] In mind-based brain association (BCI) studies, different tasks can induce different EEG brain activity patterns, laying a neuroelectrophysiological foundation for classifying EEG signals from various types of motor imagery. Related techniques utilize sliding windows to capture multiple EEG signal segments and extract features from the EEG signals within each time window, then classify the EEG signals based on the extracted features. However, traditional feature extraction methods, such as bandpass filtering, autoregression, and frequency domain statistics, select very limited features and may lose some usable information within the EEG signal, thus affecting the classification results. Summary of the Invention
[0004] This disclosure provides a method, apparatus, electronic device, and medium for classifying electroencephalogram (EEG) signals.
[0005] According to a first aspect of this disclosure, a method for classifying electroencephalogram (EEG) signals is provided, the method comprising:
[0006] Acquire the EEG signals to be classified;
[0007] The EEG signal to be classified is subjected to feature extraction in parallel by a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the trained EEG signal classification model. The first feature information of the EEG signal to be classified is output by the one-to-many filter bank co-space pattern network, and the second feature information of the EEG signal to be classified is output by the residual convolutional neural network.
[0008] The first and second feature information are relearned in parallel by using a dynamic graph convolutional neural network and a gated recurrent neural network in the trained EEG signal classification model. The third feature information of the EEG signal to be classified is output by the dynamic graph convolutional neural network, and the fourth feature information of the EEG signal to be classified is output by the gated recurrent neural network.
[0009] The third and fourth feature information are simultaneously fused using the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified.
[0010] The prediction network in the trained EEG signal classification model obtains the target classification result of the EEG signal to be classified based on the target feature information.
[0011] Optionally, the step of simultaneously fusing the third and fourth feature information using the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified includes:
[0012] The attention network is used to determine the weight coefficients corresponding to the third feature information and the fourth feature information, respectively.
[0013] The attention network performs feature fusion on each feature in the third feature information according to the weight coefficient corresponding to the third feature information, and performs feature fusion on each feature in the fourth feature information according to the weight coefficient corresponding to the fourth feature information, to obtain the target feature information of the EEG signal to be classified.
[0014] Optionally, the training method for the EEG signal classification model includes:
[0015] Obtain a training sample set; wherein each training sample in the training sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample;
[0016] The EEG signal samples are extracted in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the EEG signal classification model to be trained. The one-to-many filter bank co-space pattern network outputs the first sample feature information of the EEG signal samples, and the residual convolutional neural network outputs the second sample feature information of the EEG signal samples.
[0017] The first sample feature information and the second sample feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the EEG signal classification model to be trained. The third sample feature information of the EEG signal sample is output by the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output by the gated recurrent neural network.
[0018] The third sample feature information and the fourth sample feature information are simultaneously fused by the attention network in the EEG signal classification model to be trained, so as to obtain the target sample feature information of the EEG signal sample.
[0019] The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label;
[0020] The network parameters of the EEG signal classification model to be trained are updated using the first loss.
[0021] Optionally, the first loss is constructed by the prediction network in the EEG signal classification model to be trained based on the target sample feature information and the sample category label, including:
[0022] A second loss is constructed based on the sample category labels and the standardized data corresponding to the EEG signal samples;
[0023] A third loss is constructed based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained;
[0024] A fourth loss is constructed based on the center vector of the sample category label and the feature information of the target sample;
[0025] The first loss is constructed based on the second loss, the third loss, and the fourth loss.
[0026] Optionally, the method further includes:
[0027] Obtain a verification sample set; wherein, each verification sample in the verification sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample;
[0028] The EEG signal sample is input into the trained EEG signal classification model to obtain the predicted category label of the EEG signal sample;
[0029] The trained EEG signal classification model is validated based on the predicted category label and the sample category label.
[0030] According to a second aspect of this disclosure, an electroencephalogram (EEG) signal classification device is provided, the device comprising:
[0031] The acquisition module is used to acquire the EEG signals to be classified.
[0032] The first processing module is used to extract features from the EEG signal to be classified in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the trained EEG signal classification model, output the first feature information of the EEG signal to be classified through the one-to-many filter bank co-space pattern network, and output the second feature information of the EEG signal to be classified through the residual convolutional neural network.
[0033] The second processing module is used to perform feature relearning on the first feature information and the second feature information in parallel through the dynamic graph convolutional neural network and the gated recurrent neural network in the trained EEG signal classification model, output the third feature information of the EEG signal to be classified through the dynamic graph convolutional neural network, and output the fourth feature information of the EEG signal to be classified through the gated recurrent neural network.
[0034] The third processing module is used to simultaneously perform feature fusion on the third feature information and the fourth feature information through the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified.
[0035] The classification module is used to obtain the target classification result of the EEG signal to be classified based on the target feature information through the prediction network in the trained EEG signal classification model.
[0036] Optionally, the device further includes a training module for:
[0037] Obtain a training sample set; wherein each training sample in the training sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample;
[0038] The EEG signal samples are extracted in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the EEG signal classification model to be trained. The one-to-many filter bank co-space pattern network outputs the first sample feature information of the EEG signal samples, and the residual convolutional neural network outputs the second sample feature information of the EEG signal samples.
[0039] The first sample feature information and the second sample feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the EEG signal classification model to be trained. The third sample feature information of the EEG signal sample is output by the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output by the gated recurrent neural network.
[0040] The third sample feature information and the fourth sample feature information are simultaneously fused by the attention network in the EEG signal classification model to be trained, so as to obtain the target sample feature information of the EEG signal sample.
[0041] The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label;
[0042] The network parameters of the EEG signal classification model to be trained are updated using the first loss.
[0043] Optionally, the training module is specifically used for:
[0044] A second loss is constructed based on the sample category labels and the standardized data corresponding to the EEG signal samples;
[0045] A third loss is constructed based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained;
[0046] A fourth loss is constructed based on the center vector of the sample category label and the feature information of the target sample;
[0047] The first loss is constructed based on the second loss, the third loss, and the fourth loss.
[0048] According to a third aspect of this disclosure, an electronic device is provided, including a memory for storing executable computer instructions; and a processor for executing the electroencephalogram (EEG) signal classification method according to the first aspect above, under the control of the executable computer instructions.
[0049] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having computer instructions stored thereon, which, when executed by a processor, perform the electroencephalogram (EEG) signal classification method described in the first aspect above.
[0050] According to the EEG signal classification method of this disclosure, it extracts features from EEG signals in parallel using a one-to-many filter bank co-spatial pattern network and a residual convolutional neural network. The one-to-many filter bank co-spatial pattern network can extract EEG signal features using rich prior knowledge, while the residual convolutional neural network can learn high-dimensional and different-dimensional features of EEG signals and avoid the limitation of traditional methods that extract only partial features and lose unknown features. Furthermore, when the residual convolutional neural network performs poorly, the one-to-many filter bank co-spatial pattern network can still learn EEG signal features using rich prior knowledge. Secondly, it performs feature relearning in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network. The dynamic graph convolutional neural network can automatically learn the complex relationships between EEG signal features, while the gated recurrent neural network can automatically learn the temporal patterns of EEG signal features. These two complement each other, ensuring that both the relationships between features and the temporal patterns are captured, forming effective new features. Moreover, the parallel structure avoids mutual interference between the learning of relationships between features and the temporal patterns during feature extraction and avoids the problem of lost feature information in intermediate layers that occurs in serial network structures. Furthermore, feature fusion through attention networks can eliminate the phenomenon of insufficient extraction of discriminative features due to differences in amplitude of different features, thereby improving the classification accuracy of EEG signals.
[0051] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0052] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of the present disclosure and, together with their description, serve to explain the principles of the present disclosure.
[0053] Figure 1 This is a schematic diagram of the hardware configuration of an electronic device according to an embodiment of the present disclosure;
[0054] Figure 2 This is a flowchart illustrating a brainwave signal classification method according to an embodiment of the present disclosure;
[0055] Figure 3 This is a schematic diagram illustrating an application scenario of an EEG signal classification method based on an example of this disclosure.
[0056] Figure 4 This is a schematic diagram of the structure of an electroencephalogram (EEG) signal classification model according to an embodiment of the present disclosure;
[0057] Figure 5 This is a schematic block diagram of an electroencephalogram (EEG) signal classification device according to an embodiment of the present disclosure;
[0058] Figure 6 This is a schematic diagram of the hardware configuration of an electronic device according to another embodiment of the present disclosure. Detailed Implementation
[0059] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0060] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.
[0061] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0062] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0063] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0064] <Hardware Configuration>
[0065] Figure 1 This is a block diagram of the hardware configuration of an electronic device 1000 according to an embodiment of the present disclosure.
[0066] In one embodiment, the electronic device 1000 may be a server or a terminal device. The server may be a monolithic server or a distributed server spanning multiple computers or a computer data center. The terminal device may be a portable computer, desktop computer, wearable device, or any other device having a processor or other computing device and a memory or other storage device; this embodiment does not limit the specific device.
[0067] like Figure 1 As shown, the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, etc.
[0068] Processor 1100 may be a mobile processor. Memory 1200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk. Interface device 1300 includes, for example, a USB interface and a headphone jack. Communication device 1400 may be capable of wired or wireless communication. Communication device 1400 may include short-range communication devices, such as any device that performs short-range wireless communication based on short-range wireless communication protocols such as Hilink, WiFi (IEEE 802.11), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, and LiFi. Communication device 1400 may also include long-range communication devices, such as any device that performs WLAN, GPRS, or 2G / 3G / 4G / 5G long-range communication. Display device 1500 is, for example, an LCD screen or a touch screen. Input device 1600 may include, for example, a touch screen or a keyboard. Electronic device 1000 can output audio information through a speaker 1700 and acquire audio information through a microphone 1800.
[0069] Despite Figure 1 The electronic device 1000 shows multiple devices, but this disclosure may only relate to some of them. For example, electronic device 1000 may only relate to memory 1200 and processor 1100.
[0070] In embodiments of this disclosure, the memory 1200 of the electronic device 1000 is used to store instructions for controlling the processor 1100 to execute the EEG signal classification method provided in embodiments of this disclosure.
[0071] In the above description, those skilled in the art can design instructions based on the scheme disclosed in this disclosure. How the instructions control the processor to operate is well known in the art, and therefore will not be described in detail here.
[0072] <Method Implementation>
[0073] In this embodiment, a method for classifying electroencephalogram (EEG) signals is provided. This EEG signal classification method can be implemented by an electronic device, which can be, for example, […]. Figure 1 The electronic device shown is 1000.
[0074] according to Figure 2 As shown, the EEG signal classification method of this disclosure embodiment may include the following steps S2100 to S2500.
[0075] Step S2100: Obtain the EEG signal to be classified.
[0076] Among them, the EEG signals to be classified can be EEG signals of multiple types of motor imagery.
[0077] Step S2200: The EEG signal to be classified is subjected to feature extraction in parallel by a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the trained EEG signal classification model. The first feature information of the EEG signal to be classified is output by the one-to-many filter bank co-space pattern network, and the second feature information of the EEG signal to be classified is output by the residual convolutional neural network.
[0078] The trained EEG signal classification model includes a One-Versus-Rest Filter Bank Common Spatial Pattern (OVR-FBCSP) network and a Residual Convolutional Neural Network (RCNN). (See reference...) Figure 3 By simultaneously inputting the EEG signal to be classified into a one-to-many filter bank co-space pattern network and a residual convolutional neural network, the one-to-many filter bank co-space pattern network can extract features from the EEG signal to be classified based on the one-to-many filter bank co-space pattern algorithm, and output the first feature information of the EEG signal to be classified. The residual convolutional neural network can also extract features from the EEG signal to be classified, and output the second feature information of the EEG signal to be classified.
[0079] In this embodiment, step S2200, which extracts features from the EEG signal to be classified using a one-to-many filter bank co-spatial pattern network in the trained EEG signal classification model and outputs the first feature information of the EEG signal to be classified, may further include: dividing the EEG signal to be classified into multiple sub-frequency bands using the first group in the one-to-many filter bank co-spatial pattern network; extracting the spatial energy features of any sub-frequency band signal using the second group in the one-to-many filter bank co-spatial pattern network; and performing feature selection on each spatial energy feature using the third group in the one-to-many filter bank co-spatial pattern network to obtain the first feature information of the EEG signal to be classified.
[0080] The One-to-Many Filter Bank Co-Spatial Pattern (OVR-FBCSP) network comprises three groups: Group 1 (temporal filtering) and Group 3 (spatial filtering). Group 1 performs temporal filtering to divide the EEG signal to be classified into multiple sub-bands based on the filter bank. Group 2 performs spatial filtering to extract the spatial energy features of each sub-band using the CSP algorithm. Group 3 performs feature selection to select features from the spatial energy features.
[0081] Specifically, the EEG signal to be classified is input into the OVR-FBCSP network. First, the first group of the OVR-FBCSP network divides the EEG signal to be classified into multiple sub-frequency bands. Then, the second group of the OVR-FBCSP network extracts the spatial energy features of each sub-frequency band. Finally, the third group of the OVR-FBCSP network performs feature selection on each spatial energy feature to obtain the first feature information of the EEG signal to be classified and outputs it to the dynamic graph convolutional neural network and the gated recurrent neural network.
[0082] Step S2300: The first feature information and the second feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the trained EEG signal classification model. The third feature information of the EEG signal to be classified is output by the dynamic graph convolutional neural network, and the fourth feature information of the EEG signal to be classified is output by the gated recurrent neural network.
[0083] The trained EEG signal classification model includes a Dynamic Graph Convolutional Neural Network (DGCN) and a Gated Recurrent Neural Network (GRU). (See reference...) Figure 3 By simultaneously inputting the first and second feature information of the EEG signal to be classified into a dynamic graph convolutional neural network (HPN) and a gated recurrent neural network (RNN), the HPN can perform feature relearning on the first and second feature information of the EEG signal to be classified. That is, the HPN learns the complex relationships between features to obtain the third feature information of the EEG signal to be classified. Similarly, the gated recurrent neural network performs feature relearning on the first and second feature information of the EEG signal to be classified to obtain the fourth feature information of the EEG signal to be classified.
[0084] In this embodiment, step S2300, which uses a dynamic graph convolutional neural network in the trained EEG signal classification model to perform feature relearning on the first and second feature information and output the third feature information of the EEG signal to be classified, may further include: determining the adjacency matrix corresponding to the first and second feature information through the dynamic graph convolutional neural network; determining the Laplacian matrix corresponding to the adjacency matrix through the dynamic graph convolutional neural network; and performing feature relearning based on the Laplacian matrix through the dynamic graph convolutional neural network to obtain the third feature information of the EEG signal to be classified.
[0085] Step S2400: The third feature information and the fourth feature information are simultaneously fused using the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified.
[0086] The trained EEG signal classification model includes an attention network. (See reference...) Figure 3 By simultaneously inputting the third and fourth feature information of the EEG signal to be classified into the attention network, the third and fourth feature information can be fused at the same time through the attention network to obtain the target feature information.
[0087] In this embodiment, step S2400, which uses the attention network in the trained EEG signal classification model to simultaneously fuse the third and fourth feature information to obtain the target feature information of the EEG signal to be classified, can further include: determining the weight coefficients corresponding to the third and fourth feature information respectively through the attention network; fusing each feature information in the third feature information according to the weight coefficients corresponding to the third feature information through the attention network; and fusing each feature information in the fourth feature information according to the weight coefficients corresponding to the fourth feature information to obtain the target feature information of the EEG signal to be classified. This eliminates the phenomenon of insufficient extraction of discriminative features due to differences in amplitude between different features, effectively solving the problem of feature redundancy.
[0088] Step S2500: The prediction network in the trained EEG signal classification model obtains the target classification result of the EEG signal to be classified based on the target feature information.
[0089] The trained EEG signal classification model includes a prediction network. (See reference...) Figure 3 By inputting the target feature information of the EEG signal to be classified into the prediction network, the target classification result of the EEG signal to be classified can be determined by the prediction network.
[0090] According to the method of this disclosure, feature extraction of EEG signals is performed in parallel using a one-to-many filter bank co-spatial pattern network and a residual convolutional neural network. The one-to-many filter bank co-spatial pattern network can extract EEG signal features using rich prior knowledge, while the residual convolutional neural network can learn high-dimensional and different-dimensional features of EEG signals and avoid the limitation of traditional methods that extract only partial features and lose unknown features. Furthermore, when the residual convolutional neural network is not performing well, the one-to-many filter bank co-spatial pattern network can still learn EEG signal features using rich prior knowledge. Secondly, feature relearning is performed in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network. The dynamic graph convolutional neural network can automatically learn the complex relationships between EEG signal features, while the gated recurrent neural network can automatically learn the temporal patterns of EEG signal features. These two technologies complement each other, ensuring that both the relationships between features and the temporal patterns are captured, forming effective new features. The parallel structure avoids mutual interference between the learning of relationships between features and the temporal patterns during feature extraction and avoids the loss of feature information in intermediate layers that occurs in serial network structures. Furthermore, feature fusion through attention networks can eliminate the phenomenon of insufficient extraction of discriminative features due to differences in amplitude of different features, thereby improving the classification accuracy of EEG signals.
[0091] In one embodiment, the training method of the EEG signal classification model may further include the following steps S3100 to S3600:
[0092] Step S3100: Obtain the training sample set.
[0093] Each training sample in the training sample set includes an EEG signal sample and a sample category label for the EEG signal sample.
[0094] It should be noted that when training an EEG signal classification model, the electronic device first acquires a sample set and divides it into a training sample set and a validation sample set. The training sample set is used to train the EEG signal classification model, and the validation sample set is used to validate the model. It should also be noted that the electronic device pre-standardizes both the training and validation sample sets to ensure that each training sample in the training set and each validation sample in the validation set follows a normal distribution.
[0095] Step S3200: The EEG signal sample is subjected to feature extraction in parallel by a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the EEG signal classification model to be trained. The first sample feature information of the EEG signal sample is output by the one-to-many filter bank co-space pattern network, and the second sample feature information of the EEG signal sample is output by the residual convolutional neural network.
[0096] In step S3200, the One-to-Many Filter Bank Common Spatial Pattern (OVR-FBCSP) network includes a first group, a second group, and a third group. As mentioned above, the first group is temporal filtering, used to divide the input EEG signal sample into multiple sub-frequency bands based on the filter bank. The second group is spatial filtering, used to extract the spatial energy features of each sub-frequency band signal using the CSP algorithm. The third group is feature selection, used to perform feature selection on each spatial energy feature.
[0097] Reference Figure 4 As shown, the EEG signal samples are input through the OVR-FBCSP network. The OVR-FBCSP Temporal Filtering divides the EEG signal samples into multiple sub-band signals. Then, the OVR-FBCSP network's Spatial Filtering performs a linear transformation on each sub-band signal to obtain the corresponding spatial energy features, as shown in the following formula:
[0098]
[0099] Among them, X i,t S represents the EEG signal of the i-th bandpass filter within the t-th time window. i,t To extract spatial energy characteristics, For the weights of the CSP filter, For a class of CSP filters relative to other classes, each It can be obtained by solving for the eigenvalues:
[0100]
[0101] Among them, D i,j Let Λ be the covariance matrix of the i-th bandpass filtered EEG signal of class j. i,j For containing D i,j The diagonal matrix of eigenvalues.
[0102] Finally, feature selection using the OVR-FBCSP network is performed based on the following formula:
[0103]
[0104] Among them, f i,t This is the first sample feature information output by the One-to-Many Filter Bank Common Space Mode (OVR-FBCSP).
[0105] Reference Figure 4As shown, EEG signal samples are input into an RCNN network. The RCNN network uses multiple consecutively stacked nonlinear computation layers to fit the residual between the input data and the mapped output data, outputting the second sample feature information. The calculation of the residual convolutional network is as follows:
[0106] F(x)=H(x)-x (4)
[0107] Where F(x) is the residual, H(x) is the optimal solution, and x is the equivalent mapping of the input. When F(x) is closer to 0, the features learned by the RCNN network are closer to the original input.
[0108] Step S3300: The first sample feature information and the second sample feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the EEG signal classification model to be trained. The third sample feature information of the EEG signal sample is output by the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output by the gated recurrent neural network.
[0109] In this step S3300, refer to Figure 4 The DGCN network is used to relearn the intrinsic relationships between different EEG channels and continuously update the adjacency matrix. The adjacency matrix is then used to calculate the Laplacian matrix to learn more distinctive features and thus obtain third-sample feature information.
[0110] Typically, a directed connection graph is Where ν represents the node set and ε represents the edge set. This represents the adjacency matrix dynamically learned by each node, where the element in the i-th row and j-th column is... Used to determine the importance of the connection between the i-th node and the j-th node. Let Let x represent the optimal adjacency matrix to be learned. Then, the second and third sample feature information of the EEG signal samples are represented as x = [x1, x2, ..., x]. N ], x and spatial filtering The vector graph convolution is:
[0111]
[0112] Where N is the number of channels, L is the Laplacian matrix, and... The singular value decomposition of the Laplace matrix L is L = UΛU T (L and L) * (They are conjugates)
[0113] generally,
[0114]
[0115] The following can be approximated using a K-order Chebyshev polynomial:
[0116]
[0117] g(Λ) * Expand using a polynomial:
[0118]
[0119]
[0120]
[0121] in, Represents Λ * The maximum value among the diagonal elements, θ k For Chebyshev polynomials, via recursive expressions Calculate T k (x), normalized using formula (11), so that The diagonal elements are between [-1, 1], I N It is an N×N identity matrix.
[0122] In this step S3300, refer to Figure 4 The GRU network is used to learn the time-series features of EEG signals. The GRU network combines the forget gate and the output gate into a single update gate, namely the update gate z. t and reset door r t ,
[0123] Among them, update gate z t The main control is the amount of information from the previous state that is input into the current state:
[0124] z t =f σ (W xz x t +W hz h t-1 +b z (12)
[0125] Among them, the reset gate r t The main control is the degree to which the state information of the previous time step is forgotten:
[0126] r t =f σ (W xr x t +W hr h t-1 +b r (13)
[0127] Among them, f σ Here, tanh is the hyperbolic tangent function, W is the weight, b is the bias, and h is the non-linear activation function. t-1 Given the state at the previous moment, we can then calculate the current state:
[0128]
[0129]
[0130] y t =f σ (W hy h t (16)
[0131] Step S3400: Simultaneously perform feature fusion on the third sample feature information and the fourth sample feature information through the attention network in the EEG signal classification model to be trained, to obtain the target sample feature information of the EEG signal sample.
[0132] In step S3400, the EEG signal classification model to be trained includes an attention network. The feature information of the third and fourth samples is simultaneously input into the attention network to obtain the weight coefficients corresponding to each feature information. Feature fusion is then performed on each feature information in the third sample, and feature fusion is performed on each feature information in the fourth sample based on the weight coefficients corresponding to the fourth sample, resulting in the target sample feature information of the EEG signal sample, which is then output. This eliminates the phenomenon of insufficient extraction of discriminative features due to differences in amplitude between different features, effectively solving the problem of feature redundancy.
[0133] Reference Figure 4 The decoding process of the attention network is as follows:
[0134]
[0135] x″ i =tanh(x′) i (18)
[0136]
[0137] e mi =α(x i-1 ,h i (20)
[0138]
[0139]
[0140] Among them, b i As a bias, Softmax calculates x mi The weight coefficient w of each feature in the sequence mi e mi Hidden state information x from the decoding end of the attention network i-1 and the hidden state information h at the encoding end i Jointly determined, α mi It is the sum of all weight coefficients.
[0141] Step S3500: The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label.
[0142] Reference Figure 4 The prediction network consists of fully connected layers and normalization layers (including the normalization exponential function Softmax). Fully connected layers are used to classify based on the feature information of the target sample, and the Softmax function is used to normalize the classification results.
[0143] In this embodiment, step S3500, which constructs the first loss through the prediction network in the EEG signal classification model to be trained based on the target sample feature information and the sample category label, may further include the following steps S3510 to S3540:
[0144] Step S3510: Construct a second loss based on the sample category label and the standardized data corresponding to the EEG signal sample.
[0145] In step S3510, the second loss can be called the cross-entropy loss function L. cross-entropy Refer to the following formula:
[0146]
[0147] in, and M represents the sample class label and standardized data of the i-th training sample, respectively. batch_size This represents the batch size of the training sample set.
[0148] Step S3520: Construct a third loss based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained.
[0149] In step S3520, the third loss can be called the sparse loss function L. sparse Refer to the following formula:
[0150]
[0151] Among them, W j denoted as the number of filter banks in the dynamic graph convolutional neural network within the j-th time window.
[0152] Step S3530: Construct a fourth loss based on the center vector of the sample category label and the feature information of the target sample.
[0153] In step S3530, the fourth loss can be called the central loss function L. central Refer to the following formula:
[0154]
[0155] Among them, M batch_size f is the batch size of the training sample set. k For the target sample feature information, y k Let k be the sample class label of the kth training sample. For the e-th training cycle, y k The center vector of the class.
[0156] It should be noted that before training the EEG signal classification model, the electronic device first randomly initializes the center vector for each class of samples. In each training iteration, the center vector is updated based on the feature vector of each sample in the batch, then:
[0157]
[0158]
[0159]
[0160] in, Let be the average distance between the j-th sample and the j-th center vector in the e-th training iteration. Let be the center vector for the e-th training iteration. Furthermore, ρ (ρ∈(0,1)) represents the learning rate of the center loss function.
[0161] Step S3540: Construct the first loss based on the second loss, the third loss, and the fourth loss.
[0162] In step S3540, the first loss satisfies:
[0163] L total =L cross-entropy +L sparse +λ·L central (29)
[0164] Among them, Lcross-entropy For the second loss, L sparse As the third loss, L central This is the fourth loss.
[0165] Step S3600: Update the network parameters of the EEG signal classification model to be trained using the first loss.
[0166] In this embodiment, after training the EEG signal classification model based on steps S3100 to S3600, the trained EEG signal classification model will be validated. Specifically, the electronic device will acquire a validation sample set; wherein, each validation sample in the validation sample set includes an EEG signal sample and a sample category label of the EEG signal sample; the EEG signal sample is input into the trained EEG signal classification model to obtain a predicted category label of the EEG signal sample; and the trained EEG signal classification model is validated based on the predicted category label and the sample category label.
[0167] According to this embodiment, feature extraction of EEG signals is performed in parallel using a one-to-many filter bank co-spatial pattern network and a residual convolutional neural network. The one-to-many filter bank co-spatial pattern network can extract EEG signal features using rich prior knowledge, while the residual convolutional neural network can learn high-dimensional and different-dimensional features of EEG signals and avoid the limitation of traditional methods that extract only partial features and lose unknown features. Furthermore, when the residual convolutional neural network performs poorly, the one-to-many filter bank co-spatial pattern network can still learn EEG signal features using rich prior knowledge. Secondly, feature relearning is performed in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network. The dynamic graph convolutional neural network can automatically learn the complex relationships between EEG signal features, while the gated recurrent neural network can automatically learn the temporal patterns of EEG signal features. These two complement each other, ensuring that both the relationships between features and the temporal patterns are captured, forming effective new features. Moreover, the parallel structure avoids mutual interference between the learning of relationships between features and the temporal patterns during feature extraction and avoids the problem of feature information loss in intermediate layers that occurs in serial network structures. Furthermore, feature fusion via attention networks can eliminate the phenomenon of insufficient extraction of discriminative features due to differences in the magnitude of different features. Finally, a center loss function is defined to ensure that the extracted signal retains as much effective original information and energy as possible.
[0168] Equivalent to a single DGCN network or RCNN network, the trained EEG signal classification model in this application embodiment has significant advantages in the feature extraction and classification of motor imagery EEG signals for multi-class tasks.
[0169] <Device Embodiment>
[0170] In this embodiment, an electroencephalogram (EEG) signal classification device 5000 is provided, such as... Figure 5 As shown, the EEG signal classification device 5000 may include an acquisition module 5100, a first processing module 5200, a second processing module 5300, a third processing module 5400, and a classification module 5500.
[0171] Acquisition module 5100 is used to acquire EEG signals to be classified.
[0172] The first processing module 5200 is used to extract features from the EEG signal to be classified in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in a trained EEG signal classification model, output the first feature information of the EEG signal to be classified through the one-to-many filter bank co-space pattern network, and output the second feature information of the EEG signal to be classified through the residual convolutional neural network.
[0173] The second processing module 5300 is used to perform feature relearning on the first feature information and the second feature information in parallel through the dynamic graph convolutional neural network and the gated recurrent neural network in the trained EEG signal classification model, output the third feature information of the EEG signal to be classified through the dynamic graph convolutional neural network, and output the fourth feature information of the EEG signal to be classified through the gated recurrent neural network.
[0174] The third processing module 5400 is used to simultaneously perform feature fusion on the third feature information and the fourth feature information through the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified.
[0175] The classification module 5500 is used to obtain the target classification result of the EEG signal to be classified based on the target feature information through the prediction network in the trained EEG signal classification model.
[0176] In one embodiment, the second processing module 5400 is specifically configured to: determine the weight coefficients corresponding to the third feature information and the fourth feature information respectively through the attention network; perform feature fusion on each feature information in the third feature information according to the weight coefficients corresponding to the third feature information through the attention network, and perform feature fusion on each feature information in the fourth feature information according to the weight coefficients corresponding to the fourth feature information, to obtain the target feature information of the EEG signal to be classified.
[0177] In one embodiment, the apparatus further includes a training module (not shown in the figure), configured to: acquire a training sample set; wherein each training sample in the training sample set includes an EEG signal sample and a sample category label for the EEG signal sample; extract features from the EEG signal sample in parallel using a one-to-many filter bank co-spatial pattern network and a residual convolutional neural network in the EEG signal classification model to be trained; output first sample feature information of the EEG signal sample through the one-to-many filter bank co-spatial pattern network, and output second sample feature information of the EEG signal sample through the residual convolutional neural network; and extract features from the EEG signal sample in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network in the EEG signal classification model to be trained. The first sample feature information and the second sample feature information are relearned to output the third sample feature information of the EEG signal sample through the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output through the gated recurrent neural network. The third sample feature information and the fourth sample feature information are simultaneously fused through the attention network in the EEG signal classification model to be trained to obtain the target sample feature information of the EEG signal sample. The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label. The network parameters of the EEG signal classification model to be trained are updated through the first loss.
[0178] In one embodiment, the training module is further configured to: construct a second loss based on the standardized data corresponding to the sample category label and the EEG signal sample; construct a third loss based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained; construct a fourth loss based on the center vector of the sample category label and the feature information of the target sample; and construct a first loss based on the second loss, the third loss, and the fourth loss.
[0179] In one embodiment, the training module is further configured to: obtain a verification sample set; wherein each verification sample in the verification sample set includes an EEG signal sample and a sample category label of the EEG signal sample; input the EEG signal sample into the trained EEG signal classification model to obtain a predicted category label of the EEG signal sample; and verify the trained EEG signal classification model based on the predicted category label and the sample category label.
[0180] According to this embodiment, feature extraction of EEG signals is performed in parallel using a one-to-many filter bank co-spatial pattern network and a residual convolutional neural network. The one-to-many filter bank co-spatial pattern network can extract EEG signal features using rich prior knowledge, while the residual convolutional neural network can learn high-dimensional and different-dimensional features of EEG signals and avoid the limitation of traditional methods that extract only partial features and lose unknown features. Furthermore, when the residual convolutional neural network performs poorly, the one-to-many filter bank co-spatial pattern network can still learn EEG signal features using rich prior knowledge. Secondly, feature relearning is performed in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network. The dynamic graph convolutional neural network can automatically learn the complex relationships between EEG signal features, while the gated recurrent neural network can automatically learn the temporal patterns of EEG signal features. These two complement each other, ensuring that both the relationships between features and the temporal patterns are captured, forming effective new features. Moreover, the parallel structure avoids mutual interference between the learning of relationships between features and the temporal patterns during feature extraction and avoids the problem of feature information loss in intermediate layers that occurs in serial network structures. Furthermore, feature fusion through attention networks can eliminate the phenomenon of insufficient extraction of discriminative features due to differences in amplitude of different features, thereby improving the classification accuracy of EEG signals.
[0181] <Equipment Example>
[0182] Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to one embodiment. For example... Figure 6 As shown, the electronic device 6000 includes a processor 6100 and a memory 6200.
[0183] The memory 6200 can be used to store executable computer instructions.
[0184] The processor 6100 can be used to execute the electroencephalogram (EEG) signal classification method according to the method embodiments of this disclosure, under the control of the executable computer instructions.
[0185] The electronic device 6000 can be as follows: Figure 1 The electronic device 1000 shown may also be a device with other hardware structures, which are not limited here.
[0186] In another embodiment, the electronic device 6000 may include the above-mentioned EEG signal classification device 5000.
[0187] In one embodiment, each module of the above-mentioned EEG signal classification device 5000 can be implemented by the processor 6100 running computer instructions stored in the memory 6200.
[0188] Computer-readable storage media
[0189] This disclosure also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, perform the electroencephalogram (EEG) signal classification method provided in this disclosure.
[0190] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0191] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0192] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0193] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0194] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0195] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0196] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0197] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are equivalent.
[0198] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.
Claims
1. A method for classifying electroencephalogram (EEG) signals, characterized in that, The method includes: Acquire the EEG signals to be classified; The EEG signal to be classified is subjected to feature extraction in parallel by a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the trained EEG signal classification model. The first feature information of the EEG signal to be classified is output by the one-to-many filter bank co-space pattern network, and the second feature information of the EEG signal to be classified is output by the residual convolutional neural network. The first and second feature information are relearned in parallel using a dynamic graph convolutional neural network (HCNN) and a gated recurrent neural network (RNN) in the trained EEG signal classification model. The HCNN outputs the third feature information of the EEG signal to be classified, and the RNN outputs the fourth feature information of the EEG signal to be classified. Specifically, the process of relearning the first and second feature information using the HCNN to output the third feature information of the EEG signal to be classified includes: determining the adjacency matrix corresponding to the first and second feature information using the HCNN; determining the Laplacian matrix corresponding to the adjacency matrix using the HCNN; and relearning the feature information based on the Laplacian matrix using the HCNN to obtain the third feature information of the EEG signal to be classified. The third and fourth feature information are simultaneously fused using the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified. The prediction network in the trained EEG signal classification model obtains the target classification result of the EEG signal to be classified based on the target feature information.
2. The method according to claim 1, characterized in that, The method involves simultaneously fusing the third and fourth feature information using the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified, including: The attention network is used to determine the weight coefficients corresponding to the third feature information and the fourth feature information, respectively. The attention network performs feature fusion on each feature in the third feature information according to the weight coefficient corresponding to the third feature information, and performs feature fusion on each feature in the fourth feature information according to the weight coefficient corresponding to the fourth feature information, to obtain the target feature information of the EEG signal to be classified.
3. The method according to claim 1, characterized in that, The training methods for the EEG signal classification model include: Obtain a training sample set; wherein each training sample in the training sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample; The EEG signal samples are extracted in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the EEG signal classification model to be trained. The one-to-many filter bank co-space pattern network outputs the first sample feature information of the EEG signal samples, and the residual convolutional neural network outputs the second sample feature information of the EEG signal samples. The first sample feature information and the second sample feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the EEG signal classification model to be trained. The third sample feature information of the EEG signal sample is output by the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output by the gated recurrent neural network. The third sample feature information and the fourth sample feature information are simultaneously fused by the attention network in the EEG signal classification model to be trained, so as to obtain the target sample feature information of the EEG signal sample. The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label; The network parameters of the EEG signal classification model to be trained are updated using the first loss.
4. The method according to claim 3, characterized in that, The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label, including: A second loss is constructed based on the sample category labels and the standardized data corresponding to the EEG signal samples; A third loss is constructed based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained; A fourth loss is constructed based on the center vector of the sample category label and the feature information of the target sample; The first loss is constructed based on the second loss, the third loss, and the fourth loss.
5. The method according to claim 3, characterized in that, The method further includes: Obtain a verification sample set; wherein, each verification sample in the verification sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample; The EEG signal sample is input into the trained EEG signal classification model to obtain the predicted category label of the EEG signal sample; The trained EEG signal classification model is validated based on the predicted category label and the sample category label.
6. A brainwave signal classification device, characterized in that, The device includes: The acquisition module is used to acquire the EEG signals to be classified. The first processing module is used to extract features from the EEG signal to be classified in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the trained EEG signal classification model, output the first feature information of the EEG signal to be classified through the one-to-many filter bank co-space pattern network, and output the second feature information of the EEG signal to be classified through the residual convolutional neural network. The second processing module is used to perform feature relearning on the first feature information and the second feature information in parallel using a dynamic graph convolutional neural network and a gated recurrent neural network in the trained EEG signal classification model. The dynamic graph convolutional neural network outputs the third feature information of the EEG signal to be classified, and the gated recurrent neural network outputs the fourth feature information of the EEG signal to be classified. Specifically, the second processing module is used to determine the adjacency matrix corresponding to the first feature information and the second feature information using the dynamic graph convolutional neural network; determine the Laplacian matrix corresponding to the adjacency matrix using the dynamic graph convolutional neural network; and perform feature relearning based on the Laplacian matrix using the dynamic graph convolutional neural network to obtain the third feature information of the EEG signal to be classified. The third processing module is used to simultaneously perform feature fusion on the third feature information and the fourth feature information through the attention network in the trained EEG signal classification model to obtain the target feature information of the EEG signal to be classified. The classification module is used to obtain the target classification result of the EEG signal to be classified based on the target feature information through the prediction network in the trained EEG signal classification model.
7. The apparatus according to claim 6, characterized in that, The device further includes a training module for: Obtain a training sample set; wherein each training sample in the training sample set includes an electroencephalogram (EEG) signal sample and a sample category label for the EEG signal sample; The EEG signal samples are extracted in parallel using a one-to-many filter bank co-space pattern network and a residual convolutional neural network in the EEG signal classification model to be trained. The one-to-many filter bank co-space pattern network outputs the first sample feature information of the EEG signal samples, and the residual convolutional neural network outputs the second sample feature information of the EEG signal samples. The first sample feature information and the second sample feature information are relearned in parallel by the dynamic graph convolutional neural network and the gated recurrent neural network in the EEG signal classification model to be trained. The third sample feature information of the EEG signal sample is output by the dynamic graph convolutional neural network, and the fourth sample feature information of the EEG signal sample is output by the gated recurrent neural network. The third sample feature information and the fourth sample feature information are simultaneously fused by the attention network in the EEG signal classification model to be trained, so as to obtain the target sample feature information of the EEG signal sample. The prediction network in the EEG signal classification model to be trained constructs a first loss based on the target sample feature information and the sample category label; The network parameters of the EEG signal classification model to be trained are updated using the first loss.
8. The apparatus according to claim 7, characterized in that, The training module is specifically used for: A second loss is constructed based on the sample category labels and the standardized data corresponding to the EEG signal samples; A third loss is constructed based on the number of filter banks included in the dynamic graph convolutional neural network in the EEG signal classification model to be trained; A fourth loss is constructed based on the center vector of the sample category label and the feature information of the target sample; The first loss is constructed based on the second loss, the third loss, and the fourth loss.
9. An electronic device, characterized in that, include: Memory is used to store executable computer instructions; A processor, configured to execute the EEG signal classification method according to any one of claims 1-5, under the control of the executable computer instructions.
10. A computer-readable storage medium having computer instructions stored thereon, the computer instructions being executed by a processor to perform the electroencephalogram (EEG) signal classification method according to any one of claims 1-5.