EEG fatigue recognition method and model based on frequency domain adaptive convolution and efficient attention

By combining frequency-domain adaptive convolution with an efficient attention mechanism, the problems of homogenization in frequency band processing and over-smoothing of features in EEG fatigue detection are solved, achieving accurate extraction and stable classification, and improving the model's generalization ability and detection accuracy.

CN122174050APending Publication Date: 2026-06-09CHONGQING UNIV OF POSTS & TELECOMM

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV OF POSTS & TELECOMM
Filing Date
2026-03-18
Publication Date
2026-06-09

Smart Images

  • Figure CN122174050A_ABST
    Figure CN122174050A_ABST
Patent Text Reader

Abstract

The application provides an EEG fatigue recognition method and model based on a frequency domain adaptive convolution and an efficient attention, the method comprises the following steps: adopting a frequency domain adaptive convolution to extract characteristics of each frequency band EEG signal, obtaining fused multi-band features, adopting an efficient attention mechanism to perform residual calculation on the fused multi-band features, obtaining residual fusion characteristics, providing frequency band specificity input for residual fusion characteristic calculation through EEG signal decomposition and multi-band feature extraction, and filtering irrelevant noise; the residual fusion characteristic calculation gives global-local weights to the multi-band features, and strengthens a fatigue key mode, and the application utilizes frequency band specificity, accurately extracts each band signal, and ensures that high-precision detection results can be stably obtained in an actual environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of EEG signal processing technology, and in particular to an EEG fatigue recognition method based on frequency domain adaptive convolution and efficient attention, which can be applied to scenarios such as vehicle safety systems, driver state detection, EEG physiological signal analysis and intelligent driving assistance. Background Technology

[0002] Driver fatigue is one of the core causes of traffic accidents. Studies have shown that nearly 50% of drivers have experienced varying degrees of fatigue while driving, and fatigue-related collisions account for 20%-30% of all accidents. Therefore, developing accurate and reliable driver fatigue detection technology is of great significance for ensuring traffic safety.

[0003] Current driver fatigue detection technologies are mainly divided into two categories: behavioral monitoring and physiological signal monitoring.

[0004] Behavioral monitoring technology: This technology uses cameras to capture driver facial expressions (such as eyelid closure and yawning frequency) or vehicle control behaviors (such as lane departure and speed fluctuations) to determine fatigue. For example, eye-tracking monitoring based on the percentage of time the eyelids are closed per unit of time (PERCLOS) is a commonly used behavioral assessment indicator in the industry. However, this type of technology is easily affected by lighting, occlusion (such as wearing sunglasses), and driving environment (such as vehicle shaking caused by bumpy roads), and lacks robustness in complex scenarios.

[0005] Physiological signal monitoring technology: This technology analyzes fatigue status by collecting physiological signals from drivers (such as EEG, ECG, and EMG). Among these, EEG signals are considered the most reliable physiological indicator of fatigue because they directly reflect brain neural activity and have high temporal resolution (down to the millisecond level). EEG signals contain five characteristic frequency bands: δ (1-4Hz), θ (4-8Hz), α (8-14Hz), β (14-31Hz), and γ (31-51Hz). Studies have confirmed that under fatigue conditions, the power of δ / θ waves in the frontal lobe increases significantly (reflecting decreased cortical excitability), the power of α waves in the parietal lobe decreases and shifts to the frontal lobe (reflecting sensory processing disorder), and the power of β / γ waves is suppressed (reflecting decreased cognitive arousal). These frequency band changes are the core physiological basis for fatigue detection.

[0006] To extract fatigue features from EEG signals, existing techniques can be divided into traditional signal processing methods and deep learning methods:

[0007] Traditional signal processing methods rely on manually designed features, extracting frequency band power features through Fast Fourier Transform (FFT), Short-Time Fourier Transform (STFT), and Power Spectral Density (PSD), or achieving multi-scale signal decomposition through Discrete Wavelet Transform (DWT), and then quantifying EEG complexity by combining entropy values ​​(such as sample entropy and approximate entropy). However, these methods require extensive manual preprocessing, have poor feature generalization, and are prone to overfitting when dealing with large-scale EEG data.

[0008] The deep learning methods mentioned above have become mainstream due to their end-to-end feature learning capabilities, and mainly include the following directions:

[0009] Convolutional Neural Network (CNN) models, such as EEGNet, use depthwise separable convolutions to extract EEG spatiotemporal features. Although this achieves model lightweighting, the use of a uniform fixed convolution kernel to process full-band signals makes it unable to adapt to the different time scales of δ / θ waves (slow dynamics) and β / γ waves (fast dynamics), resulting in insufficient extraction of frequency band-specific fatigue features.

[0010] Attention-enhancing networks, such as LMDA, enhance salient features through multidimensional attention mechanisms, but still use a shared attention module to process all frequency bands. They cannot prioritize capturing the dynamic changes of key fatigue frequency bands (such as frontal theta waves), and their F1-score on the SADT dataset is only 86.36%.

[0011] Transformer / Hybrid Models: Models like Conformer combine convolution and Transformer to model the global context, but use a unified self-attention mechanism to process features across all frequency bands. This can easily lead to the loss of subtle fatigue features such as theta and alpha waves due to "overly smoothed features," and it is not optimized for differences in frequency band time scales. Its accuracy on the SADT dataset is 90.80%. While Deformer captures temporal information through layered Transformers, deep attention layers tend to accumulate redundant information, diluting fatigue features and resulting in a recall rate of only 81.85%.

[0012] Multimodal / multidimensional fusion models, such as SFT-Net and CSF-GTNet, fuse multimodal information through 4D feature tensors or ConvNeXt-BiLSTM. However, they focus on "spatiotemporal integration" after feature extraction and do not design differentiated processing mechanisms for the neurophysiological characteristics of each frequency band of EEG, such as slow δ-wave rhythm and fast γ-wave rhythm, during the feature extraction stage. As a result, frequency band information interference problems still exist.

[0013] In summary, the core flaw of existing deep learning methods lies in:

[0014] Homogenization of frequency band processing: Most models use a unified module, such as fixed convolution kernel and shared attention, to process all EEG frequency bands, ignoring the differences in time scale between different frequency bands. For example, delta waves require a large receptive field to capture slow dynamics, while gamma waves require a small kernel to capture fast fluctuations, resulting in inaccurate extraction of key frequency band features for fatigue.

[0015] Feature oversmoothing: The multiplicative self-attention mechanism of the traditional Transformer is prone to diluting subtle fatigue features such as theta waves and alpha waves due to "weight averaging". Especially in long-sequence EEG data, the variance of attention weights approaches zero, and key patterns such as frontal theta wave enhancement and parietal alpha wave suppression cannot be preserved.

[0016] Insufficient generalization: When the model is used across datasets (such as the 32 channels of SADT and the 17 channels of SEED-VIG) and across subjects, the performance fluctuates greatly because the neurophysiological priors of the EEG frequency band (such as the stable association between theta waves and fatigue) are not fully utilized. Summary of the Invention

[0017] To address the core shortcomings of existing EEG-based driver fatigue detection technologies, this invention provides an EEG fatigue recognition method based on frequency-domain adaptive convolution and efficient attention. The aim is to solve key technical problems in EEG fatigue recognition by designing the MB-STFormer model.

[0018] This invention provides an EEG fatigue recognition method based on frequency-domain adaptive convolution and efficient attention, such as... Figure 1 As shown, it includes:

[0019] Step S1: Decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band;

[0020] Step S2: Use frequency domain adaptive convolution to extract features from EEG signals of each frequency band to obtain fused multi-frequency band features;

[0021] Step S3: Use an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics;

[0022] Step S4: Input the residual fusion characteristics into the fully connected layer, classify them using Softmax, obtain the fatigue prediction probability, and identify the fatigue result using the fatigue prediction probability.

[0023] Furthermore, the step of using frequency-domain adaptive convolution to extract features from EEG signals of each frequency band to obtain fused multi-frequency band features includes:

[0024] Grouping 1D spatial convolution and frequency-adaptive temporal convolution are performed on EEG signals of each frequency band, and spatial and temporal dual-stage filtering is carried out to obtain the spatiotemporal characteristics of each frequency band. The spatiotemporal characteristics of each frequency band retain both spatial and temporal specificity.

[0025] Furthermore, the grouped 1D spatial convolution calculation includes:

[0026] Establish inter-channel spatial dependencies for each frequency band and obtain spatial features using grouped convolution;

