Driver emotional state detection method and device based on EEG data

By using a symmetric positive definite network based on manifold learning and leveraging the differential entropy features of EEG data for feature extraction and dimensionality reduction, the accuracy problem of driver emotional state detection is solved, enabling reliable detection of driver emotional state and traffic safety prevention.

CN117204856BActive Publication Date: 2024-09-24TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290934.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2024-09-24
Estimated Expiration
2043-10-07

AI Technical Summary

Technical Problem

Existing technologies for driver emotion state detection use models that induce emotions through non-specific stimuli, leading to unreliable emotion detection results. In particular, there is a lack of research in the specific field of driving, and traditional machine learning and basic deep learning methods have limited ability to extract emotion features.

Method used

A symmetric positive definite network based on manifold learning is adopted. By acquiring the differential entropy features of driver EEG data, feature extraction and dimensionality reduction are performed using a channel feature extraction module, a spatial manifold mapping module, and a convolutional dimensionality reduction module. Emotional state detection is then performed in conjunction with a fully connected layer.

Benefits of technology

It achieves accurate detection of the driver's emotional state, can prevent traffic accidents caused by negative emotions, and is suitable for physiological signal detection in specific scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117204856B
    Figure CN117204856B
Patent Text Reader

Abstract

The present application provides a method and device for detecting the emotional state of a driver based on EEG data, the method comprising: obtaining differential entropy features of the driver's EEG data; inputting the differential entropy features into a channel feature extraction module for feature extraction to obtain channel features; using a spatial manifold mapping module to perform symmetric positive manifold mapping processing on the channel features to obtain low-dimensional manifold mapping features; using a convolution dimension reduction module to perform convolution and downscaling processing on the manifold mapping features to obtain emotional state features; processing the emotional state features through a fully connected layer to obtain a driver's emotional detection result, the driver's emotional detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness and neutrality. Based on the method provided by the present application, multiple driver emotional state detections can be achieved, which is helpful to detect human factors in the driver's emotional state and prevent traffic accidents caused by negative emotions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electroencephalogram (EEG) data processing, and in particular to a method and device for detecting a driver's emotional state based on EEG data. Background Art

[0002] The detection of the driver's emotional state is closely related to driving safety. Poor driving conditions will increase driving risks, so the detection of the driver's emotional state is of great significance. With the development of EEG data processing and deep learning technology, the emotional state has begun to be studied through EEG data.

[0003] However, most of the related studies use non-specific stimuli to induce emotions, while there are relatively few studies on the specific field of driving. In addition, the models used for emotion detection in EEG data still tend to be traditional machine learning (e.g., SVM, KNN, etc.) or basic deep learning structures (e.g., CNN, LSTM, etc.). These models have limited ability to extract emotional features, and when there are many types of emotions involved, the emotion detection results are unreliable. Therefore, there is an urgent need for an emotional state detection method that is applied to the driving field and has high reliability. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application provide a method and device for detecting a driver's emotional state based on EEG data, so as to overcome the above problems or at least partially solve the above problems.

[0005] In a first aspect of an embodiment of the present application, a method for detecting a driver's emotional state based on electroencephalogram data is disclosed, the method comprising:

[0006] Obtaining differential entropy features of the driver's EEG data;

[0007] Inputting the differential entropy feature into a channel feature extraction module for feature extraction to obtain channel features;

[0008] Using a spatial manifold mapping module to perform symmetric positive definite manifold mapping processing on the channel features to obtain low-dimensional manifold mapping features;

[0009] Using a convolutional dimension reduction module to perform convolution and downscaling processing on the manifold mapping feature to obtain an emotional state feature;

[0010] The emotional state features are processed through a fully connected layer to obtain a driver emotion detection result, where the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness, and neutrality.

[0011] Optionally, the differential entropy feature is input into a channel feature extraction module for feature extraction to obtain a channel feature, including:

[0012] A single channel feature of the differential entropy feature is extracted using a convolutional layer to obtain an initial channel feature;

[0013] The initial channel features are processed using an ELU activation function and a normalization layer to obtain the channel features.

[0014] Optionally, a spatial manifold mapping module is used to perform symmetric positive definite manifold mapping processing on the channel feature to obtain a low-dimensional manifold mapping feature, including:

[0015] Using a channel convolution layer to extract the channel features to obtain spatial features;

