Motor imagery brain-computer interface self-adaptive classification method based on EEG (electroencephalogram) signals

By constructing a lightweight framework for adaptive spatiotemporal frequency 3D feature extraction and an improved IL-SVM classifier, the problems of low EEG signal classification accuracy and poor generalization ability in the MI-BMI system are solved, achieving efficient and stable motion imagination intent recognition, which is suitable for resource-constrained devices.

CN121834484APending Publication Date: 2026-04-10HENAN MEILUN MEDICAL ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HENAN MEILUN MEDICAL ELECTRONICS CO LTD
Filing Date
2026-02-26
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing MI-BMI systems suffer from low EEG signal classification accuracy, poor generalization ability, high computational overhead, and insufficient adaptability to individual differences and time-varying signals, making it difficult to achieve efficient and accurate recognition of motion imagery intentions.

Method used

A lightweight adaptive feature extraction and classification framework is constructed. An adaptive spatiotemporal frequency three-dimensional feature extraction network is adopted, combined with an improved lightweight support vector machine (IL-SVM) classifier and transfer learning, and an online adaptive update mechanism is introduced to dynamically adjust features and parameters to adapt to individual differences and signal time-varying characteristics.

Benefits of technology

It significantly improves the classification accuracy and system stability of EEG signals, reduces computing costs, and is suitable for resource-constrained edge devices and portable MI-BMI systems, thereby enhancing the system's practicality and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure QLYQS_6
    Figure QLYQS_6
  • Figure SMS_303
    Figure SMS_303
Patent Text Reader

Abstract

The invention belongs to the technical field of electroencephalogram EEG signal processing and mode recognition, and discloses a motor imagery brain-computer interface adaptive classification method based on an electroencephalogram EEG signal, which comprises the following steps: S1, collecting and preprocessing the electroencephalogram EEG signal; s2, adaptive space-time-frequency three-dimensional feature extraction is carried out; s3, training and optimizing a self-adaptive classifier; and S4, motor imagery EEG signal classification and adaptive updating are carried out. According to the motor imagery brain-computer interface adaptive classification method based on the electroencephalogram EEG signals, accurate and efficient classification of the motor imagery EEG signals is achieved by constructing a lightweight and adaptive feature extraction and classification framework, and the practicability and reliability of an MI-BMI system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electroencephalogram (EEG) signal processing and pattern recognition, and particularly relates to a motor imagery brain-computer interface adaptive classification method based on electroencephalogram (EEG) signals. BACKGROUND

[0002] Motor imagery brain-computer interface (MI-BMI) is a new type of human-computer interaction technology that does not rely on peripheral nerves and muscle conduction, directly collects and processes electroencephalogram (EEG) signals generated by the human brain, decodes the user's motor imagery intention, and converts it into executable control instructions. It has irreplaceable application value in the fields of rehabilitation training of patients with neurological disorders such as spinal cord injury and cerebral palsy, intelligent prosthesis control, and unmanned aerial vehicle control.

[0003] Currently, the core bottleneck of the MI-BMI system is the classification accuracy of the EEG signal and the system generalization ability, which is mainly due to the following reasons: EEG signals have inherent characteristics of extremely low signal-to-noise ratio, strong time-varying, significant individual differences, and susceptibility to environmental interference (such as power frequency interference and electromyographic interference); at the same time, different users' motor imagery brain electrical patterns differ significantly, and the distribution of the same user's electroencephalogram signals will fluctuate under different physiological states.

[0004] The existing MI-BMI classification methods mainly fall into two categories: one is based on traditional machine learning methods, such as common spatial patterns (CSP) and its improved algorithms, support vector machines (SVM), linear discriminant analysis (LDA), etc. This type of method relies on manually designed features (such as time domain features and frequency domain features), the feature extraction process is tedious, and it is difficult to capture the complex spatio-temporal correlation information in EEG signals, and it has poor adaptability to individual differences and signal time-varying, with limited classification accuracy; the other is based on deep learning methods, such as convolutional neural networks (CNN), long short-term memory networks (LSTM), and Transformers, etc. Although this type of method can achieve automatic feature extraction, it generally has complex model structure, high computational overhead, and high inference latency, and lacks adaptive mechanisms for EEG signal time-varying and individual differences. In cross-period and cross-subject classification tasks, additional model fine-tuning is usually required to maintain certain classification performance, which severely limits the practicality and large-scale deployment of MI-BMI systems.

[0005] In addition, most existing classification methods only focus on single-dimensional feature extraction and fail to fully integrate the three-dimensional features of EEG signals in time domain, frequency domain, and spatial domain, resulting in insufficient discriminability of feature representation. Meanwhile, in the feature fusion process, different dimensions and different channels of features are not assigned different weights, which are easily disturbed by redundant features and noise features, further reducing the classification accuracy.

[0006] Therefore, developing a MI-BMI classification method capable of self-adapting to the time-varying nature and individual differences of EEG signals, taking into account the classification accuracy and computational efficiency, and having strong generalization ability, has become a technical problem to be solved in the current field. SUMMARY

[0007] The purpose of the present application is to provide a motor imagery brain-computer interface adaptive classification method based on electroencephalogram (EEG) signals, aiming to solve the technical problems of low classification accuracy, poor generalization ability, high computational cost, and insufficient adaptability to individual differences and signal time-varying nature of existing classification methods. By constructing a lightweight and adaptive feature extraction and classification framework, accurate and efficient classification of motor imagery EEG signals is achieved, and the practicality and reliability of the MI-BMI system are improved.

[0008] To achieve the above-mentioned purpose, the present application provides a motor imagery brain-computer interface adaptive classification method based on electroencephalogram (EEG) signals, comprising the following steps: Step S1, acquisition and preprocessing of electroencephalogram (EEG) signals: using a non-invasive EEG acquisition device to collect the original EEG signals of the user performing a pre-set motor imagery task; preprocessing the collected original EEG signals to remove noise interference and standardize them to obtain pure and standardized EEG signals; Step S2, adaptive spatio-temporal frequency three-dimensional feature extraction: constructing a lightweight adaptive feature extraction network to automatically extract three-dimensional features in the time domain, frequency domain, and spatial domain of the standardized EEG signals, while introducing an attention mechanism and an adaptive adjustment module to realize differentiated enhancement and individual adaptation of the features; Step S3, adaptive classifier training and optimization: constructing a classifier based on an improved lightweight support vector machine (IL-SVM), combining transfer learning and adaptive regularization mechanism to realize classification of the three-dimensional fused features while reducing computational cost and improving the adaptability of the classifier to individual differences and signal time-varying nature; Step S4, motor imagery EEG signal classification and adaptive update: inputting the real-time collected and preprocessed EEG signals into the adaptive spatio-temporal frequency three-dimensional feature extraction module of step S2 to obtain real-time fused feature vectors ; inputting them into the optimal IL-SVM classifier trained in step S3 to output motor imagery class labels , completing the classification and recognition of motor imagery intentions; at the same time, introducing an online adaptive update mechanism to dynamically adjust the parameters of the feature extraction module and the classifier according to the real-time classification results, further improving the classification accuracy and system stability.

