Automatic safe driving cross-scene alertness detection method and device based on EEG analysis

Through the cross-scene alertness detection method of safe driving of autonomous driving based on EEG analysis, the EEG channel information is reconstructed using the pre-trained network, and the problem of insufficient risk assessment capabilities of the autonomous driving system in unexpected scenarios is solved, and cross-scene alertness detection is achieved with high accuracy.

CN119807843AActive Publication Date: 2025-04-11TSINGHUA UNIVERSITY

Patent Information

Application Number
CN202411928036.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-11
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing autonomous driving software systems lack the ability to quickly predict and evaluate potential risks, especially in unexpected scenarios or "edge situations". The EEG-based alert detection method is low in scenarios such as high-speed autonomous vehicles, which is difficult to process in real-time, and the data collection process is cumbersome and difficult to label.

Method used

A cross-scene alertness detection method for autonomous driving safety driving based on EEG analysis is proposed. Through the pre-trained alertness detection network, the N-channel EEG information and brain region information are used to reconstruct the EEG information of multiple channels missing, so as to realize cross-scene alertness detection.

Benefits of technology

On the SEED-VIG dataset containing 12 subjects, the average accuracy rate reached 86.20%, higher than the 82.21% achieved by the most advanced deep learning methods, effectively solving the problem of alertness detection accuracy and signal-to-noise ratio across scenarios and across devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807843A_ABST
    Figure CN119807843A_ABST
Patent Text Reader

Abstract

The invention provides an automatic safe driving cross-scene alertness detection method and device based on EEG analysis, and relates to the technical field of intelligent driving. The embodiment of the invention provides an automatic safe driving cross-scene alertness detection method based on EEG analysis, and the method solves the problem that the number of channels among different EEG devices is inconsistent by utilizing the capability of reconstructing the EEG information of a plurality of real channels of a pre-trained alertness detection network. The alertness detection network after fine tuning can reconstruct missing EEG information according to input EEG information of a small number of channels and corresponding brain region information, and a classification task is completed based on the reconstructed information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of intelligent driving technology, and in particular to a method and device for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis. Background Art

[0002] Autonomous driving is based on the fusion of computer systems and artificial intelligence, with the ultimate goal of significantly reducing the rate of accidents caused by human error. Although autonomous vehicles (AVs) have made significant progress in recent years, accidents involving AVs highlight the persistent challenges associated with ensuring the safety of AVs and establishing liability. Current autonomous driving software systems lack the ability to quickly predict and assess potential risks, especially in the context of unexpected scenarios or "edge cases." Such autonomous vehicles must be monitored by safety drivers. To this end, ride-hailing platforms hire and train safety drivers for their vehicles. During autonomous driving, it is not uncommon for drivers to be distracted and have difficulty concentrating, which can lead to longer response times when taking over control from a misjudged vehicle. Studies have shown that a 30-minute monotonous driving task can affect driver alertness. Therefore, monitoring the alertness of the safety driver is crucial.

[0003] Alertness is a quantitative measure of the cognitive state of a stimulus event. Depending on the type of input information, alertness detection systems can be divided into two categories. One category evaluates alertness level by analyzing driving performance. In one scheme, 11 parameters of the steering wheel were used to obtain an alertness detection accuracy of 72.79%. In one scheme, convolutional neural networks (CNNs) were used to learn the driver's hand posture, achieving an alertness detection accuracy of 85%. However, these methods usually detect reduced alertness only after the safety driver is already fatigued, and are limited by low accuracy and high computational overhead.

[0004] In recent years, the combination of physiological information processing such as electrocardiogram (ECG), electromyogram (EMG) and electroencephalogram (EEG) has provided new opportunities to solve similar problems. Among these information, EEG provides the most direct and rapid physiological response.

[0005] EEG records electrical information from the brain, providing valuable insights into brain activity. It is often used as a reliable measure to estimate alertness. Changes in the power spectrum of EEG frequency bands are often used to assess alertness. Related art In one scheme, the transient power synchronization characteristics of EEG information were used to determine that most neurons in the cerebral cortex were activated synchronously under fatigue conditions. Related art In one scheme, EEG information from the driver's occipital lobe was used to assess distraction in a driving simulator. However, scalp EEG-based experiments are time-consuming and require careful preparation, such as skin cleaning and gel injection, as well as conducting experiments in a shielded room to ensure a high signal-to-noise ratio (SNR), which makes it challenging to conduct a large number of experiments. Therefore, a more versatile, convenient, and non-invasive method is needed to evaluate EEG alertness in realistic driving scenarios. Recently developed dry electrode portable EEG devices, including near-ear EEG and in-ear EEG, provide promising solutions for this purpose.

[0006] The EEG model needs to be trained separately for different numbers of EEG channels. Although portable dry electrode EEG with few channels has been verified in practice, there are still three main problems with this system: 1) The EEG cap requires 32 to 256 wired electrodes to be placed on the driver's scalp, which affects the wearer's comfort. And if the number of channels is reduced, the detection accuracy will decrease. 2) The EEG data characteristics vary significantly between individuals, resulting in a decrease in classification accuracy in different scenarios. 3) Slight sensor movement may occur during continuous vehicle motion, resulting in unnecessary noise in the sensor information, reducing the signal-to-noise ratio and accuracy of the method. Summary of the invention

[0007] The embodiments of the present invention provide a method and device for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis.