[0016] Divide the spatial feature into N subspace features, and perform symmetric positive definite matrix transformation on each subspace feature to map the submanifold feature, where N is an integer greater than 0;

[0017] The N sub-manifold mapping features are concatenated to obtain a low-dimensional manifold mapping feature.

[0018] Optionally, the convolution dimension reduction module is used to perform convolution and downscaling processing on the manifold mapping feature, including:

[0019] The manifold mapping feature is sequentially subjected to convolution, ELU activation function and normalization processing to obtain a manifold mapping convolution feature;

[0020] The pooling layer is used to perform dimension reduction processing on the manifold mapping convolution feature to obtain the emotional state feature.

[0021] Optionally, obtaining the differential entropy features of the driver's EEG data includes:

[0022] Filtering the driver's EEG data according to a target frequency band to obtain EEG data of different frequency bands;

[0023] Sampling the EEG data of each frequency band according to preset sampling points to obtain the target EEG data samples;

[0024] The target EEG data samples are subjected to frequency domain transformation processing according to a preset window and step size to obtain differential entropy features of the driver's EEG data.

[0025] Optionally, the driver emotional state detection method based on EEG data is implemented by a symmetric positive definite network based on manifold learning, and the symmetric positive definite network is trained by the following steps:

[0026] Setting different driving scenarios to induce different driving emotions in the driver and collecting corresponding EEG data as training data. The driving emotions include: anger, sadness, disgust, fear, happiness, neutrality and surprise.

[0027] Inputting the training data into the symmetric positive definite network for training, and calculating the cross entropy loss as the loss value of the symmetric positive definite network;

[0028] The loss value is used to update the network parameters of the symmetric positive definite network, and a trained symmetric positive definite network is obtained after the convergence condition is met.

[0029] In a second aspect of the embodiment of the present application, a device for detecting a driver's emotional state based on electroencephalogram data is disclosed, the device comprising:

[0030] An acquisition module, used to acquire differential entropy features of the driver's EEG data;

[0031] A first feature module is used to input the differential entropy feature into a channel feature extraction module for feature extraction to obtain a channel feature;

[0032] A second feature module is used to perform symmetric positive definite manifold mapping processing on the channel feature by using a spatial manifold mapping module to obtain a low-dimensional manifold mapping feature;

[0033] A third feature module is used to perform convolution and downscaling processing on the manifold mapping feature using a convolution dimension reduction module to obtain an emotional state feature;

[0034] The result output module is used to process the emotional state characteristics through a fully connected layer to obtain a driver emotion detection result, and the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness and neutrality.

[0035] The third aspect of an embodiment of the present application discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the driver emotional state detection method based on EEG data described in the first aspect of the embodiment of the present application are implemented.

[0036] The fourth aspect of the embodiments of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the driver emotional state detection method based on EEG data described in the first aspect of the embodiments of the present application are implemented.

[0037] According to a fifth aspect of an embodiment of the present application, a computer program product is disclosed, including a computer program, which, when executed by a processor, implements the steps of the driver emotional state detection method based on EEG data described in the first aspect of the embodiment of the present application.

[0038] The embodiments of the present application include the following advantages:

[0039] In the embodiment of the present application, based on the differentiable characteristics of EEG data of driving emotional state, the driver's emotional state is detected using EEG data. First, the differential entropy features of the driver's EEG data are obtained, and the differential entropy features are input into the channel feature extraction module for feature extraction to obtain channel features, and then the channel features are processed by symmetric positive manifold mapping using the spatial manifold mapping module to obtain low-dimensional manifold mapping features, and then the manifold mapping features are convoluted and downscaled using the convolution dimension reduction module to obtain emotional state features, and finally the emotional state features are processed through the fully connected layer to obtain the driver's emotional detection results.

[0040] Since there are many types of driver emotional states, driver emotional state detection is a complex detection task, and a large number of emotional state features need to be extracted to achieve accurate detection. Given that manifold learning has the good property of converting high-dimensional data into differentiable low-dimensional features, manifold learning is used to extract features to better express the characteristics of the driver's emotional state and achieve accurate detection of the driver's emotional state. This method helps to detect human factors in the driver's emotional state and can prevent traffic accidents caused by negative emotions. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0042] Figure 1 is a flowchart of the steps of a method for detecting a driver's emotional state based on EEG data provided in an embodiment of the present application;

