Brain-computer interface cognitive state recognition method and system based on electroencephalogram signals

By removing artifacts through artifact prediction adaptive filtering and the ICA-IVA algorithm, and combining CWT-PSD feature extraction and CNN-LSTM model, the problems of insufficient preprocessing and feature extraction of EEG signals are solved, and high-precision, lightweight brain-computer interface cognitive state recognition is achieved.

CN121834472APending 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 brain-computer interface cognitive state recognition methods based on EEG signals suffer from poor signal preprocessing, insufficient feature extraction discrimination, and poor classification model practicality, making it difficult to meet the application requirements of high precision, high real-time performance, and ease of implementation.

Method used

Signal preprocessing is performed using an artifact prediction-based adaptive fusion filtering algorithm, and artifact removal is achieved by combining the ICA-IVA fusion artifact removal algorithm. Multi-domain features are extracted using CWT-PSD time-frequency-frequency domain fusion feature extraction technology, and an improved CNN-LSTM hybrid model is constructed for classification to realize cognitive state recognition.

Benefits of technology

It achieves high signal purity, good feature discrimination, and lightweight model, improving recognition accuracy and real-time performance. It solves the problems of incomplete signal preprocessing, insufficient feature extraction, and complex models in existing technologies, and is suitable for high-precision recognition in small sample scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121834472A_ABST
    Figure CN121834472A_ABST
Patent Text Reader

Abstract

The invention discloses a brain-computer interface cognitive state recognition method and system based on an electroencephalogram signal, and relates to the technical field of brain-computer interface and electroencephalogram signal processing.The method comprises the steps that a tested EEG signal is collected, an electro-oculogram signal is synchronously collected, and a cognitive state label is recorded; then rough filtering and fine filtering of the signals are completed through an artifact pre-judgment type self-adaptive fusion filtering algorithm, electro-oculogram and myoelectricity artifacts are removed in combination with an artifact removing algorithm, pure discrete EEG signal segments are obtained through sliding window segmentation and standardization, and then feature extraction is conducted to obtain a core feature set; an improved hybrid model is constructed, a cognitive state classification model is obtained after AdamW optimization and lightweight processing, and brain-computer interface cognitive state recognition is realized by adopting the cognitive state classification model. According to the method, high-precision and high-real-time recognition of the cognitive state is achieved, the anti-interference capacity is high, generalization is good, and the method can be widely applied to the brain-computer interface related fields such as medical rehabilitation and human-computer interaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of brain-computer interface (BCI) and electroencephalography (EEG) signal processing technology, and in particular to a brain-computer interface cognitive state recognition method and system based on EEG signals. Background Technology

[0002] Brain-computer interface (BCI) is a technology that enables direct information exchange and control between the brain and external devices without relying on peripheral nerves and muscle tissue. Its core is to collect and process physiological signals generated by brain activity, decode the body's cognitive state or control intentions, and then translate these into control commands to drive external devices. This provides crucial technical support for rehabilitation training for patients with physical disabilities and human-computer interaction in special scenarios. Among numerous brain physiological signals, electroencephalography (EEG) signals have become the most commonly used core signal source in the field of cognitive state recognition in BCI due to their advantages such as convenient acquisition, high temporal resolution, and real-time reflection of changes in brain cognitive activity.

[0003] Currently, brain-computer interface (BCI) cognitive state recognition methods based on EEG signals have been researched and applied to some extent. Their conventional technical process mainly includes EEG signal acquisition, signal preprocessing, feature extraction, feature dimensionality reduction, classification modeling, real-time decoding, and control output. However, existing BCI cognitive state recognition methods based on EEG signals still suffer from many shortcomings in practical applications, such as poor signal preprocessing performance, insufficient feature extraction discrimination, and poor practicality of classification models, making it difficult to meet the application requirements of high precision, high real-time performance, and ease of implementation.

[0004] To address these issues, there is an urgent need for a brain-computer interface method and system for recognizing cognitive states based on electroencephalogram (EEG) signals. Summary of the Invention

[0005] To address the aforementioned issues, this application proposes a brain-computer interface cognitive state recognition method and system based on electroencephalogram (EEG) signals, aiming to solve the technical problems of incomplete artifact removal, poor real-time performance, complex models, and insufficient accuracy in existing methods.

