An electroencephalogram fatigue decoding method and device based on adaptive graph and multi-scale time sequence network, medium and product
Patent Information
- Application Number
- CN202611381870.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-07
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]尽管基于深度学习的脑电疲劳解码技术取得了进展,但在一些情形下,脑电技术在实际应用中仍面临以下四个主要问题:一是由于时空特征强耦合使局部判别性信息丢失,导致输入的一维脑电信号携带信息缺失,导致网络输出的准确性低;二是采用图神经网络在训练中易学习到不真实的伪影连边,导致网络输出的准确性低;三是采用基于注意力机制的Transformer架构或循环神经网络由于缺少局部归纳偏置,在对脑电信号进行识别时容易陷入局部最优与小样本过拟合,最终导致网络输出的准确率低;四是脑电疲劳识别可解释性差
本申请,先对待测脑电信号进行空间拓扑与时频特性强耦合,得到四维脑电特征张量,将一维脑电信号转为了包含时间切片、生理频带与二维空间拓扑的四维脑电特征张量,实现了对疲劳相关空间节点与生理频带的自适应重标定,过滤无关背景噪声,为后续脑电疲劳识别模型提供了准确的输入数据;将四维脑电特征张量输入至脑电疲劳识别模型,得到脑电疲劳识别结果,完成脑电疲劳解码,其中,通过全局-局部预处理注意力模块对四维脑电特征张量进行二次标定,得到重标定特征,能够对四维脑电特征张量通过全局和局部处理,将四维脑电特征张量中的噪声进行去除,使重标定特征作为了更为准确的输入;通过双流拓扑感知空间编码器对重标定特征进行空间融合,得到空间融合特征序列,通过双流解耦设计在保留大脑网络高聚类与小世界属性的同时,有效阻断了低信噪比下的图传播噪声,克服了全连接动态图网络带来的特征同化与过平滑缺陷,实现了抗噪且鲁棒的脑电空间特征表征;通过轻量化自适应多尺度时序混合模块对空间融合特征序列进行动态加权和分类,得到脑电疲劳识别结果,通过轻量化自适应多尺度时序混合模块实现了空间融合特征序列自适应和动态加权,在降低模型参数量与计算开销的条件下,有效提取了疲劳状态的短时瞬态波动与长程演进特征,实现了对复杂时序动态特征的高效、精准解码,从而提高脑电疲劳识别结果的准确性和可解释性。
Smart Images