[0043] Figure 2 Schematic diagram of a process for obtaining a differential entropy feature provided in an embodiment of the present application;

[0044] Figure 3 It is a structural diagram of a symmetrical positive definite network provided in an embodiment of the present application;

[0045] Figure 4 It is the performance comparison result of the existing model and a symmetric positive definite network provided by the embodiment of the present application;

[0046] Figure 5 It is a structural schematic diagram of a driver emotional state detection device based on EEG data provided in an embodiment of the present application;

[0047] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] In the related art, people's emotional state is identified by recognizing their facial expressions, but the limitation of this method is that the judgment based on the face is uncertain, because people can try to keep smiling in a negative emotional state, so its detection results are unreliable. Therefore, the physiological signals in the human body have been studied. Since the cerebral cortex is the main decision-making center of the human body, the study of emotional state based on EEG data is of great significance. At present, EEG data emotion detection uses a variety of modules, for example, using SVM model and KNN model for emotion recognition; and with the popularity of deep learning networks, deep learning methods are used to study emotions based on EEG data, such as CNN and LSTM. Although many methods have focused on the relationship between EEG data and human emotional state, most of these methods use non-specific stimuli to induce emotions, and there are relatively few studies on specific areas of driving. From the perspective of public datasets for emotion recognition, classic public emotion datasets such as SEED and DEAP do not focus on actual scenarios, and the datasets involve fewer types of emotions. When there are more types of emotions involved, the emotion detection results are unreliable.

[0050] In order to address the limitations of the prior art, the applicant proposed the following technical concept: based on the characteristic of manifold learning that can transform high-dimensional data into differentiable low-dimensional features, manifold learning is used to extract features of the driver's emotional state to better express the characteristics of the driver's emotional state, and then multiple driver emotional state detections are realized based on the features.

[0051] The present application embodiment provides a method for detecting a driver's emotional state based on EEG data. Figure 1 As shown, Figure 1 1 is a flowchart of a method for detecting a driver's emotional state based on EEG data provided in an embodiment of the present application. Figure 1 As shown, the method may include steps S110 to S150:

[0052] Step S110: Acquire the differential entropy features of the driver's EEG data.

[0053] In the embodiment of the present application, the driver's EEG data is the EEG data characterizing the driver's emotional state collected during the driving process of the vehicle, and the EEG data is a data with a channel number of 32 and a sampling rate of 500Hz. The driver's EEG data has the characteristics of being differentiable, and the differential entropy feature can describe the rate of change and trend of the EEG data. Therefore, the subsequent emotional state detection is performed based on the differential entropy feature of the EEG data. Specifically, the differential entropy feature is obtained by preprocessing the collected driver's EEG data (i.e., noise filtering and sampling, etc.) and extracting the differential entropy feature.

[0054] In an optional embodiment, obtaining the differential entropy features of the driver's EEG data includes steps S110-1 to S110-3:

[0055] Step S110 - 1 : filtering the driver's EEG data according to a target frequency band to obtain EEG data of different frequency bands.

[0056] Among them, the target frequency band refers to 5 standard frequency bands (i.e., 5 different frequency bands currently recognized by the industry, and EEG data has different emotional expressions in different frequency bands), and then the driver's EEG data is filtered according to different target frequency bands to obtain EEG data of different target frequency bands. In addition, considering that the EEG data contains a lot of noise during the acquisition process, before filtering the driver's EEG data according to the target frequency band, the driver's EEG data is filtered using a 0.5-40Hz linear bandpass filter to obtain clearer driver EEG data, and then the driver's EEG data that has passed through the noise is filtered according to the target frequency band.

[0057] Step S110 - 2 : sampling the EEG data of each frequency band according to preset sampling points to obtain the target EEG data samples.

[0058] Specifically, considering that the collected driver's EEG data is a long time series continuous signal, in order to facilitate feature extraction, the EEG data of each frequency band is intercepted (i.e., sampled) as a target EEG data sample of fixed length, and there is no duplication and redundancy between the target EEG data samples. For example, if the sampling point is 250, the EEG data of each frequency band is sampled according to every 250 sampling points to obtain a target EEG data sample composed of 250 sampling points, and the size of the target EEG data sample is 32×250.

[0059] Step S110 - 3 : performing frequency domain transformation processing on the target EEG data samples according to a preset window and step size to obtain differential entropy features of the driver's EEG data.