[0006] On the one hand, this application proposes a brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals, comprising the following steps: S1. Acquire raw electroencephalogram (EEG) signals in the EEG acquisition device, simultaneously acquire electrooculogram (EOG) signals and record the cognitive state labels of the subjects to obtain raw EEG signals with cognitive state labels and synchronous EOG signals. S2. Preprocess the original EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: A pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction to filter out DC drift, high-frequency interference and residual noise in the passband. Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography and electromyography artifacts. After repairing bad channels, the segmentation and Z-score standardization are performed by fixed sliding window. S3. The CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the time domain sample entropy and spatial domain channel power difference are extracted as auxiliary features and integrated to obtain the original feature set. S4. Perform feature selection and dimensionality reduction on the initial feature set to obtain the core feature set; S5. Construct an improved CNN-LSTM hybrid model. Based on the core feature set and corresponding cognitive state labels, perform classification modeling and training on the improved hybrid model to obtain a cognitive state classification model. S6. A cognitive state classification model is used to realize the recognition of cognitive states in brain-computer interfaces.

[0007] Preferably, the pseudo-trace prediction adaptive fusion filtering algorithm in S2 includes a pseudo-trace prediction improved filtering frequency response expression and a dynamic adaptive fusion output expression; The expression for the frequency response of the artifact prediction-based improved filter is: ; in, As a factor for predicting artifacts, The attenuation coefficient is... The angular frequency of the input signal. Where ω is the cutoff angular frequency, and n is the filter order. The square of the frequency response amplitude of the improved filter for artifact prediction; Dynamic adaptive fusion output expression: ; in, This is the filtering smoothing correction factor. The output of the improved filter for artifact prediction is the coarse filter result. The output of wavelet packet filtering is the fine-filtering result. This is the final output signal after fusion filtering.

[0008] Preferably, in S2, a pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction, and the specific content of filtering out DC drift, high-frequency interference and residual clutter in the passband is as follows: Based on the synchronously acquired EOG signal, the proportion of artifacts in the original EEG signal is calculated through preliminary detection using the ICA-IVA fusion artifact removal algorithm, and then the artifact prediction factor is determined. By substituting the artifact prediction factor, attenuation coefficient, filter order, and cutoff angular frequency into the improved filter frequency response expression of the artifact prediction type, the original EEG signal is filtered to remove DC drift and high-frequency interference, resulting in a coarsely filtered signal. A wavelet packet filtering algorithm based on db4 wavelet basis and 3-level decomposition is used to finely filter the coarsely filtered signal, removing residual noise in the passband to obtain the finely filtered signal. By setting a filtering smoothing correction factor and calculating the pure EEG signal after fusion filtering based on the dynamic adaptive fusion output formula, the pure EEG signal after fusion filtering is obtained.

[0009] Preferably, the method of separating and removing electrooculography (EOG) and electromyography (EMG) artifacts based on synchronous EOG signals using the ICA-IVA fusion artifact removal algorithm, repairing bad channels, and then performing fixed sliding window segmentation and Z-score normalization processing are as follows: Using the EOG signal synchronously acquired by S1 as a reference, the independent components in the original EEG signal are separated by the ICA-IVA fusion artifact removal algorithm; By combining Pearson correlation analysis, the electrooculography artifacts that are strongly correlated with the EOG signal are removed, and the high-amplitude and high-frequency artifacts generated by electromyography are separated and removed, and the preliminarily artifact-free EEG signal is reconstructed. The noise percentage of each channel of the EEG signal after artifact removal is calculated. For bad channels with noise percentages exceeding the threshold, the adjacent channel interpolation method is used for repair. The repaired EEG signal is segmented using a fixed sliding window to convert the continuous EEG signal into discrete signal segments, with each segment corresponding to a unique cognitive state label. Z-score standardization was performed on all discrete signal segments to eliminate signal amplitude differences between different subjects and different channels, and to unify the feature scale.