[0027] Furthermore, the frequency-adaptive temporal convolution calculation includes: matching the spatial features with the time scale of each frequency band to obtain the spatiotemporal features of each frequency band;

[0028] Furthermore, the spatiotemporal characteristics of each frequency band are subjected to summation activation calculation to obtain fused multi-frequency band characteristics;

[0029] Furthermore, the method of employing an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain residual fusion characteristics includes:

[0030] S31: Linearly project the fused features into a query matrix;

[0031] S32: Multiply the query matrix by the learnable parameter vector to obtain the global attention query vector;

[0032] S33: The global query vector is generated by weighted sum of the global attention query vector and the attention weight, and the global query vector retains information about whole-brain fatigue.

[0033] S34: Element-wise computation is performed between the global query vector and the key matrix to obtain the global context;

[0034] S35: Calculate residual fusion characteristics using a fusion query matrix and global context.

[0035] Furthermore, the method of the present invention includes: calculating the loss value between the predicted probability and the true value using cross-entropy as the loss function, and adjusting the model parameters using the loss value through backpropagation.

[0036] This invention provides an EEG fatigue recognition model based on frequency-domain adaptive convolution and efficient attention, such as... Figure 2 As shown, it includes:

[0037] The EEG signal decomposition module is used to decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band.

[0038] The multi-band feature extraction module uses frequency domain adaptive convolution to extract features from EEG signals of each frequency band to obtain fused multi-band features.

[0039] The residual fusion characteristic calculation module uses an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics;

[0040] The fatigue discrimination module is used to input the residual fusion characteristics into the fully connected layer, and after Softmax classification, the fatigue prediction probability is obtained. The fatigue result is identified by the fatigue prediction probability.

[0041] Furthermore, the fatigue discrimination module also includes a prediction adjustment unit, which calculates the loss value between the predicted probability and the true value using cross-entropy as the loss function, and feeds the loss value back to the model's parameter correction module to adjust the model parameters.

[0042] This invention provides frequency-specific input for residual fusion characteristic calculation by decomposing and fusing multi-band features of EEG signals, filtering out irrelevant noise; the residual fusion characteristic calculation assigns global-local weights to multi-band features, enhancing key fatigue modes, especially theta wave enhancement and alpha wave suppression, with its frequency band contribution exceeding 40% under fatigue conditions; The frequency band primarily characterizes the awake state, contributing the most (approximately 35%) during wakefulness. It exhibits a significant dominant distribution in the occipital-parietal region, while its activity shifts and intensifies in the frontal region during fatigue. This invention achieves precise extraction, efficient fusion, and stable classification through a collaborative process, ensuring consistently high-precision detection results in real-world environments such as vehicle safety systems, driver status detection, EEG signal analysis, and intelligent driving assistance. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the implementation process of the EEG fatigue recognition method based on frequency domain adaptive convolution and efficient attention created by the present invention;

[0044] Figure 2 This is a schematic diagram of the implementation process of the EEG fatigue recognition model based on frequency domain adaptive convolution and efficient attention created by the present invention;

[0045] Figure 3 This is a schematic diagram of the process for calculating the residual fusion characteristics of this invention;

[0046] Figure 4 This is a schematic diagram of the structure of an embodiment of the MB-STFormer model created by this invention;

[0047] Figure 5 This is a schematic diagram of the structure of an embodiment of the present invention that uses an efficient attention mechanism to perform residual calculation on fused multi-band features;

[0048] Figure 6 This invention creates a heatmap of EEG frequency band feature contributions after processing by a multi-band feature extraction layer for conscious and fatigued states. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] This invention creates a multi-band spectral time-domain modeling framework and an efficient additive attention mechanism to accurately capture fatigue features of each frequency band and effectively preserve subtle features. At the same time, it improves the model's generalization ability across devices and subjects, providing a high-precision and robust EEG fatigue detection technology solution for intelligent driving safety monitoring.

[0051] according to Figure 4 The logical diagram of the MB-STFormer model, and the EEG fatigue recognition method based on frequency domain adaptive convolution and efficient attention of the present invention, include:

[0052] S1: Decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band.