[0008] A first aspect of an embodiment of the present invention provides a method for detecting cross-scenario alertness of autonomous driving safe driving based on EEG analysis, the method comprising: Obtaining a pre-trained alertness detection network, wherein the pre-trained alertness detection network is pre-trained using N-channel EEG information and corresponding brain region information, and has the function of reconstructing missing EEG information of multiple channels; Obtaining EEG information and corresponding brain region information in a sample safe driving scenario, wherein the number of channels of the EEG information in the sample safe driving scenario is M channels compared to N channels; Based on the EEG information and the corresponding brain region information in the sample safe driving scenario, the pre-trained alertness detection network is fine-tuned to obtain a fine-tuned alertness detection network; Obtaining EEG information in a new safe driving scenario, wherein the number of channels of the EEG information in the new safe driving scenario is missing at least one channel compared to N channels; Based on the fine-tuned alertness detection network, the EEG information in the new safe driving scenario is classified to obtain a classification result, wherein the classification result represents whether the category of the EEG information in the new safe driving scenario is the driver being in an alert state.

[0009] Optionally, based on the EEG information and the corresponding brain region information in the sample safe driving scenario, the pre-trained alertness detection network is fine-tuned to obtain a fine-tuned alertness detection network, including: Based on the pre-trained alertness detection network, obtaining an alertness detection network to be fine-tuned; Randomly fill the missing M channels of EEG information in the sample safe driving scenario with zeros; Inputting the filled EEG information brain region information into the channel linear mapping layer to be trained of the vigilance detection network to be fine-tuned to obtain sample information to be encoded; Processing the sample information to be encoded by the encoder and decoder of the alertness detection network to be fine-tuned to obtain sample information to be classified; Inputting the sample information to be classified into the classifier to be trained of the alertness detection network to be fine-tuned to obtain the sample classification result; Based on the sample classification results and the classification labels of the EEG information in the sample safe driving scenario, the model parameters of the channel linear mapping layer to be trained and the classifier to be trained of the alertness detection network to be fine-tuned are updated to obtain a fine-tuned alertness detection network.

[0010] Optionally, obtaining a vigilance detection network to be fine-tuned based on the pre-trained vigilance detection network includes: Initializing the model parameters of the encoder and decoder of the alertness detection network to be fine-tuned to the model parameters of the encoder and decoder in the pre-trained alertness detection network; Randomly initializing the model parameters of the channel linear mapping layer in the pre-trained alertness detection network to obtain the channel linear mapping layer to be trained of the alertness detection network to be fine-tuned; The model parameters of the classifier in the pre-trained alertness detection network are randomly initialized to obtain the classifier to be trained of the alertness detection network to be fine-tuned.

[0011] Optionally, the training process of the pre-trained alertness detection network includes: Obtaining experimental EEG information and corresponding brain region information in an experimental safe driving scenario, wherein the number of channels of the experimental EEG information in the experimental safe driving scenario is N channels; Randomly determine a plurality of channels that need to be masked from the N channels corresponding to the experimental EEG information; Inputting the experimental EEG information and the corresponding brain region information, as well as the identifiers of the multiple channels to be masked, into the channel linear mapping layer to be trained of the alertness detection network to be trained, to obtain masked experimental EEG information with position information; The masked experimental EEG information with position information is processed by an encoder and a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified; Inputting the experimental EEG information to be classified into the classifier to be trained of the alertness detection network to be trained, and obtaining the experimental EEG classification result; Based on the experimental EEG classification result and the classification label of the experimental EEG information, the model parameters of the alertness detection network to be trained are updated to obtain a pre-trained alertness detection network.

[0012] Optionally, the experimental EEG information and the corresponding brain region information, as well as the identifiers of the multiple channels to be masked, are input into the channel linear mapping layer to be trained of the alertness detection network to be trained, to obtain masked experimental EEG information with position information, including: The experimental EEG information and the corresponding brain region information are processed by the channel linear mapping layer to be trained to obtain the experimental EEG information with position information; The experimental EEG information with position information is masked according to the identifiers of the multiple channels to be masked through the channel linear mapping layer to be trained, so as to obtain masked experimental EEG information with position information.

[0013] Optionally, the masked experimental EEG information with position information is processed by an encoder and a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified, including: encoding the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained to obtain reconstructed experimental EEG information of multiple channels that are masked; Filling the reconstructed experimental EEG information of the masked multiple channels into the masked experimental EEG information with position information to obtain the reconstructed experimental EEG information; The reconstructed experimental EEG information is processed by a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

[0014] Optionally, the masked experimental EEG information with position information is encoded by an encoder of the alertness detection network to be trained to obtain reconstructed experimental EEG information of multiple channels that are masked, including: Performing selective multi-head attention calculation on the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained, to obtain a first selective multi-head attention calculation result; The first selective multi-head attention calculation result is processed by the encoder of the alertness detection network to be trained to obtain the reconstructed experimental EEG information of the masked multiple channels.

[0015] Optionally, the reconstructed experimental EEG information is processed by a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified, including: Performing selective multi-head attention calculation on the reconstructed experimental EEG information through a decoder of the alertness detection network to be trained to obtain a second selective multi-head attention calculation result; The second selective multi-head attention calculation result is processed by the decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

[0016] A second aspect of an embodiment of the present invention provides an autonomous driving safe driving cross-scenario alertness detection device based on EEG analysis, the device comprising: A first acquisition module is used to obtain a pre-trained alertness detection network, wherein the pre-trained alertness detection network is pre-trained using N-channel EEG information and corresponding brain region information, and has a function of reconstructing missing EEG information of multiple channels; A second acquisition module is used to obtain EEG information and corresponding brain region information in a sample safe driving scenario, wherein the number of channels of the EEG information in the sample safe driving scenario is M channels compared to N channels; A fine-tuning module is used to fine-tune the pre-trained alertness detection network based on the EEG information and the corresponding brain area information in the sample safe driving scene to obtain a fine-tuned alertness detection network; A third acquisition module is used to obtain EEG information in a new safe driving scenario, wherein the number of channels of the EEG information in the new safe driving scenario is missing at least one channel compared to N channels; The classification module is used to classify the EEG information in the new safe driving scenario based on the fine-tuned alertness detection network to obtain a classification result, wherein the classification result represents the category of the EEG information in the new safe driving scenario, namely, whether the driver is in an alert state.