[0010] Preferably, the CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments, converting the discrete EEG signal segments into time-frequency maps and calculating the relative power and power ratio of each EEG rhythm. Using the db4 wavelet basis and a continuous wavelet transform with 3-level decomposition, time-frequency analysis is performed on each discrete EEG signal segment, transforming the one-dimensional time-domain EEG signal into a two-dimensional time-frequency plot. The horizontal axis of the time-frequency plot represents time, the vertical axis represents frequency, and the amplitude represents signal energy, thus fully preserving the time-varying frequency domain characteristics of the signal. Based on the time-frequency graph after CWT conversion, the power spectral density was calculated using the Welch method, and the power characteristics of five types of EEG rhythms were extracted to calculate the absolute power of each type of rhythm. The relative power of each rhythm is calculated, and the key power ratios, including the power ratio reflecting the degree of fatigue and the power ratio reflecting the degree of focus, are calculated as key frequency domain features related to cognitive states.

[0011] Preferably, the temporal sample entropy and spatial channel power difference are extracted as auxiliary features, and the specific contents of the initial feature set after integration are as follows: For each discrete EEG signal segment, the temporal sample entropy is calculated to quantify the complexity of the EEG signal. The change in sample entropy value is significantly correlated with cognitive state. The average power of the four core brain regions—prefrontal, central, parietal, and occipital—in the 32-channel EEG signal was calculated. Then, the power difference between the brain regions and the power mean and standard deviation of all channels were calculated to obtain the spatial channel power difference characteristics. The extracted time-frequency domain features, frequency domain power features, time-domain sample entropy features, and spatial domain channel power difference features are sequentially integrated into a complete feature vector. The feature vectors corresponding to all discrete EEG signal segments are then summarized to obtain the initial feature set.

[0012] Preferably, the improved CNN-LSTM hybrid model employs AdamW optimization, an early stopping strategy to prevent overfitting, and lightweight quantization processing, including: Input layer, CNN unit, LSTM unit, feature fusion layer, and output layer; The CNN unit is used to extract spatial features from the time-frequency map. It includes two 3×3 convolutional layers and one pooling layer. The first layer has 16 convolutional kernels and the second layer has 32 convolutional kernels. The LSTM unit is used to capture the temporal dependencies of EEG signals. It includes one hidden layer with 32-64 neurons. The forget gate, input gate, and output gate share a common set of basic weight matrices. The AdamW optimization algorithm is used for training, which combines early stopping and Dropout regularization (Dropout probability 0.3). Without introducing complex modules such as attention mechanism and Transformer, it can effectively prevent model overfitting, improve model generalization ability, adapt to small sample scenarios of BCI cognitive state recognition, and finally achieve the accuracy requirements of ≥92% for binary classification and ≥94% for tri-class classification.

[0013] On the other hand, this application proposes a brain-computer interface cognitive state recognition system based on electroencephalogram (EEG) signals, comprising: Data acquisition unit: Acquire raw EEG signals in the EEG acquisition instrument, simultaneously acquire electrooculogram signals and record the cognitive state labels of the subjects, and obtain raw EEG signals with cognitive state labels and synchronous EOG signals; Data processing unit: preprocesses the raw EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: A pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction to filter out DC drift, high-frequency interference and residual noise in the passband. Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography and electromyography artifacts. After repairing bad channels, the segmentation and Z-score standardization are performed by fixed sliding window. Feature extraction unit: CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the temporal sample entropy and spatial channel power difference are extracted as auxiliary features. After integration, the original feature set is obtained. Feature selection and dimensionality reduction processing are performed on the initial feature set to obtain the core feature set. Model training unit: Construct an improved CNN-LSTM hybrid model, and perform classification modeling and training on the improved hybrid model based on the core feature set and corresponding cognitive state labels to obtain a cognitive state classification model.

[0014] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the content of a brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals.

[0015] A storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the content of a brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals.

[0016] In summary, the brain-computer interface cognitive state recognition method and system based on electroencephalogram (EEG) signals of the present invention have the following advantages compared with traditional technologies: 1. Excellent signal preprocessing effect, thorough removal of artifacts and noise, and high signal purity. This application adopts a self-designed artifact prediction type adaptive fusion filtering algorithm, which introduces artifact prediction factor and smoothing correction factor, and dynamically adjusts the filtering parameters in combination with artifact characteristics to achieve coarse filtering and fine filtering linkage, effectively avoiding phase distortion of weak cognitive-related EEG signals, and thoroughly filtering out DC drift, high-frequency interference and residual noise in the passband, solving the problems of poor preprocessing effect and incomplete artifact removal in existing technologies.