[0053] Optionally, the original EEG signal is decomposed into 5 independent frequency bands by bandpass filtering. The corresponding frequencies of each band are: δ: 1-4Hz, θ: 4-8Hz, α: 8-14Hz, β: 14-31Hz, γ: 31-51Hz. Frequency band isolation is used to avoid interference between frequency band information.

[0054] ,

[0055] Where X represents the original EEG signal, The nth frequency band represents the EEG signal, where n=1,2,…,5 correspond to the δ, θ, α, β, and γ bands respectively. B represents the batch number, C represents the number of EEG channels, and T represents the time point.

[0056] S2: Frequency domain adaptive convolution is used to extract features from EEG signals of each frequency band to obtain fused multi-band features.

[0057] Based on the temporal scale differences of each frequency band in the original EEG signal, such as the slow dynamics of δ / θ waves and the fast fluctuations of β / γ waves, fatigue-specific neural features of each frequency band are extracted. Grouped 1D spatial convolution and frequency-adaptive temporal convolution are performed on the EEG signals of each frequency band, followed by spatial and temporal dual-stage filtering to obtain the spatiotemporal features of each frequency band. These spatiotemporal features simultaneously preserve both spatial and temporal specificity.

[0058] The grouped 1D spatial convolution calculation includes processing each frequency band. Establish spatial dependencies between channels, such as the spatial distribution differences between frontal theta waves and parietal alpha waves, and obtain spatial features using grouped convolution. Grouped convolution preserves frequency band independence, reducing computational complexity while retaining spatial specificity.

[0059] ,

[0060] in, This represents the nth output feature. This represents the i-th input feature. This represents the convolution weights between the nth output channel and the ith input channel. This represents the set of input group indices corresponding to the nth output. The summation operation represents weighted aggregation of features only within the corresponding group, thus achieving grouped convolution. Figure 4 The middle part is represented by S.

[0061] The frequency-adaptive temporal convolution calculation includes spatial features. Matching the time scales of each frequency band yields the spatiotemporal features T of each frequency band. n .

[0062] ,

[0063] in, The output feature is the convolution at the nth time step. This represents the input features that participate in the temporal convolution. This represents the temporal convolution weight corresponding to the nth output feature. Let represent the set of temporal convolution receptive field indices corresponding to the nth output. The summation operation represents the weighted aggregation of local features in the temporal dimension, thereby achieving temporal convolution. Figure 4 The Chinese character is represented as DT.

[0064] In this embodiment, differentiated temporal convolution kernels are configured for the time characteristics of each frequency band. The size of the temporal convolution kernel is halved as the frequency of the band increases, and each kernel is matched to the time scale of each frequency band.

[0065] Preferably, the temporal convolution kernel size is δ: 125, θ: 63, α: 31, β: 15, γ: 7, to ensure that the slow frequency band captures gradual dynamics and the fast frequency band captures instantaneous fluctuations.

[0066] Existing models generally use a unified module, such as fixed-size convolutional kernels and shared attention mechanisms to process EEG full-band signals. This cannot adapt to the slow dynamic characteristics of low-frequency bands such as delta waves and theta waves and the fast fluctuation characteristics of high-frequency bands such as beta waves and gamma waves. As a result, the extraction of specific neural features that are strongly correlated with fatigue in each frequency band is inaccurate, including the increase in theta wave power in the frontal lobe, the attenuation of alpha wave power in the parietal lobe and its transfer to the frontal lobe, and the suppression of beta wave power during fatigue.

[0067] However, this invention employs summation activation calculation to obtain the fused multi-band feature F based on the spatiotemporal characteristics of each frequency band. , where n is the sequence length and d is the feature dimension, preserves the independence of each frequency band, such as theta-wave frontal lobe enhancement and alpha-wave parietal lobe suppression, and captures cross-frequency band interactions, such as theta-β phase coupling, through nonlinear activation, thus avoiding information redundancy.

[0068] ,

[0069] in, This is the activation function for GaussianErrorLinearUnit (GELU).

[0070] S3: An efficient attention mechanism is used to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics, as illustrated in the following diagram. Figure 5 As shown.

[0071] This step addresses the issue of overly smooth features caused by the "weight averaging" of traditional Transformer multiplicative self-attention by employing a low-complexity additive attention mechanism to collaboratively preserve both global context and subtle local features.

