Method and device for processing characteristics of electroencephalogram signals

Through the combination of dynamic modal decomposition and co-spatial mode, the problem of difficult reflection of channel interaction and functional area phase relationship in EEG signals is solved, and more stable and accurate EEG signal feature extraction is achieved, reducing the brain-computer interface Control delays and improve cross-individual classification performance.

CN114692680BActive Publication Date: 2024-12-27BEIHANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210257465.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2024-12-27
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

The existing EEG signal feature processing methods cannot effectively reflect the interaction between different channels in EEG signal and the relative phase relationship between brain functional regions, resulting in low decoding accuracy and efficiency, and traditional methods are used to classify tasks across individuals. The performance is not ideal and there is a long control delay.

Method used

Dynamic modal decomposition (DMD) method is used to analyze the EEG data matrix, extract modal features and perform delay stacking, and calculate the modal co-spatial mode with the CSP method to generate a spatial filter to make the EEG The signal is spatially filtered and the classification characteristics are finally determined through variance.

Benefits of technology

Improve the stability and accuracy of EEG signal feature extraction, can more accurately reflect the differences in frequency components between individuals, reduce the control delay of brain-computer interfaces, and improve the classification within and between individuals under short delays performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114692680B_ABST
    Figure CN114692680B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for processing characteristics of electroencephalogram (EEG) signals, the method comprising obtaining an electroencephalogram (EEG) signal of a patient to be tested within a preset time period, obtaining an EEG data matrix according to the EEG signal; intercepting the EEG data matrix with a sliding window and stacking it with a time delay to obtain a sliding window augmented data matrix, and calculating modal characteristics; selecting a modal vector related to a task, splicing the modal vector along time, obtaining a modal change information matrix, and performing spatial filtering to obtain a modal co-spatial mode; selecting a modal co-spatial mode filter with the largest discrimination, and calculating the variance information of the modal co-spatial mode data corresponding to the left and right hand motor imagery after spatial filtering as the final feature for classification. The present invention can extract the global dynamic characteristics related to motor imagery based on less EEG time series data, obtain a parameterized and accurate description of the brain modal change, thereby improving the classification accuracy and reducing the control delay of the brain-computer interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electroencephalogram signal detection, and in particular relates to an electroencephalogram signal feature processing method and device. Background Art

[0002] Extracting task-related brain activity features from EEG signals helps to accurately decode the patient's motor intention and perform rehabilitation exercises. However, since EEG signals contain rich information and are typical nonlinear and non-stationary signals, extracting effective brain activity features from EEG signals is the most challenging task in brain-computer interfaces. Existing EEG signal feature extraction methods based on motor imagery tasks include methods based on time domain information, frequency domain information, time-frequency domain, and spatial information.

[0003] Among them, time domain or frequency domain methods, such as the autoregressive (AR) model method and the fast Fourier transform (FFT) method, can characterize brain activity from the time domain or frequency domain respectively. The time-frequency method analyzes the changes of frequency components over time. The short-time Fourier transform (STFT) uses a fixed-length window to analyze the instantaneous spectrum of the signal, giving a time-frequency spectrum estimation method, while the wavelet transform (WT) provides a dynamic time-frequency method by deploying multi-resolution time windows, which is widely used in EEG signal research. Nevertheless, the time-frequency spectrum method based on single-channel information cannot reflect the interaction between different channels in the EEG signal, and often ignores the relative phase relationship between different functional areas of the brain, making the time-frequency spectrum estimation susceptible to noise interference, thereby affecting the decoding accuracy and decoding efficiency.

[0004] Methods based on spatial information are also widely used for EEG feature extraction. Among them, Common Spatial Pattern (CSP) and its variant algorithms are widely used for feature extraction of motor imagery tasks. The spatial filter generated by the CSP method achieves classification of different tasks by simultaneously minimizing the variance of a certain category of EEG signals in the projection direction and maximizing the variance of another category. Common Spatial-Spectral Patterns (CSSP) is optimized on the basis of CSP spatial filter. It extracts frequency domain features by inserting a time delay τ into the EEG signal and then filtering it. Common Sparse Spectral Spatial Pattern (CSSSP) further improves the CSSP method. Unlike CSSP, which calculates its own spectrum for each channel, CSSSP calculates the spectrum pattern shared by all channels, which improves the robustness of the feature. Sub-band Common Spatial Pattern (SBCSP) method uses Gabor filter library based on CSP and CSSP to decompose EEG signals into multiple sub-bands. Then, CSP spatial filtering is used on each subband, and the features extracted from each subband are fused for classification, achieving higher classification accuracy. However, SBCSP ignores the potential correlation of CSP features obtained from different subbands. The filter bank common spatial pattern (FBCSP) method calculates the mutual information of CSP features from multiple subbands in SBCSP in order to select the most discernible subband features for classification. Compared with the previous methods, FBCSP has achieved better performance and has been more widely used in practical scenarios.

[0005] Although the CSP-based method has achieved good results in motor imagery tasks, the information it uses is still relatively rough and cannot directly reflect the changes in brain functional connectivity related to motor imagery, resulting in unsatisfactory performance in cross-individual classification tasks. In addition, the traditional CSP method is based on the second-order statistics (variance information) of the projection data, and requires a longer EEG data segment to obtain accurate statistical information. Therefore, it has a longer control delay in actual brain-computer interface applications. For example, for CSP based on a 3-second time window, the patient to be tested needs to perform the motor imagery task for 3 seconds before a classification result can be given. The real-time performance cannot meet the needs of rapid induction of neural plasticity in neurorehabilitation.

[0006] With the development of deep learning, EEG signals can be directly input into end-to-end neural networks to automatically extract features and classify signals. Among them, convolutional neural networks (CNNs) are often used to extract spatial or time-frequency spectrum features, and long short-term memory (LSTM) networks are often used to extract time-related features. Deep learning methods have achieved good results in many EEG classification tasks, but the big data dependency characteristics of training complex network models make the model's generalization ability poor under limited data. In addition, the inherent black box characteristics of neural networks make the classification features used opaque and poorly interpretable, and cannot reveal the brain activity mechanism related to the task.

[0007] The main difficulty in extracting EEG features is that EEG is a nonlinear and non-stationary signal that contains rich brain activity information. It is extremely difficult to fully characterize the time, space, frequency, and phase change information related to the task during brain activity. Koopman operator theory and dynamic mode decomposition (DMD) method transform complex nonlinear processes into linear dynamic processes in the observation space, providing new ideas for applying mature linear system methods to study complex nonlinear dynamics. This method is mostly used in high-dimensional fluid dynamics research, and related methods are still relatively rare in the study of EEG activity.

[0008] In summary, the existing EEG signal feature processing methods have many defects. Summary of the invention

[0009] In view of this, the purpose of the present invention is to overcome the deficiencies of the prior art and to provide a method and device for processing EEG signal features to solve the problem that the method for processing EEG signal features in the prior art has many defects.

[0010] To achieve the above objectives, the present invention adopts the following technical solutions:

[0011] A method for processing electroencephalogram (EEG) signal characteristics, comprising:

[0012] Acquire the electroencephalogram (EEG) signal of the patient to be tested within a preset time period, and obtain an EEG data matrix according to the EEG signal; the EEG signal is generated according to the left-hand and right-hand movement imagination of the patient to be tested;

[0013] The EEG data matrix is ​​intercepted with a sliding window and time-delayed stacked to obtain a sliding window augmented data matrix;

[0014] Performing dynamic modal decomposition on the multiple sliding window augmented data matrices that change with time, extracting modal features, selecting task-related modal vectors, and splicing the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix;

[0015] The modal co-spatial mode of the modal change information matrix is ​​calculated by using the co-spatial mode method, and a corresponding projection transformation matrix is ​​obtained; the projection transformation matrix is ​​the spatial filter;

[0016] The spatial filter is applied to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and the variance of the filtered modal change information along the time direction is calculated based on the modal co-spatial data, and the final classification feature is determined based on the variance and the final classification feature is classified.

[0017] Furthermore, the step of obtaining the electroencephalogram signal of the patient to be tested within a first preset time period includes:

[0018] Obtain EEG signals from a first preset time point before left and right hand movement imagination occurs to a second preset time point after the occurrence.

[0019] Furthermore, the method of intercepting the EEG data matrix with a sliding window and performing time-delay stacking to obtain a sliding window augmented data matrix includes:

[0020] Determine the number of sliding windows with the preset sliding window length, step size and time domain width;

[0021] The EEG data matrix is ​​intercepted by using the sliding window length, step length and number of sliding windows to obtain a plurality of sliding window data sampled along time;

[0022] Each sliding window data is stacked with a time delay to obtain a sliding window augmented data matrix.

[0023] Furthermore, the performing dynamic modal decomposition on the plurality of sliding window augmented data matrices to extract modal features includes:

[0024] According to the sliding window augmented data matrix, a first observation data matrix and a second observation data matrix are obtained; wherein the state value of each column in the second observation data matrix is ​​the state value of the corresponding column in the first observation data matrix at the next moment;

[0025] Performing data dimensionality reduction processing on the first measurement matrix and the second measurement matrix to obtain a corresponding dimensionality reduction system matrix;

[0026] Calculating the eigenvalues ​​and eigenvectors of the reduced-dimensional system matrix, determining the eigenvalues ​​of the reduced-dimensional system matrix as the eigenvalues ​​of the linear system matrix, and mapping the eigenvectors of the reduced-dimensional matrix back to the high-dimensional space to obtain the corresponding eigenvectors of the linear system matrix;

[0027] According to the eigenvalues ​​and eigenvectors of the linear system matrix, a modal change information matrix is ​​obtained; wherein the eigenvalues ​​and eigenvectors of the linear system matrix represent the eigenfrequency and the corresponding invariant subspace of the linear system matrix.

[0028] Furthermore, performing data dimensionality reduction processing on the first measurement matrix and the second measurement matrix to obtain a corresponding dimensionality reduction system matrix includes:

[0029] Determining the dimension of the low-dimensional space; wherein the dimension represents the number of singular values;

[0030] Selecting singular values ​​and corresponding singular vectors up to the number of singular values ​​in the first observation data matrix and the second observation matrix to form a first dimensionality reduction transformation matrix and a second dimensionality reduction transformation matrix;

[0031] A reduced-dimensionality system matrix is ​​calculated based on the first reduced-dimensionality transformation matrix and the second reduced-dimensionality transformation matrix.

[0032] Furthermore, the task-related modal vectors are selected, and the modal vectors corresponding to each sliding window augmented data matrix are spliced ​​over time to obtain a modal change information matrix, including:

[0033] Selecting a modal eigenvector corresponding to a key mode from the modal change information matrix, calculating the amplitude and phase of each element in the modal eigenvector, and constructing a modal amplitude and phase eigenvector of the sliding window according to the amplitude and phase; wherein the key mode includes more than one;

[0034] The modal amplitude and phase eigenvectors corresponding to more than one key mode are spliced ​​along the spatial direction to obtain a multi-modal eigenvector within a preset sliding window;

[0035] The corresponding multimodal feature vectors are calculated for each sliding window in turn and concatenated along the time direction to obtain the modal change information matrix.

[0036] Furthermore, the modal change information matrix includes a left-hand modal change information matrix under left-hand movement imagination and a right-hand modal change information matrix under right-hand movement imagination; the modal co-space mode method is used to calculate the modal co-space mode of the modal change information matrix and obtain the corresponding projection transformation matrix, including:

[0037] Calculate the normalized sample covariance matrix of the left-hand modal change information matrix and the right-hand modal change information matrix of each test to obtain the left-hand modal covariance matrix and the right-hand modal covariance matrix;

[0038] The left-hand modal covariance matrix and the right-hand modal covariance matrix of multiple tests are averaged to obtain the left-hand average modal covariance matrix and the right-hand average modal covariance matrix;

[0039] Adding the left-hand average modal covariance matrix and the right-hand average modal covariance matrix to obtain a sum modal covariance matrix, and performing eigendecomposition on the sum modal covariance matrix to define a whitening matrix;

[0040] Using the whitening matrix, respectively, the left-hand average modal covariance matrix and the right-hand average modal covariance matrix are subjected to similarity transformation to obtain a left-hand covariance similarity matrix and a right-hand covariance similarity matrix;

[0041] Solving the common eigenvectors of the left-handed covariance similarity matrix and the right-handed covariance similarity matrix, arranging the corresponding eigenvectors in descending order of the corresponding eigenvalues ​​of the left-handed covariance similarity matrix to form a common eigenvector matrix;

[0042] A projection transformation matrix, ie, a spatial filter, is constructed according to the whitening matrix corresponding to the modal covariance matrix and the common eigenvector matrix.

[0043] Furthermore, the projection transformation matrix can diagonalize the left-hand modal covariance matrix and the right-hand modal covariance matrix at the same time, and the sum of their corresponding eigenvalues ​​is 1.

[0044] The present application provides an electroencephalogram signal feature processing device, comprising:

[0045] An acquisition module is used to acquire the EEG signals of the patient to be tested within a preset time period, and obtain an EEG data matrix according to the EEG signals; the EEG signals are generated according to the left and right hand movement imagination of the patient to be tested;

[0046] A data preparation module, used for intercepting the EEG data matrix with a sliding window and performing time-delay stacking to obtain a sliding window augmented data matrix;

[0047] A modal decomposition module is used to perform dynamic modal decomposition on the multiple sliding window augmented data matrices that change over time, extract modal features, select task-related modal vectors, and splice the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix;

[0048] A spatial filtering module, used for calculating the modal co-spatial mode of the modal change information matrix by using the co-spatial mode method, and obtaining a corresponding projection transformation matrix; the projection transformation matrix is ​​the spatial filter;

[0049] A classification module is used to apply the spatial filter to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and calculate the variance of the filtered modal change information along the time direction based on the modal co-spatial data, determine the final classification feature based on the variance and classify the final classification feature.

[0050] An embodiment of the present application provides a computer device, including: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any one of the above-mentioned methods for processing EEG signal features.