[0009] Preferably, in step S1, the specific process of electroencephalogram (EEG) signal acquisition and preprocessing is as follows: ​Step S11, Signal Acquisition: A multi-channel EEG acquisition device is used, with the sampling frequency set to 250~500Hz. The electrode layout follows the international 10-20 system. The acquisition electrodes cover the motor cortex area of ​​the brain. The signals of the reference electrode and the ground electrode are acquired at the same time. The single acquisition time for each type of motor imagery task is 2~5s. Each type of task is repeated 30~50 times to form the original EEG signal dataset. Step S12, Power Frequency Interference Removal: An adaptive notch filter algorithm is used to filter 50Hz power frequency interference and its harmonics. The center frequency of the notch filter is 50Hz, 100Hz, or 150Hz, and the bandwidth is set to 2~5Hz. The filter coefficients are updated iteratively to adaptively track the frequency fluctuations of the power frequency interference. The calculation method is as follows: Let the original EEG signal be The transfer function of a notch filter for: ; in, This is the digital angular frequency corresponding to the center frequency of the notch filter. The center frequency of the notch filter; is the sampling frequency; r is the attenuation coefficient; Represents a complex variable; Filtered output signal for and The convolution is as follows: ; in, This represents the convolution operation; Step S13, Removal of EMG and EEG interference: The preprocessed signal is decomposed into multiple independent components using the Independent Component Analysis (ICA) algorithm. By calculating the kurtosis coefficient and spectral characteristics of each independent component, EMG and EEG interference components are identified and removed. The remaining independent components are then reconstructed to obtain the EEG signal after removing EMG and EEG interference. Kurtosis coefficient The calculation method is as follows: ; in, For independent component signals; for The mean; Expressing expectation; when When an element is identified as interfering, it is removed. Step S14, Frequency band selection: The effective features of motion-imagined EEG signals are concentrated in the 8~12Hz μ wave and 13~30Hz β wave frequency bands. Using a Butterworth bandpass filter, the reconstructed signal is selected for frequency band selection, retaining the effective frequency band signal of 8~30Hz. The filter order is set to 4~6. Step S15, Standardization Processing: The Z-score standardization method is used to standardize the screened EEG signals, eliminating signal amplitude differences between different electrodes and different users, as shown below: ; in, The signal amplitude at the a-th sampling point of the b-th electrode; This is the mean value of all sampling points of the b-th electrode; Let be the standard deviation of all sampling points of the b-th electrode; The normalized signal amplitude; After standardization, a pure, standardized EEG signal is obtained. As shown below: ; in, This represents the number of electrode channels; This represents the total number of sampling points.

[0010] Preferably, in step S2, the specific process of adaptive spatiotemporal frequency three-dimensional feature extraction is as follows: Step S21, Spatial Feature Extraction: Using the improved Common Spatial Pattern (ICSP) algorithm, spatial filtering is performed on the standardized EEG signal to maximize the inter-class variance and minimize the intra-class variance of different categories of motion image signals, thereby extracting spatial features. The ICSP algorithm avoids the problem of singular covariance matrix in small sample cases by introducing a regularization term, and at the same time, it adaptively adjusts the weights of inter-class variance and intra-class variance to improve the discriminative power of spatial features. Step S22, Joint Time-Frequency Feature Extraction: Adaptive Wavelet Packet Transform (AWPT) is used to perform joint time-frequency decomposition on the standardized EEG signal, extracting joint features with time-frequency focusing characteristics. At the same time, it adaptively adjusts the wavelet packet basis function and the number of decomposition layers to adapt to the EEG signal characteristics of different users; Step S23, Attention Enhancement and Feature Fusion: Introduce a lightweight channel attention mechanism (LCA) to enhance spatial features. Joint features of time and frequency domains Differentiated weight allocation is performed to enhance the representational power of effective features and suppress the interference of redundant and noisy features. Then, feature fusion is performed to obtain the final three-dimensional fused feature vector. .

[0011] Preferably, in step S21, spatial feature extraction is performed, and the specific process is as follows: Step S211: Calculate the covariance matrix of each category of standardized EEG signals: Suppose the standardized EEG signals are divided into K categories, K≥2, and the signal of the kth category is... k=1,2,...,K Let be the total number of sampling points for the k-th class signal, then the covariance matrix of the k-th class signal is... As shown below: ; in, The regularization coefficient is used. It is a C×C identity matrix, used to avoid singularity in the covariance matrix; Step S212: Construct the overall class covariance matrix The covariance matrix between classes As shown below: ; ; in, Let C be the mean vector of the k-th type of signal, which is C×1. The vector of total mean values ​​for all categories of signals, C×1; Step S213: Solve for the optimal spatial filter: by solving the generalized eigenvalue problem. , to obtain eigenvalues and the corresponding feature vector Select the eigenvectors corresponding to the first m largest eigenvalues ​​and the eigenvectors corresponding to the last m smallest eigenvalues ​​to form the optimal spatial filter. ; Step S214: Extract spatial features: Pass the standardized EEG signal through an optimal spatial filter. The spatially filtered signal is obtained as shown below: , ; By averaging Z in the time domain, we obtain the spatial eigenvectors: ; in, The i-th element represents the mean of all sampled points in the i-th row of the Z-domain.

[0012] Preferably, in step S22, the joint time-domain and frequency-domain feature extraction is performed, and the specific process is as follows: Step S221: Adaptive selection of wavelet packet basis function: Based on the Shannon entropy minimization criterion of the signal, adaptively select the wavelet packet basis function that matches the current EEG signal; The Shannon entropy is calculated as follows: Let signal x be the coefficient of the j-th node in the i-th layer after wavelet packet decomposition. Its energy is The total energy is Then the probability of that node is The Shannon entropy H is: ; The wavelet packet basis function that minimizes Shannon entropy H is selected as the decomposition basis of the current signal; Step S222: Adaptively determine the number of decomposition layers: based on the sampling frequency of the EEG signal. Based on the effective frequency band, the wavelet packet decomposition level L is adaptively determined to ensure accurate coverage of the effective frequency band after decomposition, as shown below: ; in, The lowest frequency in the effective frequency band; Indicates rounding down; Step S223, Wavelet Packet Decomposition and Feature Extraction: Using the selected wavelet packet basis function and decomposition level L, wavelet packet decomposition is performed on each channel of the standardized EEG signal X to obtain the wavelet packet coefficients of each node in each level; for the wavelet packet coefficients of each channel, four time-domain-frequency domain joint features are extracted: energy, variance, peak-to-peak value and wavelet entropy, which form the joint feature vector of the channel. Step S224, Feature Dimensionality Reduction: Principal Component Analysis (PCA) algorithm is used to reduce the dimensionality of the joint feature vector of all channels, removing redundant features and retaining principal components with a cumulative contribution rate exceeding 95%, thus obtaining the time-frequency domain joint feature vector. As shown below: ; in, The number of principal components; This represents the number of electrode channels.