Figure CN122911522A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electroencephalography (EEG) technology, and in particular to an EEG fatigue decoding method, device, medium, and product based on adaptive graphs and multi-scale temporal networks. Background Technology
[0002] Accurate monitoring of fatigue is crucial for preventing errors in high-risk operations. Among numerous physiological signals, electroencephalography (EEG) is widely regarded as the gold standard for objectively assessing cognitive fatigue because it can directly reflect the activity state of the central nervous system.
[0003] Despite the progress made in deep learning-based EEG fatigue decoding technology, EEG technology still faces four main problems in practical applications: First, the strong spatiotemporal coupling causes the loss of local discriminative information, resulting in a lack of information carried by the input one-dimensional EEG signal and low accuracy of the network output. Second, graph neural networks are prone to learning unrealistic artifacts during training, leading to low accuracy of the network output. Third, Transformer architectures or recurrent neural networks based on attention mechanisms, lacking local inductive bias, are prone to getting stuck in local optima and small-sample overfitting when recognizing EEG signals, ultimately resulting in low accuracy of the network output. Fourth, the interpretability of EEG fatigue recognition is poor. Summary of the Invention
[0004] The purpose of this application is to provide a method, device, medium, and product for decoding brainwave fatigue based on adaptive graphs and multi-scale temporal networks, which can improve the accuracy and interpretability of brainwave fatigue recognition results.
[0005] To achieve the above objectives, this application provides the following solution.
[0006] In a first aspect, this application provides a method for decoding brainwave fatigue based on adaptive graphs and multi-scale temporal networks, including: The electroencephalogram (EEG) signal to be tested is acquired using electrodes; The EEG signal to be tested is strongly coupled with spatial topology and time-frequency characteristics to obtain a four-dimensional EEG feature tensor; the four-dimensional EEG feature tensor is a feature tensor with four dimensions including time slices, physiological frequency bands and two-dimensional space. The four-dimensional EEG feature tensor is input into the EEG fatigue recognition model to obtain the EEG fatigue recognition result, thus completing the EEG fatigue decoding. The EEG fatigue recognition result includes: fatigue category and fatigue level estimate. The EEG fatigue recognition model includes: a global-local preprocessing attention module, a two-stream topology-aware spatial encoder, and a lightweight adaptive multi-scale temporal hybridization module. The global-local preprocessing attention module is used to perform secondary calibration on the four-dimensional EEG feature tensor to obtain recalibrated features. The two-stream topology-aware spatial encoder is used to perform spatial fusion on the recalibrated features to obtain a spatial fusion feature sequence. The lightweight adaptive multi-scale temporal hybridization module is used to dynamically weight and classify the spatial fusion feature sequence to obtain the EEG fatigue recognition result.
[0007] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks.
[0008] Thirdly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks.
[0009] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks.
[0010] According to the specific embodiments provided in this application, this application has the following technical effects: This application first performs strong coupling of spatial topology and time-frequency characteristics on the EEG signal to be tested to obtain a four-dimensional EEG feature tensor. This transforms the one-dimensional EEG signal into a four-dimensional EEG feature tensor containing time slices, physiological frequency bands, and two-dimensional spatial topology. This enables adaptive recalibration of fatigue-related spatial nodes and physiological frequency bands, filtering irrelevant background noise and providing accurate input data for the subsequent EEG fatigue recognition model. The four-dimensional EEG feature tensor is then input into the EEG fatigue recognition model to obtain the EEG fatigue recognition result, completing the EEG fatigue decoding. Specifically, a global-local preprocessing attention module performs secondary calibration on the four-dimensional EEG feature tensor to obtain recalibrated features. This allows for the removal of noise from the four-dimensional EEG feature tensor through global and local processing, making the recalibrated features a more accurate input. Finally, a two-stream topology-aware spatial encoding method is used. The encoder spatially fuses the recalibrated features to obtain a spatially fused feature sequence. Through a dual-stream decoupling design, it effectively blocks graph propagation noise under low signal-to-noise ratio conditions while preserving the high clustering and small-world properties of the brain network. This overcomes the feature assimilation and oversmoothing defects caused by fully connected dynamic graph networks, achieving noise-resistant and robust EEG spatial feature representation. A lightweight adaptive multi-scale temporal hybridization module dynamically weights and classifies the spatially fused feature sequence to obtain EEG fatigue recognition results. The lightweight adaptive multi-scale temporal hybridization module achieves adaptive and dynamic weighting of the spatially fused feature sequence. Under the condition of reducing the number of model parameters and computational overhead, it effectively extracts the short-term transient fluctuations and long-term evolution features of fatigue state, achieving efficient and accurate decoding of complex temporal dynamic features, thereby improving the accuracy and interpretability of EEG fatigue recognition results. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating a brainwave fatigue decoding method based on adaptive graphs and multi-scale temporal networks provided in this application.
[0013] Figure 2 This is a detailed flowchart illustrating a brainwave fatigue decoding method based on adaptive graphs and multi-scale temporal networks, which is provided in this application.
[0014] Figure 3The following is a detailed flowchart of step S3 provided in this application: (a) is a detailed flowchart of the global-local preprocessing attention module; (b) is a detailed flowchart of the dual-stream topology-aware spatial encoder; and (c) is a detailed flowchart of the lightweight adaptive multi-scale temporal hybrid module.
[0015] Figure 4 A schematic diagram of the two-dimensional topological mesh mapping of the 17 effective EEG electrodes provided in this application.
[0016] Figure 5 The diagram below illustrates the distribution of physiological frequency band significance provided in this application; where (a) is a frequency band attention weight distribution diagram; and (b) is a diagram of attention weight difference and 95% confidence interval.
[0017] Figure 6 This is a schematic diagram of the two-dimensional spatial attention distribution provided in this application; wherein, (a) is the average attention weight diagram of the awake group; (b) is the average attention weight diagram of the fatigued group; and (c) is the average attention weight diagram of the state difference (fatigue-awake).
[0018] Figure 7 The connection matrix diagram provided in this application; wherein, (a) is the average adjacency matrix diagram of the sober group; (b) is the average adjacency matrix diagram of the fatigue group; and (c) is the difference matrix (fatigue-sober) diagram.
[0019] Figure 8 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] Specific problems with EEG technology: (1) Strong spatiotemporal coupling leads to the loss of local discriminative information. Existing EEG fatigue detection models often fail to fully capture the spatial dependence across brain regions and the temporal evolution of cognitive states when processing input signals. Many traditional methods ignore the physical topological connections at the bottom of the brain. The processing method of simply flattening multi-channel EEG signals into one-dimensional vectors destroys the prior geometric distribution of signals on the real three-dimensional scalp, resulting in severe physical spatial and frequency band information aliasing during the feature extraction stage. The lack of carried information leads to low accuracy of network output.
[0022] (2) Topological fragility and noise sensitivity of purely data-driven graph networks. Although graph neural networks (GNNs) have been introduced into EEG analysis to capture spatial connections, EEG signals themselves have an extremely low signal-to-noise ratio, which makes dynamic graphs constructed purely through data-driven methods highly susceptible to background noise. This over-reliance on data makes the network prone to learning spurious connections during training, resulting in a lack of robustness of global topological features and low accuracy of network output.
[0023] (3) Long-term EEG modeling faces computational bottlenecks and the risk of overfitting. To capture the long-term dependence of fatigue evolution, existing studies mostly use Transformer architecture or recurrent neural networks based on attention mechanisms. However, when processing long-sequence EEG data, the self-attention mechanism of Transformer generates quadratic growth. The computational complexity is limited. At the same time, due to the lack of the local inductive bias inherent in convolutional neural networks (CNNs), it is very prone to getting stuck in local optima and small sample overfitting when faced with EEG datasets with limited data size, resulting in low accuracy of the network output.
[0024] (4) Approximation error and mechanism lag in ex post-hoc attribution explanation methods. Most existing deep learning EEG models are black-box models, lacking the ability to explain the explicit logic behind their predictions. To improve interpretability, current research mainly uses ex post-hoc attribution explanation to assist in localization. However, as an external algorithm, the ex post-hoc explainer cannot change the already trained network model itself, which results in the continued existence of artifacts and decision biases extracted by the model during inference. This gradient-based approximation cannot truly map the underlying physical basis of the model's forward inference.
[0025] This application aims to overcome the limitations of the aforementioned technologies and provides a method for decoding EEG fatigue based on adaptive graphs and multi-scale temporal networks. This application processes the EEG signal under test through strong coupling of spatial topology and time-frequency characteristics to obtain a four-dimensional EEG feature tensor. It decouples spatiotemporal features through a global-local preprocessing attention module, suppresses topological noise using prior guidance, and employs a two-stream topological sensing spatial encoder with linear complexity and a lightweight adaptive multi-scale temporal hybrid module. Finally, it constructs an interpretable EEG fatigue recognition model, aiming to provide objective physical evidence with physiological consistency while ensuring accurate decoding of EEG fatigue recognition results, thereby improving interpretability.
[0026] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] In one exemplary embodiment, such as Figure 1 and Figure 2 As shown, a brainwave fatigue decoding method based on adaptive graphs and multi-scale temporal networks is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is described using a server as an example, and includes the following steps S1 to S3.
[0028] Step S1: Acquire the EEG signal to be tested through electrodes.
[0029] Specifically, the EEG signal to be measured is as follows: Figure 2 The original EEG signal is input.
[0030] Step S2: Perform strong coupling of spatial topology and time-frequency characteristics on the EEG signal to be tested to obtain a four-dimensional EEG feature tensor; the four-dimensional EEG feature tensor is a feature tensor with four dimensions including time slices, physiological frequency bands and two-dimensional space.
[0031] Specifically, the four-dimensional EEG feature tensor is as follows: Figure 2 4D feature flow.
[0032] As one possible implementation, the electrodes include active electrodes and inactive electrodes; step S2 specifically includes steps S21 to S24: Step S21: Construct a two-dimensional mesh based on the distribution of electrodes.
[0033] Step S22: Divide the EEG signal to be tested into time segments according to the preset time to obtain multiple time slices of EEG signal.
[0034] Step S23: Extract physiological frequency band signals from the EEG signals of each time slice corresponding to the effective electrodes, and calculate the differential entropy features; the differential entropy features are the entropy features of the physiological frequency band signals of each time slice corresponding to the effective electrodes.
[0035] Step S24: Map the differential entropy features into a two-dimensional grid to obtain a four-dimensional EEG feature tensor.
[0036] Specifically, addressing the problem that traditional one-dimensional vectorization methods easily lead to the loss of geometric structure and temporal evolution information due to the strong coupling between spatial topology and time-frequency characteristics in EEG signals, this application proposes a method for constructing structured 4D EEG feature flow (i.e., a method for generating four-dimensional EEG feature tensors). First, the input continuous EEG signal is divided into... A time slice ( Then, for each time slice The various passages inside (common (one effective electrode), extraction physiological frequency bands ( The signal is analyzed, and its differential entropy (DE) characteristic is calculated. Several physiological frequency bands are used to characterize brain electrical fatigue-related activities at different frequency scales. Frequency bands are used to characterize low-frequency slow waves and drowsiness enhancement features. Frequency bands are used to characterize features related to decreased attention and accumulated fatigue. Frequency bands are used to characterize changes in alertness and cortical inhibition-related features. Frequency bands are used to characterize features related to active cognitive processing and attention maintenance. Frequency bands are used to characterize features related to high-frequency neural synchronization and information integration. This is achieved through simultaneous extraction... By utilizing the differential entropy features of five frequency bands, this application can preserve multi-scale physiological information of brain fatigue states, from low-frequency slowing down to high-frequency cognitive activity changes, at the spectral level. This provides a more comprehensive spectral representation basis for subsequent spatial coding, graph structure modeling, and temporal decoding. For short-time narrowband EEG signals that approximately follow a local Gaussian distribution, the formula for calculating their differential entropy features is as follows: .
[0037] in, For the first The first time slice The first effective electrode Differential entropy characteristics of each physiological frequency band; This indicates that variance statistics are performed on the signal segment within the brackets within the current time slice; For the first The first time slice The first effective electrode The electroencephalogram (EEG) signals to be tested in each physiological frequency band.
[0038] Next, based on the actual three-dimensional electrode distribution of the 10-20 international standard lead system, the one-dimensional channel features are projected and zero-filled to... Within the two-dimensional mesh, the construction of the two-dimensional mesh is completed; specifically, for the first... The first time slice and the first For each frequency band, a preset position mapping function is established to map the electrode channel set to the two-dimensional topological mesh. The first Differential entropy characteristics of each effective electrode Write grid coordinates And set the grid positions that do not correspond to valid electrodes to zero, that is: .
[0039] In one specific embodiment, the 17 effective electrodes are mapped to their relative positions in a 10-20 international standard lead system. Two-dimensional topological mesh. Specific mapping relationships are as follows: Figure 4 As shown in the figure, the positions labeled with electrode names are used to fill in the differential entropy features of the corresponding electrodes, while positions without corresponding valid electrodes are filled with zeros. The same spatial mapping is performed on each of the five physiological frequency bands, forming a shape of size [size missing]. The spectral-spatial feature tensor.
[0040] After standardization, the slices are superimposed to form a four-dimensional EEG feature tensor with explicit physical meaning. This preserves the spectral selectivity, spatial geometry, and temporal evolution characteristics of EEG signals at the physical level.
[0041] Step S3: Input the four-dimensional EEG feature tensor into the EEG fatigue recognition model to obtain the EEG fatigue recognition result, thus completing the EEG fatigue decoding. The EEG fatigue recognition result includes: fatigue category and fatigue level estimate. The EEG fatigue recognition model includes: a global-local preprocessing attention module, a two-stream topological sensing spatial encoder, and a lightweight adaptive multi-scale temporal hybridization module. The global-local preprocessing attention module is used to perform secondary calibration on the four-dimensional EEG feature tensor to obtain recalibrated features. The two-stream topological sensing spatial encoder is used to perform spatial fusion on the recalibrated features to obtain a spatial fusion feature sequence. The lightweight adaptive multi-scale temporal hybridization module is used to dynamically weight and classify the spatial fusion feature sequence to obtain the EEG fatigue recognition result.
[0042] As one feasible approach, step S3 specifically includes steps S31 to S33: Step S31: Perform secondary calibration on the four-dimensional EEG feature tensor to obtain recalibrated features.
[0043] Specifically, such as Figure 2 The hollow-piece calibration features were used to complete the calibration of the four-dimensional EEG feature tensor to recalibration features. For example... Figure 3 As shown in (a), to alleviate the computational burden of subsequent network branches on discriminative feature extraction and to directly filter fatigue-independent background noise at the front end, this application introduces a global-local preprocessing attention module before spatial encoding. This module adjusts the feature response at the slice level through separate axial spatial reweighting and global frequency response calibration. First, channel compression (i.e., channel compression of the input features (i.e., the four-dimensional EEG feature tensor) is performed. Figure 3 After (1×1 Conv), apply one-dimensional large kernel attention (e.g., ...) along the row and column directions of the two-dimensional scalp mesh. Figure 3(Axlal Row LKA and Axial Col LKA). Spatial gating weights. Reconstructed using outer product form: .
[0044] In the formula, and These represent the axial context response vectors extracted along the row and column directions, respectively. This represents the outer product operation of vectors; This represents the spatial scaling factor that the network can learn during training. The sigmoid activation function is used to map the values of the weight matrix to... Interval. Simultaneously, to integrate global statistics with the spatially filtered residual response, the four-dimensional EEG feature tensor... and space-weighted intermediate tensors Perform Global Average Pooling (GAP).
[0045] As one feasible approach, step S31 specifically includes steps S311 to S313: Step S311: Spatial extraction is performed on the four-dimensional EEG feature tensor to obtain spatial gating weights and spatially weighted intermediate tensors.
[0046] As an implementable approach, step S311 specifically includes: convolving the four-dimensional EEG feature tensor to obtain convolutional features; extracting the convolutional features using a one-dimensional big-kernel attention mechanism to obtain spatial gating weights; and fusing the four-dimensional EEG feature tensor and the spatial gating weights to obtain a spatially weighted intermediate tensor.
[0047] Step S312: Extract the frequency bands from the four-dimensional EEG feature tensor and the spatially weighted intermediate tensor to obtain the frequency band gating weights.
[0048] As an feasible approach, such as Figure 3 In the expression for frequency band extraction, the formula is: .
[0049] in, For the first The first time slice The frequency band gating weights of each physiological frequency band signal are specifically output as one-dimensional frequency band attention weights. Use the Sigmoid activation function; For the first Scaling parameters for each physiological frequency band signal; For the first Temperature parameters of physiological frequency band signals; For attention operations, specifically one-dimensional high-efficiency channel attention operations are designed to capture the interaction dependencies between different physiological frequency bands; This is a global average pooling operation; For the first Four-dimensional EEG feature tensors for each time slice; For the first Spatial weighted intermediate tensor of a time slice and These represent the learnable scaling parameter and the temperature parameter used to adjust the gating strength, respectively.
[0050] Step S313: Fuse the four-dimensional EEG feature tensor, the spatially weighted intermediate tensor, and the frequency band gating weights to obtain the recalibrated features.
[0051] Specifically, the output recalibration features are: .
[0052] In the formula, This is for recalibrated features, i.e., the output feature tensor of the current slice after adaptive filtering; This represents element-wise multiplication based on a tensor broadcast mechanism. This step enables simultaneous calibration of circadian rhythm energy and activated brain regions during a single forward computation.
[0053] Step S32: Spatial fusion of the recalibrated features to obtain a spatial fusion feature sequence.
[0054] As one feasible approach, step S32 specifically includes steps S3201 to S3211: Step S3201: Extract local features from the recalibrated features to obtain local spatial features.
[0055] Step S3202: Extract frequency band features from the recalibrated features to obtain the initial node feature matrix.
[0056] Step S3203: Construct a static prior map based on the distance between the electrodes.
[0057] Step S3204: Extract the effective electrodes from the recalibration features to obtain the effective feature matrix.
[0058] Step S3205: Calculate the node feature similarity of the effective feature matrix to obtain the initial dense dynamic graph.
[0059] Step S3206: Perform sparsification, symmetry and normalization on the initial dense dynamic graph in sequence to obtain the sparsified dynamic graph.
[0060] Step S3207: Generate a fused adjacency matrix based on the static prior graph and the sparsed dynamic graph.
[0061] Step S3208: Based on the initial node feature matrix and the fused adjacency matrix, a two-layer graph convolutional network is used to fuse them to obtain the fused node feature matrix.
[0062] Step S3209: Based on the fused node feature matrix, calculate the importance score and attention weight of the nodes.
[0063] Step S3210: Generate global topological features based on the fused node feature matrix, as well as the importance score and attention weight of the nodes.
[0064] Step S3211: Concatenate the local spatial features and global topological features to obtain a spatial fusion feature sequence.
[0065] Specifically, to simultaneously capture local adjacent patterns and long-range interactions across brain regions in EEG signals, and to address the issues of artifact connectivity and "oversmoothing" easily introduced by pure data-driven graph networks under low signal-to-noise ratios, this application proposes a dual-stream topology-aware spatial encoder. For example... Figure 3 As shown in (b), firstly, the local Euclidean convolution branch recalibrates the features using a cascaded depthwise separable convolution (DSConv). Extracting local spatial features Secondly, non-Euclidean branch pairs A gather operation is performed to directly extract the feature matrices of 17 physically valid electrodes to avoid interference from zero-filled meshes on topology propagation. A static prior map based on the true 3D spatial distances of the physical electrodes is introduced. The initial dynamic graph is obtained by calculating similarity using node features. Subsequently, in order to control graph density and forcibly sever weak connections caused by noise, this application innovatively applies... Sparsity constraints generate sparse dynamic graphs: .
[0066] In the formula, is the sparsed dynamic graph, representing the dynamic graph matrix after sparse processing; This represents the initial dense dynamic graph calculated from node feature similarity. This means retaining only the nodes with the highest connection weights. The sparsification operation of each neighbor effectively suppresses artifacts in low signal-to-noise ratio edges. This indicates that the symmetry operation is performed to preserve the properties of the undirected graph; It is an identity matrix, used to add self-joins to preserve the node's own information; This represents a symmetric normalization operation used to stabilize the gradient propagation of subsequent graph convolutions.
[0067] By combining the confidence level of the dynamic graph structure with the physical prior graph, the first... The fused adjacency matrix corresponds to each time slice. Specifically, the graph structure confidence is calculated based on the concentration of the maximum connection weights of each node in the dynamic graph: the maximum connection weight corresponding to each node is obtained, and the entire graph is then analyzed. The average of the maximum connection weights of the nodes is then calculated; subsequently, the weights under a uniform connection state are used. As a baseline, the average value is normalized to the range of 0 to 1. The normalized graph structure confidence is then multiplied by the base fusion coefficients to obtain the adaptive residual fusion coefficients corresponding to the current time slice. In one specific embodiment, the base fusion coefficient is set to 0.2, which reduces the impact of the dynamic graph on the fused adjacency matrix when the structural confidence is low, and appropriately increases its contribution when the connection relationships of the dynamic graph are relatively clear. The final fused adjacency matrix used for graph convolution propagation is specifically represented as follows: .
[0068] In the formula, Indicates the first The time slices are ultimately used to create a fused adjacency matrix for graph convolution propagation; This is a static prior map, representing a physical prior map constructed based on the three-dimensional physical location of the electrodes; This is a sparsed dynamic graph, representing a dynamic graph constructed based on the node feature similarity of the current time slice; This represents the residual fusion coefficients adaptively determined based on the confidence level of the dynamic graph structure; This represents the symmetric normalization operation; This indicates the number of effective electrode nodes, in this embodiment... .
[0069] Through the above fusion method, when the confidence of the dynamic graph structure is low, the fused adjacency matrix mainly retains the stable physical prior relationships; when the confidence of the dynamic graph structure is high, the dynamic functional connectivity information corresponding to the current EEG state is appropriately added, thereby taking into account both the stability of the electrode spatial structure and the sample adaptability of EEG functional connectivity.
[0070] For the Let the spatial-band reweighted features (i.e., recalibration features) of the GPLA output be given by time slices. .according to The preset positions of each effective electrode in the two-dimensional scalp grid, from Extract the frequency band features corresponding to each electrode and arrange them according to a preset electrode order to obtain the initial node feature matrix: .
[0071] In the formula, Indicates the first Preset row and column coordinates of each electrode in a two-dimensional grid; Indicates the first The first time slice Initial node characteristics of each electrode; This represents the initial node characteristic matrix consisting of all effective electrodes; In this embodiment, the number of frequency band features is indicated. , respectively corresponding , , , and Five EEG bands; , These represent the height and width of the two-dimensional scalp grid, respectively.
[0072] Merge the adjacency matrix With the initial node feature matrix The input consists of a two-layer graph convolutional network. The l-th layer first performs weighted aggregation of the features of each node and its neighboring nodes based on the fusion adjacency matrix. Then, it uses a trainable linear mapping matrix to transform the node feature dimensions and sequentially performs Dropout, layer normalization, and ReLU activation. The node feature update process is represented as follows: .
[0073] In the formula, and Let represent the input node feature matrix and the output node feature matrix of the l-th layer graph convolution, respectively; Let represent the trainable feature mapping matrix of the l-th layer graph convolution; This indicates a Dropout operation; Presentation layer normalization operation.
[0074] In this embodiment, the first layer of graph convolution maps the features of each node from 5 dimensions to 32 dimensions, resulting in... The second layer of graph convolution again aggregates neighborhood information based on the same fused adjacency matrix, and maps the node features from 32 dimensions to 64 dimensions, resulting in the fused node feature matrix. Therefore, the adjacency matrix is merged. As a rule for information propagation between nodes, it continuously acts on the initial node features and generates a second layer of node features containing higher-order electrode association information.
[0075] For each electrode node output by the second-layer graph convolution, a parameter-shared linear scoring layer maps the corresponding 64-dimensional node features into a scalar importance score, and this score is applied to all nodes in the current time slice. Softmax normalization is performed across all nodes to obtain node attention weights. Subsequently, the features of each node are weighted and summed based on these node attention weights to obtain the nth node attention weight. The graph space features of each time slice are represented as follows: .
[0076] .
[0077] .
[0078] In the formula, Indicates from The first one taken from The 64-dimensional feature vector of each electrode node; and These represent the trainable weights and biases of the shared linear scoring layer, respectively. Indicates the first The importance score of each node; This represents the attention weight of the corresponding node. The sum of the attention weights of all nodes within the same time slice is 1. This represents the 64-dimensional graph space features obtained after node attention convergence. Through the node attention readout mechanism, the contribution of different electrode nodes to the graph space representation can be dynamically adjusted according to the current EEG state.
[0079] At the same time, see Figure 3 The left-hand CNN branch in (b) processes the same GPLA-reweighted five-band two-dimensional scalp grid. This CNN branch obtains the first... 64-dimensional local spatial features corresponding to each time slice The CNN branch primarily extracts local spatial patterns from a regular two-dimensional scalp mesh, while the GCN branch primarily extracts the physical and dynamic functional connections between real electrode nodes.
[0080] Local spatial features output by CNN branches Graph space features of GCN branch output The concatenation is performed along the feature dimension, and then passed through a fusion mapping layer consisting of a fully connected layer, batch normalization, ReLU activation, and Dropout to obtain the th... Unified spatial fusion features corresponding to each time slice The above processing is performed on all T time slices, and they are arranged in chronological order to obtain the spatial fusion feature sequence of subsequent time series modules. Specifically, it means: .
[0081] In the formula, This indicates splicing along the feature dimension; Represents feature fusion mapping; Indicates the first Spatial fusion features of a time slice; This represents a spatially fused feature sequence composed of all consecutive time slices; In this embodiment, the fused feature dimension is represented. ; This refers to the number of time slices contained in an EEG sample, as shown in this embodiment. .
[0082] Step S33: Perform dynamic weighting and classification on the spatial fusion feature sequence to obtain the brainwave fatigue recognition result.
[0083] As one feasible approach, step S33 specifically includes steps S331 to S337: Step S331: Convolve the spatial fusion feature sequence to obtain multi-scale temporal features.
[0084] Step S332: Perform global average pooling on the spatial fusion feature sequence to obtain the global temporal description vector.
[0085] Step S333: Generate multi-scale fusion weights based on the global temporal description vector.
[0086] Step S334: Perform dynamic weighted summation on the spatial fusion feature sequence, multi-scale temporal features, and multi-scale fusion weights to obtain multi-scale temporal hybrid features.
[0087] Step S335: Perform deep convolution on the multi-scale temporal hybrid features to obtain the enhanced temporal feature sequence.
[0088] Step S336: Generate global temporal representation features based on the enhanced temporal feature sequence.
[0089] Step S337: Input the global time series representation features into the classification head and regression head to obtain the fatigue category and fatigue level estimates.
[0090] Specifically, to extract the changing patterns of fatigue state at different time scales, spatial fusion feature sequences are used. Input a lightweight adaptive multi-scale temporal mixing module. For example... Figure 3As shown in (c), this module sets up three parallel one-dimensional depthwise separable convolutional branches. Each branch first uses channel-wise depthwise convolution to extract the temporal changes within each feature channel, and then uses pointwise convolution with a kernel size of 1 to achieve information interaction between different feature channels. The output of the m-th branch is represented as: .
[0091] In the formula, Indicates the first The kernel size in each branch is... void ratio One-dimensional channel-wise depthwise convolution; Indicates the first One-dimensional pointwise convolution with a kernel size of 1 in each branch; Indicates the first The output of each temporal convolutional branch is the multi-scale temporal feature.
[0092] In one specific embodiment, the kernel sizes of the three branches are 3, 5, and 7, respectively, with corresponding dilatancy ratios of 1, 2, and 3. Symmetrical zero-padding with padding amounts of 1, 4, and 9 is used to ensure that the output duration of all three branches remains constant. Therefore, the three branches are used to extract short-term, medium-term, and long-term fatigue time-series variation patterns, respectively.
[0093] To dynamically select the time scale based on the temporal characteristics of different EEG samples, the input sequence is first processed along the time dimension. Perform global average pooling to obtain the global temporal description vector of the current sample. Then, The input layer is sequentially normalized, followed by the first fully connected layer, the GELU activation layer, and the second fully connected layer to obtain the gated scores corresponding to the three convolutional branches. Finally, Softmax normalization is performed on the gated scores to obtain the dynamic fusion weights (i.e., multi-scale fusion weights) of the three branches. .
[0094] .
[0095] In the formula, This indicates that global average pooling is performed along the time dimension; Represents the global temporal description vector of the current EEG sample; , , and This represents the trainable parameters of the gated network; This represents the scale fusion weight vector corresponding to the current sample; all three weights are non-negative and their sum is 1.
[0096] The This is a sample-level dynamic weighting system, meaning that each EEG sample generates a set of three-scale fusion weights based on its complete temporal features. All time slices within the same sample share this set of weights, while different EEG samples can obtain different weight combinations. The three weights are used to adjust the relative contributions of short-term, medium-term, and long-term temporal features in the current sample, and do not correspond to fatigue classification categories.
[0097] The outputs of the three temporal convolutional branches are dynamically weighted and summed, and then Dropout, residual connections, and layer normalization are performed sequentially to obtain multi-scale temporal hybrid features: .
[0098] In the formula, This represents the feature sequence obtained after adaptive multi-scale temporal mixing; This represents the input feature sequence formed by fusing the CNN branch and the GCN branch, i.e., the spatial fusion feature sequence; Indicates the first The output of each temporal convolutional branch is the multi-scale temporal feature; Indicates the first Dynamic fusion weights for each branch, i.e., fusion weights for multiple scales; This represents the learnable residual scaling factor, used to adjust the degree of influence of multi-scale temporal augmentation information on the original input sequence; This indicates a Dropout operation; Presentation layer normalization operation. In one specific embodiment, It is initialized to 1 and updated along with other network parameters during model training.
[0099] To further enhance the local order and relative positional relationships between consecutive time slices, multi-scale temporal blending features are incorporated. The input is a local location convolution module, PosConv. PosConv contains two parallel one-dimensional depthwise convolution branches: the first branch uses a one-dimensional depthwise convolution with a kernel size of 7 and a dilation rate of 1 to extract local location relationships between adjacent time slices; the second branch uses a one-dimensional dilated depthwise convolution with a kernel size of 15 and a dilation rate of 2 to extract location relationships with a larger temporal span. The two branches use symmetrical zero-padding with padding amounts of 3 and 14 respectively to maintain consistent input and output time lengths.
[0100] The outputs of the two positional convolutional branches are added together, and residual fusion is performed using a learnable positional residual scaling factor and multi-scale temporal hybrid features to obtain the position-enhanced temporal feature sequence: .
[0101] In the formula, This represents a one-dimensional depthwise convolution with a kernel size of 7 and a dilation of 1. This represents a one-dimensional dilated depthwise convolution with a kernel size of 15 and a dilation rate of 2. This represents the learnable positional residual scaling factor; This refers to the enhanced temporal feature sequence, specifically the temporal feature sequence after position enhancement. Indicates the first The feature vectors obtained after multi-scale temporal blending and location enhancement of each time slice. In one specific embodiment, Initialize it to 0 so that PosConv approximately maintains an identity mapping in the initial stage of training and gradually learns the degree of injection of positional enhancement information during training.
[0102] Subsequently, temporal attention pooling was used to enhance the temporal feature sequences after location enhancement. The data is then aggregated. First, a parameter-shared linear scoring layer is used to aggregate the data from each time slice. The dimensional feature map is transformed into a scalar importance score; then, in all Softmax normalization is performed across time slices to obtain temporal attention weights; finally, the features of each time slice are weighted and summed according to the temporal attention weights to obtain the global temporal representation features: .
[0103] In the formula, Represents the trainable parameters of the time-attention scoring layer; Indicates the first Importance score of each time slice; Indicates the first The temporal attention weights corresponding to each time slice are equal to the sum of all temporal attention weights within the same sample, which is 1. This indicates the output of PosConv. Each time slice feature; The global temporal representation feature represents the sample-level global temporal representation obtained after temporal attention pooling.
[0104] Finally, the global temporal representation features Simultaneously, a classification head and a regression head are input. The classification head generates a fatigue classification score through linear mapping, which is then converted into a fatigue probability using a sigmoid function. Based on a preset or validation set-determined classification probability threshold, it outputs the specific fatigue category, such as conscious or fatigued. The regression head sequentially generates fatigue level estimates through a fully connected layer, a ReLU activation layer, and an output layer, approximating the PERCLOS continuous label of the corresponding EEG sample. Thus, by sharing spatial-temporal features and a joint classification-regression output structure, the final discrete classification and continuous regression prediction of fatigue states are achieved.
[0105] Furthermore, addressing the issues of opaque internal decision-making processes in traditional deep learning models and the inability of post-attribution algorithms to accurately reflect the model's forward inference logic, this application constructs an endogenous multi-level structured and interpretable output mechanism during multi-task prediction. First, the multi-task prediction module receives the global temporal representation features output in step S336. The auxiliary regression head uses the Smooth-L1 loss function to fit the continuous PERCLOS fatigue index to constrain the smoothness of the feature space; the main classification head uses the binary cross-entropy loss function to output discrete fatigue state binary classification results. Furthermore, during forward inference, the system does not rely on external interpretation algorithms, directly extracting the network's inherent intermediate variable outputs as the objective physiological decision-making basis for fatigue state identification. Extract the frequency band gating weights generated in step S31 (like Figure 5 As shown in the figure, this output parameter quantifies the physiological rhythm energy transfer during fatigue evolution. Data indicates that, under fatigue conditions, the model assigns higher weights to the Delta and Gamma bands while reducing the weights of the Alpha and Beta bands. This output exhibits band recalibration characteristics consistent with decreased cortical arousal and compensatory cognitive efforts in the mid-to-late stages.
[0106] Extract the spatial gating weights generated in step S31 (like Figure 6 As shown in the figure: This parameter outputs a two-dimensional spatial response map of a specific activated brain region. The topological distribution shows that the model significantly reduces the weight of the parieto-occipital regions (such as O1, O2, PO3, PO4) under fatigue conditions, while increasing the weight of the frontotemporal regions (such as FT7, FT8, T7, T8). This objectively reflects the decline in visual information processing efficiency caused by fatigue, as well as the compensatory activation of the executive control network.
[0107] Extract the fused adjacency matrix generated in step S32 (like Figure 7As shown in the figure, this matrix tracks the topological dynamics of long-range connections in the cortical brain network. The difference matrix indicates that fatigue-related network topology changes are not a globally uniform decay, but rather manifest as selective sparse rewiring of connection strength between local electrode pairs.
[0108] To verify the effectiveness of the method proposed in this application, experiments were conducted using the publicly available SEED-VIG dataset and a self-collected EEG fatigue dataset. 4D-CRNN, ESTCNN, EEGNet, and DGCNN were selected as comparison methods. The performance of each method was compared under the same data preprocessing procedures, the same training and testing splitting conditions, and the same evaluation metrics. These metrics included accuracy, F1 score, Kappa coefficient, recall, and precision to ensure consistency and objectivity in the comparisons between different methods.
[0109] Table 1. Performance Comparison Results of the Model and Comparison Method in this Application on the SEED-VIG Dataset
[0110] Table 2 Performance Comparison Results of Model and Comparison Method on Self-Collected Dataset
[0111] As shown in Tables 1 and 2, on both the publicly available SEED-VIG dataset and the self-collected dataset, the AG-MSNet model described in this application outperforms comparable methods such as 4D-CRNN, ESTCNN, EEGNet, and DGCNN in terms of evaluation metrics including Accuracy, F1-score, Kappa, Recall, and Precision. The results demonstrate that adaptive graph structure modeling and multi-scale temporal feature extraction can more fully utilize the spatial connectivity, spectral differences, and temporal evolution features in EEG signals, thereby improving the accuracy, stability, and generalization ability of fatigue state recognition.
[0112] The beneficial effects of the EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks proposed in this application are mainly reflected in: 1. This application aims to solve the difficulty of feature extraction caused by the strong coupling of temporal, spatial and spectral information of EEG signals in the prior art, alleviate the discriminative attenuation problem caused by strong coupling of multidimensional features, and improve the feature signal-to-noise ratio. By constructing a 4D EEG feature stream that retains explicit physical priors, introducing a global-local preprocessing attention module, and adopting a dual-stream topological sensing spatial encoder and a lightweight multi-scale temporal decoding module, the application obtains EEG fatigue recognition results and completes EEG fatigue decoding. Under the condition of reducing the number of model parameters and computational overhead, it effectively extracts the short-term transient fluctuations and long-range evolution features of fatigue state, realizes efficient and accurate decoding of complex temporal dynamic features, and thus improves the accuracy and interpretability of EEG fatigue recognition results.
[0113] 2. The step of obtaining a four-dimensional EEG feature tensor by strongly coupling the spatial topology and time-frequency characteristics of the EEG signal under test includes a time-slicing unit, a frequency band decomposition unit, and a differential entropy (DE) feature extraction unit. This unit is responsible for transforming the raw signal into a 4D feature flow that includes time slices, physiological frequency bands, and strictly maps the two-dimensional spatial topology of the real physical electrodes. This provides the entire system with prior data input that preserves the original geometric structure. This mechanism directly filters out fatigue-unrelated background noise at the front end, preserving fine-grained spatiotemporal differences in fatigue evolution, and improving the accuracy and regression fitting of subsequent multi-task predictions.
[0114] Simultaneously, the raw EEG signals are transformed into a 4D feature stream containing time slices, physiological frequency bands, and two-dimensional spatial topology. Unlike the abstract attention hidden deep within the network, this application introduces a GPLA module at the network's front end to directly perform pre-feature screening on this physically meaningful 4D tensor: In the spatial dimension, axial decomposition attention is used to decouple the horizontal and vertical receptive fields, capturing long-range spatial associations across brain regions with low parameter counts, generating two-dimensional spatial weights; in the frequency dimension, globally averaged features of the original input and spatially weighted input are fused, combined with one-dimensional efficient channel attention and gating units, to generate globally perceived physiological frequency band weights. This mechanism enables adaptive recalibration of fatigue-related spatial nodes and physiological frequency bands, filters irrelevant background noise, and provides a denoised and effective input representation for subsequent deep graph convolutions and temporal networks.
[0115] 3. Global-Local Preprocessing Attention Module: Deployed at the front end of the network architecture, this module performs pre-processing feature selection and noise reduction. It includes an axial spatial reweighting branch and a global frequency response calibration branch. Based on the characteristics of the input EEG sample, it adaptively evaluates and assigns higher activation weights to key spatial brain regions and core physiological rhythms, such as Delta or Gamma waves, thereby filtering out irrelevant background noise. It also adaptively decouples and recalibrates the original signal in terms of frequency band rhythms and two-dimensional spatial activation brain regions.
[0116] 4. Improved the shortcomings of pure data-driven graph networks at low signal-to-noise ratios, which are prone to artifact connections and "oversmoothing". Dual-stream topological sensing spatial coding module: used to jointly capture multi-level spatial interaction features in EEG signals. This module adopts a parallel dual-branch design: its local Euclidean convolution branch is responsible for extracting fine-grained spatial patterns in adjacent cortical regions; its dynamic sparse graph branch introduces the three-dimensional distance prior of physical electrodes, and in Top- Under sparsity constraints, long-range non-Euclidean topological link features across the brain are extracted. Local Euclidean convolution is used to extract adjacent cortical patterns, and the construction of a dynamic graph is guided by a physical prior distance matrix. This is achieved by introducing Top-... The sparsity constraint forces the severing of weak connections, enabling the network to dynamically adjust the fusion ratio of anatomical priors and data-driven topology based on input samples. This design blocks noise propagation under low signal-to-noise ratio conditions and improves the robustness of spatial global topological features to individual differences.
[0117] Meanwhile, the local convolution branch focuses on extracting fine-grained spatial patterns within adjacent brain regions; the graph convolution branch introduces a priori physical distance matrix of the actual electrode distribution as a low-level topological constraint, and combines it with dynamic Top- A sparsity mechanism is employed to forcibly sever weak connections caused by artifact noise, extracting long-range topological interaction features across brain regions. This dual-stream decoupling design effectively blocks graph propagation noise under low signal-to-noise ratios while preserving the high clustering and small-world properties of brain networks. It overcomes the feature assimilation and oversmoothing defects of fully connected dynamic graph networks, achieving noise-resistant and robust EEG spatial feature representation.
[0118] 5. It alleviates the computational bottleneck and overfitting risk of long-sequence EEG temporal modeling. A lightweight multi-scale temporal decoding module is used for efficient modeling of the temporal evolution dynamics of fatigue states. This module employs parallel multi-scale one-dimensional depthwise separable convolutions to simultaneously capture short-term transient fluctuations and long-term macroscopic trends during driving fatigue; and combines local location convolutions with temporal inductive bias injection, achieving linear time complexity. It replaces the computationally expensive self-attention mechanism, outputting sample-level shared semantic representations. Simultaneously, a lightweight multi-scale temporal decoding module replaces the traditional self-attention architecture (such as Transformer) with quadratic complexity. Through parallel mixing of multi-scale one-dimensional depthwise separable convolutions and explicit injection of temporal inductive biases using local positional convolutions (PosConv1D), it effectively extracts short-term transient fluctuations and long-range evolution features of fatigue states while reducing the number of model parameters and computational overhead.
[0119] Meanwhile, traditional recurrent neural networks (RNNs) are difficult to parallelize, and the self-attention mechanism (Transformer) has... To address the drawbacks of quadratic computational complexity and overfitting, this application incorporates a method after spatial feature fusion that... A lightweight multi-scale temporal decoding module with linear time complexity is proposed. This module employs parallel one-dimensional convolutions with varying kernel sizes and dilatation rates to decouple the extraction of long-term macroscopic decay trends and short-term local transient fluctuations in the EEG fatigue evolution process. Furthermore, it replaces absolute positional encoding with local positional convolution (PosConv), implicitly injecting positional priors while preserving the temporal translation invariance of physiological sequences. This design achieves efficient and accurate decoding of complex temporal dynamic features with low parameter count and computational overhead.
[0120] 6. Classification-Oriented Multi-Task Prediction: As the final output, it receives the shared representations output by the aforementioned temporal decoder. Multi-task prediction utilizes a linear classification head for outputting discrete fatigue states and a parallel auxiliary regression head for fitting continuous PERCLOS indices, achieving a unified framework that balances continuous physiological representation learning with discrete practical early warning decisions. Interpretability is integrated as an inherent computational component of the network's forward inference, natively outputting multi-level structured parameters without relying on external post-interpretation algorithms: through the output frequency band-gated weights, the increase in slow waves and... Energy transfer due to wave attenuation; spatial transfer between visual cortex response attenuation and compensatory activation in the frontotemporal region was located through output spatial gating weights; the selective sparse reconnection process across brain regions was quantified through the convolutional adjacency matrix of the final output graph. This mechanism makes the internal decision-making process of deep learning transparent, providing objective physical evidence for fatigue warning.
[0121] Meanwhile, addressing the shortcomings of traditional deep learning models—such as a lack of transparency and the inability of post-hoc attribution algorithms to accurately reflect internal decision-making logic—this application incorporates an interpretability module as an inherent computational component for network forward inference. When performing EEG fatigue decoding tasks, this framework natively outputs multi-level structured parameters without relying on external interpretation algorithms. These parameters include: physiological band recalibration weights reflecting rhythmic energy transfer, a two-dimensional spatial response distribution map reflecting brain region activation states, and a selective sparse edge reconnection matrix reflecting brain network topological evolution. This endogenous mechanism enhances the transparency of the model's decision-making process, enabling the spatial transfer and band reorganization patterns extracted by deep learning to exhibit interpretable characteristics consistent with prior knowledge in cognitive neuroscience.
[0122] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 8As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores the EEG signals to be tested. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks.
[0123] Those skilled in the art will understand that Figure 8 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0124] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0125] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0126] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0127] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0128] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, etc., and are not limited to these.
[0129] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0130] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for decoding brainwave fatigue based on adaptive graphs and multi-scale temporal networks, characterized in that, The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks includes: The electroencephalogram (EEG) signal to be tested is acquired using electrodes; The EEG signal to be tested is strongly coupled with spatial topology and time-frequency characteristics to obtain a four-dimensional EEG feature tensor; the four-dimensional EEG feature tensor is a feature tensor with four dimensions including time slices, physiological frequency bands and two-dimensional space. The four-dimensional EEG feature tensor is input into the EEG fatigue recognition model to obtain the EEG fatigue recognition result, thus completing the EEG fatigue decoding. The EEG fatigue recognition result includes: fatigue category and fatigue level estimate. The EEG fatigue recognition model includes: a global-local preprocessing attention module, a two-stream topology-aware spatial encoder, and a lightweight adaptive multi-scale temporal hybridization module. The global-local preprocessing attention module is used to perform secondary calibration on the four-dimensional EEG feature tensor to obtain recalibrated features. The two-stream topology-aware spatial encoder is used to perform spatial fusion on the recalibrated features to obtain a spatial fusion feature sequence. The lightweight adaptive multi-scale temporal hybridization module is used to dynamically weight and classify the spatial fusion feature sequence to obtain the EEG fatigue recognition result.
2. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 1, characterized in that, The electrodes include effective electrodes and ineffective electrodes; The EEG signal to be tested is strongly coupled with its spatial topology and time-frequency characteristics to obtain a four-dimensional EEG feature tensor, specifically including: Based on the distribution of the electrodes, a two-dimensional mesh is constructed; The EEG signal to be tested is divided into time segments according to a preset time to obtain multiple time slices of EEG signal; Physiological frequency band signals are extracted from the EEG signals of each time slice corresponding to the effective electrode, and differential entropy features are calculated; the differential entropy features are the entropy features of the physiological frequency band signals of each time slice corresponding to the effective electrode. The differential entropy features are mapped onto the two-dimensional grid to obtain a four-dimensional EEG feature tensor.
3. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 1, characterized in that, The four-dimensional EEG feature tensor is recalibrated twice to obtain recalibrated features, specifically including: Spatial extraction is performed on the four-dimensional EEG feature tensor to obtain spatial gating weights and spatially weighted intermediate tensors; Frequency band extraction is performed on the four-dimensional EEG feature tensor and the spatially weighted intermediate tensor to obtain the frequency band gating weights; The recalibrated features are obtained by fusing the four-dimensional EEG feature tensor, the spatially weighted intermediate tensor, and the frequency band gating weights.
4. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 3, characterized in that, Spatial extraction is performed on the four-dimensional EEG feature tensor to obtain spatial gating weights and spatially weighted intermediate tensors, specifically including: Convolution is performed on the four-dimensional EEG feature tensor to obtain convolutional features; A one-dimensional large kernel attention mechanism is used to extract the convolutional features to obtain spatial gating weights; The four-dimensional EEG feature tensor and the spatial gating weights are fused to obtain a spatially weighted intermediate tensor.
5. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 3, characterized in that, The expression for frequency band extraction is: 。 in, For the first The first time slice Frequency band gating weights for physiological frequency band signals; Use the Sigmoid activation function; For the first Scaling parameters for each physiological frequency band signal; For the first Temperature parameters of physiological frequency band signals; For attention operations; This is a global average pooling operation; For the first Four-dimensional EEG feature tensors for each time slice; For the first Spatial weighted intermediate tensors of time slices.
6. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 1, characterized in that, Spatial fusion of the recalibrated features yields a spatial fusion feature sequence, specifically including: Local feature extraction is performed on the recalibrated features to obtain local spatial features; Frequency band features are extracted from the recalibrated features to obtain an initial node feature matrix; A static prior graph is constructed based on the distance between the electrodes; The effective electrode is extracted from the recalibrated features to obtain the effective feature matrix; Node feature similarity is calculated on the effective feature matrix to obtain an initial dense dynamic graph; The initial dense dynamic graph is sequentially subjected to sparsification, symmetry, and normalization to obtain a sparsified dynamic graph. Based on the static prior graph and the sparsified dynamic graph, a fused adjacency matrix is generated. Based on the initial node feature matrix and the fused adjacency matrix, a two-layer graph convolutional network is used to fuse them to obtain the fused node feature matrix. Based on the fused node feature matrix, the importance score and attention weight of the node are calculated. Based on the fused node feature matrix, as well as the node importance score and attention weight, global topological features are generated; The local spatial features and the global topological features are concatenated to obtain a spatial fusion feature sequence.
7. The EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks according to claim 1, characterized in that, The spatial fusion feature sequence is dynamically weighted and classified to obtain the EEG fatigue recognition result, specifically including: Convolution is performed on the spatial fusion feature sequence to obtain multi-scale temporal features; Global average pooling is performed on the spatial fusion feature sequence to obtain a global temporal description vector; Based on the global temporal description vector, multiple scale fusion weights are generated; The spatial fusion feature sequence, the multi-scale temporal features, and the multi-scale fusion weights are dynamically weighted and summed to obtain the multi-scale temporal hybrid features. The multi-scale temporal hybrid features are subjected to deep convolution to obtain an enhanced temporal feature sequence; Based on the enhanced temporal feature sequence, a global temporal representation feature is generated; The global temporal representation features are input into the classification head and regression head to obtain fatigue category and fatigue degree estimates.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the EEG fatigue decoding method based on adaptive graphs and multi-scale temporal networks as described in any one of claims 1-7.