[0051] An embodiment of the present application also provides a computer storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the steps of any one of the above-mentioned methods for processing EEG signal features.

[0052] The present invention adopts the above technical solution, and the beneficial effects that can be achieved include:

[0053] The present invention provides a method and device for processing EEG signal features. The present application applies the DMD method to EEG modal analysis to reveal the changes in brain functional connections during motor imagery, which is then used for motor imagery classification tasks. Compared with existing EEG feature extraction methods, the DMD-based method has many advantages: First, the DMD method extracts EEG pattern features based on the dynamic interaction relationship between EEG channels. Compared with the traditional method of extracting features channel by channel, the dynamic constraint relationship between channels is considered, making the extracted features more stable; second, the DMD method extracts frequency components in EEG activity based on a data-driven method. Compared with the method based on a fixed EEG rhythm range, it can more accurately reflect the individual differences in the main frequency components between different individuals; third, each EEG modality that represents spatiotemporal correlation information, its corresponding spatiotemporal coherence pattern reflects the large The functional connectivity between different brain regions in this rhythm includes the relative intensity of brain activity (amplitude information) and the timing differences in brain activity between regions (phase information); in addition, the DMD method is essentially a multivariate autoregressive model. Compared with non-parametric methods such as Fourier transform, it can obtain a parametric and accurate description of the dynamic process based on less data, thereby reducing the control delay of the brain-computer interface; finally, based on the Koopman operator theory, the DMD method uses EEG signals as high-dimensional observation variables of nonlinear brain activity, and the obtained brain modalities characterize the nonlinear dynamic behavior of the brain from a linear observation space.

[0054] In addition, the DMD-CSP method proposed in this application can improve both intra-individual and inter-individual classification performance at a shorter delay. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 Schematic diagram of the steps of the method for processing EEG signal characteristics of the present invention;

[0057] Figure 2 Schematic diagram of the process of the method for processing EEG signal characteristics of the present invention;

[0058] Figure 3 It is a structural schematic diagram of the EEG signal feature processing device of the present invention;

[0059] Figure 4 Schematic diagram of the steps of the method for processing EEG signal characteristics of the present invention;

[0060] Figure 5 The dynamic modal spectrum diagram when the number of modes provided by the present invention is 11;

[0061] Figure 6 The fast Fourier transform spectrum diagram provided by the present invention when the number of modes is 11;

[0062] Figure 7 This is a schematic diagram of the structure of the EEG signal feature processing device provided by the present invention. DETAILED DESCRIPTION

[0063] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0064] According to Hebb's learning theory, the connectivity of neuronal synapses is strengthened after repeated stimulation, and neural plasticity is closely related to the delay of stimulation. Therefore, studying the interaction between motor-related cortical synapses and reducing the delay time of neural regulation is crucial for the application of brain-computer interfaces in neurorehabilitation.

[0065] Brain-computer interface (BCI) is an important method in the process of stroke rehabilitation. Unlike traditional rehabilitation methods, it does not require patients to perform actual movements of their body parts. It generates control signals by decoding the patient's movement intentions and conducts two-way interactions with the patient based on motor imagination: on the one hand, it controls peripherals by outputting instructions, and on the other hand, it promotes the patient's rehabilitation level by regulating the plasticity of neural activity in the motor area of ​​the cerebral cortex. Unlike the high acquisition cost of electrocorticogram (ECoG) and functional magnetic resonance imaging (fMRI) technology, the relatively economical and portable acquisition process makes electroencephalogram (EEG) the most commonly used information acquisition method in BCI research. This is because EEG has a high temporal resolution, and EEG signals are particularly suitable for the study of dynamic brain activities and functional networks.

[0066] According to the Koopman operator theory, a finite-dimensional nonlinear dynamic system can be represented as a linear process in an infinite-dimensional observation space. The dynamic mode decomposition (DMD) method provides a finite-dimensional approximation of the infinite-dimensional observation space. According to the linear system theory, for a discrete linear system x k+1 =Ax k , its dynamic evolution process can be decomposed into:

[0067] x k =ΨΛ k B0

[0068] Among them, Ψ is the eigenvector of matrix A, Λ is the eigenvalue of matrix A, is the participation coefficient, that is, the projection of the initial state on the eigenspace. If the eigenvalue of the system is a real number, then the corresponding eigenvector is exponentially growing or decaying; on the contrary, if the obtained eigenvalue is a complex number, then the corresponding mode is oscillating. Therefore, it can be found that the eigenvector of the matrix A determines the mode of the system, and the eigenvalue of A determines the frequency and growth rate of the mode.

[0069] In this application, the N EEG measurement channels are regarded as N observation functions of the brain activity state at the current analysis moment. The goal of DMD is to find a linear system in the observation function space that satisfies the following approximate relationship:

[0070]

[0071] According to the Koopman operator theory, by selecting a suitable scalar observable state function space, a finite-dimensional nonlinear dynamic system can be transformed into an infinite-dimensional linear dynamic system problem. The linear system is defined as:

[0072]

[0073] in, is the Koopman operator, g:R n →C is the observation function.

[0074] Brain activity is a nonlinear dynamic system, and EEG signals are measured from the scalp using acquisition equipment. Therefore, EEG signals are regarded as the observed value of the brain state function during motor imagery, that is, g(x(t))=x(t). It should be noted that the above work is to approximate the eigenvalue and eigenfunction of the Koopman operator through the DMD algorithm after determining the original EEG signal as the observation function.

[0075] Due to the strong nonlinear characteristics of EEG signals, the corresponding Koopman operator has a rich characteristic spectrum. The DMD method based on the linear "full-state" observation function, that is, the observation space constructed only by the current EEG channel data, is difficult to ensure that it is an invariant space under the action of the Koopman operator, and thus it is difficult to accurately approximate the eigenvalues ​​and characteristic functions of the Koopman operator. However, Takens' delay nesting theory shows that a dynamic system can be accurately described with enough historical information. Therefore, delay nesting can effectively expand the observation function space, that is, use the past historical measurement values ​​to expand the observation function and generate a richer new observation function space. Where △t is the delay time.

[0076] A specific method and device for processing EEG signal features provided in an embodiment of the present application will be described below in conjunction with the accompanying drawings.

[0077] like Figure 1 As shown, the EEG signal feature processing method provided in the embodiment of the present application includes:

[0078] S101, obtaining an electroencephalogram (EEG) signal of a patient to be tested within a preset time period, and obtaining an EEG data matrix according to the EEG signal; the EEG signal is generated according to left-hand and right-hand movement imagination performed by the patient to be tested;

[0079] S102, intercepting the EEG data matrix with a sliding window and performing time-delay stacking to obtain a sliding window augmented data matrix;

[0080] S103, performing dynamic modal decomposition on the multiple sliding window augmented data matrices that change with time, extracting modal features, selecting task-related modal vectors, and splicing the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix;

[0081] S104, using a common space mode method to calculate the modal common space mode of the modal change information matrix, and obtain a corresponding projection transformation matrix; the projection transformation matrix is ​​a spatial filter;