[0013] Preferably, in step S23, attention enhancement and feature fusion are performed as follows: Step S231, Construct the attention weight calculation module: and By concatenating the vectors, a temporary feature vector is obtained. As shown below: ; Attention weights for each feature dimension are calculated using two fully connected layers and a sigmoid activation function. The calculation method is as follows: ; in, and d is the weight matrix; d is the hidden layer dimension. ; , For bias terms; It is a linear activation function; This is the Sigmoid activation function, used to normalize the weights to the [0,1] interval; Step S232, Feature Weighting and Fusion: The temporary feature vector is weighted and fused. With attention weight Element-wise multiplication yields the weighted eigenvector, as shown below: ; in, This represents element-wise multiplication; Will As the final 3D fusion feature vector It contains key three-dimensional information of the EEG signal in the time domain, frequency domain, and spatial domain.

[0014] Preferably, in step S3, the adaptive classifier is trained and optimized, and the specific process is as follows: Step S31: Dataset partitioning; All the 3D fusion feature vectors obtained in step S2 and their corresponding motion imagination category tags The feature-label dataset is composed of the following: ; in, The total number of samples; the dataset The dataset is randomly divided into training sets in a 7:2:1 ratio. Validation set Test set It is used for classifier training, parameter optimization, and performance testing; Step S32: Classifier initialization and transfer learning; Step S33, Adaptive Regularization Training: An adaptive regularization mechanism is adopted to dynamically adjust the penalty coefficient B of the IL-SVM classifier. Based on the classification error of the samples during training, the complexity and classification accuracy of the classifier are adaptively balanced to avoid overfitting and improve the adaptability to the time-varying nature of the signal.

[0015] Preferably, in step S32, the specific process of classifier initialization and transfer learning is as follows: Step S321: Initialize the IL-SVM classifier: Based on the traditional SVM classifier, a lightweight improvement to the kernel function is introduced. A hybrid kernel function of linear kernel function and radial basis function (RBF) is adopted to balance classification accuracy and computational efficiency. Hybrid kernel function As shown below: ; in, Mixed weights; This refers to the bandwidth parameter of the RBF kernel function; The distance is Euclidean. Step S322, Transfer Learning Initialization: Collect motion imagery EEG feature datasets from different users as the source domain dataset. Using source domain dataset The IL-SVM classifier is pre-trained to obtain pre-trained model parameters, including the mixing kernel parameters α and γ and the SVM penalty coefficient B. These pre-trained model parameters are then used as initial parameters and transferred to the current user's classifier training, reducing the training sample size requirement for the current user and improving the classifier's generalization ability and convergence speed.

[0016] Preferably, in step S33, the specific process of adaptive regularization training is as follows: Step S331: Define the objective function: The objective function of the IL-SVM classifier is as follows: ; Constraints: , i=1,2,..., ; in, The normal vector of the classification hyperplane; For bias terms; These are slack variables, used to allow for a small number of misclassifications. The adaptive penalty coefficient at iteration t; The feature map corresponding to the hybrid kernel function; Step S332, Adaptive penalty coefficient update: The update method is as follows: ; in, This is the initial penalty coefficient; The attenuation coefficient; Let be the classification error rate of the training set at iteration t; The maximum permissible error rate; Step S333, Classifier Training: The Sequence Minimum Optimization (SMO) algorithm is used to solve the objective function and obtain the optimal classification hyperplane parameters. During training, a validation set is used every 10 iterations. Calculate the classification accuracy. When the classification accuracy on the validation set no longer improves after 5 consecutive iterations, stop training and obtain the optimal IL-SVM classifier model.

[0017] Preferably, in step S4, the motion-imagined EEG signal classification and adaptive update are performed as follows: Step S41, Real-time Classification: ... The input is fed into the IL-SVM classifier to calculate the classification decision function. As shown below: ; in, For symbolic functions, according to The value of is used to output the corresponding motion imagery category label. ; Step S42, Classification Result Verification: Calculate the confidence score of the real-time classification result. The confidence score is calculated as the absolute value of the output of the classification decision function, as shown below: ; When Conf≥θ, the classification result is deemed valid, and the result is output. When Conf < θ, the classification result is deemed invalid, no classification label is output, and the feature vector of the sample is fused in real time. and temporary category labels Add it to the incremental training sample set; where θ is the confidence threshold, ranging from 0.5 to 0.8; Step S43, Online Adaptive Update: When the number of samples in the incremental training sample set reaches a preset threshold, the incremental SMO algorithm is used to update the incremental sample set with the original training set. By combining these methods, the IL-SVM classifier is incrementally trained, and the classification hyperplane parameters are updated. Simultaneously, the mean of the standardized EEG signal was recalculated. and standard deviation The normalization parameters of step S15 are updated; the basis functions and number of decomposition layers of wavelet packet decomposition are adjusted, and the time-domain-frequency domain joint feature extraction parameters of step S22 are updated; through online adaptive updates, the classification method adapts to the time-varying nature of the user's EEG signal in real time and maintains high classification accuracy.

[0018] Therefore, the present invention employs the above-mentioned adaptive classification method for motor imagery brain-computer interface based on electroencephalogram (EEG) signals, and the beneficial effects are as follows: (1) An adaptive three-dimensional feature extraction framework for time, space and frequency was creatively constructed, which integrates the three-dimensional key information of EEG signals in the time domain, frequency domain and spatial domain. The problem of singular covariance matrix in traditional spatial feature extraction was solved by the improved CSP algorithm. The accurate extraction of time and frequency features was achieved by adaptive wavelet packet transform. Combined with the lightweight channel attention mechanism, the features of different dimensions and different channels were assigned different weights, which effectively enhanced the discriminativeness of feature representation, reduced the interference of redundant features and noise features, and significantly improved the classification accuracy.

[0019] (2) An improved lightweight support vector machine (IL-SVM) classifier is proposed. It adopts a hybrid kernel function to balance classification accuracy and computational efficiency. Combined with the transfer learning mechanism, it effectively solves the problem of poor generalization ability caused by individual differences and reduces the training sample requirements of current users. An adaptive regularization mechanism is introduced to dynamically adjust the penalty coefficient, avoid overfitting of the classifier, and improve the adaptability to signal time-varying characteristics.

[0020] (3) An online adaptive update mechanism was designed, which can dynamically update the feature extraction parameters and classifier parameters based on real-time classification results and incremental samples, so that the classification method can adapt to the time-varying nature of the user's EEG signal and physiological state changes in real time, maintain high classification accuracy, and avoid frequent offline retraining, thus improving the practicality and stability of the system.

[0021] (4) The model structure of the entire classification method is lightweight, with low computational overhead and low inference latency. While ensuring classification accuracy, it significantly reduces computational cost and is suitable for deployment on resource-constrained edge devices and portable MI-BMI systems, with broad application prospects.

[0022] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0023] Figure 1 This is a flowchart of the adaptive classification method for motor imagery brain-computer interface based on electroencephalogram (EEG) signals, which is based on the present invention. Detailed Implementation