[0017] 2. CWT-PSD time-frequency-frequency domain fusion feature extraction technology is adopted to convert EEG signals into time-frequency maps and calculate the relative power and key power ratio of each EEG rhythm. At the same time, time-domain sample entropy and spatial channel power differences are added as auxiliary features to achieve effective fusion of multi-domain features. No complex feature selection algorithm is required. The core features closely related to cognitive state can be retained by simply using variance thresholding. This reduces feature redundancy and improves the distinguishability between feature classes. It can accurately capture the differences in EEG neural representation under different cognitive states and solve the deficiency of insufficient feature distinguishability in existing technologies.

[0018] 3. Construct an improved CNN-LSTM hybrid model. By simplifying the structure of CNN and LSTM units, the number of parameters and computation are reduced, achieving model lightweighting. Combined with AdamW optimization algorithm, early stopping strategy and Dropout regularization, overfitting can be effectively avoided without complex modules, improving the model's generalization ability. It balances lightweighting and high accuracy, solving the problems of existing models being complex, having high inference latency or low accuracy and poor generalization.

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

[0020] Figure 1 This is a flowchart illustrating the steps of a brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to the present invention. Figure 2 This is a unit diagram of a brain-computer interface cognitive state recognition system based on electroencephalogram (EEG) signals according to the present invention. Detailed Implementation

[0021] The technical method of the present invention will be further described below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of this application.

[0022] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.

[0023] Techniques, systems, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, they should be considered part of the instruction manual.

[0024] In all the examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0025] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains.

[0026] Example 1 A brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals, such as Figure 1 As shown, it includes the following steps: S1. Acquire raw electroencephalogram (EEG) signals in an EEG acquisition device, simultaneously acquire electrooculogram (EOG) signals and record the subject's cognitive state labels to obtain raw EEG signals with cognitive state labels and synchronous EOG signals.

[0027] Specifically, a 32-channel EEG acquisition system was selected, and an adaptive sampling rate adjustment algorithm was used according to the international 10-20 electrode positioning system. The sampling rate (250–500 Hz) was dynamically adjusted based on the subject's state (resting / mild activity) to balance data quality and device power consumption. The signal resolution was fixed at 16 bits and the bandwidth at 0.5–70 Hz. Electrooculography (EOG) signals were acquired simultaneously for subsequent artifact separation, and continuous EEG signals were acquired (15–20 min per session). A label smoothing algorithm was used to preprocess cognitive state labels to mitigate labeling bias. The subject's cognitive state labels were recorded simultaneously, and finally, the raw EEG signal with cognitive state labels and the synchronous EOG signal were obtained, providing a basis for subsequent preprocessing.

[0028] S2. Preprocess the original EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: An ad hoc adaptive fusion filtering algorithm based on pseudo-trace prediction is used to perform coarse and fine filtering in conjunction to remove DC drift, high-frequency interference and residual noise in the passband.

[0029] Understandably, by using the artifact prediction factor, filtering and subsequent artifact removal algorithms are linked in advance. The stronger the artifact (the larger the artifact prediction factor), the greater the weight of fine filtering of wavelet packets and the smaller the weight of coarse filtering. At the same time, the high-frequency components corresponding to the artifact are suppressed by the exponential term. The filtering smoothing correction factor avoids weight imbalance and ensures that the filtered signal not only removes noise artifacts but also retains weak cognitive signals such as rhythm, thus achieving better preprocessing results.

[0030] Furthermore, the pseudo-trace prediction adaptive fusion filtering algorithm in S2 includes a pseudo-trace prediction improved filtering frequency response expression and a dynamic adaptive fusion output expression; The expression for the frequency response of the artifact prediction-based improved filter is: ; in, The artifact prediction factor (0≤β≤1) is calculated from the proportion of artifacts initially detected by the ICA-IVA algorithm (the higher the proportion of artifacts, the closer β is to 1), and is used to dynamically adapt the artifact strength. The attenuation coefficient is 0.92 (optimized based on EEG signal characteristics, unlike the original fixed 0.9). The angular frequency of the input signal. ω is the cutoff angular frequency (0.5~70 Hz), and n is the filter order (4th order). The square of the frequency response amplitude of the artifact prediction improved filter is the core characterization of the filtering algorithm's attenuation capability for signals of different frequencies. The larger the value, the better the preservation effect of the corresponding frequency signal. j is the imaginary unit.