[0072] This step is implemented in detail, as follows: Figure 3 As shown, it includes:

[0073] S31: Merge features The linear projection is the query matrix Q:

[0074] ,

[0075] in, Let be the first projection matrix of the linear projection, which is learnable.

[0076] S32: Multiply the query matrix Q by the learnable parameter vector This yields the global attention query vector. for

[0077] ,

[0078] Where n represents the sequence length and d represents the dimension of the embedding vector. Used to avoid gradient vanishing. Depend on Composed of column vectors, for The attention weights of the i-th sequence.

[0079] S33: The global attention query vector and attention weight are weighted and summed to generate a global query vector q, which retains information about brain fatigue.

[0080] ,

[0081] in, Let be the i-th column vector of matrix Q.

[0082] S34: The global query vector q and the key matrix K are element-wise computed to obtain the global context G, avoiding the averaging effect of multiplicative self-attention. G retains the global trend without diluting local features, such as the spatiotemporal fluctuations of frontal lobe theta waves.

[0083] ,

[0084] ,

[0085] Where K represents the key matrix, which is the fusion feature. Through the second projection matrix Obtained through linear projection, the second projection matrix is ​​learnable. This indicates element-wise multiplication.

[0086] S35: Calculate residual fusion characteristics using the fusion query matrix and global context. The calculation method is as follows:

[0087] ,

[0088] ,

[0089] Where F' represents the residual fusion characteristic, Let T(G) be the matrix obtained by LayerNorm normalizing the query matrix Q, and let T(G) be the output after linear transformation of the global context features. The weight matrix represents the linear transformation. This represents the bias term of the linear transformation. Through fusion computation, subtle features are ensured not to be lost, and the computational complexity of attention is reduced to... It is adapted to the real-time requirements of in-vehicle systems.

[0090] S4: Residual fusion characteristics The fully connected layer of the input classification module is processed by Softmax classification to obtain the fatigue prediction probability. Fatigue outcomes are identified through fatigue prediction probability.

[0091] The method of identifying fatigue results through fatigue prediction probability can set a fatigue threshold. When the fatigue prediction probability... If the fatigue level exceeds a fatigue threshold, it is considered fatigued; otherwise, it is considered non-fatigue. Alternatively, fatigue prediction probabilities can be used to identify fatigue outcomes.

[0092] Furthermore, the loss between the predicted probability and the true value can be calculated using cross-entropy as the loss function. The model parameters are adjusted using the loss value through backpropagation.

[0093] ,

[0094] in, The true label is 0 or 1, where 0 represents fatigue and 1 represents non-fatigue. M is the number of samples in each batch, where c represents the category index. Since the results only include fatigue and non-fatigue, c can only be 1 or 2.

[0095] This invention provides frequency-specific input for residual fusion characteristic calculation by decomposing and fusing multi-band features of EEG signals, filtering out irrelevant noise; the residual fusion characteristic calculation assigns global-local weights to multi-band features, enhancing key fatigue modes, especially theta wave enhancement and alpha wave suppression, with its frequency band contribution exceeding 40% under fatigue conditions; The frequency band primarily characterizes the awake state, contributing the most (approximately 35%) during wakefulness. It exhibits a significant dominant distribution in the occipital-parietal region, while its activity shifts and intensifies in the frontal region during fatigue. This invention achieves precise extraction, efficient fusion, and stable classification through a collaborative process, ensuring stable output of high-precision detection results in real-world environments such as vehicle safety systems, driver status detection, EEG signal analysis, and intelligent driving assistance.

[0096] The multiplicative self-attention mechanism of the traditional Transformer is prone to feature oversmoothing due to the "weight averaging" effect. Especially when processing long-sequence EEG data, the variance of attention weights approaches zero, which dilutes subtle fatigue features such as the spatiotemporal fluctuations of theta waves and changes in the spatial distribution of alpha waves, reducing the model's ability to discriminate fatigue states. It also exhibits poor generalization under different EEG device configurations (such as 32 channels in the SADT dataset and 17 channels in the SEED-VIG dataset) and different subject scenarios, making it difficult to maintain stable performance between laboratory simulators and actual vehicle environments (which have complex factors such as vibration and electromagnetic interference).