[0017] A third aspect of an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the method for detecting cross-scenario alertness for safe autonomous driving based on EEG analysis as described in the first aspect of the present invention.

[0018] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for detecting cross-scenario alertness for safe autonomous driving based on EEG analysis as described in the first aspect of the present invention is implemented.

[0019] A fifth aspect of an embodiment of the present invention provides a computer program product, including a computer program / instruction, which is implemented by a processor to implement the steps in the method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis as described in the first aspect of the present invention.

[0020] Driver alertness is a prerequisite for safe driving of autonomous vehicles. Compared with the high lag and low precision of vehicle behavior trajectory detection, alertness detection based on physiological information is currently the most reliable and accurate method. Although electroencephalogram (EEG)-based alertness detection methods have made some progress in experimental scenarios, due to the low signal-to-noise ratio of EEG information acquisition and the difficulty of real-time processing, it is still a challenging problem under scene constraints such as high-speed autonomous driving vehicles. In addition, the cumbersome data acquisition process and annotation difficulties also hinder the progress in this field. Considering the successful application of EEG monitoring in experimental environments, the embodiments of the present invention believe that the scene transfer of knowledge learned in experimental scenarios is reasonable and feasible. Therefore, the embodiments of the present invention aim to bridge the field gap between experiments and new scenarios while balancing the number of channels and accuracy. Specifically, the embodiments of the present invention propose a method for cross-scene alertness detection for safe driving of autonomous driving based on EEG analysis, which is based on the standard montage structure of EEG channels and reduces the number of channels by considering the common areas of EEG channels in different scenarios. The results show that the average accuracy of the method proposed in the embodiment of the present invention on the SEED-VIG dataset containing 12 subjects is 86.20%, which is higher than the 82.21% achieved by the most advanced deep learning method. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a flowchart of the steps of a method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis provided by an embodiment of the present invention; Figure 2 It is a flow chart of a method for detecting cross-scenario alertness for safe autonomous driving based on EEG analysis provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0024] In the embodiment of the present invention, a method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis is proposed to achieve cross-scenario, cross-subject, and cross-device monitoring of driver alertness. Specifically, Figure 1 As shown, it shows a flowchart of the steps of the method for detecting cross-scenario alertness of autonomous driving safe driving based on EEG analysis provided by an embodiment of the present invention, and the method includes the following steps: S101, obtaining a pre-trained alertness detection network, wherein the pre-trained alertness detection network is pre-trained using N-channel EEG information and corresponding brain region information, and has the function of reconstructing missing EEG information of multiple channels.

[0025] S102, obtaining EEG information and corresponding brain region information in a sample safe driving scenario, wherein the number of channels of the EEG information in the sample safe driving scenario is M channels compared to N channels.

[0026] S103, based on the EEG information and the corresponding brain region information in the sample safe driving scenario, fine-tune the pre-trained alertness detection network to obtain a fine-tuned alertness detection network.

[0027] S104, obtaining EEG information in a new safe driving scenario, wherein the number of channels of the EEG information in the new safe driving scenario is missing at least one channel compared to N channels.

[0028] S105, based on the fine-tuned alertness detection network, classify the EEG information in the new safe driving scenario to obtain a classification result, wherein the classification result represents the category of the EEG information in the new safe driving scenario, that is, whether the driver is in an alert state.

[0029] Specifically, in step S101, the pre-trained alertness detection network is obtained by training a Transformer network with a selective multi-head attention mechanism using N-channel EEG information, and its accuracy is better than the traditional multi-head attention Transformer network and SOTA.

[0030] In the embodiment of the present invention, the training process of the pre-trained alertness detection network includes: S201, obtaining experimental EEG information and corresponding brain region information in an experimental safe driving scenario, wherein the number of channels of the experimental EEG information in the experimental safe driving scenario is N channels.

[0031] S202, randomly determining a plurality of channels that need to be masked from the N channels corresponding to the experimental EEG information.

[0032] S203, inputting the experimental EEG information and the corresponding brain region information, as well as the identifiers of multiple channels that need to be masked, into the channel linear mapping layer to be trained of the alertness detection network to be trained, to obtain masked experimental EEG information with position information.

[0033] S204, processing the masked experimental EEG information with position information through the encoder and decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

[0034] S205, inputting the experimental EEG information to be classified into the classifier to be trained of the alertness detection network to be trained, and obtaining the experimental EEG classification result.

[0035] S206, based on the experimental EEG classification result and the classification label of the experimental EEG information, updating the model parameters of the alertness detection network to be trained to obtain a pre-trained alertness detection network.

[0036] In an embodiment of the present invention, during the training process of the pre-trained alertness detection network, features can be extracted from EEG information to obtain EEG features, and features can be extracted from brain region information to obtain regional features. The EEG features and regional features are concatenated and input into the pre-trained Transformer network, and some channels are randomly shielded to force the Transformer encoder and decoder to reconstruct the original EEG features, so that the pre-trained alertness detection network obtained by training has the function of reconstructing the missing EEG information of multiple channels.

[0037] In the embodiment of the present invention, the frequency-based features in the EEG information are extracted by calculating the power spectral density (PSD), and then the power spectral density is converted into differential entropy, and the brain region information is spliced ​​to obtain the input features.

[0038] Specifically, in an embodiment of the present invention, first, the original EEG information is preprocessed to remove noise and normalize to eliminate the influence of the amplitude and range differences between the values ​​of the indicators. Then the power spectral density and differential entropy of the EEG information in different frequency bands are extracted. Secondly, since the EEG electrodes are placed according to the international 10-20 standard, the embodiment of the present invention encodes the two-dimensional position into the EEG feature based on the placement coordinates of the EEG channel. The encoded masked EEG information is then input into the encoding layer of the Transformer. In the multi-head attention mechanism, the average H divergence is used to calculate the correlation between each query and all keys to obtain the most critical top queries. Again, all slices are merged by global average pooling, and a simple fully connected network is used to predict the alert state. Finally, the fine-tuning network is fine-tuned by sharing the weights of the pre-trained network trained on the experimental dataset, so as to obtain better classification results on the real dataset.