[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] like Figure 1 As shown, the present invention provides an adaptive classification method for motor imagery brain-computer interface based on electroencephalogram (EEG) signals, comprising the following steps: Step S1: Acquisition and preprocessing of electroencephalogram (EEG) signals.

[0026] A non-invasive EEG acquisition device was used to collect raw EEG signals from the user while performing a preset motor imagery task. The preset motor imagery task included at least two types of limb motor imagery, such as left-hand motor imagery, right-hand motor imagery, foot motor imagery, and tongue motor imagery. The collected raw EEG signals were preprocessed to remove noise interference and standardize, resulting in clean, standardized EEG signals.

[0027] Step S11, Signal Acquisition: Use a 32-channel or 64-channel EEG acquisition device, with a sampling frequency set to 250~500Hz. The electrode layout follows the international 10-20 system. The acquisition electrodes mainly cover the motor cortex areas of the brain (such as key electrodes like C3, C4, and Cz). Simultaneously, acquire signals from the reference electrode and the ground electrode. The acquisition duration is designed according to the motor imagery task. The single acquisition duration for each type of motor imagery task is 2~5s, and each type of task is repeated 30~50 times to form the original EEG signal dataset.

[0028] Step S12, Power Frequency Interference Removal: An adaptive notch filter algorithm is used to filter 50Hz power frequency interference and its harmonics (100Hz, 150Hz). The center frequencies of the notch filter are 50Hz, 100Hz, and 150Hz, and the bandwidth is set to 2~5Hz. By iteratively updating the filter coefficients, the algorithm adaptively tracks the frequency fluctuations of the power frequency interference to avoid attenuation of the useful EEG signal during the filtering process. The calculation method is as follows: Let the original EEG signal be The transfer function of a notch filter for: ; in, This is the digital angular frequency corresponding to the center frequency of the notch filter. The center frequencies of the notch filter are (50Hz, 100Hz, 150Hz). is the sampling frequency; r is the attenuation coefficient (range 0.9~0.95); This represents a complex variable.

[0029] Filtered output signal for and The convolution is as follows: ; in, This represents the convolution operation.

[0030] Step S13, Removal of EMG and EEG Interference: Using the Independent Component Analysis (ICA) algorithm, the preprocessed signal is decomposed into multiple independent components. By calculating the kurtosis coefficient and spectral characteristics of each independent component, EMG interference components (with large kurtosis coefficients and spectra mainly distributed above 30Hz) and EEG interference components (with abnormal kurtosis coefficients and obvious low-frequency drift) are identified and removed. The remaining independent components are then reconstructed to obtain the EEG signal after removing EMG and EEG interference.

[0031] Kurtosis coefficient The calculation method is as follows: ; in, For independent component signals; for The mean; Expressing expectation; when If the information is found to be interfering, it will be removed.

[0032] Step S14, Frequency Band Selection: The effective features of motion-imagined EEG signals are mainly concentrated in the μ wave (8~12Hz) and β wave (13~30Hz) frequency bands. A Butterworth bandpass filter is used to select the frequency bands of the reconstructed signal, retaining the effective frequency band signals of 8~30Hz. The filter order is set to 4~6 to avoid signal distortion.

[0033] Step S15, Standardization Processing: The Z-score standardization method is used to standardize the screened EEG signals, eliminating signal amplitude differences between different electrodes and different users, as shown below: ; in, The signal amplitude at the a-th sampling point of the b-th electrode; This is the mean value of all sampling points of the b-th electrode; Let be the standard deviation of all sampling points of the b-th electrode; This is the standardized signal amplitude.

[0034] After standardization, a pure, standardized EEG signal is obtained. As shown below: ; in, This represents the number of electrode channels; This represents the total number of sampling points.

[0035] This invention employs a multi-step preprocessing process, including adaptive notch filtering and ICA interference removal, which effectively removes various noises such as power frequency interference, electromyography interference, and electrooculography interference, resulting in a clean EEG signal. This provides a reliable foundation for subsequent feature extraction and classification, further improving the stability and reliability of the classification method.

[0036] Step S2: Adaptive spatiotemporal frequency three-dimensional feature extraction.

[0037] A lightweight adaptive feature extraction network is constructed to automatically extract three-dimensional features in the time, frequency, and spatial domains of standardized EEG signals. Attention mechanisms and adaptive adjustment modules are introduced to achieve differentiated feature enhancement and individual adaptation.

[0038] Step S21: Spatial feature extraction.

[0039] An improved common spatial pattern (ICSP) algorithm is used to perform spatial filtering on standardized EEG signals, maximizing the inter-class variance and minimizing the intra-class variance of different types of motion image signals to extract spatial features. Compared with the traditional CSP algorithm, the ICSP algorithm avoids the problem of singular covariance matrix in small sample cases by introducing a regularization term, and adaptively adjusts the weights of inter-class and intra-class variances to improve the discriminative power of spatial features.

[0040] Step S211: Calculate the covariance matrix of each category of standardized EEG signals: Suppose that the standardized EEG signals are divided into K categories (K≥2), and the signal of the kth category is... (k=1,2,...,K) Let be the total number of sampling points for the k-th class signal, then the covariance matrix of the k-th class signal is... As shown below: ; in, is the regularization coefficient (value range 1e-6~1e-4). It is a C×C identity matrix, used to avoid singularity in the covariance matrix.

[0041] Step S212: Construct the overall class covariance matrix The covariance matrix between classes As shown below: ; ; in, Let be the mean vector (C×1) of the k-th type of signal. This is the total mean vector (C×1) for all categories of signals.

[0042] Step S213: Solve for the optimal spatial filter: by solving the generalized eigenvalue problem. , to obtain eigenvalues and the corresponding feature vector Select the eigenvectors corresponding to the first m largest eigenvalues ​​and the eigenvectors corresponding to the last m smallest eigenvalues ​​to form the optimal spatial filter. (The value of m is determined based on the number of channels C, and is usually taken as m=2~4).

[0043] Step S214: Extract spatial features: Pass the standardized EEG signal through an optimal spatial filter. The spatially filtered signal is obtained as shown below: , ; By averaging Z in the time domain, we obtain the spatial eigenvectors: ; in, The i-th element represents the mean of all sampled points in the i-th row of the Z-domain.

[0044] Step S22: Joint time-domain and frequency-domain feature extraction.

[0045] The Adaptive Wavelet Packet Transform (AWPT) is used to perform time-domain and frequency-domain joint decomposition on the standardized EEG signal, extracting joint features with time-frequency focusing characteristics. At the same time, the wavelet packet basis function and the number of decomposition layers are adaptively adjusted to suit the EEG signal characteristics of different users.

[0046] Step S221: Adaptive selection of wavelet packet basis functions: Based on the Shannon entropy minimization criterion of the signal, adaptively select the basis function that is most suitable for the current EEG signal from commonly used wavelet packet basis functions (such as db4, db6, sym5, coif4).