[0082] S105, applying the spatial filter to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and calculating the variance of the filtered modal change information along the time direction based on the modal co-spatial data, determining the final classification feature based on the variance and classifying the final classification feature.

[0083] The working principle of the EEG signal feature processing method is as follows: Figure 2 As shown in the figure, the patient performs left-hand motor imagination and right-hand motor imagination respectively, and records the N-channel EEG signals of the patient in the motor imagination time period T (0.3 seconds before the imagination starts to 1.3 seconds after the imagination starts), and obtains an N×T EEG data matrix. From the N×T EEG data matrix, a sliding window is applied along the time series direction, and EEG data with a window length of L are intercepted in sequence. Specifically, assuming that the sliding window step length is d, we can get Sliding windows sampled along time. Each sliding window data is stacked with time delay to obtain a sliding window augmented data matrix of N′×L′. DMD analysis is performed on each sliding window augmented data matrix to extract the data mode, and the amplitude and phase of the mode corresponding to the q frequency components related to motor imagery activities are selected as features. These features reflect the instantaneous EEG mode and the functional connection characteristics of brain activities corresponding to different rhythms. Since different sliding windows characterize the changes of each brain functional connection over time, the modal features corresponding to different sliding windows over time are spliced ​​to obtain a 2qN×p modal change information matrix. Then, the modal change information matrix is ​​spatially filtered using the common space mode, and the projection with the largest difference in the eigenvalues ​​of the left and right hands is selected as the projection transformation matrix, i.e., the spatial filter, to improve the classification accuracy. When applying the spatial filter, the modal change information matrix to be decoded is filtered using a spatial filter to obtain modal common space mode data. According to the modal common space mode data, the variance of the filtered modal change information along the time direction is obtained, and finally, linear discriminant analysis is applied for classification.

[0084] The features extracted by the technical solution provided in this application characterize the temporal changes in the whole-brain functional connectivity of the core frequency spatiotemporal correlation, and also contain time, space, frequency, and phase information, thereby improving the classification performance of motor imagery tasks.

[0085] In some embodiments, the step of obtaining the patient's electroencephalogram signal within a first preset time period includes:

[0086] Obtain EEG signals from a first preset time point before left and right hand movement imagination occurs to a second preset time point after the occurrence.

[0087] Specifically, Figure 3As shown in the figure, the preprocessed EEG data from 0.3 seconds before to 1.3 seconds after the motor imagery is selected as samples (left hand motor imagery and right hand motor imagery), and the N-channel EEG signal data matrix N×T is obtained. Since the DMD method needs to analyze the EEG signal of a certain length to obtain the modal features, it is necessary to sample the 1.6-second data into different sub-segments by sliding the window, and use the features of the sub-segments in each window to characterize the system state at that moment.

[0088] In some embodiments, the EEG data matrix is ​​intercepted by a sliding window to obtain a plurality of sliding window data matrices, including:

[0089] Determine the number of sliding windows with the preset sliding window length, step size and time domain width;

[0090] The EEG data matrix is ​​intercepted by using the sliding window length, step length and number of sliding windows to obtain a plurality of sliding window data sampled along time;

[0091] Each sliding window data is stacked with a time delay to obtain multiple sliding window augmented data matrices.

[0092] For example: the sliding window length is L, the step length is d, and the number of sliding windows extracted in the time domain width T is We get p N×L sliding window data matrices. The sliding window N×L can be expressed as:

[0093]

[0094] In actual BCI applications, using less data can improve the real-time performance of MI motion intention decoding and reduce control delay. Therefore, the method provided in this application only uses fewer data fragments for MI classification. For example, if the window length is selected as 0.6 seconds and the step length is selected as 0.0625 seconds, a total of 17 sliding windows are generated.

[0095] In order to make the observed data better meet the spatial invariance under the action of the Koopman operator, according to Takens delay nesting theory, when the delay nesting dimension s needs to satisfy s ≥ 2N + 1, where N is the original state dimension, the dynamic process can be linearly expressed by the historical data, that is, it satisfies the following linear delay nesting relationship:

[0096]

[0097] Therefore, we stack the data in the original sliding window with a maximum delay of s.

[0098] Specifically, in the present application, each N×L sliding window data matrix is ​​time-delay stacked according to the embedding dimension s to obtain a corresponding sliding window augmented data matrix, and the sliding window augmented data matrix is ​​the following Hankel matrix:

[0099]

[0100]

[0101] In some embodiments, performing dynamic modal decomposition on the plurality of sliding window augmented data matrices to extract modal features includes:

[0102] According to the sliding window augmented data matrix, a first observation data matrix and a second observation data matrix are obtained; wherein the state value of each column in the second observation data matrix is ​​the state value of the corresponding column in the first observation data matrix at the next moment;

[0103] Performing data dimensionality reduction processing on the first measurement matrix and the second measurement matrix to obtain a corresponding dimensionality reduction system matrix;

[0104] Calculating the eigenvalues ​​and eigenvectors of the reduced-dimensional system matrix, determining the eigenvalues ​​of the reduced-dimensional system matrix as the eigenvalues ​​of the linear system matrix, and mapping the eigenvectors of the reduced-dimensional matrix back to the high-dimensional space to obtain the corresponding eigenvectors of the linear system matrix;

[0105] According to the eigenvalues ​​and eigenvectors of the linear system matrix, a modal change information matrix is ​​obtained; wherein the eigenvalues ​​and eigenvectors of the linear system matrix represent the eigenfrequency and the corresponding invariant subspace of the linear system matrix.

[0106] Preferably, performing data dimensionality reduction processing on the first measurement matrix and the second measurement matrix to obtain a corresponding dimensionality reduction system matrix includes:

[0107] Determining the dimension of the low-dimensional space; wherein the dimension represents the number of singular values;

[0108] Selecting singular values ​​and corresponding singular vectors up to the number of singular values ​​in the first observation data matrix and the second observation matrix to form a first dimensionality reduction transformation matrix and a second dimensionality reduction transformation matrix;

[0109] A reduced-dimensionality system matrix is ​​calculated based on the first reduced-dimensionality transformation matrix and the second reduced-dimensionality transformation matrix.

[0110] In some embodiments, the task-related modal vectors are selected, and the modal vectors corresponding to each sliding window augmented data matrix are concatenated over time to obtain a modal change information matrix, including:

[0111] Selecting a modal eigenvector corresponding to a key mode from the modal change information matrix, calculating the amplitude and phase of each element in the modal eigenvector, and constructing a modal amplitude and phase eigenvector of the sliding window according to the amplitude and phase; wherein the key mode includes more than one;

[0112] The modal amplitude and phase eigenvectors corresponding to more than one key mode are spliced ​​along the spatial direction to obtain a multi-modal eigenvector within a preset sliding window;

[0113] The corresponding multimodal feature vectors are calculated for each sliding window in turn and concatenated along the time direction to obtain the modal change information matrix.

[0114] Specifically, the Hankel matrix of the next moment is similarly constructed to obtain two augmented observation data matrices:

[0115]

[0116] That is, each column of the second observation matrix X′ is the state value of each column of the first observation matrix X at the next moment.