[0039] Specifically, in the embodiment of the present invention, after obtaining the experimental EEG information in the experimental safe driving scenario, the experimental EEG information needs to be preprocessed, including: channel positioning, re-reference, independent component analysis (ICA), bandpass filtering, segmentation and standardization. Specifically, all these processes can be performed through a MATLAB toolbox called EEGLab.

[0040] In an embodiment of the present invention, the experimental EEG information in the experimental safe driving scenario refers to a standard data set obtained in a laboratory scenario. Specifically, the experimental EEG information in the experimental safe driving scenario can come from the SAD data set, which is a public sustained attention driving data set obtained by volunteers completing a 90-minute sustained attention task in a driving simulator. The data set includes 62 32-channel EEG data of 27 subjects driving on a four-lane highway, and these volunteers were instructed to keep the vehicle in the center of the lane. Lane departure events are randomly activated, causing the vehicle to drift from the original cruising lane to the left lane or the right lane. The entire experiment includes events of deviation start, reaction start, and response deviation. The next trial starts 5-10 seconds after the previous trial is completed, and the volunteers are instructed to drive the car back to the original cruising lane. Reaction time (RT) is the time interval between the start of deviation and the start of reaction in each trial. For each driving trial, two types of RT are calculated: local RT and global RT. Local RT is defined as the RT of each trial. Global RT is the average of all local RTs within the 90-second window before the deviation occurs. Trials can be labeled as "sleepy" and "alert" based on the difference between local RT and global RT. "Alert RT" is measured as the 5th percentile of local RT and represents the RT that subjects can perform during alertness. Trials in which both local RT and global RT are less than 1.5 times the alert RT are labeled as "alert", and trials in which both local RT and global RT are greater than 2.5 times the alert RT are labeled as "sleepy". After labeling all subjects in the dataset, each category of each subject is required to contain at least 50 samples to avoid overfitting. Because some subjects have small sample sizes in some categories, the data of subjects with a sample size of less than 50 in a certain category are discarded. Finally, after data augmentation, 17,707 trials were selected from 13 subjects.

[0041] In the embodiment of the present invention, each EEG information is filtered using a 1-50 Hz bandpass filter to reduce the impact of environmental noise. In the embodiment of the present invention, the filtered EEG information can also be standardized. Specifically, the EEG information is represented as EEG (C, T) , where C is the number of channels of EEG information and T is the number of sample points of EEG information. Then the EEG information is standardized using z-score to reduce fluctuations and non-stationarity, as follows: (1) in, , , Z and X represent the standardized EEG information and the original EEG information, respectively. and Representing the mean and variance of the preprocessed data, the z-score provides a true representation of the relative standard distance of a score from the mean. All EEG information is scaled and falls into a specific interval with a mean of 0 and a standard deviation of 1.

[0042] Power spectral density (PSD) defines the distribution of information power with frequency. In physics, the instantaneous power spectral density of a wave at a specific frequency is usually defined as the result of multiplying its frequency density by a corresponding coefficient. Since the collected EEG information is mostly time domain information, the time domain information must first be mapped to the frequency domain and then the power spectral density is calculated. Therefore, in the embodiment of the present invention, the WELCH algorithm is used to obtain the power spectral density of the EEG information.

[0043] (2) Where U represents the normalization factor, d(n) is the data window, with a length of N Data x(n) Divided into L segments, each segment length is M The frequency spectrum of EEG information is divided into δ (1-4Hz), θ (4-8Hz), α (8-13Hz), β (13-30Hz) and γ (30-50Hz). In this part, the differential entropy (DE) of each frequency band is calculated as follows: (3) In the embodiment of the present invention, the EEG information collected by each channel is expressed as differential entropy of five frequency bands through formula (2) and formula (3).

[0044] In the embodiment of the present invention, the problem of data imbalance can also be solved based on sampling methods, such as upsampling and downsampling: (4) in, represents the input vector selected from a small number of sample classes, that is, the corresponding differential entropy feature, express A sample randomly selected from the K nearest neighbors of represents new samples randomly synthesized in sequence, Finally, the embodiment of the present invention uses this upsampling method to generate uniformly distributed samples.

[0045] In the embodiment of the present invention, step S203 includes the following sub-steps: S2031, processing the experimental EEG information and the corresponding brain region information through the channel linear mapping layer to be trained to obtain the experimental EEG information with position information; S2032 , masking the experimental EEG information with position information according to the identifiers of the multiple channels to be masked through the channel linear mapping layer to be trained, to obtain masked experimental EEG information with position information.

[0046] In the embodiment of the present invention, since the alertness detection network to be trained does not include any recursive or convolutional process, in the embodiment of the present invention, position encoding is added to the input vector to provide the model with some information about the relative position of the feature in the temporal information.

[0047] Specifically, in an embodiment of the present invention, the experimental EEG information in the experimental safe driving scenario is a composite of information from n-dimensional (e.g., 16, 32, 64, 128) electrode channels, following the internationally recognized EEG cap electrode placement rules, namely the 10-20 system. The 32-channel EEG cap only represents a subset of the denser 64-channel EEG cap. In addition, although the number of electrode channels in different EEG caps is different, each brain region (temporal lobe, occipital lobe, etc.) contains relatively fixed EEG channel names. Therefore, an embodiment of the present invention proposes to integrate 2D-based EEG coordinates into the original information through position encoding to enhance the semantic similarity and temporal position in the d-dimensional space.

