Driver cognitive load electroencephalogram signal classification method based on dynamic graph attention network
Through dynamic graph attention networks, the problem of failure to capture dynamic changes in driving tasks in the existing technology is solved, and high-precision cognitive load classification is achieved, driving safety and the practicality of intelligent driving assistance systems are improved.
Patent Information
- Application Number
- CN202510478347.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, the cognitive load classification method based on EEG signals fails to fully capture the dynamic change characteristics in driving tasks and the complex spatial and temporal dependence between leads, and lacks high ecologically efficient driving-related scenario data, resulting in insufficient accuracy and applicability of the classification model.
The dynamic graph attention network is adopted, and by constructing a dynamic graph structure, the EEG data is obtained in real time, the multi-head graph attention mechanism is used to learn the attention weight between nodes, and the adjacent matrix is generated by combining functional connection indicators to achieve dynamic feature extraction and classification of EEG signals.
It significantly improves the accuracy and real-time nature of cognitive load classification, adapts to dynamic changes in driving tasks, provides higher classification accuracy and applicability, and provides solid technical support for driving safety monitoring and intelligent driving assistance systems.
Smart Images

Figure CN120493050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of driver cognitive load EEG signal classification, and in particular to a driver cognitive load EEG signal classification method based on a dynamic graph attention network. Background Art
[0002] Driver cognitive load is a key factor affecting driving safety. When the driving task is complex, environmental conditions fluctuate, or the driver drives for extended periods, their cognitive load can increase significantly, leading to prolonged reaction times and reduced operational accuracy, thereby increasing the risk of traffic accidents. Therefore, real-time assessment of the driver's cognitive load is crucial for improving driving safety. Electroencephalogram (EEG), an important physiological signal that directly reflects brain activity, has become a research hotspot in the field of cognitive load assessment due to its high temporal resolution and correlation with cognitive load.
[0003] However, existing EEG-based cognitive load classification methods still suffer from several shortcomings. Traditional methods mostly rely on static feature extraction or single-task conditions, failing to fully capture the dynamic changes in EEG signals during driving tasks and the complex spatiotemporal dependencies between leads. Furthermore, graph structure analysis typically assumes fixed lead relationships, ignoring the dynamic adjustment mechanism of the graph structure topology during driving. This assumption is difficult to adapt to the changes in cognitive load status in actual driving situations. At the same time, currently available EEG datasets are mostly based on laboratory tasks and lack driving-related scenario data with high ecological validity, which limits the practical application of classification models. Summary of the Invention
[0004] The purpose of this invention is to provide a driver cognitive load EEG signal classification method based on a dynamic graph attention network. By dynamically modeling the lead relationship of EEG signals and combining the complex characteristics of driving tasks, different driving cognitive load levels can be accurately identified, providing real-time and effective support for driving safety monitoring and intelligent assistance systems.
[0005] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0006] The driver cognitive load EEG signal classification method based on dynamic graph attention network includes:
[0007] Building a dynamic graph attention neural network;
[0008] The driver's EEG data is acquired in real time during driving and divided into time windows. The data of each time window is pre-processed and input into a trained dynamic graph attention neural network to obtain the classification result of the EEG data corresponding to the time window. The dynamic graph attention neural network includes an EEG signal acquisition unit, a feature extraction unit, a graph attention unit, and a classification unit.
[0009] The EEG signal acquisition unit is used to acquire EEG data in real time and perform preprocessing by constructing a graph structure;
[0010] The feature extraction unit extracts feature vectors based on the preprocessed EEG data and constructs a feature matrix of nodes in the graph structure. At the same time, it calculates the functional connectivity index that represents the connection relationship between nodes in the graph structure to generate an adjacency matrix.
[0011] The graph attention unit includes multiple graph attention layers based on the multi-head graph attention mechanism. In each graph attention layer, the feature vector of the node is used to learn the attention weight. By weighted aggregation of the attention weights between different nodes, the feature matrix of the node is updated in combination with the adjacency matrix. The final feature matrix is output through the last graph attention layer.
[0012] The classification unit performs classification based on the final feature matrix and outputs the classification results.
[0013] Furthermore, the feature extraction unit extracts feature vectors based on the preprocessed EEG data, where the feature vector of the i-th node is represented as: h i =[F std ,F PSD ,F band ,MSE];F std ,F PSD ,F band ,MSE represent the standard deviation, power spectral density, frequency band energy, and multi-scale entropy calculated from EEG data;
[0014] Then the initial characteristic matrix is: H=[h1,h1,...,h N ] T ; where N is the number of nodes and the superscript T indicates transpose.
[0015] Furthermore, the feature extraction unit uses EEG electrode channels as nodes of the graph structure and generates a dynamic adjacency matrix by calculating functional connectivity indicators in each time window.
[0016] Furthermore, the functional connectivity indices include phase locking value, phase lag index and mutual information calculated from EEG data;
[0017] Calculate the phase locking value PLV between the i-th node and the j-th node using EEG data ij , PLV ij As the adjacency matrix A PLV The element value of the i-th row and j-th column in the equation; the phase lag index PLI of the i-th node and the j-th node is calculated using the phase of the EEG data ij , PLI ij As the adjacency matrix A PLI The element value of the i-th row and j-th column in ; the mutual information MI between the i-th node and the j-th node is calculated using the joint distribution and marginal distribution of EEG data ij , MI ij As the adjacency matrix A MI The value of the element in row i and column j;
[0018] For three adjacency matrices A PLV 、A PLI and A MI Perform normalization processing separately to obtain the normalized result A' of each adjacency matrix PLV , A′ PLI and A′ MI ;
[0019] The final adjacency matrix is generated by weighted averaging:
[0020] A=αA′ PLV +βA′ ALI +γA′ MI
[0021] Among them, α, β, and γ are learnable weight parameters and their sum is 1.
[0022] Furthermore, a total of L graph attention layers are set, and K attention heads are set in each graph attention layer. When l = 1, the input of the first graph attention layer is the adjacency matrix A and the initial feature matrix H. The processing process of the kth attention head in is as follows:
[0023] (3.1) For each node’s feature vector Apply a linear change:
[0024]
[0025] where h i represents the eigenvector of the i-th node obtained from the feature matrix H; W k Denotes the learnable linear change matrix of the kth attention head, z i Represents the eigenvector after linear change;
[0026] (3.2) For the i-th node, the adjacency matrix A and the preset threshold θ are used to determine whether the i-th node and other nodes need to calculate the attention weight:
[0027] If the element A in the i-th row and j-th column of the adjacency matrix A ij ≥θ, indicating that there is a strong connection between the i-th node and the j-th node, and all nodes with strong connections constitute the neighbor node set of the i-th node Then continue (3.3) to calculate the attention weight; otherwise, if A ij <θ, attention weight is not calculated;
[0028] (3.3) For the linearly changed eigenvector z of the i-th node and the j-th node in its neighbor node set i and z j , calculate the attention weights of the two:
[0029] e ij =LeakyReLU(a T [z i ||z j ])
[0030] Among them, [z i ||z j ] represents the eigenvector z i and z j The splicing process, LeakyReLU is the activation function, and a is the learnable attention vector;
[0031] Normalize the attention weights:
[0032]
[0033] in, represents the normalized attention weight of the kth attention head; the kth node is A node in
[0034] Finally, aggregate the neighbor features to obtain the new feature vector of the node calculated by the kth attention head:
[0035]
[0036] in, is the feature vector of the i-th node after the k-th attention head calculates it, ReLU is the activation function, h j Represents the feature vector of the jth node;
[0037] The new feature vector after all K attention heads in the lth graph attention layer process the feature vector of the node:
[0038]
[0039] Using the new feature vector h′ of all nodes i , construct the feature matrix H output by the first graph attention layer l .
[0040] Furthermore, for the case of l>1, the feature matrix H output by the previous graph attention layer is l As the input of the next graph attention layer, using the adjacency matrix A and feature matrix H l Calculate the feature matrix H of this layer l+1 ; The feature matrix output by the last graph attention layer is recorded as H L .
[0041] Furthermore, the classification unit is based on the feature matrix H output by the last graph attention layer L Implement classification;
[0042] First, the final aggregate features are calculated by average pooling:
[0043]
[0044] Among them, h t Represents the feature matrix H L The eigenvectors in ;
[0045] Secondly, the classification score is output through the fully connected layer:
[0046] Output=softmax(W c h global )
[0047] Among them, W c Represents the learnable classification weight matrix, and softmax is the classification function.
[0048] A terminal device includes a processor, a memory, and a computer program stored in the memory; when the processor executes the computer program, the driver cognitive load EEG signal classification method based on a dynamic graph attention network is implemented.
[0049] A computer-readable storage medium stores a computer program; when the computer program is executed by a processor, the driver's cognitive load EEG signal classification method based on a dynamic graph attention network is implemented.
[0050] Compared with the prior art, the present invention has the following technical features:
[0051] The present invention achieves high-precision classification of the driver's cognitive load status by innovatively combining data collection of virtual driving scenarios with dynamic graph attention network modeling technology. This method overcomes the limitations of traditional technologies in modeling static features of EEG signals, and effectively solves the problem that fixed topological graph structures are difficult to adapt to dynamic changes in driving tasks, thereby significantly improving the accuracy, real-timeness and applicability of cognitive load classification, and providing solid technical support for driving safety monitoring and intelligent driving assistance systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 Schematic diagram of the architecture of the dynamic graph attention neural network of the present invention;
[0053] Figure 2 A schematic diagram of a virtual driving scene constructed in the present invention;
[0054] Figure 3 The experimental results of the comparison between this method and traditional methods on existing public datasets, where (a) is the three-category accuracy on the STEW dataset; (b) is the confusion matrix of this method on the STEW dataset; (c) is the three-category F1 score of different methods in 5-fold cross validation;
[0055] Figure 4 The figures are the comparative experimental results of this method and traditional methods on the existing self-built dataset of the present invention, where (a) is the three-category accuracy on the self-built dataset; (b) is the confusion matrix of this method on the self-built dataset; (c) is the three-category F1 score of different methods in 5-fold cross validation. DETAILED DESCRIPTION
[0056] The present invention provides a method for classifying driver cognitive load EEG signals based on a dynamic graph attention network. By innovatively combining data collection of virtual driving scenarios with dynamic graph attention network modeling technology, high-precision classification of the driver's cognitive load status is achieved. This method overcomes the limitations of traditional technologies in modeling static features of EEG signals, and effectively solves the problem that fixed topology brain networks are difficult to adapt to dynamic changes in driving tasks, thereby significantly improving the accuracy, real-time nature, and applicability of cognitive load classification, and providing solid technical support for driving safety monitoring and intelligent driving assistance systems. The method of the present invention is specifically as follows:
[0057] Constructing a dynamic graph attention neural network;
[0058] A virtual driving scenario is constructed, EEG data is collected and a data set is constructed, and the data set is used to train the dynamic graph attention neural network. In actual application, the driver's EEG data is collected in real time by an EEG signal acquisition unit, divided according to time windows, and the data of each time window is preprocessed and input into the trained dynamic graph attention neural network to obtain a classification result of the EEG data corresponding to the time window.
[0059] The dynamic graph attention neural network includes an EEG signal acquisition unit, a feature extraction unit, a graph attention unit, and a classification unit; wherein:
[0060] The EEG signal acquisition unit is used to acquire EEG data in real time and perform preprocessing by constructing a graph structure;
[0061] The feature extraction unit extracts feature vectors based on the preprocessed EEG data and constructs a feature matrix of nodes in the graph structure. At the same time, it calculates the functional connectivity index that represents the connection relationship between nodes in the graph structure to generate an adjacency matrix.
[0062] The graph attention unit includes multiple graph attention layers based on the multi-head graph attention mechanism. In each graph attention layer, the feature vector of the node is used to learn the attention weight. By weighted aggregation of the attention weights between different nodes, the feature matrix of the node is updated in combination with the adjacency matrix. The final feature matrix is output through the last graph attention layer.
[0063] The classification unit performs classification based on the final feature matrix and outputs the classification results.
[0064] 1. Dynamic Graph Attention Neural Network.
[0065] Construct a dynamic graph attention neural network; the design of the dynamic graph attention neural network aims to accurately capture the changes in the driver's brain network topology under different cognitive load states by dynamically modeling the spatiotemporal characteristics of EEG data, and achieve high-precision classification.
[0066] 1. EEG signal acquisition unit.
[0067] In the EEG signal acquisition unit, the driver's EEG data is acquired in real time using devices such as an EEG cap, and the EEG data is preprocessed.
[0068] 2. Feature extraction unit.
[0069] The feature extraction unit uses EEG electrode channels as nodes of a graph structure and generates a dynamic adjacency matrix by calculating functional connectivity indicators that characterize the connection relationships (edges) between nodes within each time window; the functional connectivity indicators include phase locking value, phase lag index and mutual information.
[0070] The core of the dynamic graph attention network lies in its ability to reflect the dynamic characteristics of EEG signals in real time through dynamic topological modeling. This method treats EEG electrode channels as nodes in a graph structure, selects relevant node features, and constructs a dynamic graph topology by calculating functional connectivity metrics between nodes as graph edges. These metrics reflect the synchrony and interaction strength between leads, revealing functional connectivity patterns in brain activity under varying levels of cognitive load. By dynamically updating the graph topology, the method overcomes the limitations of traditional static graph structures, which are unable to adapt to the spatiotemporal changes in complex driving tasks, and provides more flexible and accurate EEG feature modeling capabilities.
[0071] 2.1 Feature Matrix
[0072] The EEG electrode channel, that is, the EEG data sequence collected by the node is expressed as: X∈R N×T ; where N is the number of EEG electrodes (nodes), T is the number of sampling points in each time window, and R represents the real space.
[0073] After extracting the features of the EEG data collected by all EEG electrode channels in each time window, the initial feature matrix of the node is obtained: H∈R N×F ; Where F is the node feature, including standard deviation, power spectrum density, frequency band energy, and multi-scale entropy, as described below:
[0074] (1) Standard Deviation.
[0075]
[0076] Among them, F std represents the standard deviation of an EEG electrode channel (node) in the current time window, T represents the total number of sampling points in the time window, x(t) represents the EEG data of the current node at time point t, and F mean Represents the average value of all EEG data of the node in the current time window. The calculation formula is:
[0077] (2) Power Spectral Density (PSD).
[0078] For the EEG data collected at each node, the power of the Delta (0.5-4 Hz), Theta (4-8 Hz), Alpha (8-13 Hz), Beta (13-30 Hz), and Gamma (30-50 Hz) frequency bands is calculated using Fast Fourier Transform (FFT):
[0079]
[0080] Among them, F PSD represents the power spectral density of the node at frequency f, and X(f) represents the frequency domain representation of the EEG data collected by the node obtained by fast Fourier transform, that is, the complex amplitude of the signal at frequency f.
[0081] (3) Band Power
[0082] For the EEG data collected by each node, calculate the energy of the Delta (0.5-4Hz), Theta (4-8Hz), Alpha (8-13Hz), Beta (13-30Hz), and Gamma (30-50Hz) frequency bands:
[0083]
[0084] Among them, F band represents the energy of the frequency band, f1 represents the upper limit frequency of the frequency band, f2 represents the lower limit frequency of the frequency band, and df represents the differential of the frequency.
[0085] (4) Multiscale Entropy (MSE).
[0086] First, construct a multi-scale time series by coarse-graining the EEG data series. The specific steps are as follows:
[0087] For the EEG data sequence X={x1,x2,x3,......,x N}, select a time scale τ; for each time scale τ, divide the sequence into non-overlapping subsequences of length τ, and calculate the mean of each subsequence to obtain the coarse-grained sequence Y τ ;
[0088] Secondly, for each coarse-grained sequence Y τ Column calculation sample entropy SampEn τ , used to quantify the complexity of EEG data at this time scale τ;
[0089] Finally, by max Calculate the sample entropy and obtain the curve of sample entropy changing with time scale as the multi-scale entropy:
[0090] In summary, the eigenvector of the i-th node can be expressed as: h i =[F std ,F PSD ,F band ,MSE]; then the initial feature matrix is: H=[h1,h1,...,h N] T ∈R N×F .
[0091] 2.2 Generation of functional connectivity indicators and adjacency matrix.
[0092] The adjacency matrix is calculated using the EEG data collected in each time window. First, the EEG data of the nodes are used to calculate several functional connectivity indicators between the nodes. After weighted fusion of all functional connectivity indicators, the final adjacency matrix is obtained.
[0093] The functional connectivity indicators include:
[0094] (1) Phase Locking Value (PLV).
[0095] Calculate the phase locking value PLV between the i-th node and the j-th node using EEG data ij , PLV ij As the adjacency matrix A PLV The element value in the i-th row and j-th column of ; the matrix size is N×N.
[0096] (2) Phase Lag Index (PLI).
[0097] The phase lag index PLI of the i-th node and the j-th node is calculated using the phase of the EEG data ij , PLI ij As the adjacency matrix A PLI The element value in the i-th row and j-th column of ; the matrix size is N×N.
[0098] (3) Mutual Information (MI).
[0099] The mutual information MI between the i-th node and the j-th node is calculated using the joint distribution and marginal distribution of EEG data. ij , MI ij As the adjacency matrix A MI The element value in the i-th row and j-th column of ; the matrix size is N×N.
[0100] For three adjacency matrices A PLV 、A PLI and A MI Perform normalization processing separately to obtain the normalized result A' of each adjacency matrix PLV , A′ PLI and A′ MI ;
[0101] Introduce learnable weights w1, w2, w3 and generate the final adjacency matrix by weighted average:
[0102] A=αA′ PLV +βA′ ALI +γA′ MI
[0103] Among them, α, β, and γ are learnable weight parameters and their sum is 1. During the network training process, backpropagation optimization is used to make it adaptively reflect the contribution of each indicator to the cognitive load classification. In practical applications, new EEG data is obtained in each time window, and the adjacency matrix A is updated based on the EEG data.
[0104] 3. Graph attention unit.
[0105] The graph attention unit includes multiple graph attention layers. A multi-head graph attention mechanism is set in each graph attention layer. The multi-head graph attention mechanism updates the feature matrix in combination with the current feature matrix and the adjacency matrix.
[0106] The multi-head graph attention mechanism uses multiple attention heads to perform weighted aggregation on the feature vectors of nodes from different perspectives, thereby fully capturing the complex interactions between nodes in the graph structure; each attention head independently learns a set of attention weight matrices to generate weighted feature representations for each node, and finally splices the outputs of multiple attention heads to improve feature expression capabilities and model robustness, thereby more accurately capturing key features related to changes in cognitive load in the graph structure.
[0107] In this scheme, a total of L graph attention layers are set, and K attention heads are set in each graph attention layer. When l = 1, that is, the input of the first graph attention layer is the adjacency matrix A and the initial feature matrix H, the processing process of the kth attention head is as follows:
[0108] (3.1) For each node’s feature vector Apply a linear change:
[0109]
[0110] where h i represents the feature vector of the i-th node obtained from the feature matrix H, whose dimension is F, as the input of the current attention head; W k The learnable linear transformation matrix of the k-th attention head is represented, mapping the features from dimension F to F'; z i ∈R F' Represents the eigenvector after linear transformation.
[0111] (3.2) For the i-th node, the adjacency matrix A and the preset threshold θ are used to determine whether the i-th node and other nodes need to calculate the attention weight:
[0112] If the element A in the i-th row and j-th column of the adjacency matrix A ij ≥θ, indicating that there is a strong connection between the i-th node and the j-th node, and all nodes with strong connections constitute the neighbor node set of the i-th node Then continue (3.3) to calculate the attention weight; otherwise, if A ij <θ, indicating that the connection between the i-th node and the j-th node is weak, and the attention weight is not calculated.
[0113] (3.3) For the linearly changed eigenvector z of the i-th node and the j-th node in its neighbor node set i and z j , calculate the attention weights of the two:
[0114]
[0115] Among them, [z i ||z j ] represents the eigenvector z i and z j The splicing process, LeakyReLU is the activation function, a is the learnable attention vector, and the superscript T represents transposition.
[0116] Normalize the attention weights:
[0117]
[0118] in, represents the normalized attention weight of the kth attention head; the kth node is A node in .
[0119] Finally, aggregate the neighbor features to obtain the new feature vector of the node calculated by the kth attention head:
[0120]
[0121] in, is the feature vector of the i-th node after the k-th attention head calculates it, ReLU is the activation function, h j Represents the feature vector of the j-th node.
[0122] Therefore, the new feature vector after all K attention heads in the lth graph attention layer process the feature vector of the node is:
[0123]
[0124] Using the new feature vector h′ of all nodes i , construct the feature matrix H output by the first graph attention layer l ∈RN ×(K·F) .
[0125] For the case of l>1, that is, starting from the second graph attention layer, the feature matrix H output by the previous graph attention layer l As the input of the next graph attention layer, using the adjacency matrix A and feature matrix H l Calculate the feature matrix H of this layer in the same way as above l+1 ; The feature matrix output by the last graph attention layer is recorded as H L .
[0126] By stacking multiple layers of graph attention layers, the feature matrix is gradually refined, where the adjacency matrix A is used as a topological constraint to ensure that the multi-layer updates are consistent with the interactive characteristics of the EEG data.
[0127] 4. Taxonomic unit.
[0128] The classification unit is based on the feature matrix H output by the last graph attention layer L Implementation classification, as follows:
[0129] First, the final aggregate features are calculated by average pooling:
[0130]
[0131] Among them, h t Represents the feature matrix H L The eigenvectors in .
[0132] Secondly, the classification score is output through the fully connected layer:
[0133] Output=softmax(W c h global )
[0134] Among them, W c represents the learnable classification weight matrix.
[0135] The output of the fully connected layer is the NASA-TLX score predicted from the EEG data. Based on the correspondence between the preset NASA-TLX score range and the cognitive load level (low load, medium load, high load), the cognitive load level corresponding to the NASA-TLX score range in which the score result falls is used as the classification result, and the score and classification results of the current time window are output in real time through the display screen.
[0136] 2. Network training process
[0137] A virtual driving scene is built, EEG data is collected and a data set is constructed, and the data set is used to train the dynamic graph attention neural network. In actual application, the driver's EEG data is collected in real time by an EEG signal acquisition unit and divided according to time windows. The data of each time window is preprocessed and then input into the trained dynamic graph attention neural network to obtain the classification result of the EEG data corresponding to the time window.
[0138] First, the data set is constructed. In this scheme, a virtual scene is built to collect EEG data to construct the data set, and the training set and the validation set are divided. Figure 2 As shown in the figure, a virtual reality device is used to construct a driving scenario. In the driving device contained in the virtual reality device, the driver wears a multi-channel EEG cap (64-channel device) to record EEG data during driving. The collected EEG data is preprocessed, including bandpass filtering, artifact removal, and segmentation according to time windows. The EEG data of each time window is used as a sample, and the NASA-TLX subjective score of the cognitive load level is used as the sample label.
[0139] Equipment: Boruikang 64-channel EEG cap; electrode configuration: following the international 10-20 system, 64-lead configuration; sampling rate: 500 Hz.
[0140] The driving scenario includes three tasks with different cognitive load levels:
[0141] Low load: sunny weather, the driving environment is a simple flat and straight road condition, there are no obstacles or interference tasks, there are no other conditions and restrictions, and the driving conditions are easy.
[0142] Medium load: Under cloudy conditions, the driving scenario includes curved roads, speed limit adjustments, and traffic light interactions, accompanied by slight traffic interference, making the driving task slightly more complicated.
[0143] High load: Driving on mountain roads on rainy nights is challenging due to complex and changing road conditions, dense traffic interference, and a high driving workload.
[0144] When training the dynamic graph attention neural network, a variety of parameter optimization strategies are used to tune the key parameters of the dynamic graph attention neural network (learning rate, number of attention heads K, etc.); the parameter optimization strategies are:
[0145] Grid Search: Systematically searches for the best parameter configuration by iterating over predefined parameter combinations to ensure the accuracy and robustness of the model in classification tasks.
[0146] Bayesian optimization: Use probabilistic models to model the parameter space and intelligently select the optimal parameter combination, significantly reducing search space and time costs.
[0147] Early stopping mechanism: An early stopping strategy is added during model training to avoid overfitting and improve the generalization ability of the model; the trained network is finally used to perform classification tasks with a low cognitive load level.
[0148] Regularization technology: Dropout and L2 regularization are introduced to effectively prevent the model from overfitting in high-dimensional feature space.
[0149] Batch normalization: Add batch normalization operations after each network layer to stabilize the input feature distribution and improve training efficiency.
[0150] Initialization strategy: Use the Xavier initialization method to initialize the network weights to improve the stability and convergence speed of model training.
[0151] In actual driving scenarios, drivers wear brain computers to obtain real-time EEG data, which is divided into time windows. The EEG data of each time window is pre-processed by bandpass filtering, artifact removal, and other methods before being input into the trained network to obtain the scoring and classification results of the cognitive load level.
[0152] When the classification result shows a high-load state, the system reminds the driver to pay attention or adjust the state through voice prompts or visual alerts on the instrument panel.
[0153] If the high-load state continues for more than the set time, the system will suggest the driver to take a short break through voice or display, or activate the assisted driving mode if necessary to ensure driving safety.
[0154] Figure 2 This paper describes the experimental process for constructing a driver cognitive load EEG signal dataset. The dataset consists of three 20-minute driving segments, each of which randomly presents three different driving conditions. This randomization simulates real-world driving scenarios and eliminates driver fatigue and distraction. After each driving segment, the subjective NASA-TXL scale is filled in as the primary label, followed by a three-minute break before the next driving segment.
[0155] 3. Model Performance Verification
[0156] The public datasets CL-Drive and STEW are used to verify the model performance. The experiment evaluates the model performance through classification accuracy, recall rate and F1 score. The proposed method (DGAT) is compared with traditional methods (GCN, RNN) to prove the superiority of dynamic graph attention network in cognitive load classification. The experimental results are presented in the form of mean and standard deviation to ensure the reliability of the results. Figure 3 shown.
[0157] The validation set divided from the dataset constructed by the present invention is used to conduct a comparative experiment on this method (DGAT) and traditional methods (GCN, RNN). The results are as follows: Figure 4 shown.
[0158] Verification with public datasets and self-built datasets of the present invention shows that the method of the present invention has higher classification accuracy and higher F1 score than existing methods, which verifies the effectiveness and accuracy of the network model of the present invention, and has good generalization.
[0159] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A driver cognitive load EEG signal classification method based on dynamic graph attention network, characterized by: include: Constructing a dynamic graph attention neural network; The driver's EEG data is acquired in real time during driving and divided into time windows. The data of each time window is pre-processed and input into a trained dynamic graph attention neural network to obtain the classification result of the EEG data corresponding to the time window. The dynamic graph attention neural network includes an EEG signal acquisition unit, a feature extraction unit, a graph attention unit, and a classification unit. The EEG signal acquisition unit is used to acquire EEG data in real time and perform preprocessing by constructing a graph structure; The feature extraction unit extracts feature vectors based on the preprocessed EEG data and constructs a feature matrix of nodes in the graph structure. At the same time, it calculates the functional connectivity index that represents the connection relationship between nodes in the graph structure to generate an adjacency matrix. The graph attention unit includes multiple graph attention layers based on the multi-head graph attention mechanism. In each graph attention layer, the feature vector of the node is used to learn the attention weight. By weighted aggregation of the attention weights between different nodes, the feature matrix of the node is updated in combination with the adjacency matrix. The final feature matrix is output through the last graph attention layer. The classification unit performs classification based on the final feature matrix and outputs the classification results.
2. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 1 is characterized in that: The feature extraction unit extracts feature vectors based on the preprocessed EEG data, where the feature vector of the i-th node is expressed as: h i =[F std ,F PSD ,F band ,MSE];F std ,F PSD ,F band ,MSE represent the standard deviation, power spectral density, frequency band energy, and multi-scale entropy calculated from EEG data; Then the initial characteristic matrix is: H=[h1,h1,...,h N ] T ; where N is the number of nodes and the superscript T indicates transpose.
3. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 1 is characterized in that: The feature extraction unit uses EEG electrode channels as nodes of the graph structure and generates a dynamic adjacency matrix by calculating functional connectivity indicators in each time window.
4. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 1 is characterized in that: The functional connectivity indices include phase locking value, phase lag index and mutual information calculated from EEG data; Calculate the phase locking value PLV between the i-th node and the j-th node using EEG data ij , PLV ij As the adjacency matrix A PLV The element value of the i-th row and j-th column in the equation; the phase lag index PLI of the i-th node and the j-th node is calculated using the phase of the EEG data ij , PLI ij As the adjacency matrix A PLI The element value of the i-th row and j-th column in ; the mutual information MI between the i-th node and the j-th node is calculated using the joint distribution and marginal distribution of EEG data ij , MI ij As the adjacency matrix A MI The value of the element in row i and column j; For three adjacency matrices A PLV 、A PLI and A MI Perform normalization processing separately to obtain the normalized result A' of each adjacency matrix PLV , A′ PLI and A′ MI ; The final adjacency matrix is generated by weighted averaging: A=αA′ PLV +βA′ ALI +γA′ MI Among them, α, β, and γ are learnable weight parameters and their sum is 1.
5. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 1 is characterized in that: A total of L graph attention layers are set, and K attention heads are set in each graph attention layer. When l = 1, the input of the first graph attention layer is the adjacency matrix A and the initial feature matrix H. The processing process of the kth attention head in the first graph attention layer is as follows: (3.1) For each node’s feature vector Apply a linear change: z i =W k h i where h i represents the eigenvector of the i-th node obtained from the feature matrix H; W k Denotes the learnable linear change matrix of the kth attention head, z i Represents the eigenvector after linear change; (3.2) For the i-th node, the adjacency matrix A and the preset threshold θ are used to determine whether the i-th node and other nodes need to calculate the attention weight: If the element A in the i-th row and j-th column of the adjacency matrix A ij ≥θ, indicating that there is a strong connection between the i-th node and the j-th node, and all nodes with strong connections constitute the neighbor node set of the i-th node Then continue (3.3) to calculate the attention weight; otherwise, if A ij <θ, attention weight is not calculated; (3.3) For the linearly changed eigenvector z of the i-th node and the j-th node in its neighbor node set i and z j , calculate the attention weights of the two: e ij =LeakyReLU(a T [With i ||with j ]) Among them, [z i ||z j ] represents the eigenvector z i and z j The splicing process, LeakyReLU is the activation function, and a is the learnable attention vector; Normalize the attention weights: in, represents the normalized attention weight of the kth attention head; the kth node is A node in Finally, aggregate the neighbor features to obtain the new feature vector of the node calculated by the kth attention head: in, is the feature vector of the i-th node after the k-th attention head calculates it, ReLU is the activation function, h j Represents the feature vector of the jth node; The new feature vector after all K attention heads in the lth graph attention layer process the feature vector of the node: Using the new feature vector h of all nodes i ′, construct the feature matrix H output by the first graph attention layer l .
6. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 5 is characterized in that: For the case of l>1, the feature matrix H output by the previous graph attention layer l As the input of the next graph attention layer, using the adjacency matrix A and feature matrix H l Calculate the feature matrix H of this layer l+1 ; The feature matrix output by the last graph attention layer is recorded as H L .
7. The driver cognitive load EEG signal classification method based on dynamic graph attention network according to claim 6 is characterized in that: The classification unit is based on the feature matrix H output by the last graph attention layer L Implement classification; First, the final aggregate features are calculated by average pooling: Among them, h t Represents the feature matrix H L The eigenvectors in ; Secondly, the classification score is output through the fully connected layer: Output=softmax(W c h global ) Among them, W c Represents the learnable classification weight matrix, and softmax is the classification function.
8. A terminal device comprising a processor, a memory, and a computer program stored in the memory; characterized in that: When the processor executes the computer program, it implements the driver cognitive load EEG signal classification method based on the dynamic graph attention network according to any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program; wherein: When the computer program is executed by a processor, the method for classifying driver cognitive load EEG signals based on a dynamic graph attention network according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Driver workload prediction method based on multiple physiological signals under multiple auditory interferences
CN121171550A
Double-branch electroencephalogram emotion recognition method and system based on brain region topology and space-time
CN121388531A
Personnel state prediction method based on brain function connection, edge computing device and medium
CN121647698A