[0117] According to the Koopman operator theory, the discrete linear system X′=AX, where the linear system matrix A describes the linear evolution of the system state from X to state X′ in the observation space, has the most direct approximate solution:

[0118]

[0119] in is the generalized inverse of the matrix X.

[0120] According to linear system theory, the eigenvalues ​​and eigenvectors of the linear system matrix A give the eigenfrequency and corresponding invariant subspace of the linear system, which is called DMD mode. When the dimension of the observation space is relatively high, the problem of solving the A matrix is ​​an ill-posed problem. Therefore, the DMD method first reduces the dimension of the data and uses the similar system matrix in the reduced dimension space to obtain the eigenvalues ​​and eigenvectors of the linear system. The eigenvectors and eigenvalues ​​of matrix A are indirectly calculated to extract the main modes that dominate the linear process in the system.

[0121] Perform truncated singular value decomposition on the first observation matrix X with the number of singular values ​​r, and get

[0122] X≈UΣV *

[0123] Among them, * represents conjugate transpose, extracting its first r singular values ​​and corresponding singular vectors to form a matrix Reduce the rank of matrix X from N to r. The selection of parameter r is crucial. If r is too small or too large, it will cause loss of dynamic information or introduce redundant information, making the modal information inaccurate.

[0124] Construct the linear evolution operator of the system state in low-dimensional space (also called dimensionality reduction system matrix):

[0125]

[0126] is the projection of X in r-dimensional space. According to the above definition, it satisfies

[0127]

[0128] Right now It is the linear system matrix in r-dimensional space, that is, the reduced-dimensional system matrix.

[0129] Compute the reduced dimension system matrix The eigenvalues ​​and eigenvectors of

[0130]

[0131] Among them, the matrix Λ is a diagonal matrix, and the diagonal elements are The eigenvalue of , and its corresponding eigenvector is the column vector in the matrix M. According to the properties of similar matrices, the matrix The eigenvalues ​​of are also the eigenvalues ​​of the matrix A, and the eigenvector matrix Ψ corresponding to the matrix A can be obtained by mapping the eigenvector M back to the corresponding vector in the high-dimensional space:

[0132] Ψ [N,r] =Λ -1 YV∑ -1 M

[0133] It can be understood that the above-mentioned DMD method can obtain the discrete spectrum of the observation space linear system matrix A (approximate Koopman operator), where each mode contains eigenvalues ​​and eigenvectors. The eigenvalues ​​describe the frequency and stability of the corresponding frequency components, and the eigenvectors describe the spatial coherence relationship and how to reconstruct the original signal.

[0134] The damping coefficient and characteristic frequency of the corresponding mode are obtained through the diagonal elements λ of the eigenvalue matrix Λ:

[0135]

[0136] g = real(ω)

[0137]

[0138] Among them, ω is the angular frequency corresponding to the mode, Δt is the sampling interval between sample points, g is the calculated damping coefficient, and f is the characteristic frequency corresponding to the mode. When we obtain the eigenvalues ​​and eigenvectors of the system matrix A of the linear system, we can reconstruct the original signal using the modes obtained by dynamic mode decomposition:

[0139]

[0140] Where r is the number of modes, Ψ is the k The modal change information matrix is ​​composed of ω k The matrix is ​​composed of , and b is the coefficient of each mode.

[0141] The DMD mode of the system is obtained, such as Figure 4 As shown, corresponding to different characteristic frequencies, the modal vibration shape may be a real vector or a complex vector. When it is a real mode, it means that each spatial position point always vibrates with the same or opposite phase, and the vibration of each point forms a standing wave in space. The phase difference of each point is 0 degree or 180 degrees, and the different values ​​of the modal vibration shape vector represent the relative amplitude and direction of each point; when the mode is a complex mode, the modal vibration shape vector is a complex number, and there is a phase difference between each observation point in the system. The vibration of each point forms a traveling wave in space. The amplitude represents the amplitude of each point, and the phase reflects the order in which the vibration occurs. Regardless of real mode or complex mode, within the same mode, each position point is in accordance with the corresponding characteristic frequency ω k vibration.

[0142] Therefore, in this application, the dynamic mode decomposition of time delay stacking is used to obtain the mode change information matrix:

[0143] Ψ [N×s,r] =UM=XV∑ -1 M

[0144] Take the above modal eigenvector matrix Ψ [N×s,r] The last N rows of Ψ are used as the final modal change information matrix Ψ [N,r] .

[0145] It should be noted that the DMD mode calculated in this application consists of a triplet of the eigenvalue of the mode, the modal vibration vector, and the participation factor. The eigenvalue of the mode reflects the natural frequency and stability of the mode; the vibration vector of the mode reflects the spatial coherence; and the participation factor reflects the proportion of each mode in the specified signal.

[0146] For the data in each EEG sliding window, this algorithm is applied to extract new modal features. Therefore, for a series of sliding windows in a signal sample segment, a set of features containing changes in functional connectivity between multiple channels can be generated. Since this new feature contains the changes in energy and phase of each channel at the frequency of interest over time, this new modal feature vector contains the spatiotemporal variation characteristics of brain connections. Finally, the CSP method is used as a spatial filter to extract the variance of changes in brain functional connectivity in each sample.

[0147] The DMD complex mode reflects the whole-brain dynamics across channels, because multi-channel EEG signals are treated as a mutually coupled multivariate system in the process of calculating DMD. The EEG signal can be decomposed into a discrete spectrum with the corresponding DMD mode shape, where the DMD mode is a complex vector representing the coherent pattern (functional connectivity) of the corresponding rhythm. Its amplitude reflects the amplitude difference of different channels at a specific frequency, and its phase describes the connectivity of different channels in the EEG.

[0148] It should be noted that in the dynamic mode decomposition step, when different numbers of singular values ​​are selected, we can decompose different frequency components. When a smaller number of singular values ​​are selected, the decomposed frequency components are more important to the data matrix and have a greater impact, while when the number of singular values ​​selected gradually increases, the newly emerging frequency components are relatively unimportant to the data matrix. Therefore, we can first ignore the degree of signal restoration and determine the importance difference between the various frequencies in the μ band. Figure 5 As shown, when the number of modes is 3, only the DC component and the component with a frequency of 11 Hz are extracted. Therefore, it can be found that the frequency component of 11 Hz is the most important. Therefore, our subsequent modal analysis is mainly aimed at 11 Hz. This frequency is also consistent with the conclusions of the brain activity research on motor imagery.

[0149] When the number of modes is increased to 11, it can be found that the signals with a frequency of 8 Hz and a frequency of 11 Hz are extracted, such as Figure 6 As shown. It can be seen that the importance of 8Hz frequency is lower than 11Hz, but both are more important than other frequencies within 8-12Hz. Therefore, in order to ensure the degree of signal restoration, we still choose the number of modes as 51, but when extracting information, we only focus on the information of 8Hz and 11Hz to avoid irrelevant interference of other frequency information on the results.