[0048] In the embodiment of the present invention, the calculation formula of the position code is as follows: (5) where x and y represent the coordinates of the EEG channels, j represents the dimension of the EEG channel, d represents the dimension of the position encoding vector, PE((x, y), 2 j) and PE((x,y), 2 j +1 ) The coordinates are x and y The second position code j and (2 j +1) components.

[0049] The position code is concatenated with the experimental EEG information in the original experimental safe driving scenario to obtain the experimental EEG information with position information.

[0050] Step S204 includes the following sub-steps: S2041, encoding the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained to obtain reconstructed experimental EEG information of multiple masked channels; S2042, filling the masked experimental EEG information with position information with the reconstructed experimental EEG information of the plurality of channels to obtain the reconstructed experimental EEG information; S2043, processing the reconstructed experimental EEG information through the decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

[0051] In the embodiment of the present invention, S2041 specifically includes: Performing selective multi-head attention calculation on the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained, to obtain a first selective multi-head attention calculation result; The first selective multi-head attention calculation result is processed by the encoder of the alertness detection network to be trained to obtain the reconstructed experimental EEG information of the masked multiple channels.

[0052] In the embodiment of the present invention, S2043 specifically includes: Performing selective multi-head attention calculation on the reconstructed experimental EEG information through a decoder of the alertness detection network to be trained to obtain a second selective multi-head attention calculation result; The second selective multi-head attention calculation result is processed by the decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

[0053] In an embodiment of the present invention, multiple channels that need to be masked are randomly determined from N channels corresponding to the experimental EEG information. During the pre-training process, the EEG information of the corresponding channels is masked, and the encoder reconstructs the masked EEG information. The prediction layer classifies the alertness state of the reconstructed information, so that the pre-trained alertness detection network has the function of reconstructing the missing EEG information of multiple channels.

[0054] In the embodiment of the present invention, considering that EEG information includes multiple brain regions such as the occipital lobe, temporal lobe and frontal lobe, the missing EEG information may lack complete information in a certain brain region, or the number of channels in this brain region is limited. To this end, the embodiment of the present invention proposes to input the brain region information corresponding to the EEG channel into the alertness detection network to be trained, so that the alertness detection network to be trained can refer to the brain region information and use part of the information of a brain region to reconstruct other EEG information in the brain region. In the embodiment of the present invention, the EEG channels are divided into 15 brain regions based on central symmetry. Specifically, Figure 2The flowchart of the method for detecting cross-scenario alertness of autonomous driving safe driving based on EEG analysis according to an embodiment of the present invention is shown. Figure 2 The brain schematic diagram in the lower left corner shows 15 brain regions divided according to an embodiment of the present invention.

[0055] In the embodiment of the present invention, a region-level tag is introduced As brain region information, they are appended to the end of the input sequence to represent the brain region information corresponding to each EEG channel. During the training process, the alertness detection network to be trained extracts localized information from the original channel through the attention mechanism, where the determined attention mask is assigned to the encoder / decoder. This ensures accurate association between regional features and source features of the same brain region, as well as between features of different regions. Secondly, the encoder converts a series of tokens Map to , and the last 15 tokens constitute the implicit representation. Again, the decoder is the same as the encoder with N Transformer blocks, and the selective multi-head attention calculation is also adopted. The decoder can only access the information contained in the regional features and some channels. This design enables the encoder to effectively reconstruct the EEG information through a unified topological structure.

[0056] In an embodiment of the present invention, the regional-level labeling information representing the brain region information is spliced ​​with the EEG information and combined with the selective multi-head attention mechanism to improve the model's ability to reconstruct EEG signals, so that the model can also reconstruct missing EEG information of multiple channels across scenarios and devices.

[0057] In the embodiment of the present invention, the EEG channel is divided into 15 regions based on the central symmetry of the brain. This division helps the model capture the features of different brain regions during training and takes into account the spatial information of brain regions when extracting features.

[0058] In an embodiment of the present invention, regional-level tags are introduced at the end of the input sequence, and these tags are input into the model together with the original EEG signal features. This enables the model to understand the EEG signal from a regional perspective, thereby extracting richer features. Specifically, the encoder maps the input EEG signal and the regional-level tags to a high-dimensional space, which contains hidden representations. In this process, the regional-level tags help the model understand the regional characteristics of the EEG signal.

[0059] In the embodiment of the present invention, during the pre-training phase, parts of the input EEG signal are randomly masked, and the task of the model is to try to reconstruct these masked parts. Regional-level labels play a key role in this process, helping the model to take into account the characteristics of different brain regions during the reconstruction process.

[0060] By considering the regional characteristics of EEG signals, the model is able to better generalize to different scenarios and devices. This is especially important for cross-scenario and cross-device alertness detection, as different environments and devices may have different effects on EEG signals.

[0061] In the embodiment of the present invention, in step 202, after determining the multiple channels that need to be masked, in the subsequent process, the part of the EEG information input to the encoder to be trained is masked, and the encoder to be trained attempts to reconstruct it using the remaining information.

[0062] In an embodiment of the present invention, the pre-training process is completed by reconstructing the input and predicting the information of the missing EEG channel, which is composed of the output embedding of the decoder. In an embodiment of the present invention, the mean square error (MSE) loss is used to measure the difference between the predicted DE value and the true value. During the migration process, the mask of the missing channel is first randomly filled with 0 by analogy to meet the input dimension consistency. For the encoder and decoder, the weights are directly shared and the intermediate layers are frozen to reconstruct the missing EEG channel information. For the final classifier, randomized initialization is used to allow the fine-tuned network to better adapt to new data.

[0063] In the embodiment of the present invention, a multi-head attention mechanism is used to learn long-term dependencies, allowing direct connections between each pair of positions. The average H divergence is used to calculate the correlation between the query and all keys to obtain the most critical top queries.