[0060] Specifically, each target EEG data sample is transformed in the frequency domain (i.e., short-time Fourier transform STFT) according to a preset window (e.g., a window of 50) and a step size (e.g., a step size of 10) to obtain the average power spectral density corresponding to each target EEG data sample, and then the average power spectral density is calculated to obtain the differential entropy feature.

[0061] For example, the average power spectral density PSD calculated from the frequency domain energy spectrum is expressed as:

[0062] PSD = ∑[FFT(x)] 2 / (f end -f start +1)

[0063] Among them, x is the target EEG data sample signal, f end is the end of the frequency band, f start The starting point of the frequency band.

[0064] The differential entropy feature is calculated using a simplified formula. This simplification is based on the fact that a fixed-length EEG signal (i.e., the target EEG data sample) intercepted within a certain frequency range of the EEG data can be regarded as a Gaussian signal, and its differential entropy is approximately equal to the logarithmic energy spectrum. Therefore, the differential entropy feature DE is expressed as:

[0065] DE=log2(PSD)

[0066] Figure 2 It is a schematic diagram of the process of obtaining a differential entropy feature provided in an embodiment of the present application. Specifically, first, a 0.5-40Hz linear bandpass filter is used to filter the noise of the driver's EEG data, and then the EEG data is filtered using 5 target frequency bands to obtain EEG data of different target frequency bands, and the EEG data of each frequency band is sampled according to preset sampling points (i.e., 250 samples) to obtain target EEG data samples, and finally, the target EEG data samples are transformed in the frequency domain according to a preset window (window equals 50) and step size (step size equals 10) to obtain the differential entropy feature of the driver's EEG data, and the differential entropy feature size is 32×100.

[0067] Step S120: inputting the differential entropy feature into a channel feature extraction module for feature extraction to obtain channel features.

[0068] In the embodiment of the present application, a channel feature extraction module is used to extract the differential entropy feature, so as to further extract and adaptively modify the differential entropy feature from the channel dimension to obtain the channel feature that can accurately characterize the emotional state.

[0069] In an optional embodiment, the channel feature extraction module includes a convolution layer, an ELU activation function and a normalization layer. Specifically, the differential entropy feature is input into the channel feature extraction module for feature extraction to obtain the channel feature, including: using the convolution layer to extract a single channel feature of the differential entropy feature to obtain the initial channel feature; using the ELU activation function and the normalization layer to process the initial channel feature to obtain the channel feature.

[0070] In the specific implementation, the convolution kernel is used to implement the convolution operation of 64 consecutive data points on the same channel to obtain the initial channel features, which are then activated by the ELU activation function and normalized by the normalization layer BN to improve the robustness and convergence speed of the network, and finally the channel features are obtained.

[0071] Step S130: using a spatial manifold mapping module to perform symmetric positive definite manifold mapping processing on the channel features to obtain low-dimensional manifold mapping features.

[0072] In the embodiment of the present application, the channel feature is a feature that expresses the driver's emotional state from a high dimension. In order to better classify the driver's emotional state, it is necessary to accurately map the high-dimensional channel feature to a low-dimensional feature expression. Manifold learning is a method of mapping high-dimensional data to a low-dimensional manifold, which achieves the purpose of dimensionality reduction by retaining the local relationship between features. In the embodiment of the present application, a symmetric positive definite manifold is used to perform symmetric positive definite manifold mapping processing on the channel feature, where the positive definite manifold is defined as a set of n×n symmetric positive definite matrices, and this set is defined as:

[0073]

[0074] Where n represents the dimension of the matrix, R n×n represents the set of all n×n real matrices, represents the set of n×n symmetric positive definite matrices. Therefore, the symmetric positive definite matrix manifold can be defined as an n(n+1) / 2-dimensional Euclidean manifold, and its tangent space can be regarded as the set of all symmetric matrices.

[0075] In an optional embodiment, a spatial manifold mapping module is used to perform symmetric positive definite manifold mapping processing on the channel features to obtain low-dimensional manifold mapping features, including: using a channel convolution layer to extract features of the channel features to obtain spatial features; dividing the spatial features into N subspace features, and performing a symmetric positive definite matrix transformation on each of the subspace features to obtain submanifold mapping features, where N is an integer greater than 0; and splicing the N submanifold mapping features to obtain low-dimensional manifold mapping features.