[0031] Dynamic adaptive fusion output expression: ; in, This is a filter smoothing correction factor (value ranging from 0.05 to 0.1), used to balance filtering accuracy and signal distortion, avoiding over-filtering that could lead to the loss of weak cognitively relevant signals. This is the output of the improved filter for artifact prediction (coarse filter result). This is the output of wavelet packet filtering (fine filtering result). This is the final output signal after fusion filtering.

[0032] Furthermore, S2 employs a pseudo-trace prediction-type adaptive fusion filtering algorithm for coarse and fine filtering in conjunction with other methods. The specific details of filtering out DC drift, high-frequency interference, and residual clutter within the passband are as follows: Based on the synchronously acquired EOG signal, the proportion of artifacts in the original EEG signal is calculated through preliminary detection using the ICA-IVA fusion artifact removal algorithm, thereby determining the artifact prediction factor.

[0033] By substituting the artifact prediction factor, attenuation coefficient, filter order, and cutoff angular frequency into the improved filter frequency response expression for artifact prediction, the original EEG signal is filtered to remove DC drift and high-frequency interference, resulting in a coarsely filtered signal.

[0034] A wavelet packet filtering algorithm based on db4 wavelet basis and 3-level decomposition is used to finely filter the coarsely filtered signal, removing residual noise in the passband to obtain the finely filtered signal.

[0035] By setting a filtering smoothing correction factor and calculating the pure EEG signal after fusion filtering based on the dynamic adaptive fusion output formula, the pure EEG signal after fusion filtering is obtained.

[0036] Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove EOG and EMG artifacts. After repairing bad channels, the signal is segmented by a fixed sliding window and normalized by Z-score.

[0037] Furthermore, based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography (EOG) and electromyography (EMG) artifacts. After repairing bad channels, the specific details of fixed sliding window segmentation and Z-score normalization are as follows: Using the EOG signal synchronously acquired by S1 as a reference, the independent components in the original EEG signal are separated by the ICA-IVA fusion artifact removal algorithm.

[0038] By combining Pearson correlation analysis (correlation coefficient > 0.7), the EEG artifacts strongly correlated with the EOG signal were removed, and the high-amplitude, high-frequency artifacts generated by electromyography were separated and removed, and the preliminarily artifact-free EEG signal was reconstructed.

[0039] The noise percentage of each channel of the EEG signal after artifact removal is calculated. For bad channels with a noise percentage >30%, the adjacent channel interpolation method is used for repair to ensure the data integrity of each channel of the EEG signal.

[0040] The repaired EEG signal was segmented using a fixed sliding window with a window length of 3s and a step size of 0.8s, converting the continuous EEG signal into discrete signal segments, each segment corresponding to a unique cognitive state label.

[0041] Z-score standardization is performed on all discrete signal segments to eliminate signal amplitude differences between different subjects and different channels, unify feature scale, and ensure the accuracy of subsequent feature extraction.

[0042] S3. The CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the temporal sample entropy and spatial channel power difference are extracted as auxiliary features and integrated to obtain the original feature set.

[0043] Furthermore, CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments, converting the discrete EEG signal segments into time-frequency maps and calculating the relative power and power ratio of each EEG rhythm. Time-frequency domain feature extraction: Using the db4 wavelet basis and 3-level decomposition continuous wavelet transform (CWT), time-frequency analysis is performed on each discrete EEG signal segment, transforming the one-dimensional time-domain EEG signal into a two-dimensional time-frequency graph. The horizontal axis of the time-frequency graph represents time (corresponding to a 3-second signal segment), the vertical axis represents frequency (0.5–70Hz), and the amplitude represents signal energy, thus fully preserving the time-varying frequency domain characteristics of the signal.

[0044] Frequency domain power feature calculation: Based on the time-frequency plot after CWT conversion, the Welch method was used to calculate the power spectral density (PSD), and the power features of five types of EEG rhythms were extracted. Rhythm (0.5–4Hz), Rhythm (4–8 Hz) Rhythm (8–13 Hz) Rhythm (13–30 Hz) Rhythms (30–70 Hz), calculate the absolute power for each type of rhythm.