[0097] To address the issues of insufficient mid-frequency band adaptation, overly smooth features, and poor generalization in existing EEG-based driver fatigue detection technologies, this invention improves upon the traditional Transformer by proposing a Multi-Branch Spatiotemporal Transformer (MB-STFormer) model architecture, as illustrated in the diagram below. Figure 4 As shown.

[0098] This invention provides an EEG fatigue recognition system based on frequency-domain adaptive convolution and efficient attention, such as... Figure 2As shown, it includes:

[0099] The EEG signal decomposition module is used to decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band. The specific implementation of step S1 is described in [link to step S1]. Figure 4 A diagram of the Preprocessed Date module.

[0100] The multi-band feature extraction module uses frequency-domain adaptive convolution to extract features from EEG signals of each frequency band, obtaining fused multi-band features. The specific implementation of step S2 is described in [link to step S2]. Figure 4 Schematic diagram of the Multi-band Feature Extraction module;

[0101] The residual fusion characteristic calculation module employs an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics. The specific implementation method of step S3 is described in [link to step S3]. Figure 4 Schematic diagram of the Efficient Attention module;

[0102] The fatigue discrimination module is used to input the residual fusion characteristics into the fully connected layer, and after Softmax classification, the fatigue prediction probability is obtained. The fatigue result is identified by the fatigue prediction probability, which is implemented in step S4.

[0103] The model's EEG signal decomposition module and multi-band feature extraction module provide frequency-specific input to the residual fusion characteristic calculation module, filtering out irrelevant noise. The residual fusion characteristic calculation module assigns global-local weights to multi-band features, enhancing key fatigue patterns, particularly theta wave enhancement and alpha wave suppression. These modules work together to achieve accurate extraction, efficient fusion, and stable classification, ensuring stable output of high-precision detection results in real-world environments such as vehicle safety systems, driver status detection, EEG physiological signal analysis, and intelligent driving assistance.

[0104] Specifically, the fatigue discrimination module also includes a prediction adjustment unit, which calculates the loss between the predicted probability and the true value using cross-entropy as the loss function. The loss value is fed back to the model's parameter correction module to adjust the model parameters.

[0105] Based on the above inventions, a "nested cross-validation + two-stage training" strategy is used to compare the performance of this invention with existing models. The specific steps are as follows:

[0106] Data preprocessing involves bandpass filtering of the raw EEG signal from 1 to 50 Hz, automatic artifact removal (AAR method), resampling to 128 Hz according to the dataset sampling rate, and standardization (mean 0, variance 1).

[0107] Nested cross-validation settings were used: the SADT dataset employed 10-fold outer loop and 3-fold inner loop cross-validation; the SEED-VIG and SEED-VLA datasets employed 5-fold outer loop and 3-fold inner loop cross-validation.

[0108] The two-phase training includes:

[0109] Phase 1 (Inner Loop Model Selection): Training using the inner loop training set The model has the following hyperparameters set as follows: batch size 32, Adam optimizer, and initial learning rate. The training run consisted of 200 rounds, and the model with the best performance on the validation set was selected as the candidate model.

[0110] Phase 2 (Fine-tuning): Fine-tune the candidate model using the outer loop full training set, adjusting the learning rate to... The training run is limited to a maximum of 20 rounds. If the accuracy of the training set reaches 100%, the process is terminated early to avoid overfitting. Cross-subject validation: A "leave one subject out" strategy is adopted to ensure the objectivity of the model's generalization ability assessment. Each subject's data is used independently as the test set, while the rest are used as the training set to repeat the above training process.

[0111] Evaluation metrics: As shown in Table 1, four metrics were used: accuracy, precision, recall, and F1-score. Statistical significance was verified using the Wilcoxon signed-rank test, and the significance probability value was used. , representing the probability value in a significance test, is used to measure whether the result is statistically significant. To make it significant, an asterisk is used to indicate its significance in Table 1. Highly significant results are indicated by two asterisks in Table 1. Key results: On the SADT dataset, the model achieves an accuracy of 91.61% and an F1-score of 90.74%, significantly outperforming benchmark models such as EEGNet (89.09%) and Conformer (90.80%). On the SEED-VIG and SEED-VLA datasets, the accuracy is 86.87% and 87.58%, respectively, with recalls exceeding 76%, demonstrating excellent cross-device and cross-subject generalization capabilities.