[0064] In the attention mechanism, each past position h , all positions can be represented by multiple attention heads u : (6) in, It is k The result of the attention head is is the linear projection matrix. Considering efficiency and effectiveness, the scaled dot product is used as the attention function. is the weighted sum of all value vectors, where the weights are calculated by applying the attention function to a specific query and key.

[0065] Related research shows that the self-attention mechanism in the traditional Transformer is a long-tail distribution of attention scores, and only a limited number of points are strongly correlated with other points. To this end, the embodiments of the present invention look for the top few queries with the greatest impact. The difference between the distribution of related queries and the uniform distribution is so large that the difference between the probability distribution of each query and the uniform distribution can be used as a criterion for selecting top queries. In the embodiments of the present invention, a simple formula 7 is used to measure the difference between the query and the key to avoid a lot of calculations before formula 8.

[0066] (7) In formula 7, H(q i ,K) Indicates all keys q i The arithmetic mean of L K express k The number of vectors. If i queries to get a larger H(q i ,K) , then its attention probability is more “diverse” and has a high chance of containing the dominant dot product pairs in the head field of the long-tail self-attention distribution.

[0067] (8) in, and v j They are q A subset of a vector, k Vector Sum v vector, d k yes k j The dimension of is obtained by projecting the input vector into Q space, K space and V space. q , k i and v i .

[0068] = W q h i ,W k h i ,W v h i (9) in, and is the projection matrix. Each attention set head has its own projection matrix, as shown in formula (9); where formula (8) means calculating a head based on the extracted part q, and formula (9) means using the values ​​of multiple heads to perform projection calculation to obtain a new qkv.

[0069] Each attention head is constructed by h tis obtained by including all "past" positions in order to capture ℎ t and h i Any long-term dependencies between them are captured. In addition, different attention heads focus on different aspects of the dependencies. After obtaining a refined representation of each position through the multi-head attention mechanism, the embodiment of the present invention adds a fully connected feedforward network that can be applied to each position independently and identically. This feedforward network transforms the nonlinear function, which is defined as follows. Then a residual layer and batch normalization are added: (10) in, b 1 ,b 2 represents the bias term, W 1 ,W 2 represents the weight matrix, m t Represents the input of the previous layer.

[0070] The full attention transformer calculates self-attention by taking past features as a whole. This approach reduces the risk of losing or forgetting past information. However, some information in the input may introduce noise, resulting in reduced accuracy. By reducing the number of calculations of q, the embodiments of the present invention can speed up the computational efficiency and space occupancy of the model. It can be noted that the algorithm using the selective attention mechanism has a smaller overhead in terms of memory usage, thereby enabling the embodiments of the present invention to simplify the resource consumption problem in motion scenes. In the embodiment of the present invention, the classifier is a fully connected layer that uses an activation function to ensure that the network predicts the alert state. The number of output neurons is equal to the probability. The predicted probability is then determined by a linear function. The objective function is optimized by binary cross entropy as follows: (11) in is a probability distribution where each element p i Indicates that the sample belongs to the category i The probability of is the sample label, if the sample belongs to the category i , y i =1, otherwise y i =0.