[0045] The relative power of each rhythm is obtained by dividing the absolute power of a specific rhythm by the sum of the absolute powers of all rhythms. Simultaneously, the critical power ratio is calculated, including... (Reflects the degree of fatigue) The ratio of two types of core power (reflecting the level of focus) serves as a key frequency domain feature related to cognitive states.

[0046] Furthermore, temporal sample entropy and spatial channel power differences are extracted as auxiliary features, and the integrated features yield the following initial feature set: Temporal-domain assisted feature extraction: For each discrete EEG signal segment, calculate the temporal sample entropy (embedding dimension m=2, similarity tolerance r=0.2). The standard deviation of the signal is used to quantify the complexity of the EEG signal. The change in sample entropy value is significantly correlated with cognitive state (focus / distraction / fatigue).

[0047] Spatial-assisted feature extraction: The average power of the four core brain regions—prefrontal, central, parietal, and occipital—in the 32-channel EEG signal is calculated. Then, the power difference between the brain regions and the power mean and standard deviation of all channels are calculated to obtain the spatial channel power difference features, which reflect the activation differences of each brain region under different cognitive states.

[0048] Feature integration: The extracted time-frequency domain features (time-frequency plot feature vector), frequency domain power features (relative power of 5 types of rhythms and power ratio of 2 types), time-domain sample entropy features, and spatial domain channel power difference features are integrated into a complete feature vector in sequence. After summing the feature vectors corresponding to all discrete EEG signal segments, an initial feature set covering cognitive-related neural representations is obtained.

[0049] S4. Perform feature selection and dimensionality reduction on the initial feature set to obtain the core feature set.

[0050] S5. Construct an improved CNN-LSTM hybrid model. Based on the core feature set and corresponding cognitive state labels, perform classification modeling and training on the improved hybrid model to obtain a cognitive state classification model.

[0051] Furthermore, the improved CNN-LSTM hybrid model employs AdamW optimization, an early stopping strategy to prevent overfitting, and lightweight quantization processing, including: The system consists of an input layer, CNN units, LSTM units, a feature fusion layer, and an output layer.

[0052] CNN units are used to extract spatial features from time-frequency maps, including 2 layers and 360p layers. It has 3 convolutional layers and 1 pooling layer. The first convolutional layer has 16 kernels and the second convolutional layer has 32 kernels.

[0053] The LSTM unit is used to capture the temporal dependencies of EEG signals. It includes one hidden layer with 32-64 neurons. The forget gate, input gate, and output gate share a common set of basic weight matrices.

[0054] The AdamW optimization algorithm is used for training, which combines early stopping strategy and Dropout regularization (Dropout probability 0.3). Without introducing complex modules such as attention mechanism and Transformer, it can effectively prevent model overfitting, improve model generalization ability, adapt to small sample scenarios of BCI cognitive state recognition, and finally achieve the accuracy requirements of ≥92% for binary classification and ≥94% for tri-class classification.

[0055] S6. A cognitive state classification model is used to realize the recognition of cognitive states in brain-computer interfaces.

[0056] Example 2 A brain-computer interface cognitive state recognition system based on electroencephalogram (EEG) signals, such as Figure 2 As shown, it includes: Data acquisition unit: Acquire raw EEG signals in the EEG acquisition instrument, simultaneously acquire electrooculogram signals and record the cognitive state labels of the subjects, and obtain raw EEG signals with cognitive state labels and synchronous EOG signals; Data processing unit: preprocesses the raw EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: A pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction to filter out DC drift, high-frequency interference and residual noise in the passband. Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography and electromyography artifacts. After repairing bad channels, the segmentation and Z-score standardization are performed by fixed sliding window. Feature extraction unit: CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the temporal sample entropy and spatial channel power difference are extracted as auxiliary features. After integration, the original feature set is obtained. Feature selection and dimensionality reduction processing are performed on the initial feature set to obtain the core feature set. Model training unit: Construct an improved CNN-LSTM hybrid model, and perform classification modeling and training on the improved hybrid model based on the core feature set and corresponding cognitive state labels to obtain a cognitive state classification model.