[0112] Table 1 Performance Comparison of This Model with Existing Models

[0113]

[0114] It is evident that MB-STFormer demonstrates stronger overall advantages in fatigue detection tasks. It not only more accurately characterizes driver fatigue but also possesses better noise immunity and scene adaptability. Furthermore, its model design balances feature representation ability and discriminative stability, maintaining high recognition reliability even in complex driving environments. Therefore, it provides a more efficient, robust, and practically valuable solution for driver fatigue monitoring in intelligent driving scenarios. Figure 6 As shown, this figure visualizes the EEG frequency band features of a driver in a typical alert and fatigued state after processing by a multi-band feature extraction layer. The figure displays topological maps of the Delta (1-4 Hz), Theta (4-8 Hz), Alpha (8-14 Hz), Beta (14-31 Hz), and Gamma (31-51 Hz) frequency bands, corresponding to the δ, θ, α, β, and γ bands created in this invention, respectively. Each column represents a specific frequency band; the first row shows features in the alert state, and the second row shows features in the fatigued state. The power values ​​au on these topological heatmaps represent the relative power of each EEG channel within the corresponding frequency band, showing the contribution of each channel and frequency band to the final classification.

[0115] according to Figure 6 It can be seen that, The frequency band contributes most significantly to the fatigue state, mainly manifested as enhanced slow wave activity in the frontal and central regions, and its frequency band contribution exceeds 40% under fatigue conditions; The frequency band primarily characterizes the state of wakefulness, contributing the most during wakefulness (approximately 35%), and exhibiting a distinctly dominant distribution in the occipital-parietal region. However, during fatigue, its activity shifts and intensifies towards the frontal region. Furthermore... The frequency bands exhibit strong activation in the central frontal region during wakefulness, reflecting high cognitive engagement and alertness maintenance. However, their activity weakens and becomes diffuse during fatigue. Therefore, this paper suggests that different frequency bands have complementary roles in fatigue recognition. More emphasis is placed on fatigue characteristics. More emphasis on signs of wakefulness This reflects the level of cognitive activity and alertness. The aforementioned contributions mainly stem from the synergistic effect of the three key steps of this invention. Specifically, the effective separation and highlighting of the fatigue-related frequency band and the alertness-related frequency band is primarily achieved through step S1, which decomposes the original EEG signal into fixed frequency bands. , , , , Independent frequency bands reduce information aliasing between frequency bands, providing a prerequisite for subsequent identification of the differentiated contributions of each frequency band; Frequency bands make a significant contribution to fatigue status. Frequency bands are better able to characterize the state of wakefulness. The statement "Frequency bands reflect cognitive activity and alertness levels" is mainly accomplished by step S2. This step extracts spatial-temporal features from different frequency bands through grouped 1D spatial convolution and frequency-adaptive temporal convolution, enabling targeted modeling of the spatial distribution and temporal scale features of each frequency band. This highlights the complementary role of each frequency band in fatigue recognition. The statement "Key fatigue patterns are further enhanced, subtle features are less likely to be lost, and ultimately more stable and reliable discrimination is achieved" is mainly accomplished by step S3. This involves using an efficient attention mechanism to perform residual calculation on the fused multi-frequency band features, assigning global-local weights to the multi-frequency band features, further enhancing key patterns closely related to fatigue, and improving the model's stable recognition ability of fatigue states in complex scenarios. Finally, step S4 completes the classification output, forming the fatigue recognition result.

[0116] This invention follows the neurophysiological laws of EEG, and the extracted features are highly consistent with fatigue mechanisms such as decreased cortical excitability and attention loss. The heat map visualization clearly shows the differences in frequency band spatial distribution, and the neurophysiological interpretability is strong, providing an engineering application solution for vehicle safety monitoring.

[0117] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. An EEG fatigue recognition method based on frequency-domain adaptive convolution and efficient attention, characterized in that, include: Step S1: Decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band; Step S2: Use frequency domain adaptive convolution to extract features from EEG signals of each frequency band to obtain fused multi-frequency band features; Step S3: Use an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics; Step S4: Input the residual fusion characteristics into the fully connected layer, classify them using Softmax, obtain the fatigue prediction probability, and identify the fatigue result using the fatigue prediction probability.