[0071] The following, combined Figure 2Taking an exemplary embodiment as an example, the training process of the alertness detection network to be trained in the embodiment of the present invention is explained. Assuming that the experimental EEG information has 64 channels, the alertness detection network to be trained can randomly determine 32 channels that need to be masked. The channel linear mapping layer splices the experimental EEG information and the corresponding brain area information, and adds 2D position encoding to obtain the experimental EEG information with position information, and floods the channels that need to be masked to obtain masked experimental EEG information with position information corresponding to the remaining 32 EEG channels. The EEG information is input into the encoder, and the encoder performs selective multi-head attention calculation on the EEG information to obtain a first selective multi-head attention calculation result, and based on the first selective multi-head attention calculation result, the reconstructed experimental EEG information of the masked multiple channels is obtained (such as Figure 2 The encoder outputs the EEG information (indicated by the green oval box in the output of the encoder), and then fills the EEG information into the masked experimental EEG information with position information to obtain the reconstructed experimental EEG information (64-channel EEG information). The encoder then inputs the reconstructed experimental EEG information into the decoder, which processes the decoder to obtain the experimental EEG information to be classified, and inputs it into the classifier to obtain the experimental EEG classification result. During the experiment, the model parameters are finally updated based on the classification results output by the classifier and the classification labels of the experimental EEG information.

[0072] In the embodiment of the present invention, considering that the standard EEG information follows the international standard of 10-20, the topology is consistent. The standard EEG channel position rationalizes the transfer model from multiple channels to a limited number of EEG channels. Due to the reduction of channels, zero padding is usually used to maintain the consistency of the input dimension. However, this method will lead to the loss of relevant information, and even fine-tuning will lead to significant performance degradation.

[0073] Based on this, an embodiment of the present invention proposes freezing the parameters of the encoder and decoder of a pre-trained alertness detection network that has learned the ability to reconstruct missing EEG channels, and then fine-tuning the parameters of the channel linear mapping layer and classifier of the alertness detection network based on data in actual scenarios.

[0074] Specifically, in the embodiment of the present invention, step S103 includes the following sub-steps: S1031, obtaining an alertness detection network to be fine-tuned based on the pre-trained alertness detection network; S1032, randomly filling the missing M channels of EEG information in the sample safe driving scenario with zeros; S1033, inputting the filled EEG information brain region information into the channel linear mapping layer to be trained of the alertness detection network to be fine-tuned to obtain sample information to be encoded; S1034, processing the sample information to be encoded by the encoder and decoder of the alertness detection network to be fine-tuned to obtain sample information to be classified; S1035, inputting the sample information to be classified into the classifier to be trained of the alertness detection network to be fine-tuned to obtain the sample classification result; S1036, based on the sample classification results and the classification labels of the EEG information in the sample safe driving scenario, the model parameters of the channel linear mapping layer to be trained and the classifier to be trained of the alertness detection network to be fine-tuned are updated to obtain a fine-tuned alertness detection network.

[0075] Taking into account the real driving environment, in an embodiment of the present invention, mask transfer pre-training is used to implement a model across scenarios and devices.

[0076] Wherein, S1031 includes the following sub-steps: S10311, initializing the model parameters of the encoder and decoder of the alertness detection network to be fine-tuned to the model parameters of the encoder and decoder in the pre-trained alertness detection network; S10312, randomly initializing the model parameters of the channel linear mapping layer in the pre-trained alertness detection network to obtain the channel linear mapping layer to be trained of the alertness detection network to be fine-tuned; S10313, randomly initializing the model parameters of the classifier in the pre-trained alertness detection network to obtain the classifier to be trained of the alertness detection network to be fine-tuned.

[0077] Specifically, Figure 2 As shown, in an embodiment of the present invention, during the fine-tuning process, further fine-tuning can be performed based on the pre-trained alertness detection network. During the fine-tuning process, the parameters of the encoder and the decoder are frozen, and the parameters of the channel linear mapping layer and the classifier of the alertness detection network are updated.

[0078] In an embodiment of the present invention, the EEG information in a sample safe driving scenario may be derived from sample EEG information collected in an actual application scenario, for example, may be derived from a SEED-VIG dataset or a SEED-VRW dataset.

[0079] The SEED-VIG dataset was obtained by collecting EEG, EOG, and eye movement data from 23 subjects through a simulated driving system. During the simulation, the highway scenery was projected onto an LCD screen in front of an actual modified vehicle. The test route was straight and monotonous to make the subjects feel tired. Both EEG and EOG were obtained using the ESI Neuroscan system with a sampling rate of 1000 Hz. The EEG cap has 64 electrodes, which are positioned using the international standard of 10-20. This dataset records 11 channels of posterior EEG, including "FT7", "FT8", "T7", "T8", "TP7", "TP8", "CP1", "CP2", "P1", "P2", "PO3", "POZ", "PO4", "O1", "O2", and 4 channels of forehead EOG for further analysis. At the same time, an infrared camera was deployed in the SMI eye tracking glasses 2 to record eye gaze and several eye movements, including blinking, eye closure (CLOS), saccades, and fixations. The labels in this dataset are the PERCLOS levels measured by the eye tracker. If the PERCLOS value was less than 0.35, the subject was labeled as awake. If the PERCLOS value was greater than 0.70, the subject was labeled as exhausted. Finally, a sub-dataset containing 12 subjects was constructed. More than 50 samples of alertness and fatigue were collected for each subject to ensure a balanced dataset.

[0080] The SEED-VRW dataset is based on driving a four-seater electric car. The dataset was collected on actual roads in a certain place. The roads are mainly straight lines with few pedestrians and vehicles, providing a safer and more realistic simulation of real road driving conditions. The subjects reacted to the driving conditions in real time, turning the steering wheel when turning, or braking when pedestrians crossed their path. The experiments were conducted after meals, when sleepiness is usually induced. The length of time each participant spent in the sleepy driving experiment varied from person to person. Referring to SEED-VIG, the same preprocessing steps and label calculations were performed on this dataset.

[0081] In an embodiment of the present invention, a pre-trained alertness detection network is used to have the ability to reconstruct accurate EEG information of multiple channels to solve the problem of inconsistent channel numbers between different EEG devices, so that the fine-tuned alertness detection network can reconstruct the missing EEG information based on the input EEG information of a few channels and the corresponding brain area information, and complete the classification task based on the reconstructed information.

[0082] Based on the same inventive concept, an embodiment of the present invention further provides an autonomous driving safe driving cross-scenario alertness detection device based on EEG analysis, the device comprising: A first acquisition module is used to obtain a pre-trained alertness detection network, wherein the pre-trained alertness detection network is pre-trained using N-channel EEG information and corresponding brain region information, and has a function of reconstructing missing EEG information of multiple channels; A second acquisition module is used to obtain EEG information and corresponding brain region information in a sample safe driving scenario, wherein the number of channels of the EEG information in the sample safe driving scenario is M channels compared to N channels; A fine-tuning module is used to fine-tune the pre-trained alertness detection network based on the EEG information and the corresponding brain area information in the sample safe driving scene to obtain a fine-tuned alertness detection network; A third acquisition module is used to obtain EEG information in a new safe driving scenario, wherein the number of channels of the EEG information in the new safe driving scenario is missing at least one channel compared to N channels; The classification module is used to classify the EEG information in the new safe driving scenario based on the fine-tuned alertness detection network to obtain a classification result, wherein the classification result represents the category of the EEG information in the new safe driving scenario, namely, whether the driver is in an alert state.

[0083] Based on the same inventive concept, an embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and run on the processor. When the processor is executed, it implements the steps in the method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis as described in any of the above embodiments.

[0084] Based on the same inventive concept, an embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis are implemented in any of the above embodiments.

[0085] Based on the same inventive concept, an embodiment of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps in the method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis as described in any of the above embodiments.

[0086] 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.

[0087] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0088] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (apparatus), and computer program products according to the embodiments of the present invention. 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 terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable 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.

[0089] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable 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.

[0090] These computer program instructions can also be loaded onto a computer or other programmable 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.

[0091] Although the preferred embodiments of the present invention 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 invention.

[0092] 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.