[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical methods 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 methods of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical methods to deviate from the spirit and scope of the technical methods of the present invention.

Claims

1. A brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals, characterized in that, Includes the following steps: S1. Acquire raw electroencephalogram (EEG) signals in the EEG acquisition device, simultaneously acquire electrooculogram (EOG) signals and record the cognitive state labels of the subjects to obtain raw EEG signals with cognitive state labels and synchronous EOG signals. S2. Preprocess the original EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: A pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction to filter out DC drift, high-frequency interference and residual noise in the passband. Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography and electromyography artifacts. After repairing bad channels, the segmentation and Z-score standardization are performed by fixed sliding window. S3. The CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the time domain sample entropy and spatial domain channel power difference are extracted as auxiliary features and integrated to obtain the initial feature set. S4. Perform feature selection and dimensionality reduction on the initial feature set to obtain the core feature set; S5. Construct an improved CNN-LSTM hybrid model. Based on the core feature set and corresponding cognitive state labels, perform classification modeling and training on the improved hybrid model to obtain a cognitive state classification model. S6. A cognitive state classification model is used to realize the recognition of cognitive states in brain-computer interfaces.

2. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 1, characterized in that, The S2 pseudo-trace prediction type adaptive fusion filtering algorithm includes a pseudo-trace prediction type improved filtering frequency response expression and a dynamic adaptive fusion output expression; The expression for the frequency response of the artifact prediction-based improved filter is: ; in, As a factor for predicting artifacts, The attenuation coefficient is... The input signal angular frequency, Where ω is the cutoff angular frequency, and n is the filter order. The square of the frequency response amplitude of the improved filter for artifact prediction; Dynamic adaptive fusion output expression: ; in, This is the filtering smoothing correction factor. The output of the improved filter for artifact prediction is the coarse filter result. The output of wavelet packet filtering is the fine-filtering result. This is the final output signal after fusion filtering.

3. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 2, characterized in that, S2 employs a pseudo-trace prediction-based adaptive fusion filtering algorithm for combined coarse and fine filtering, specifically filtering out DC drift, high-frequency interference, and residual clutter in the passband. Based on the synchronously acquired EOG signal, the proportion of artifacts in the original EEG signal is calculated through preliminary detection using the ICA-IVA fusion artifact removal algorithm, and then the artifact prediction factor is determined. By substituting the artifact prediction factor, attenuation coefficient, filter order, and cutoff angular frequency into the improved filter frequency response expression of the artifact prediction type, the original EEG signal is filtered to remove DC drift and high-frequency interference, resulting in a coarsely filtered signal. A wavelet packet filtering algorithm based on db4 wavelet basis and 3-level decomposition is used to finely filter the coarsely filtered signal, removing residual noise in the passband to obtain the finely filtered signal. By setting a filtering smoothing correction factor and calculating the pure EEG signal after fusion filtering based on the dynamic adaptive fusion output formula, the pure EEG signal after fusion filtering is obtained.

4. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 3, characterized in that, Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove EOG and EMG artifacts. After repairing bad channels, the specific details of fixed sliding window segmentation and Z-score normalization are as follows: Using the EOG signal synchronously acquired by S1 as a reference, the independent components in the original EEG signal are separated by the ICA-IVA fusion artifact removal algorithm; By combining Pearson correlation analysis, the electrooculography artifacts that are strongly correlated with the EOG signal are removed, and the high-amplitude and high-frequency artifacts generated by electromyography are separated and removed, and the preliminarily artifact-free EEG signal is reconstructed. The noise percentage of each channel of the EEG signal after artifact removal is calculated. For bad channels with noise percentages exceeding the threshold, the adjacent channel interpolation method is used for repair. The repaired EEG signal is segmented using a fixed sliding window to convert the continuous EEG signal into discrete signal segments, with each segment corresponding to a unique cognitive state label. Z-score standardization was performed on all discrete signal segments to eliminate signal amplitude differences between different subjects and different channels, and to unify the feature scale.

5. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 4, characterized in that, The CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments, converting the discrete EEG signal segments into time-frequency maps and calculating the relative power and power ratio of each EEG rhythm. Using the db4 wavelet basis and a continuous wavelet transform with 3-level decomposition, time-frequency analysis is performed on each discrete EEG signal segment, transforming the one-dimensional time-domain EEG signal into a two-dimensional time-frequency plot. The horizontal axis of the time-frequency plot represents time, the vertical axis represents frequency, and the amplitude represents signal energy, thus fully preserving the time-varying frequency domain characteristics of the signal. Based on the time-frequency graph after CWT conversion, the power spectral density was calculated using the Welch method, and the power characteristics of five types of EEG rhythms were extracted to calculate the absolute power of each type of rhythm. The relative power of each rhythm is calculated, and the key power ratios, including the power ratio reflecting the degree of fatigue and the power ratio reflecting the degree of focus, are calculated as key frequency domain features related to cognitive states.

6. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 5, characterized in that, The temporal sample entropy and spatial channel power difference are extracted as auxiliary features, and the integrated features yield the following initial feature set: For each discrete EEG signal segment, the temporal sample entropy is calculated to quantify the complexity of the EEG signal. The change in sample entropy value is significantly correlated with cognitive state. The average power of the four core brain regions—prefrontal, central, parietal, and occipital—in the EEG signal is calculated. Then, the power difference between the brain regions and the power mean and standard deviation of all channels are calculated to obtain the spatial channel power difference characteristics. The extracted time-frequency domain features, frequency domain power features, time-domain sample entropy features, and spatial domain channel power difference features are sequentially integrated into a complete feature vector. The feature vectors corresponding to all discrete EEG signal segments are then summarized to obtain the initial feature set.

7. The brain-computer interface cognitive state recognition method based on electroencephalogram (EEG) signals according to claim 6, characterized in that, The improved CNN-LSTM hybrid model employs AdamW optimization, an early stopping strategy to prevent overfitting, and lightweight quantization processing, including: Input layer, CNN unit, LSTM unit, feature fusion layer, and output layer; The CNN unit is used to extract spatial features from the time-frequency map. It includes two 3×3 convolutional layers and one pooling layer. The first layer has 16 convolutional kernels and the second layer has 32 convolutional kernels. The LSTM unit is used to capture the temporal dependencies of EEG signals. It includes one hidden layer with 32-64 neurons. The forget gate, input gate, and output gate share a common set of basic weight matrices. The AdamW optimization algorithm is used, combined with early stopping strategy and Dropout regularization for training to prevent model overfitting, improve model generalization ability, and adapt to small sample scenarios of BCI cognitive state recognition.

8. A brain-computer interface cognitive state recognition system based on electroencephalogram (EEG) signals, used to implement the brain-computer interface cognitive state recognition method based on EEG signals as described in any one of claims 1 to 7, characterized in that, include: Data acquisition unit: Acquire raw EEG signals in the EEG acquisition instrument, simultaneously acquire electrooculogram signals and record the cognitive state labels of the subjects, and obtain raw EEG signals with cognitive state labels and synchronous EOG signals; Data processing unit: preprocesses the raw EEG signal and the synchronous EOG signal to obtain discrete EEG signal segments. The preprocessing includes: A pseudo-trace prediction type adaptive fusion filtering algorithm is used to perform coarse and fine filtering in conjunction to filter out DC drift, high-frequency interference and residual noise in the passband. Based on the synchronous EOG signal, the ICA-IVA fusion artifact removal algorithm is used to separate and remove electrooculography and electromyography artifacts. After repairing bad channels, the segmentation and Z-score standardization are performed by fixed sliding window. Feature extraction unit: CWT-PSD time-frequency-frequency domain fusion feature extraction technology is used to extract multi-domain features from discrete EEG signal segments. The discrete EEG signal segments are converted into time-frequency maps and the relative power and power ratio of each EEG rhythm are calculated. At the same time, the temporal sample entropy and spatial channel power difference are extracted as auxiliary features. After integration, the original feature set is obtained. Feature selection and dimensionality reduction processing are performed on the initial feature set to obtain the core feature set. Model training unit: Construct an improved CNN-LSTM hybrid model, and perform classification modeling and training on the improved hybrid model based on the core feature set and corresponding cognitive state labels to obtain a cognitive state classification model.

9. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the content of the brain-computer interface cognitive state recognition method based on electroencephalogram signals as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the brain-computer interface cognitive state recognition method based on electroencephalogram signals as described in any one of claims 1 to 7.