[0047] The Shannon entropy is calculated as follows: Let signal x be the coefficient of the j-th node in the i-th layer after wavelet packet decomposition. Its energy is The total energy is Then the probability of that node is The Shannon entropy H is: ; The wavelet packet basis function that minimizes the Shannon entropy H is selected as the decomposition basis of the current signal.

[0048] Step S222: Adaptively determine the number of decomposition layers: based on the sampling frequency of the EEG signal. The effective frequency band (8~30Hz) is used to adaptively determine the wavelet packet decomposition level L, ensuring that the decomposition accurately covers the effective frequency band, as shown below: ; in, The lowest frequency in the effective frequency band (8Hz); This indicates rounding down, typically L = 3~5 layers.

[0049] Step S223, Wavelet Packet Decomposition and Feature Extraction: Using the selected wavelet packet basis function and decomposition level L, wavelet packet decomposition is performed on each channel of the standardized EEG signal X to obtain the wavelet packet coefficients of each node in each level; for the wavelet packet coefficients of each channel, four time-domain-frequency domain joint features are extracted: energy, variance, peak-to-peak value and wavelet entropy, which form the joint feature vector of the channel.

[0050] Step S224, Feature Dimensionality Reduction: Principal Component Analysis (PCA) algorithm is used to reduce the dimensionality of the joint feature vector of all channels, removing redundant features and retaining principal components with a cumulative contribution rate of over 95%, thus obtaining the time-domain-frequency domain joint feature vector. As shown below: ; in, The number of principal components (n≤C×4). This represents the number of electrode channels.

[0051] Step S23: Attention enhancement and feature fusion.

[0052] Introducing a lightweight channel attention (LCA) mechanism to address spatial features Joint features of time and frequency domains Differentiated weight allocation is performed to enhance the representational power of effective features and suppress the interference of redundant and noisy features. Then, feature fusion is performed to obtain the final three-dimensional fused feature vector. .

[0053] Step S231, Construct the attention weight calculation module: and By concatenating the vectors, a temporary feature vector is obtained. As shown below: ; Attention weights for each feature dimension are calculated using two fully connected layers and a sigmoid activation function. The calculation method is as follows: ; in, and d is the weight matrix; d is the hidden layer dimension. ; , For bias terms; It is a linear activation function; This is the Sigmoid activation function, used to normalize the weights to the [0,1] interval.

[0054] Step S232, Feature Weighting and Fusion: The temporary feature vector is weighted and fused. With attention weight Element-wise multiplication yields the weighted eigenvector, as shown below: ; in, This indicates element-wise multiplication.

[0055] Will As the final 3D fusion feature vector It contains key three-dimensional information of EEG signals in the time, frequency, and spatial domains, and has strong discriminative power.

[0056] Step S3: Adaptive classifier training and optimization.

[0057] A classifier based on an improved lightweight support vector machine (IL-SVM) is constructed, which combines transfer learning and adaptive regularization mechanisms to achieve accurate classification of three-dimensional fused features F, while reducing computational overhead and improving the classifier's adaptability to individual differences and signal time-varying characteristics.

[0058] Step S31: Dataset partitioning.

[0059] All the 3D fusion feature vectors obtained in step S2 and their corresponding motion imagination category tags The feature-label dataset is composed of the following: ; in, This represents the total number of samples. (The dataset is...) The dataset is randomly divided into training sets in a 7:2:1 ratio. Validation set Test set It is used for classifier training, parameter optimization, and performance testing.

[0060] Step S32: Classifier initialization and transfer learning.

[0061] Step S321: Initialize the IL-SVM classifier: Based on the traditional SVM classifier, a lightweight improvement to the kernel function is introduced. A hybrid kernel function of linear kernel function and radial basis function (RBF) is adopted to balance classification accuracy and computational efficiency.

[0062] Hybrid kernel function As shown below: ; in, Mixed weights (value range 0.3~0.7); This is the bandwidth parameter of the RBF kernel function (value range: 0.01~1). The distance is Euclidean. Step S322, Transfer Learning Initialization: Collect motion imagery EEG feature datasets from multiple different users as the source domain dataset. Using source domain dataset The IL-SVM classifier is pre-trained to obtain pre-trained model parameters, including the mixing kernel parameters α and γ, and the SVM penalty coefficient B. These pre-trained model parameters are then used as initial parameters and transferred to the current user's classifier training. This reduces the training sample size required for the current user, improves the classifier's generalization ability and convergence speed, and addresses the problem of decreased classification accuracy caused by individual differences.

[0063] Step S33: Adaptive regularization training.

[0064] An adaptive regularization mechanism is adopted to dynamically adjust the penalty coefficient B of the IL-SVM classifier. Based on the classification error of the samples during training, the complexity and classification accuracy of the classifier are adaptively balanced to avoid overfitting and improve the adaptability to the time-varying nature of the signal.

[0065] Step S331: Define the objective function: The objective function of the IL-SVM classifier is as follows: ; Constraints: , (i=1,2,..., ); in, The normal vector of the classification hyperplane; For bias terms; These are slack variables, used to allow for a small number of misclassifications. The adaptive penalty coefficient at iteration t; The feature map corresponding to the hybrid kernel function; Step S332, Adaptive penalty coefficient update: The update method is as follows: ; in, The initial penalty coefficient (value range 1~10); The attenuation coefficient (range 0.01~0.1). Let be the classification error rate of the training set at iteration t; This is the maximum permissible error rate (with a value of 0.2).

[0066] When classification error rate When it is large, Increase the penalty for incorrect samples; when the classification error rate... When smaller, Reduce the complexity of the classifier to avoid overfitting.

[0067] Step S333, Classifier Training: The Sequence Minimum Optimization (SMO) algorithm is used to solve the objective function and obtain the optimal classification hyperplane parameters. During training, a validation set is used every 10 iterations. Calculate the classification accuracy. When the classification accuracy on the validation set no longer improves after 5 consecutive iterations, stop training and obtain the optimal IL-SVM classifier model.

[0068] Step S4: Classification and adaptive update of motion-imagined EEG signals.

[0069] The real-time acquired and preprocessed EEG signal is then processed through the adaptive spatiotemporal frequency 3D feature extraction network in step S2 to obtain a real-time fused feature vector. ;Will The input is fed into the optimal IL-SVM classifier trained in step S3, and the output is the motion imagery category label. It completes the classification and recognition of the intention of movement imagination; at the same time, it introduces an online adaptive update mechanism to dynamically adjust the parameters of the feature extraction module and the classifier based on the real-time classification results, further improving the classification accuracy and system stability.

[0070] Step S41, Real-time Classification: ... The input is fed into the IL-SVM classifier to calculate the classification decision function. As shown below: ; in, For symbolic functions, according to The value of is used to output the corresponding motion imagery category label. .

[0071] Step S42, Classification Result Verification: Calculate the confidence score of the real-time classification result. The confidence score is calculated as the absolute value of the output of the classification decision function, as shown below: ; When Conf ≥ θ (θ is the confidence threshold, ranging from 0.5 to 0.8), the classification result is considered valid, and the output is... When Conf < θ, the classification result is deemed invalid, no classification label is output, and the feature vector of the sample is fused in real time. and temporary category labels Add it to the incremental training sample set.