[0150] In summary, by gradually increasing the number of singular value selections in dynamic modal decomposition, the most critical frequencies and their corresponding modes of the EEG task can be pre-analyzed. Selecting these most critical modes (q) from r modes for subsequent common spatial mode filtering can effectively improve the representativeness and robustness of the features. Among them, the number of modes is the same as the number of singular values.

[0151] In some embodiments, the modal change information matrix includes a left-hand modal change information matrix under left-hand motor imagination and a right-hand modal change information matrix under right-hand motor imagination; the method of using a common space mode method to calculate the modal common space mode of the modal change information matrix and obtain a corresponding projection transformation matrix includes:

[0152] Calculate the normalized sample covariance matrix of the left-hand modal change information matrix and the right-hand modal change information matrix of each test to obtain the left-hand modal covariance matrix and the right-hand modal covariance matrix;

[0153] The left-hand modal covariance matrix and the right-hand modal covariance matrix of multiple tests are averaged to obtain the left-hand average modal covariance matrix and the right-hand average modal covariance matrix;

[0154] Adding the left-hand average modal covariance matrix and the right-hand average modal covariance matrix to obtain a sum modal covariance matrix, and performing eigendecomposition on the sum modal covariance matrix to define a whitening matrix;

[0155] Using the whitening matrix, respectively, the left-hand average modal covariance matrix and the right-hand average modal covariance matrix are subjected to similarity transformation to obtain a left-hand covariance similarity matrix and a right-hand covariance similarity matrix;

[0156] Solving the common eigenvectors of the left-handed covariance similarity matrix and the right-handed covariance similarity matrix, and arranging the corresponding eigenvectors in descending order of the corresponding eigenvalues ​​of the left-handed covariance similarity matrix to form a common eigenvector matrix;

[0157] A projection transformation matrix, ie, a spatial filter, is constructed according to the whitening matrix corresponding to the modal covariance matrix and the common eigenvector matrix.

[0158] Specifically, the modal change information matrix Ψ is obtained through dynamic modal decomposition: [N,r] , select q modes corresponding to the key frequency components related to motor imagery activities from the r system modes, calculate the amplitude and phase (complex number) of each element respectively, and obtain the modulus and phase modal change information matrix of the key complex modal vector under each sliding window:

[0159]

[0160] Stack the magnitude and phase matrices as column vectors to form the magnitude and phase eigenvectors of the system under the sliding window:

[0161]

[0162] The system amplitude and phase feature vectors under p sliding windows are combined to obtain the time-frequency amplitude and phase modal change information matrix during the motion imagination period, that is, the modal change information matrix is:

[0163]

[0164] The principle of spatial filtering using the common spatial pattern is essentially to find a projection transformation matrix W such that

[0165]

[0166] P L , P R They are the left-hand modal change information matrix and the right-hand modal change information matrix respectively. The common space mode maximizes the variance difference between different categories in the projection space by finding a linear projection transformation, which is beneficial to improve the classification performance.

[0167] The method to calculate the projection transformation matrix is:

[0168] First, the normalized covariance matrix of the left and right hand motor imagery modality change information matrix is ​​calculated for each trial:

[0169]

[0170] The covariance matrices calculated for all trials of the left and right hands are averaged to obtain the left-hand average modal covariance matrix. Right-handed mean modal covariance matrix

[0171] Definition and modal covariance matrix are

[0172]

[0173] Performing feature decomposition, we get

[0174] R=UDU T

[0175] The columns of U are the unit eigenvectors of the matrix, and D is a diagonal matrix whose elements are the eigenvalues ​​corresponding to the matrix.

[0176] Define the whitening transformation matrix:

[0177]

[0178] Project the covariance matrix with the whitening matrix and get

[0179]

[0180]

[0181] Among them, S L is the left-handed covariance similarity matrix, S R is the right-hand covariance similarity matrix.

[0182] It can be proved that the above matrix S L With S R have the same eigenvector, that is, the common eigenvector Q, and the sum of the diagonal matrices corresponding to the eigenvalues ​​is the unit matrix, that is, the sum of the corresponding eigenvalues ​​is 1:

[0183] S L =QD L Q T

[0184] S R =QD R Q T

[0185] D L +D R =I

[0186] Therefore, the common eigenvector B corresponding to S L The largest eigenvalue corresponds to S R The minimum eigenvalue of the left-hand covariance similarity matrix S L When the eigenvalue of is the largest, the right-hand covariance similarity matrix S R The eigenvalue of is the smallest, thereby achieving the purpose of optimal separation of the two types of tasks. Wherein, the projection transformation matrix can diagonalize the left-handed mode covariance matrix and the right-handed mode covariance matrix at the same time, and the sum of their corresponding eigenvalues ​​is 1. It can be understood that the common eigenvector matrix can diagonalize the two covariance matrices after whitening at the same time, and the sum of their corresponding eigenvalues ​​is 1.

[0187] The projection transformation matrix is ​​thus defined as:

[0188] W=Q T F

[0189] Among them, W is the spatial filter. The modal change information matrix to be decoded is input into the spatial filter for filtering to obtain the modal common spatial pattern data, as follows:

[0190] Project the modal change information matrix to obtain the optimal feature space:

[0191] Z L =WP L

[0192] Z R =WP R

[0193] Among them, Z L is the left-handed co-spatial mode data, Z R is the right-handed co-space mode data.

[0194] The CSP modal change information matrix generated by the algorithm is not equivalent. The feature information is mainly concentrated in the head and tail of the modal change information matrix, while the feature information in the middle is not obvious and can be ignored, so the mth row and the last mth row of data are selected as the modal change information matrix for CSP feature extraction.

[0195] In this feature space, the variance of the feature is better distinguishable. The first m rows and the last m rows of the common space pattern data are taken to extract the variance logarithm F L and F R As the final classification feature:

[0196] F L =ln Var(Z L )

[0197] F R =ln Var(Z R )

[0198] Among them, F L is the variance of the left-handed cospatial pattern data, F R is the variance of the right-handed cospatial pattern data.

[0199] Finally, the final features extracted above are sent to the linear discriminant classifier LDA to classify the left-hand and right-hand motor imagination. The LDA method is to find an optimal projection in the projection space so that the distance between samples of the same type is small and the distance between samples of different types is large. After determining the classifier model parameters, compared with complex neural networks, LDA has a faster discrimination speed for new EEG signals, which can improve the real-time performance of BCI.