[0076] In the specific implementation, the channel convolution layer also includes a convolution module and an ELU activation function and a normalization layer, and then the process of extracting the channel features using the channel convolution layer specifically includes: extracting the channel features using the convolution layer to obtain the initial spatial features; then using the ELU activation function and the normalization layer to perform activation and normalization processing to obtain the spatial features; then performing symmetric positive definite manifold mapping processing to achieve feature dimensionality reduction to obtain low-dimensional manifold mapping features, wherein the symmetric positive definite matrix transformation of each subspace feature refers to: calculating the covariance matrix of each subspace feature. The value of N is determined according to the actual processing needs. For example, if the value of N is 3, the spatial features are divided into 3 subspace features, and the covariance matrices of the 3 spatial features are calculated respectively as submanifold mapping features, and then the 3 submanifold mapping features are spliced ​​to obtain the manifold mapping features.

[0077] Step S140: using a convolution dimension reduction module to perform convolution and downscaling processing on the manifold mapping feature to obtain an emotional state feature.

[0078] In the embodiment of the present application, further dimension reduction processing is performed on the manifold mapping features to facilitate classification of the emotional state features after dimension reduction.

[0079] In an optional embodiment, the convolutional dimension reduction module includes a convolutional layer, an ELU activation function, a normalization layer, and a maximum pooling layer. Further, the convolutional dimension reduction module is used to perform convolution and downscaling processing on the manifold mapping feature, including: sequentially performing convolution, ELU activation function and normalization processing on the manifold mapping feature to obtain a manifold mapping convolutional feature: performing dimension reduction processing on the manifold mapping convolutional feature using a pooling layer to obtain the emotional state feature.

[0080] In the specific implementation, a one-dimensional convolution kernel of size 32 is used to re-convolute the manifold mapping features, and then the ELU activation function and normalization are performed, and a maximum pooling layer is established for feature processing and dimensionality reduction. In addition, dropout is added to randomly delete nodes to reduce the risk of network overfitting.

[0081] Step S150: Processing the emotional state features through a fully connected layer to obtain a driver emotion detection result, wherein the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness and neutrality.

[0082] The number of neurons in the fully connected layer is the same as the number of types of driver emotional states of interest. Since the present embodiment of the application focuses on seven emotional states: anger, fear, sadness, disgust, surprise, happiness, and neutrality, there are seven neurons in the fully connected layer. The fully connected layer is then used to output the type of driver emotion.

[0083] In an embodiment of the present application, based on the differentiable characteristics of EEG data of different driving emotional states, the driver's emotional state is detected using EEG data. Due to the large number of types of driver emotional states of concern, driver emotional state detection is a complex detection task, and a large number of emotional state features need to be extracted to achieve accurate detection. In view of the good property of manifold learning that converts high-dimensional data into differentiable low-dimensional features, manifold learning is used to perform feature extraction to better express the characteristics of the driver's emotional state and achieve accurate detection of the driver's emotional state. This method helps to detect human factors in the driver's emotional state, can prevent traffic accidents caused by negative emotions, and thus contribute to the intelligent traffic safety system. In addition, the method provided in the embodiment of the present application is also applicable to the emotional state of humans in specific scenarios based on physiological signals.

[0084] In an optional embodiment, the driver's emotional state detection method based on EEG data is implemented by a symmetric positive definite network based on manifold learning. Figure 3 It is a structural diagram of a symmetric positive definite network provided in an embodiment of the present application. Specifically, first, the channel feature extraction module uses a convolution layer to extract a single channel feature of the differential entropy feature to obtain an initial channel feature, and uses an ELU activation function and a normalization layer to process the initial channel feature to obtain the channel feature; then, the spatial manifold mapping module uses a channel convolution layer to extract the channel feature to obtain a spatial feature, and then performs a symmetric positive definite manifold mapping process on the spatial feature to achieve feature dimensionality reduction, and obtains a low-dimensional manifold mapping feature; finally, the convolution dimension reduction module is used to perform convolution, ELU activation function and normalization processing on the manifold mapping feature in turn to obtain a manifold mapping convolution feature, and the maximum pooling layer is used to perform dimensionality reduction processing on the manifold mapping convolution feature to obtain an emotional state feature, and a fully connected layer is used to output the category to which the driver's emotional state belongs.