[0072] Step S43, Online Adaptive Update: When the number of samples in the incremental training sample set reaches a preset threshold (usually 50-100), the incremental SMO algorithm is used to update the incremental sample set with the original training set. By combining these methods, the IL-SVM classifier is incrementally trained, and the classification hyperplane parameters are updated. Simultaneously, the mean of the standardized EEG signal was recalculated. and standard deviation The normalization parameters of step S15 are updated; the basis functions and decomposition levels of wavelet packet decomposition are adjusted, and the joint time-domain and frequency-domain feature extraction parameters of step S22 are updated; through online adaptive updates, the classification method can adapt to the time-varying nature of the user's EEG signal in real time and maintain high classification accuracy.

[0073] Example 1 This embodiment uses four types of motor imagery tasks, including left-hand motor imagery, right-hand motor imagery, foot motor imagery, and tongue motor imagery, as examples to illustrate the specific implementation process of the present invention.

[0074] Step 1: EEG signal acquisition and preprocessing.

[0075] Step 11, Signal Acquisition: A 64-channel EEG acquisition device was used, with a sampling frequency set to 250Hz. The electrode layout followed the international 10-20 system. The focus was on acquiring electrode signals from the motor cortex regions such as C3, C4, Cz, FC3, FC4, CP3, and CP4. The reference electrode was the mastoid process of the left ear, and the ground electrode was the forehead. Ten healthy subjects (aged 20-30 years, with no history of neurological diseases) were recruited. Each subject performed four types of motor imagery tasks. The single acquisition time for each type of task was 3 seconds, and each type of task was repeated 40 times, for a total of 10×4×40=1600 raw EEG signal samples were collected.

[0076] Step 12, Power Frequency Interference Removal: An adaptive notch filter algorithm is used, with the center frequency set to 50Hz and 100Hz, the bandwidth set to 3Hz, the attenuation coefficient r=0.92, and the regularization coefficient λ=1e-5, to filter the original EEG signal and remove power frequency interference and its harmonics.

[0077] Step 13, EMG and EEG interference removal: Using the ICA algorithm, the filtered signal is decomposed into 64 independent components. The kurtosis coefficient Q of each independent component is calculated. Independent components with Q>3 are identified as interference components (EMG and EEG interference) and removed. The remaining independent components are reconstructed to obtain the interference-free EEG signal.

[0078] Step 14, Frequency band selection: Use a 4th-order Butterworth bandpass filter to retain the effective frequency band signal of 8~30Hz and remove low-frequency drift and high-frequency noise.

[0079] Step 15: Standardization Processing: The Z-score standardization method is used to standardize the signal of each electrode, eliminating amplitude differences and obtaining a standardized EEG signal. (Sampling frequency 250Hz, acquisition time 3s, T=250×3=750 sampling points).

[0080] Step 2: Adaptive spatiotemporal frequency 3D feature extraction.

[0081] Step 21, Spatial Feature Extraction: Step 211: Calculate the covariance matrix of the four types of standardized EEG signals. (k=1,2,3,4), regularization coefficient λ=1e-5; Step 212: Calculate the overall class covariance matrix. Intraclass covariance matrix ; Step 213: Solve the generalized eigenvalue problem, select the eigenvectors corresponding to the first 3 largest eigenvalues ​​and the last 3 smallest eigenvalues, and form the optimal spatial filter. ; Step 214: Perform spatial filtering on the standardized EEG signal X to obtain... , The spatial eigenvector is obtained by averaging Z in the time domain. .

[0082] Step 22, Joint Time-Frequency Domain Feature Extraction: Step 221: Based on the Shannon entropy minimization criterion, adaptively select the db6 wavelet packet basis function (Shannon entropy minimum). Step 222: Calculate the number of decomposition layers. ; Step 223: Perform 3-level wavelet packet decomposition on the standardized EEG signal of each channel to obtain the coefficients of each node in each level; for each channel, extract 4 features: energy, variance, peak-to-peak value, and wavelet entropy to form the joint feature vector (4-dimensional) of that channel; a total of 64×4=256-dimensional joint features are obtained for 64 channels; Step 224: Use the PCA algorithm to reduce the dimensionality of the 256-dimensional joint features, retaining the principal components with a cumulative contribution rate exceeding 95%, to obtain the time-frequency domain joint feature vector. .

[0083] Step 23: Attention Enhancement and Feature Fusion Step 231, splicing and To obtain temporary feature vectors ; Step 232: Construct the LCA attention module with hidden layer dimension d=19. , , , Initialize to 0, calculate attention weights ; Step 233, for After weighting, the final 3D fusion feature vector is obtained. .

[0084] Step 3: Adaptive classifier training and optimization.

[0085] Step 31: Dataset Splitting: Combine the 1600 fused feature vectors and their category labels (left hand = 1, right hand = 2, foot = 3, tongue = 4) from 10 subjects to form the feature-label dataset D; then divide it into the training set in a 7:2:1 ratio. (1120 samples), validation set (320 samples), test set (160 samples).

[0086] Step 32, Classifier Initialization and Transfer Learning: Collect motion imagery EEG feature datasets from 50 different users as the source domain dataset. ,use A pre-trained IL-SVM classifier is used, with the mixture kernel parameters initialized to α=0.5, γ=0.1, and initial penalty coefficients. =5; Use the pre-trained model parameters as the initial parameters for the current classifier.

[0087] Step 33: Adaptive Regularization Training: The IL-SVM classifier is trained iteratively using the SMO algorithm, with an adaptive penalty coefficient decay coefficient β=0.05 and a maximum allowable error rate. =0.2; Every 10 iterations, the classification accuracy is calculated using the validation set. When the classification accuracy on the validation set does not improve for 5 consecutive iterations, training is stopped, and the optimal IL-SVM classifier model is obtained; After training, the parameters of the hybrid kernel function are adjusted to α=0.45, γ=0.08, and the penalty coefficient B converges to 3.2.

[0088] Step 4: Classification and adaptive update of motion-imagined EEG signals.

[0089] Step 41, Real-time Classification: The real-time acquired and preprocessed EEG signals are passed through the feature extraction network from Step 2 to obtain real-time fused features. ;Will The input is fed into the optimal IL-SVM classifier, the decision function value is calculated, and the classification label is output. .

[0090] Step 42, Classification result verification: Confidence threshold θ=0.6. When Conf≥0.6, output the classification label; when Conf<0.6, add the sample to the incremental training sample set.

[0091] Step 43, Online Adaptive Update: When the incremental training sample set reaches 80 samples, the incremental SMO algorithm is used to incrementally train the classifier and update the parameters; at the same time, the standardized parameters and wavelet packet decomposition parameters are updated to achieve adaptive optimization.

[0092] The classification method of this embodiment was tested for performance and compared with existing mainstream classification methods (traditional CSP+SVM, CNN, Transformer). The test indicators included classification accuracy, inference latency, and cross-subject classification accuracy. The test results are shown in Table 1.