[0093] The above is a detailed introduction to the cross-scenario alertness detection method for autonomous driving safe driving based on EEG analysis provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis, characterized in that: The method comprises: Obtaining a pre-trained alertness detection network, wherein the pre-trained alertness detection network is pre-trained using N-channel EEG information and corresponding brain region information, and has the function of reconstructing missing EEG information of multiple channels; Obtaining EEG information and corresponding brain region information in a sample safe driving scenario, wherein the number of channels of the EEG information in the sample safe driving scenario is M channels compared to N channels; Based on the EEG information and the corresponding brain region information in the sample safe driving scenario, the pre-trained alertness detection network is fine-tuned to obtain a fine-tuned alertness detection network; Obtaining EEG information in a new safe driving scenario, wherein the number of channels of the EEG information in the new safe driving scenario is missing at least one channel compared to N channels; Based on the fine-tuned alertness detection network, the EEG information in the new safe driving scenario is classified to obtain a classification result, wherein the classification result represents whether the category of the EEG information in the new safe driving scenario is the driver being in an alert state.

2. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 1 is characterized in that: Based on the EEG information and the corresponding brain region information in the sample safe driving scenario, the pre-trained alertness detection network is fine-tuned to obtain the fine-tuned alertness detection network, including: Based on the pre-trained alertness detection network, obtaining an alertness detection network to be fine-tuned; Randomly fill the missing M channels of EEG information in the sample safe driving scenario with zeros; Inputting the filled EEG information brain region information into the channel linear mapping layer to be trained of the vigilance detection network to be fine-tuned to obtain sample information to be encoded; Processing the sample information to be encoded by the encoder and decoder of the alertness detection network to be fine-tuned to obtain sample information to be classified; Inputting the sample information to be classified into the classifier to be trained of the alertness detection network to be fine-tuned to obtain the sample classification result; Based on the sample classification results and the classification labels of the EEG information in the sample safe driving scenario, the model parameters of the channel linear mapping layer to be trained and the classifier to be trained of the alertness detection network to be fine-tuned are updated to obtain a fine-tuned alertness detection network.

3. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 2 is characterized in that: Based on the pre-trained alertness detection network, obtaining an alertness detection network to be fine-tuned includes: Initializing the model parameters of the encoder and decoder of the alertness detection network to be fine-tuned to the model parameters of the encoder and decoder in the pre-trained alertness detection network; Randomly initializing the model parameters of the channel linear mapping layer in the pre-trained alertness detection network to obtain the channel linear mapping layer to be trained of the alertness detection network to be fine-tuned; The model parameters of the classifier in the pre-trained alertness detection network are randomly initialized to obtain the classifier to be trained of the alertness detection network to be fine-tuned.

4. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 1, characterized in that: The training process of the pre-trained alertness detection network includes: Obtaining experimental EEG information and corresponding brain region information in an experimental safe driving scenario, wherein the number of channels of the experimental EEG information in the experimental safe driving scenario is N channels; Randomly determine a plurality of channels that need to be masked from the N channels corresponding to the experimental EEG information; Inputting the experimental EEG information and the corresponding brain region information, as well as the identifiers of the multiple channels to be masked, into the channel linear mapping layer to be trained of the alertness detection network to be trained, to obtain masked experimental EEG information with position information; The masked experimental EEG information with position information is processed by an encoder and a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified; Inputting the experimental EEG information to be classified into the classifier to be trained of the alertness detection network to be trained, and obtaining the experimental EEG classification result; Based on the experimental EEG classification result and the classification label of the experimental EEG information, the model parameters of the alertness detection network to be trained are updated to obtain a pre-trained alertness detection network.

5. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 4 is characterized in that: The experimental EEG information and the corresponding brain region information, as well as the identifiers of the multiple channels to be masked, are input into the channel linear mapping layer to be trained of the alertness detection network to be trained, to obtain the masked experimental EEG information with position information, including: The experimental EEG information and the corresponding brain region information are processed by the channel linear mapping layer to be trained to obtain the experimental EEG information with position information; The experimental EEG information with position information is masked according to the identifiers of the multiple channels to be masked through the channel linear mapping layer to be trained, so as to obtain masked experimental EEG information with position information.

6. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 4 is characterized in that: The masked experimental EEG information with position information is processed by the encoder and decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified, including: encoding the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained to obtain reconstructed experimental EEG information of multiple channels that are masked; Filling the reconstructed experimental EEG information of the masked multiple channels into the masked experimental EEG information with position information to obtain the reconstructed experimental EEG information; The reconstructed experimental EEG information is processed by a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

7. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 6 is characterized in that: The masked experimental EEG information with position information is encoded by the encoder of the alertness detection network to be trained to obtain the reconstructed experimental EEG information of the masked multiple channels, including: Performing selective multi-head attention calculation on the masked experimental EEG information with position information through an encoder of the alertness detection network to be trained, to obtain a first selective multi-head attention calculation result; The first selective multi-head attention calculation result is processed by the encoder of the alertness detection network to be trained to obtain the reconstructed experimental EEG information of the masked multiple channels.

8. The method for detecting cross-scenario alertness of autonomous driving safety driving based on EEG analysis according to claim 6 is characterized in that: The reconstructed experimental EEG information is processed by a decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified, including: Performing selective multi-head attention calculation on the reconstructed experimental EEG information through a decoder of the alertness detection network to be trained to obtain a second selective multi-head attention calculation result; The second selective multi-head attention calculation result is processed by the decoder of the alertness detection network to be trained to obtain the experimental EEG information to be classified.

9. 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 method for detecting cross-scenario alertness for safe driving with autonomous driving based on EEG analysis according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the method for detecting cross-scenario alertness for safe driving of autonomous driving based on EEG analysis as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Driver alertness monitoring method and system based on electroencephalogram information

    CN105105774A

  • Driving risk monitoring method based on attention mechanism

    CN113780385A

  • Alarm level monitoring method based on electroencephalogram signals and related device

    CN117770838A

  • Driving state monitoring and feedback method and system based on multi-mode human factor intelligent data analysis

    CN117909810A

  • Cross-subject driving fatigue detection system based on deep learning

    CN117932306A

Cited By

  • Streaming electroencephalogram data-oriented artifact consciousness element contrast detection system

    CN122388695A