[0085] Furthermore, the symmetric positive definite network is trained by the following steps, including steps A1 to A3:

[0086] Step A1: setting different driving scenarios to induce different driving emotions in the driver, and collecting corresponding EEG data as training data, wherein the driving emotions include: anger, sadness, disgust, fear, happiness, neutrality and surprise.

[0087] Step A2: inputting the training data into the symmetric positive definite network for training, and calculating the cross entropy loss as the loss value of the symmetric positive definite network.

[0088] Step A3: using the loss value to update the network parameters of the symmetric positive definite network, and obtaining a trained symmetric positive definite network after satisfying the convergence condition.

[0089] In the embodiment of the present application, when collecting training samples, considering that the physiological expression of human emotions can last at least 30 seconds, the EEG data of the first 30 seconds of each driving process is intercepted to form a training data set. The number of EEG data channels is 32 and the sampling rate is 500Hz. Then the symmetric positive definite network is trained end-to-end, and the cross entropy loss is selected. As the loss function of a symmetric positive definite network, where y j is the true label vector, The prediction vector is a symmetric positive definite network. The learning rate is set to 5e during training. -4 , the batch size is set to 64, and the dropout parameter is set to p = 0.25 to avoid overfitting. At the same time, in order to obtain better symmetric positive definite network training results, the Adam optimizer is selected for symmetric positive definite network training. Since the training data covers 7 emotional states such as anger, sadness, disgust, fear, happiness, neutrality and surprise, the symmetric positive definite network trained based on the training data can accurately identify these 7 types of driver emotional states.

[0090] Further, in order to analyze the performance of the symmetric positive definite network provided in the embodiment of the present application, 3 ablation experiments were designed for comparative analysis. Ablation experiment 1 does not use the channel feature extraction module, ablation experiment 2 does not use the spatial manifold mapping module, and ablation experiment 3 does not use the convolutional dimension reduction module. At the same time, considering the limited amount of EEG data of a single person and the complexity of the tasks involving seven emotions, two methods of intra-subject verification and combined subject verification were used for comparison, and the classification effect was evaluated by the accuracy (Acc), precision (P), recall (R) and F1 score of the network on the test set. Specifically, under the two verification methods, the model performance of the 3 ablation experiments was compared with the performance of the symmetric positive definite network. The comparison results are shown in Table 1. It can be seen that the performance of the symmetric positive definite network is better than the network structure formed by any ablation experiment method. Therefore, deleting certain modules will affect the performance of the symmetric positive definite network. In addition, by comparing the three ablation experiments, it can be found that the spatial manifold mapping module has the greatest impact on the performance of the symmetric positive definite network (the accuracy is about 70%), that is, the processing of spatial features plays the greatest role.

[0091] Table 1 Performance comparison results of ablation experiment and symmetric positive definite network

[0092]

[0093] Further, a variety of existing models are used as benchmarks to realize the detection of driver's emotional state, and compared with the symmetric positive definite network proposed in the embodiment of the present application to verify the performance of the symmetric positive definite network. The 7 existing models selected include: MLP, 1DCNN, LSTM, EEGNet, LDA, SVM and KNN for comparison. The comparison results are shown in Table 2. It can be seen that the accuracy of the subject verification method of the symmetric positive definite network reaches 97.12%, and the accuracy of the combined subject verification method reaches 97.25%. It can be seen from the results of different models that no matter what verification method is used, the symmetric positive definite network can obtain the best results. This shows that the symmetric positive definite network provided in the embodiment of the present application is more advanced than other methods, and can better classify the emotional state of the driver during driving according to the driver's EEG data. Comparing the classification results of the two verification methods under the same model, it can be seen that the results are consistent, which shows that under the two verification methods, the results obtained by each model are stable, which basically reflects the performance of the model.

[0094] Table 2 Performance comparison between existing models and symmetric positive definite networks

[0095]