[0093] Table 1 Test Results

[0094] The test results show that the test set classification accuracy and cross-subject classification accuracy of the method of this invention are significantly higher than those of existing mainstream methods, and the inference latency is much lower than that of existing deep learning methods. It can significantly improve computational efficiency and generalization ability while ensuring classification accuracy, effectively solving the shortcomings of existing methods and is suitable for the actual deployment of portable MI-BMI systems.

[0095] Therefore, this invention adopts the above-mentioned adaptive classification method of motor imagery brain-computer interface based on EEG signals. By constructing a lightweight and adaptive feature extraction and classification framework, it achieves accurate and efficient classification of motor imagery EEG signals, thereby improving the practicality and reliability of the MI-BMI system.

[0096] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.

Claims

1. A motor imagery brain-computer interface adaptive classification method based on electroencephalogram (EEG) signals, characterized in that, Comprising the following steps: Step S1, acquisition and preprocessing of electroencephalogram (EEG) signals: using a non-invasive EEG acquisition device to collect raw EEG signals of a user performing a pre-set motor imagery task; preprocessing the collected raw EEG signals to remove noise interference and standardize them to obtain pure standardized EEG signals; Step S2, adaptive spatio-temporal-frequency three-dimensional feature extraction: constructing a lightweight adaptive feature extraction network to automatically extract three-dimensional features in the time domain, frequency domain, and spatial domain of the standardized EEG signals, while introducing an attention mechanism and an adaptive adjustment module to realize differentiated enhancement and individual adaptation of the features; Step S3, adaptive classifier training and optimization: constructing a classifier based on an improved lightweight support vector machine (IL-SVM), combining transfer learning and adaptive regularization mechanism to classify the three-dimensional fused features while reducing computational overhead and improving the adaptability of the classifier to individual differences and signal time variability; Step S4, Motion Imagination EEG Signal Classification and Adaptive Update: The real-time acquired and preprocessed EEG signal is processed through the adaptive spatiotemporal frequency 3D feature extraction module in Step S2 to obtain a real-time fused feature vector. ;Will The input is fed into the optimal IL-SVM classifier trained in step S3, and the output is the motion imagery category label. It completes the classification and recognition of the intention of movement imagination; at the same time, it introduces an online adaptive update mechanism to dynamically adjust the parameters of the feature extraction module and the classifier based on the real-time classification results, further improving the classification accuracy and system stability.

2. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 1, wherein, In step S1, the specific process of electroencephalogram (EEG) signal acquisition and preprocessing is as follows: Step S11, signal acquisition: using a multi-channel EEG acquisition device with a sampling frequency of 250-500 Hz, the electrode layout follows the international 10-20 system, the signals of the reference electrode and the ground electrode are collected, the single collection time of each motor imagery task is 2-5 seconds, and each task is repeated 30-50 times to form an original EEG signal dataset; Step S12, power frequency interference removal: using an adaptive notch filter algorithm to filter the 50Hz power frequency interference and its harmonics, the center frequency of the notch filter is 50Hz, 100Hz or 150Hz, the bandwidth is set to 2-5Hz, and the filter coefficients are updated iteratively to adaptively track the frequency fluctuations of the power frequency interference, the calculation method is as follows: Let the original EEG signal be The transfer function of the notch filter is: ; wherein is a digital angular frequency corresponding to the notch center frequency; is a notch center frequency; is a sampling frequency; r is a decay coefficient; denotes a complex variable; Filtered output signal To With Convolution of the following, as shown: ; wherein denotes a convolution operation; Step S13, electromyographic and electrooculographic interference removal: using independent component analysis (ICA) algorithm to decompose the preprocessed signal into multiple independent components, identifying and removing electromyographic and electrooculographic interference components by calculating the kurtosis coefficient and spectral characteristics of each independent component, and then reconstructing the remaining independent components to obtain EEG signals free of electromyographic and electrooculographic interference; kurtosis coefficient is calculated as follows: ; wherein is an independent component signal; is the mean value of denotes expectation; when it is determined to be an interfering component and is rejected. Step S14, frequency band selection: the effective features of motor imagery EEG signals are concentrated in the mu wave (8-12Hz) and beta wave (13-30Hz) frequency bands, a Butterworth band-pass filter is used to filter the reconstructed signal to retain the effective frequency band signal of 8-30Hz, and the order of the filter is set to 4-6; Step S15, standardization: using Z-score standardization method to standardize the filtered EEG signal to eliminate signal amplitude differences between different electrodes and different users, as follows: ; wherein, is the signal amplitude of the a-th sampling point of the b-th electrode; is the mean value of all sampling points of the b-th electrode; is the standard deviation of all sampling points of the b-th electrode; is the normalized signal amplitude; standardized to obtain a clean standardized EEG signal as follows: ; wherein, is the number of electrode channels; is the total number of sampling points.

3. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 2, characterized in that, In step S2, the specific process of adaptive spatio-temporal-frequency three-dimensional feature extraction is as follows: Step S21, spatial feature extraction: an improved common spatial pattern (ICSP) algorithm is used to perform spatial filtering on the normalized EEG signal, to maximize the inter-class variance of different categories of motor imagery signals and minimize the intra-class variance, and to extract spatial features ; The ICSP algorithm introduces a regularization term to avoid the problem of singular covariance matrix in small sample cases, and adaptively adjusts the weights of inter-class variance and intra-class variance to improve the discriminability of spatial features; Step S22, time-frequency domain combined feature extraction: using adaptive wavelet packet transform (AWPT) to perform time-frequency domain combined decomposition on the standardized EEG signal to extract combined features with time-frequency focusing characteristics Meanwhile, the wavelet packet base function and the decomposition layer number are adaptively adjusted to adapt to the EEG signal characteristics of different users. Step S23, attention enhancement and feature fusion: a lightweight channel attention mechanism LCA is introduced to the spatial feature and the joint feature of time-frequency domain Differential weight allocation is performed to enhance the representation ability of effective features and suppress the interference of redundant features and noise features, and then feature fusion is performed to obtain the final three-dimensional fusion feature vector .

4. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 3, characterized in that, In step S21, the spatial feature is extracted, and the specific process is as follows: Step S211, calculating the covariance matrix of each category of standardized EEG signals: assuming that the standardized EEG signals are divided into K categories, K≥2, the kth category of signals is , k=1, 2,..., K, , and the total number of sampling points of the kth category of signals is Nk, then the covariance matrix of the kth category of signals is , as follows: ; wherein is a regularization coefficient; is a C x C identity matrix to avoid singularity of the covariance matrix; Step S212, constructing the total-intra-class covariance matrix and the total-inter-class covariance matrix as follows: ; ; wherein, is the mean vector of the kth class of signals, C x 1 ; is the total mean vector of all classes of signals, C x 1 ; Step S213, solving the optimal spatial filter: by solving the generalized eigenvalue problem , get the eigenvalue and the corresponding eigenvector ; select the eigenvector corresponding to the first m largest eigenvalues and the eigenvector corresponding to the last m smallest eigenvalues to form the optimal spatial filter ; Step S214: Extract spatial features: Pass the standardized EEG signal through an optimal spatial filter. The spatially filtered signal is obtained as shown below: , ; The Z is time-domain averaged to obtain a spatial feature vector: ; wherein, The i-th element of Z represents the mean of all the sampling points of the i-th row in the Z domain.

5. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 4, characterized in that, In step S22, the time-frequency domain combined feature is extracted, and the specific process is as follows: Step S221, adaptive selection of wavelet packet basis function: based on the Shannon entropy minimization criterion of the signal, the wavelet packet basis function matching the current EEG signal is adaptively selected; The Shannon entropy is calculated as follows: assuming that a signal x is decomposed by wavelet packet, the coefficient of the i-th layer and the j-th node is , the energy is , the total energy is , the probability of the node is , and the Shannon entropy H is: ; The wavelet packet basis function that minimizes the Shannon entropy H is selected as the decomposition basis of the current signal; Step S222, adaptively determining the number of decomposition layers: according to the sampling frequency of the EEG signal and the effective frequency band, the number of wavelet packet decomposition layers L is adaptively determined to ensure that the effective frequency band can be accurately covered after decomposition, as follows: ; wherein is the lowest frequency of the effective frequency band; denotes the floor function; Step S223, wavelet packet decomposition and feature extraction: using the selected wavelet packet basis function and the decomposition layer number L, the wavelet packet decomposition is performed on each channel of the standardized EEG signal X, and the wavelet packet coefficients of each layer and each node are obtained; the wavelet packet coefficients of each channel are extracted, and four time-frequency domain combined features: energy, variance, peak-to-peak value and wavelet entropy are extracted to form the combined feature vector of the channel; Step S224, feature dimension reduction: a principal component analysis (PCA) algorithm is used to reduce the dimension of the joint feature vectors of all channels, remove redundant features, retain principal components with an accumulated contribution rate of more than 95%, and obtain time-frequency domain joint feature vectors As shown below: ; wherein, is the number of main components; is the number of electrode channels.

6. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 5, characterized in that, In step S23, attention enhancement and feature fusion, the specific process is as follows: Step S231, constructing an attention weight calculation module: constructing an attention weight calculation module by using the following formula and Splicing is performed to obtain a temporary feature vector As follows: ; The attention weight of each feature dimension is calculated by two fully connected layers and a sigmoid activation function in the following manner: ; wherein, and is a weight matrix; d is a hidden layer dimension, ; , is a bias term; is a linear activation function; is a Sigmoid activation function that normalizes the weights to the interval [0, 1]; Step S232, feature weighting and fusion: the temporary feature vector and the attention weight are element-wise multiplied to obtain the weighted feature vector, as follows: ; wherein represents an element-wise multiplication; Will As the final three-dimensional fusion feature vector It contains the three-dimensional key information of the time domain, frequency domain and space domain of the EEG signal.

7. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 6, characterized in that, In step S3, adaptive classifier training and optimization, the specific process is as follows: Step S31, data set division; all the three-dimensional fusion feature vectors obtained in step S2 and their corresponding motor imagery class labels , to form a feature-label dataset, as follows: ; wherein, is the total number of samples; the dataset is randomly divided into training set , validation set , test set for training, parameter optimization and performance testing of the classifier; Step S32, classifier initialization and transfer learning; Step S33, adaptive regularization training: using the adaptive regularization mechanism, the penalty coefficient B of the IL-SVM classifier is dynamically adjusted, the complexity and classification accuracy of the classifier are adaptively balanced according to the classification error of the sample in the training process, overfitting is avoided, and the adaptability to signal time variation is improved.

8. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 7, characterized in that, In step S32, the specific process of classifier initialization and transfer learning is as follows: Step S321, initialize IL-SVM classifier: based on the traditional SVM classifier, introduce kernel function lightweight improvement, use mixed kernel function of linear kernel function and radial basis kernel function RBF, consider classification accuracy and calculation efficiency; Mixed kernel function As follows: ; wherein, is a mixing weight; is a bandwidth parameter of the RBF kernel function; is the Euclidean distance; Step S322, migration learning initialization: collect the motor imagery EEG feature dataset of different users as the source domain dataset , using the source domain dataset , pre-training the IL-SVM classifier to obtain pre-training model parameters, specifically including the mixed kernel function parameters α, γ and the penalty coefficient B of the SVM; migrating the pre-training model parameters as initial parameters to the current user's classifier training, reducing the training sample size requirement of the current user, and improving the generalization ability and convergence speed of the classifier.

9. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 8, characterized in that, In step S33, the specific process of adaptive regularization training is as follows: Step S331, define the objective function: the objective function of the IL-SVM classifier is as follows: ; Constraints: , , i = 1, 2,..., ; wherein, is a normal vector to the classification hyperplane; is a bias term; is a slack variable to allow a small amount of misclassification; is an adaptive penalty coefficient at iteration t; is a feature map corresponding to the hybrid kernel function; Step S332, adaptive penalty coefficient update: The update mode of the update mode is as follows: ; wherein, is an initial penalty coefficient; is a decay coefficient; is a training set classification error rate at iteration t; is a maximum allowed error rate; Step S333, classifier training: using sequence minimum optimization (SMO) algorithm, solving the objective function to obtain optimal classification hyperplane parameters ; in the training process, every 10 iterations, using the validation set to calculate the classification accuracy, when the validation set classification accuracy does not improve for 5 consecutive iterations, stop training, and obtain the optimal IL-SVM classifier model.

10. The electroencephalogram (EEG) signal-based motor imagery brain-computer interface adaptive classification method according to claim 9, characterized in that, In step S4, the specific process of motor imagination EEG signal classification and adaptive update is as follows: Step S41, Real-time Classification: The input into the IL-SVM classifier, the classification decision function is calculated as follows: ; wherein, is a symbol function, according to the value of ; Step S42, classification result verification: calculate the confidence of the real-time classification result, and the confidence is calculated as the absolute value of the output value of the classification decision function, as follows: ; When Conf ≥ θ, it is determined that the classification result is valid, and the classification label is output When Conf < θ, it is determined that the classification result is invalid, the classification label is not output, and the sample real-time fusion feature vector and the temporary classification label are added to the incremental training sample set; wherein θ is a confidence threshold, and the value range is 0.5-0.

8. Step S43, online adaptive update: when the number of samples in the incremental training sample set reaches a preset threshold, the incremental SMO algorithm is used to update the classification hyperplane parameters In combination, the IL-SVM classifier is incrementally trained, and the classification hyperplane parameters are updated ; at the same time, the mean value of the standardized EEG signal is recalculated , and the standard deviation is updated; the standardization parameters of step S15 are updated; the basis function of the wavelet packet decomposition and the number of decomposition layers are adjusted, and the time-frequency domain joint feature extraction parameters of step S22 are updated; through online adaptive update, the classification method is real-time adapted to the time-varying nature of the user's EEG signal, and high classification accuracy is continuously maintained.