2. The method according to claim 1, characterized in that, The process of decomposing the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band is achieved using bandpass filtering.

3. The method according to claim 1, characterized in that, The method of extracting features from EEG signals of each frequency band using frequency-domain adaptive convolution includes: performing grouped 1D spatial convolution and frequency-adaptive temporal convolution on EEG signals of each frequency band, performing spatial and temporal dual-stage filtering, and obtaining the spatiotemporal features of each frequency band. The spatiotemporal features of each frequency band retain both spatial and temporal specificity.

4. The method according to claim 3, characterized in that, Grouped 1D spatial convolutional cloud computing includes: establishing inter-channel spatial dependencies for each frequency band and obtaining spatial features using grouped convolution; , in, This represents the nth output feature. This represents the i-th input feature. This represents the convolution weights between the nth output channel and the ith input channel. This represents the set of input group indices corresponding to the nth output, and the summation operation indicates that feature weighting aggregation is performed only within the corresponding group. Frequency-adaptive temporal convolution calculation includes: matching spatial features to the time scale of each frequency band to obtain the spatiotemporal features of each frequency band. , Among them, T n The nth temporal convolution output features represent the spatiotemporal characteristics of each frequency band. This represents the temporal convolution weight corresponding to the nth output feature. Let represent the set of temporal convolutional receptive field indices corresponding to the nth output. The summation operation represents the weighted aggregation of local features in the temporal dimension.

5. The method according to claim 4, characterized in that, Differentiated temporal convolution kernels are configured for the temporal characteristics of each frequency band. The size of the temporal convolution kernel is halved as the frequency of the band increases, and each kernel is matched to the time scale of each frequency band.

6. The method according to claim 4, characterized in that, The process of obtaining fused multi-band features includes: performing summation activation calculation on the spatiotemporal features of each frequency band to obtain fused multi-band features.

7. The method according to claim 1, characterized in that, The method employs an efficient attention mechanism to perform residual calculation on the fused multi-band features, obtaining residual fusion characteristics, including: S31: Linearly project the fused features into a query matrix; , in, This represents the fusion feature, where Q is the query matrix. The first projection matrix of the linear projection; S32: Multiply the query matrix by the learnable parameter vector This yields the global attention query vector. ; , Where n represents the sequence length and d represents the dimension of the embedding vector. Depend on Composed of column vectors, for The attention weights of the i-th sequence; S33: The global query vector is generated by weighted sum of the global attention query vector and the attention weight, and the global query vector retains information about whole-brain fatigue. , Where q represents the global query vector. Let i be the i-th column vector of matrix Q; S34: Element-wise computation is performed between the global query vector and the key matrix to obtain the global context; , , Where G represents the global context, K represents the key matrix, and K is the fused feature. Through the second projection matrix Obtained by linear projection. Indicates element-wise multiplication; S35: Calculate residual fusion characteristics using a fusion query matrix and global context; , , Where F' represents the residual fusion characteristic, Let T(G) be the matrix obtained by LayerNorm normalizing the query matrix Q, and let T(G) be the output after linear transformation of the global context features. The weight matrix represents the linear transformation. This represents the bias term of the linear transformation.

8. The method according to claim 1, characterized in that, The loss value between the predicted probability and the true value is calculated using cross-entropy as the loss function, and the model parameters are adjusted through backpropagation using the loss value.

9. An EEG fatigue recognition model based on frequency-domain adaptive convolution and efficient attention, characterized in that, include: The EEG signal decomposition module is used to decompose the original EEG signal into fixed frequency bands to obtain EEG signals of each frequency band. The multi-band feature extraction module uses frequency domain adaptive convolution to extract features from EEG signals of each frequency band to obtain fused multi-band features. The residual fusion characteristic calculation module uses an efficient attention mechanism to perform residual calculation on the fused multi-band features to obtain the residual fusion characteristics; The fatigue discrimination module is used to input the residual fusion characteristics into the fully connected layer, and after Softmax classification, the fatigue prediction probability is obtained. The fatigue result is identified by the fatigue prediction probability.

10. The method according to claim 9, characterized in that, The fatigue discrimination module also includes a prediction adjustment unit, which calculates the loss value between the predicted probability and the true value using cross-entropy as the loss function, and feeds the loss value back to the model's parameter correction module to adjust the model parameters.