[0200] This method combines the Koopman operator theory and Takens embedding theory, applies the DMD method to EEG modal analysis, reveals the changes in brain functional connections during motor imagery, and then uses it for motor imagery classification tasks. Compared with existing EEG feature extraction methods, the DMD-based method has many advantages: First, the DMD method extracts EEG pattern features based on the dynamic interaction relationship between EEG channels. Compared with the traditional method of extracting features channel by channel, it considers the dynamic constraint relationship between channels, making the extracted features more stable; secondly, the DMD method extracts frequency components in EEG activity based on a data-driven method. Compared with the method based on a fixed EEG rhythm range, it can more accurately reflect the individual differences of the main frequency components between different individuals; thirdly, each EEG modality that represents spatiotemporal correlation information, its corresponding spatiotemporal coherence pattern reflects the large The functional connectivity between different brain regions in this rhythm includes the relative intensity of brain activity (amplitude information) and the temporal difference of brain activity between regions (phase information); in addition, the DMD method is essentially a multivariate autoregressive model. Compared with non-parametric methods such as Fourier transform, it can obtain a parametric and accurate description of the dynamic process based on less data, thereby reducing the control delay of the brain-computer interface; finally, according to the Koopman operator theory, the DMD method uses EEG signals as high-dimensional observation variables of nonlinear brain activity, and the obtained brain modality represents the nonlinear dynamic behavior of the brain from the linear observation space. This method was verified on the Physionet EEG motion image and BCI Competition IV 2a datasets. The results show that the proposed DMD-CSP method can improve both intra-individual and inter-individual classification performance at a shorter delay.

[0201] This application uses the Physionet EEG motor imagery dataset (eegmmidb) and the BCI CompetitionIV 2a dataset to verify the effectiveness of the proposed DMD-CSP algorithm.

[0202] In the eegmmidb dataset, each patient has 45 trials, including 1:1 left-hand motor imagery and right-hand motor imagery. Due to the small number of samples, the dataset is enhanced by sliding window processing. For each motor imagery task, after the visual stimulation signal of the moving image is issued, a sliding window with an offset of 10 sampling points is used to obtain 5 data segments of 1.3 seconds in length, and a total of 225 samples are generated for each patient. The dataset is divided into a training set and a test set, of which 36 trials are the training set and 9 trials are the test set; therefore, there are a total of 180 training samples and 45 test samples. For each training sample, the DMD-CSP feature extraction method is used to generate the spatiotemporal modal change information matrix, and the three projection directions with the largest variance difference are extracted according to CSP, and a total of 6 features are extracted. Finally, the feature is sent to the linear discriminant classifier for classification. The final classification accuracy of each patient is the average classification accuracy of running 10 experiments. The comparison results of different feature extraction methods are shown in Table 1.

[0203] Table 1: Comparison results of different classification methods within the patient under test on the eegmmidb dataset

[0204]

[0205] It can be seen that the proposed algorithm produces the highest average classification accuracy. The DMD-CSP method has significant improvements in the classification performance for patient 2 (increase of 16.6%), patient 3 (increase of 21.06%), patient 7 (increase of 24.67%), and patient 9 (increase of 16.14%).

[0206] For the BCI Competition IV 2a dataset, each patient has a training set of 144 trials and a test set of 144 trials. The data segment from 0.3 seconds before stimulation to 1 second after stimulation was used to train the classifier. The classification comparison results of different classification methods are shown in Table 2. The average classification accuracy of the DMD-CSP method is higher than that of the corresponding CSP method.

[0207] It is worth noting that the average accuracy of the BCI Competition IV 2a dataset is lower than that of the eegmmidb dataset. The main reason is that the number of EEG channels in this dataset is small (22 channels). It can be seen that DMD-CSP is more suitable for multi-channel EEG measurement data. The reason is that the DMD-CSP method extracts the spatiotemporal features of the whole brain in the modal space. Based on the Koopman theory, more channels mean studying the nonlinear dynamic changes of the brain in a higher-dimensional observation space.

[0208] Table 2: Comparison of different classification methods for patients on the BCI Competition IV 2a dataset

[0209]

[0210]

[0211] The classification performance across the tested patients is as follows:

[0212] In order to further verify the performance of the DMD-CSP method in the MI classification task across the patients to be tested, this part of the experiment adopts leave-one-out cross-validation, selects data of 9 patients to be tested from the data set, uses data of 8 patients to be tested as the training set, and uses the EEG signal of the remaining 1 patient to be tested as the test set. Table 3 lists the comparison results of this algorithm with other methods on the eegmmidb dataset. The results show that this method is generally better than the existing methods. Specifically, the average accuracy is improved by 8.79% compared with CSP, and by 4.51% compared with FBCSP. Compared with other methods, this method has significantly improved the performance of subject 8 (increased by 10.8%). Table 4 shows the comparison results tested in the BCI Competition IV 2a dataset. This method can still improve the average classification accuracy, especially the performance of subject 9 (increased by 6.46.%).

[0213] Table 3: Comparison results of different classification methods across patients on the eegmmidb dataset

[0214]

[0215] Table 4: Comparison of different classification methods across patients on the BCI Competition IV 2a dataset

[0216]

[0217] like Figure 7 As shown, the present application provides an EEG signal feature processing device, comprising:

[0218] The acquisition module 701 is used to acquire the EEG signals of the patient to be tested within a preset time period, and obtain an EEG data matrix according to the EEG signals; the EEG signals are generated according to the left and right hand movement imagination of the patient to be tested;

[0219] A data preparation module 702 is used to intercept the EEG data matrix with a sliding window and perform time delay stacking to obtain a sliding window augmented data matrix;

[0220] The modal decomposition module 703 is used to perform dynamic modal decomposition on the multiple sliding window augmented data matrices that change with time, extract modal features, select task-related modal vectors, and splice the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix;

[0221] A spatial filtering module 704 is used to calculate the modal co-spatial mode of the modal change information matrix using a co-spatial mode method and obtain a corresponding projection transformation matrix; the projection transformation matrix is ​​a spatial filter;

[0222] The classification module 705 is used to apply the spatial filter to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and calculate the variance of the filtered modal change information along the time direction based on the modal co-spatial data, determine the final classification feature based on the variance and classify the final classification feature.

[0223] The working principle of the EEG signal feature processing device provided in the present application is as follows: the acquisition module 701 acquires the EEG signal of the patient to be tested within a preset time period, and obtains an EEG data matrix according to the EEG signal; the EEG signal is generated according to the left and right hand movement imagination of the patient to be tested; the data preparation module 702 intercepts the EEG data matrix with a sliding window and performs time delay stacking to obtain a sliding window augmented data matrix; the modal decomposition module 703 performs dynamic modal decomposition on multiple sliding window augmented data matrices that change with time, extracts modal features, selects task-related modal vectors, and performs dynamic modal decomposition on each sliding window according to the passage of time. The modal vectors corresponding to the augmented data matrix are spliced ​​to obtain the modal change information matrix; the spatial filtering module 704 uses the common space mode method to calculate the modal common space mode of the modal change information matrix and obtain the corresponding projection transformation matrix; the projection transformation matrix is ​​the spatial filter; the classification module 705 applies the spatial filter to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain the modal common space mode data, and calculates the variance of the filtered modal change information along the time direction according to the modal common space data, determines it as the final classification feature according to the variance and classifies the final classification feature.

[0224] In summary, the present invention provides a method and device for processing EEG signal features, which can obtain a parameterized and accurate description of a dynamic process based on less data, thereby reducing the control delay of the brain-computer interface, and can extract global dynamic characteristics related to motor imagery from shorter EEG time series segments for classification.

[0225] It can be understood that the method embodiment provided above corresponds to the device embodiment described above, and the corresponding specific contents can be referenced to each other and will not be repeated here.