[0096] In addition, deep learning networks such as LSTM, MLP and 1DCNN (with accuracy rates above 70%) also achieved good results, which proves that the EEG data of drivers under different driving emotional states perform differently, so the emotional state of the driver during driving can be detected through EEG data. Traditional machine learning methods such as SVM, LDA and KNN (with accuracy rates below 30%) performed poorly in this classification task because the models were too simple to handle such complex classification tasks. The comparison of these results reflects the effectiveness of deep learning networks in handling complex tasks, and also shows the necessity of designing a well-structured model to detect the emotional state of the driver. Based on the different results of each model, it was found that in addition to the symmetric positive definite network, the EEGNet network also performed better (with an accuracy rate of around 90%). The confusion matrices of EEGNet and SDENet under the combined subject verification method were further compared, as shown in Figure 2. Figure 4 As shown, by comparing the confusion matrix, it can be seen that the symmetric positive definite network provided by the present application is more accurate in detecting each emotional state, while EEGNet lacks the ability to process the three driving emotional states of anger, happiness and sadness.

[0097] The present application also provides a driver emotional state detection device based on EEG data, referring to Figure 5 As shown, Figure 5: is a schematic diagram of a driver emotional state detection device based on EEG data provided in an embodiment of the present application, the device comprising:

[0098] An acquisition module 510 is used to acquire differential entropy features of the driver's EEG data;

[0099] A first feature module 520 is used to input the differential entropy feature into a channel feature extraction module for feature extraction to obtain a channel feature;

[0100] A second feature module 530 is used to perform symmetric positive definite manifold mapping processing on the channel feature by using a spatial manifold mapping module to obtain a low-dimensional manifold mapping feature;

[0101] A third feature module 540 is used to perform convolution and downscaling processing on the manifold mapping feature using a convolution dimension reduction module to obtain an emotional state feature;

[0102] The result output module 550 is used to process the emotional state feature through a fully connected layer to obtain a driver emotion detection result, and the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness and neutrality.

[0103] In an optional embodiment, the first feature module includes:

[0104] A convolution module, used for extracting a single channel feature of the differential entropy feature using a convolution layer to obtain an initial channel feature;

[0105] The function module is used to process the initial channel features using the ELU activation function and the normalization layer to obtain the channel features.

[0106] In an optional embodiment, the second feature module includes:

[0107] A spatial feature module, used to extract the channel features using a channel convolution layer to obtain spatial features;

[0108] A feature splitting module is used to divide the spatial feature into N subspace features, and perform a symmetric positive definite matrix transformation on each of the subspace features to map the submanifold features, where N is an integer greater than 0;

[0109] A mapping splicing module is used to splice the N sub-manifold mapping features to obtain a low-dimensional manifold mapping feature.

[0110] In an optional embodiment, the third feature module includes:

[0111] A convolution module, used to sequentially perform convolution, ELU activation function and normalization processing on the manifold mapping feature to obtain a manifold mapping convolution feature;

[0112] The dimension reduction module is used to perform dimension reduction processing on the manifold mapping convolution feature by using a pooling layer to obtain the emotional state feature.

[0113] In an optional embodiment, the acquisition module includes:

[0114] A filtering module, used for filtering the driver's EEG data according to a target frequency band to obtain EEG data of different frequency bands;

[0115] A sampling module, used to sample the EEG data of each frequency band according to a preset sampling point to obtain the target EEG data sample;

[0116] The transformation module is used to perform frequency domain transformation processing on the target EEG data samples according to a preset window and step size to obtain the differential entropy characteristics of the driver's EEG data.

[0117] In an optional embodiment, the driver emotional state detection method based on EEG data is implemented by a symmetric positive definite network based on manifold learning, and the symmetric positive definite network is trained by a training module, and the training module includes:

[0118] The sample module is used to set different driving scenarios to induce different driving emotions in the driver and collect corresponding EEG data as training data. The driving emotions include: anger, sadness, disgust, fear, happiness, neutrality and surprise.

[0119] A loss module, used for inputting the training data into the symmetric positive definite network for training, and calculating the cross entropy loss as the loss value of the symmetric positive definite network;

[0120] An updating module is used to update the network parameters of the symmetric positive definite network using the loss value, and obtain a trained symmetric positive definite network after satisfying the convergence condition.

[0121] The present application also provides an electronic device, referring to Figure 6 , Figure 6 Schematic diagram of an electronic device structure provided by an embodiment of the present application. Figure 6 As shown, the electronic device 600 includes: a memory 610 and a processor 620. The memory 610 and the processor 620 are connected via a bus communication. A computer program is stored in the memory 610. The computer program can be run on the processor 620 to implement the steps of the driver emotional state detection method based on EEG data described in the embodiment of the present application.

[0122] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the driver emotional state detection method based on EEG data described in the embodiment of the present application are implemented.