[0226] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0227] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0228] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction method, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0229] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0230] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for processing EEG signal features, characterized in that: include: Acquire the EEG signals of the patient to be tested within a preset time period, and obtain an EEG data matrix according to the EEG signals; The EEG signal is generated based on left-hand and right-hand motor imagery performed by the patient to be tested; The EEG data matrix is ​​intercepted with a sliding window and time-delayed stacked to obtain a sliding window augmented data matrix; Performing dynamic modal decomposition on the multiple sliding window augmented data matrices that change over time, extracting modal features, selecting task-related modal vectors, and splicing the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix; The modal co-spatial mode of the modal change information matrix is ​​calculated by using the co-spatial mode method, and a corresponding projection transformation matrix is ​​obtained; the projection transformation matrix is ​​the spatial filter; The spatial filter is applied to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and the variance of the filtered modal change information along the time direction is calculated based on the modal co-spatial data, and the final classification feature is determined based on the variance and the final classification feature is classified.

2. The method according to claim 1, characterized in that The step of obtaining the electroencephalogram signal of the patient to be tested within a first preset time period includes: Obtain EEG signals from a first preset time point before left and right hand movement imagination occurs to a second preset time point after the occurrence.

3. The method according to claim 1 or 2, characterized in that: The method of intercepting the EEG data matrix with a sliding window and performing time-delay stacking to obtain a sliding window augmented data matrix includes: Determine the number of sliding windows with the preset sliding window length, step size and time domain width; The EEG data matrix is ​​intercepted by using the sliding window length, step length and number of sliding windows to obtain a plurality of sliding window data sampled along time; Each sliding window data is stacked with a time delay to obtain a sliding window augmented data matrix.

4. The method according to claim 1, characterized in that: The step of performing dynamic modal decomposition on the plurality of sliding window augmented data matrices to extract modal features includes: According to the sliding window augmented data matrix, a first observation data matrix and a second observation data matrix are obtained; wherein the state value of each column in the second observation data matrix is ​​the state value of the corresponding column in the first observation data matrix at the next moment; Performing data dimensionality reduction processing on the first observation data matrix and the second observation data matrix to obtain a corresponding dimensionality reduction system matrix; Calculating the eigenvalues ​​and eigenvectors of the reduced-dimensional system matrix, determining the eigenvalues ​​of the reduced-dimensional system matrix as the eigenvalues ​​of the linear system matrix, and mapping the eigenvectors of the reduced-dimensional system matrix back to the high-dimensional space to obtain the eigenvectors of the corresponding linear system matrix; According to the eigenvalues ​​and eigenvectors of the linear system matrix, a modal change information matrix is ​​obtained; wherein the eigenvalues ​​and eigenvectors of the linear system matrix represent the eigenfrequency and the corresponding invariant subspace of the linear system matrix.

5. The method according to claim 4, characterized in that Performing data dimensionality reduction processing on the first observation data matrix and the second observation data matrix to obtain a corresponding dimensionality reduction system matrix, including: Determining the dimension of the low-dimensional space; wherein the dimension represents the number of singular values; Selecting singular values ​​and corresponding singular vectors up to the number of singular values ​​in the first observation data matrix and the second observation data matrix to form a first dimensionality reduction transformation matrix and a second dimensionality reduction transformation matrix; A reduced-dimensionality system matrix is ​​calculated based on the first reduced-dimensionality transformation matrix and the second reduced-dimensionality transformation matrix.

6. The method according to claim 4, characterized in that The task-related modal vectors are selected, and the modal vectors corresponding to each sliding window augmented data matrix are spliced ​​over time to obtain a modal change information matrix, including: Selecting a modal eigenvector corresponding to a key mode from the modal change information matrix, calculating the amplitude and phase of each element in the modal eigenvector, and constructing a modal amplitude and phase eigenvector of the sliding window according to the amplitude and phase; wherein the key mode includes more than one; The modal amplitude and phase eigenvectors corresponding to more than one key mode are spliced ​​along the spatial direction to obtain a multi-modal eigenvector within a preset sliding window; The corresponding multimodal feature vectors are calculated for each sliding window in turn and concatenated along the time direction to obtain the modal change information matrix.

7. The method according to claim 6, characterized in that The modality change information matrix includes a left-hand modality change information matrix under left-hand movement imagination and a right-hand modality change information matrix under right-hand movement imagination; The method of using the common space mode method to calculate the modal common space mode of the modal change information matrix and obtain the corresponding projection transformation matrix includes: Calculate the normalized sample covariance matrix of the left-hand modal change information matrix and the right-hand modal change information matrix of each test to obtain the left-hand modal covariance matrix and the right-hand modal covariance matrix; The left-hand modal covariance matrix and the right-hand modal covariance matrix of multiple tests are averaged to obtain the left-hand average modal covariance matrix and the right-hand average modal covariance matrix; Adding the left-hand average modal covariance matrix and the right-hand average modal covariance matrix to obtain a sum modal covariance matrix, and performing eigendecomposition on the sum modal covariance matrix to define a whitening matrix; Using the whitening matrix, respectively, the left-hand average modal covariance matrix and the right-hand average modal covariance matrix are subjected to similarity transformation to obtain a left-hand covariance similarity matrix and a right-hand covariance similarity matrix; Solving the common eigenvectors of the left-handed covariance similarity matrix and the right-handed covariance similarity matrix, arranging the corresponding eigenvectors in descending order of the corresponding eigenvalues ​​of the left-handed covariance similarity matrix to form a common eigenvector matrix; A projection transformation matrix, ie, a spatial filter, is constructed according to the whitening matrix corresponding to the modal covariance matrix and the common eigenvector matrix.

8. The method according to claim 7, characterized in that The projection transformation matrix diagonalizes the left-hand modal covariance matrix and the right-hand modal covariance matrix at the same time, and the sum of their corresponding eigenvalues ​​is 1.

9. An electroencephalogram signal feature processing device, characterized in that: include: An acquisition module is used to acquire the EEG signals of the patient to be tested within a preset time period, and obtain an EEG data matrix according to the EEG signals; The EEG signal is generated based on left-hand and right-hand motor imagery performed by the patient to be tested; A data preparation module, used for intercepting the EEG data matrix with a sliding window and performing time-delay stacking to obtain a sliding window augmented data matrix; A modal decomposition module is used to perform dynamic modal decomposition on the multiple sliding window augmented data matrices that change over time, extract modal features, select task-related modal vectors, and splice the modal vectors corresponding to each sliding window augmented data matrix over time to obtain a modal change information matrix; A spatial filtering module, used for calculating the modal co-spatial mode of the modal change information matrix by using the co-spatial mode method, and obtaining a corresponding projection transformation matrix; the projection transformation matrix is ​​the spatial filter; A classification module is used to apply the spatial filter to perform spatial filtering on the modal change information matrix to be decoded in turn to obtain modal co-spatial pattern data, and calculate the variance of the filtered modal change information along the time direction based on the modal co-spatial data, determine the final classification feature based on the variance and classify the final classification feature.

10. A computer device comprising: Memory and processor; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for processing EEG signal features as described in any one of claims 1 to 8.