[0123] The embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the driver emotional state detection method based on EEG data described in the embodiment of the present application.

[0124] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0125] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods and devices according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0126] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0127] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0128] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0129] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0130] The above is a detailed introduction to a driver emotional state detection method and device based on EEG data provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for detecting a driver's emotional state based on EEG data, characterized in that: The method comprises: Obtaining differential entropy features of the driver's EEG data; Inputting the differential entropy feature into a channel feature extraction module for feature extraction to obtain channel features; The channel features are symmetrically mapped to positive definite manifolds using a spatial manifold mapping module to obtain low-dimensional manifold mapping features, including: extracting features from the channel features using a channel convolution layer to obtain spatial features; dividing the spatial features into N subspace features, and performing a symmetrical positive definite matrix transformation on each of the subspace features to obtain submanifold mapping features, where N is an integer greater than 0; and concatenating the N submanifold mapping features to obtain low-dimensional manifold mapping features; The convolution and downscaling processing is performed on the manifold mapping feature by using a convolution dimension reduction module to obtain an emotional state feature, including: sequentially performing convolution, ELU activation function and normalization processing on the manifold mapping feature to obtain a manifold mapping convolution feature; performing dimension reduction processing on the manifold mapping convolution feature by using a pooling layer to obtain the emotional state feature; The emotional state features are processed through a fully connected layer to obtain a driver emotion detection result, where the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness, and neutrality.

2. The method according to claim 1, characterized in that The differential entropy feature is input into the channel feature extraction module for feature extraction to obtain the channel feature, including: A single channel feature of the differential entropy feature is extracted using a convolutional layer to obtain an initial channel feature; The initial channel features are processed using an ELU activation function and a normalization layer to obtain the channel features.

3. The method according to claim 1, characterized in that Obtain the differential entropy features of the driver's EEG data, including: Filtering the driver's EEG data according to a target frequency band to obtain EEG data of different frequency bands; The EEG data of each frequency band is sampled according to the preset sampling points to obtain the target EEG data samples; The target EEG data samples are subjected to frequency domain transformation processing according to a preset window and step size to obtain differential entropy features of the driver's EEG data.

4. The method according to claim 1, characterized in that: The driver emotional state detection method based on EEG data is implemented by a symmetric positive definite network based on manifold learning, and the symmetric positive definite network is trained by the following steps: Setting different driving scenarios to induce different driving emotions in the driver and collecting corresponding EEG data as training data. The driving emotions include: anger, sadness, disgust, fear, happiness, neutrality and surprise. Inputting the training data into the symmetric positive definite network for training, and calculating the cross entropy loss as the loss value of the symmetric positive definite network; The loss value is used to update the network parameters of the symmetric positive definite network, and a trained symmetric positive definite network is obtained after the convergence condition is met.

5. A driver emotional state detection device based on EEG data, characterized in that: The device comprises: An acquisition module, used to acquire differential entropy features of the driver's EEG data; A first feature module is used to input the differential entropy feature into a channel feature extraction module for feature extraction to obtain a channel feature; The second feature module is used to use the spatial manifold mapping module to perform symmetric positive definite manifold mapping processing on the channel features to obtain low-dimensional manifold mapping features, including: using a channel convolution layer to extract features from the channel features to obtain spatial features; dividing the spatial features into N subspace features, and performing symmetric positive definite matrix transformation on each of the subspace features to obtain submanifold mapping features, where N is an integer greater than 0; splicing the N submanifold mapping features to obtain low-dimensional manifold mapping features; The third feature module is used to perform convolution and downscaling processing on the manifold mapping feature using a convolution dimension reduction module to obtain an emotional state feature, including: sequentially performing convolution, ELU activation function and normalization processing on the manifold mapping feature to obtain a manifold mapping convolution feature; performing dimension reduction processing on the manifold mapping convolution feature using a pooling layer to obtain the emotional state feature; The result output module is used to process the emotional state characteristics through a fully connected layer to obtain a driver emotion detection result, and the driver emotion detection result includes any one of the following: anger, fear, sadness, disgust, surprise, happiness and neutrality.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the driver emotional state detection method based on EEG data described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting the driver's emotional state based on EEG data described in any one of claims 1 to 4 are implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the driver emotional state detection method based on EEG data as described in any one of claims 1 to 4 are implemented.