Driving behavior classification method, device and product based on noise reduction diffusion probability model
By applying noise reduction diffusion probability models in driving behavior analysis, new samples and learning reconstruction errors are generated, and the problem of insufficient data volume of Electrical Electricity signals has been solved, and the accuracy of driving behavior classification significantly improves the accuracy of driving behavior.
Patent Information
- Application Number
- CN202411441083.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-16
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-10-16
AI Technical Summary
In the prior art, when using EEG signals for driving behavior analysis, there is a problem of insufficient data volume, which affects the accuracy of the driver's behavior model.
The method based on the noise reduction diffusion probability model, by generating new samples and learning reconstruction errors, enhancing EEG features, and solving the problem of insufficient sample capacity, thereby improving the accuracy of driving behavior classification.
The noise and electrical signals are removed and reconstructed by the noise reduction priority model, and their distribution is learned, and the characteristics of extraction and enhancement are learned, thereby improving the accuracy of the recognition of the driving behavior model.
Smart Images

Figure CN119004264B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a driving behavior classification method, device and product based on a noise reduction diffusion probability model. Background Art
[0002] Due to the growth of traffic volume, traffic safety has always been a key issue of social concern. In terms of traffic safety, the driver's status and behavior are the main influencing factors, because more than 94% of traffic accidents are related to human factors. Among human factors, abnormal conditions (such as distraction, fatigue, etc.) and abnormal behaviors (forced lane changes, running red lights) are the main causes of traffic accidents. Therefore, analyzing and predicting the driver's behavior, especially establishing the driver's behavior model, plays an important role in improving vehicle safety and avoiding traffic accidents.
[0003] Traditional driver behavior models rely mainly on vehicle data, such as speed, acceleration, pedals, steering wheel angle, etc. Other models analyze driving behavior by collecting facial expressions or body posture and movement from cameras. However, there is a major limitation in using vehicle data to study driving behavior: namely, vehicle data can have observable reactions after dangerous behaviors have already occurred. Take a driver who is trying to change lanes as an example. He does not know which lane has pedestrians. When the steering wheel is turned, dangerous driving behavior is detected. However, it is too late to issue a warning to stop the driver from changing lanes. The vehicle is likely to collide directly with the vehicle on the right due to failure to brake in time. In order to solve the problem of delayed reactions observed using vehicle data, physiological indicators such as electroencephalogram (EEG) can be used to build driving behavior models. Compared with vehicle data, it has a unique advantage in detecting driving behavior: the driver's reactions can be exploited through EEG signals, which can be detected well before the action occurs, and the reaction can be 130 milliseconds to 500 milliseconds in advance.
[0004] However, most of the current related technologies only use electroencephalogram (EEG) signals to identify specific single driving behaviors, and there is a major difficulty in using EEG signals for driving behavior analysis due to insufficient data. The distribution and feature limitations of EEG signals affect the accuracy of the driver behavior model. Summary of the invention
[0005] Based on the above technical problems, the embodiments of the present invention provide a driving behavior classification method, device and product based on the noise reduction diffusion probability model, aiming to enhance EEG features through the noise reduction diffusion probability model, solve the problem of insufficient sample capacity by generating new samples and learning reconstruction errors, thereby improving the accuracy of driving behavior classification.
[0006] A first aspect of an embodiment of the present invention provides a driving behavior classification method based on a noise reduction diffusion probability model, the method comprising:
[0007] Obtaining a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, wherein the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a stable driving label;
[0008] Inputting the sample EEG signal into an encoder in a driving behavior classification model to be trained for encoding to obtain a sample encoding result;
[0009] Performing diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal;
[0010] Inputting the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal;
[0011] Inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoised diffusion probability model to capture the representation of the sample EEG signal;
[0012] Inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal;
[0013] According to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal, the model parameters of the driving behavior classification model to be trained are updated to obtain a trained driving behavior classification model;
[0014] The EEG signal to be classified is input into the trained driving behavior classification model to obtain a driving behavior classification result of the EEG signal to be classified.
[0015] A second aspect of an embodiment of the present invention provides a driving behavior classification device based on a noise reduction diffusion probability model, the device comprising:
[0016] A sample acquisition module, used to obtain a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, wherein the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a stable driving label;
[0017] A sample encoding module, used for inputting the sample EEG signal into an encoder in the driving behavior classification model to be trained for encoding, and obtaining a sample encoding result;
[0018] A sample diffusion processing module, used for performing diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal;
[0019] A sample denoising diffusion module, used for inputting the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal;
[0020] A sample decoding module, used for inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal;
[0021] A sample classification module, used for inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal;
[0022] A model training module, used for updating the model parameters of the driving behavior classification model to be trained according to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal, so as to obtain a trained driving behavior classification model;
[0023] The behavior classification module is used to input the EEG signal to be classified into the trained driving behavior classification model to obtain the driving behavior classification result of the EEG signal to be classified.
[0024] 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 when the computer program is executed by the processor, the driving behavior classification method based on the noise reduction diffusion probability model according to the first aspect of the embodiment of the present invention is implemented.
[0025] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the driving behavior classification method based on the noise reduction diffusion probability model of the first aspect of the embodiment of the present invention is implemented.
[0026] In the driving behavior classification method based on the noise reduction diffusion probability model provided by the embodiment of the present invention, a sample EEG signal carrying a driving behavior label is obtained; the sample EEG signal is input into a driving behavior classification model to be trained (including an encoder, a noise reduction diffusion probability model, a decoder and a classifier), firstly, the sample EEG signal is encoded by the encoder to obtain a sample encoding result; secondly, the sample EEG signal is diffused to obtain a noisy sample EEG signal; then, the noisy sample EEG signal is input into the noise reduction diffusion probability model to obtain a denoised sample EEG signal; then, the denoised sample EEG signal and the sample encoding result are input into the decoder to obtain a sample decoding result; the sample decoding result is input into the classifier to obtain a driving behavior classification result of the sample EEG signal; according to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal, the model parameters of the driving behavior classification model to be trained are updated to obtain a trained driving behavior classification model; finally, the trained driving behavior classification model is used to identify and classify the driving behavior of the EEG signal to be classified.
[0027] This embodiment uses sample EEG signals corresponding to five different driving behavior labels for model training, and can train a driving behavior classification model that comprehensively predicts multiple driving behaviors, thereby improving the classification performance of the model. In addition, in the driving behavior classification model of this embodiment, the noisy sample EEG signal can be denoised and reconstructed by a noise reduction diffusion probability model to learn the distribution of the sample EEG signal, thereby performing representation extraction and feature enhancement on the sample EEG signal; the decoder can capture the representation of the sample EEG signal by using the reconstruction error of the noise reduction diffusion probability model. In other words, the driving behavior classification model (encoder-decoder structure model) containing the noise reduction diffusion probability model in this embodiment is used to generate and learn efficient representations of EEG signal data, solve the problem of insufficient sample capacity by generating new samples and learning reconstruction errors, and improve the recognition accuracy of the driving behavior model by enhancing EEG features. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] 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 labor.
[0029] Figure 1 is a flowchart of a method for classifying driving behaviors based on a noise reduction diffusion probability model according to an embodiment of the present invention;
[0030] Figure 2 is an overall framework diagram of a driving behavior classification model shown in one embodiment of the present invention;
[0031] Figure 3 is an overall flow chart of a driving behavior classification method based on a noise reduction diffusion probability model according to an embodiment of the present invention;
[0032] Figure 4 is a short-time Fourier transform power spectrum corresponding to sample EEG signals of different driving behavior labels at different times shown in an embodiment of the present invention;
[0033] Figure 5 It is a structural block diagram of a driving behavior classification device based on a noise reduction diffusion probability model provided by an embodiment of the present invention;
[0034] Figure 6 It is a schematic diagram of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] Please refer to Figure 1 , Figure 1 FIG. 1 is a flowchart of a driving behavior classification method based on a noise reduction diffusion probability model according to an embodiment of the present invention. Figure 1 As shown, the driving behavior classification method based on the noise reduction diffusion probability model provided in this embodiment includes at least the following steps:
[0037] Step S11: obtaining a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, and the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a smooth driving label.
[0038] In this embodiment, the experimental paradigm of event-related behavioral response is used to study multiple driving behaviors. Based on this, this embodiment divides driving behaviors into four categories: deceleration, acceleration, turning and lane changing. Stable driving is used as a control group. Five driving behaviors are tested in multiple event-related simulated driving experiments, and the driver's electroencephalogram (ie, EEG signal) is collected to obtain EEG signals corresponding to five different driving behaviors. The EEG signals corresponding to the five different driving behaviors are used as sample EEG signals for training a driving behavior classification model.
[0039] That is to say, the training samples of the driving behavior classification model to be trained in this embodiment are sample EEG signals, which carry driving behavior labels, including: acceleration label, deceleration label, turning label, lane change label and smooth driving label.
[0040] Step S12: inputting the sample EEG signal into an encoder in the driving behavior classification model to be trained for encoding to obtain a sample encoding result.
[0041] In this embodiment, the driving behavior classification model to be trained includes: an encoder, a noise reduction diffusion probability model, a decoder and a classifier. It can be understood that the encoder, the noise reduction diffusion probability model, the decoder and the classifier in the driving behavior classification model to be trained are respectively: an encoder to be trained, a noise reduction diffusion probability model to be trained, a decoder to be trained and a classifier to be trained.
[0042] After obtaining the sample EEG signal, the sample EEG signal can be input into the driving behavior classification model to be trained for training. Specifically, the sample EEG signal is input into the encoder in the driving behavior classification model to be trained for encoding processing to obtain a sample encoding result corresponding to the sample EEG signal.
[0043] Step S13: performing diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal.
[0044] In this embodiment, after obtaining the sample encoding result output by the encoder, the sample EEG signal needs to be diffused: through the diffusion step, noise is introduced into the sample EEG signal to obtain a noisy sample EEG signal corresponding to the sample EEG signal.
[0045] Step S14: inputting the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal.
[0046] In this embodiment, after obtaining the noisy sample EEG signal, it is necessary to input the noisy sample EEG signal into the denoising diffusion probability model, and denoise the noisy sample EEG signal through the denoising diffusion probability model to obtain the denoised sample EEG signal. Among them, the denoising diffusion probability model (Denoising diffusion Probabilistic Model, DDPM) is a generative model with strong generative ability and can be used for data enhancement and feature enhancement. In this embodiment, the denoising diffusion probability model can be used to generate higher quality simulation data by learning the distribution of data, and can improve the performance of the model.
[0047] In this embodiment, by adding a denoising diffusion probability model to the driving behavior classification model to be trained, the noisy sample EEG signals are denoised and reconstructed through the denoising diffusion probability model, the distribution of the sample EEG signals can be learned, thereby performing representation extraction and feature enhancement on the sample EEG signals.
[0048] Step S15: inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
[0049] In this embodiment, after the denoising diffusion probability model outputs the denoised sample EEG signal, the denoised sample EEG signal and the sample encoding result can be input into the decoder, and the denoised sample EEG signal and the sample encoding result are decoded by the decoder to obtain the corresponding sample decoding result. The decoder can use the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
[0050] In an optional implementation, the reconstruction error of the denoising diffusion probability model represents the loss between the denoised sample EEG signal and the sample EEG signal.
[0051] In this embodiment, the denoising diffusion probability model not only generates data, but also learns effective data representation. The denoising diffusion probability model causes information loss due to the addition of noise during the forward modeling process, resulting in prediction errors during the inference process. By adopting a classification-oriented decoder, these reconstruction errors can be used to restore the lost information. In the process of filling the gaps, the decoder effectively obtains a meaningful representation of the original sample. In this process, the integration of the denoising diffusion probability model and the decoder effectively enhances the characteristics of the EEG signal.
[0052] Step S16: inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal.
[0053] In this embodiment, after obtaining the sample decoding result output by the decoder, the sample decoding result can be input into the classifier, and the sample decoding result can be classified by the classifier to obtain the driving behavior classification result corresponding to the sample EEG signal. For example, the driving behavior classification result corresponding to the sample EEG signal can be: changing lanes, accelerating, decelerating, turning or steady driving.
[0054] Step S17: updating the model parameters of the driving behavior classification model to be trained according to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal to obtain a trained driving behavior classification model.
[0055] In this embodiment, the model parameters in the driving behavior classification model to be trained can be updated according to the driving behavior classification result corresponding to the sample EEG signal and the driving behavior label carried by the sample EEG signal to obtain a trained driving behavior classification model.
[0056] For example, based on the driving behavior classification result corresponding to the sample EEG signal and the driving behavior label carried by the sample EEG signal, the model parameters of the encoder to be trained, the model parameters of the denoising diffusion probability model to be trained, the model parameters of the decoder to be trained, and the model parameters of the classifier to be trained in the driving behavior classification model to be trained are updated respectively to obtain a trained encoder, a trained denoising diffusion probability model, a trained decoder, and a trained classifier, thereby obtaining a trained driving behavior classification model.
[0057] Step S18: inputting the EEG signal to be classified into the trained driving behavior classification model to obtain a driving behavior classification result of the EEG signal to be classified.
[0058] In this embodiment, the trained driving behavior classification model can be used to predict the driving behavior related to the EEG signal to obtain the corresponding driving behavior classification result. Among them, the EEG signal to be classified is the EEG signal that needs to be predicted for driving behavior, which can be the EEG signal of the driver collected in real time. The EEG signal to be classified is input into the trained driving behavior classification model, and the driving behavior classification result corresponding to the EEG signal to be classified output by the trained driving behavior classification model can be obtained.
[0059] In this embodiment, the model training is performed using sample EEG signals corresponding to five different driving behavior labels, and a driving behavior classification model for comprehensive prediction of multiple driving behaviors can be trained, thereby improving the classification performance of the model. Also, in the driving behavior classification model of this embodiment, the noisy sample EEG signals can be denoised and reconstructed by the noise reduction diffusion probability model to learn the distribution of the sample EEG signals, thereby performing representation extraction and feature enhancement on the sample EEG signals; the meaningful representation of the sample EEG signals can be captured by the decoder using the reconstruction error of the noise reduction diffusion probability model. In other words, this embodiment implements driving behavior classification based on EEG signals by using a driving behavior classification model including a noise reduction diffusion probability model, generates and learns efficient representations of EEG signal data, integrates the data enhancement function of the noise reduction diffusion probability model, generates new samples and learns reconstruction errors to solve the problem of insufficient sample capacity, and enhances the EEG features to improve the recognition accuracy of the driving behavior model.
[0060] In combination with the above embodiments, in one implementation, the present invention also provides a driving behavior classification method based on a noise reduction diffusion probability model, in which the noise reduction diffusion probability model includes: a first convolutional layer and a UNet structure for noise prediction, the UNet structure includes: a first upsampling structure, a second upsampling structure, a third upsampling structure, a first downsampling structure, a second downsampling structure, and a third downsampling structure; the decoder includes: a first upsampling layer, a second upsampling layer, and a third upsampling layer.
[0061] In this embodiment, the noise reduction diffusion probability model includes: a first convolution layer and a UNet structure, and the UNet structure is used for noise prediction. The UNet structure in the noise reduction diffusion probability model includes: along the processing flow of the data, three downsampling structures (first downsampling structure, second downsampling structure, third downsampling structure) and three upsampling structures (first upsampling structure, second upsampling structure, third upsampling structure).
[0062] Furthermore, the decoder in this embodiment includes three upsampling layers: along the data processing flow, they are the first upsampling layer, the second upsampling layer and the third upsampling layer.
[0063] The first convolutional layer and the first down-sampling structure are connected to the third up-sampling layer, the second down-sampling structure is connected to the second up-sampling layer, and the third down-sampling structure is connected to the first up-sampling layer. By the connection, the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
[0064] In this embodiment, the last layer of the denoising diffusion probability model is the first convolution layer, the first convolution layer and the first downsampling structure of the denoising diffusion probability model are jump-connected to the third upsampling layer of the decoder, the second downsampling structure of the denoising diffusion probability model is jump-connected to the second upsampling layer of the decoder, and the third downsampling structure of the denoising diffusion probability model is jump-connected to the first upsampling layer of the decoder. In this embodiment, the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal through jumping.
[0065] Furthermore, the denoising diffusion probability model selects UNet as the structure for noise prediction, and the output of the denoising diffusion probability model is jump-connected with the upsampling layer of the decoder, so that the error information of the denoising diffusion probability model in the reconstruction process can be utilized. By trying to identify and correct the reconstruction error of the denoising diffusion probability model, meaningful EEG signals can be learned, and meaningful EEG signal features can be learned.
[0066] In combination with the above embodiments, in one implementation, the present invention further provides a driving behavior classification method based on a noise reduction diffusion probability model, in which the "inputting the noisy sample EEG signal into the noise reduction diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal" in the above step S14 may specifically include step S21, and the "inputting the denoised sample EEG signal and the sample encoding result into the decoder in the driving behavior classification model to be trained to obtain a sample decoding result" in the above step S15 may specifically include steps S22 to S24:
[0067] Step S21: input the noisy sample EEG signal into the first down-sampling structure, and sequentially pass through the second down-sampling structure, the third down-sampling structure, the first up-sampling structure, the second up-sampling structure, the third up-sampling structure and the first convolutional layer to obtain the denoised sample EEG signal.
[0068] In this embodiment, the noisy sample EEG signal is input into the first down-sampling structure in the denoising diffusion probability model, and is processed in sequence by the first down-sampling structure, the second down-sampling structure, the third down-sampling structure, the first up-sampling structure, the second up-sampling structure, the third up-sampling structure and the first convolutional layer to obtain the denoised sample EEG signal output by the first convolutional layer, that is, the denoised sample EEG signal output by the denoising diffusion probability model is obtained.
[0069] Step S22: input the output of the third down-sampling structure and the sample encoding result into the first up-sampling layer to obtain a first up-sampling result.
[0070] In this embodiment, the output of the third down-sampling structure in the denoising diffusion probability model and the sample encoding result (i.e., the output of the encoder) are input to the first up-sampling layer of the decoder by jumping the third down-sampling structure with the first up-sampling layer to obtain the first up-sampling result output by the first up-sampling layer.
[0071] Step S23: input the output of the second down-sampling structure and the first up-sampling result into the second up-sampling layer to obtain a second up-sampling result.
[0072] In this embodiment, the output of the second down-sampling structure in the denoising diffusion probability model and the first up-sampling result output by the first up-sampling layer are input to the second up-sampling layer of the decoder through a jump connection between the second down-sampling structure and the second up-sampling layer, so as to obtain the second up-sampling result output by the second up-sampling layer.
[0073] Step S24: input the denoised sample EEG signal, the output of the first down-sampling structure and the second up-sampling result into the third up-sampling layer to obtain the sample decoding result.
[0074] In this embodiment, the denoised sample EEG signal output by the first convolutional layer in the denoising diffusion probability model, the output of the first downsampling structure in the denoising diffusion probability model, and the second upsampling result output by the second upsampling layer in the decoder are input to the third upsampling layer of the decoder through jumping between the first convolutional layer, the first downsampling structure and the third upsampling layer, so as to obtain the sample decoding result output by the third upsampling layer, that is, the sample decoding result output by the decoder is obtained.
[0075] In this embodiment, the denoising diffusion probability model and decoder structure are extremely important in extracting important EEG features to accurately classify driving behavior.
[0076] In addition, in another optional embodiment, the encoder includes three downsampling layers and an average pooling layer: along the processing flow of the data, they are the first downsampling layer, the second downsampling layer, the third downsampling layer and the average pooling layer. Each downsampling layer contains: a second convolution layer and a self-attention layer. Compared with the second convolution layer, the self-attention layer can extract long-range feature correlations. And, among the three upsampling layers (the first upsampling layer, the second upsampling layer and the third upsampling layer) included in the decoder, each upsampling layer contains a third convolution layer and a self-attention layer. The second convolution layer and the third convolution layer may be the same or different. The self-attention layer in the decoder upsampling layer may be the same or different from the self-attention layer in the encoder downsampling layer.
[0077] In an optional implementation, the classifier of this embodiment may be composed of three fully connected linear layers, and the output of the decoder is calculated through the linear layer and normalized through the softmax function to obtain the output probability.
[0078] In one embodiment, Figure 2 As shown, Figure 2 FIG. 1 is an overall framework diagram of a driving behavior classification model shown in an embodiment of the present invention. Figure 2 In the , the driving behavior classification model includes: encoder, decoder, classifier (feedforward neural network) and denoising diffusion probability model. That is, the driving behavior classification model includes an encoder-decoder structure and a DDPM module. The encoder consists of three downsampling layers (such as three UNet downsampling layers), followed by an average pooling layer; the decoder consists of three upsampling layers (such as three UNet upsampling layers), namely the first upsampling layer, the second upsampling layer and the third upsampling layer. DDPM (denoising diffusion probability model) receives the noisy sample EEG signal after the diffusion step And reconstruct it. Then reconstruct the result Input to the decoder for joint decoding, get the decoding result, and get the final classification output .
[0079] Specifically, Figure 2 In the example, the EEG signal is , , where 59 represents 59 channels and 2000 represents 2000 data points; that is, 1s is 1000 data points, and 59*2s has 2000 data points. Sample EEG signal After the diffusion step, the noisy sample EEG signal is obtained , and, sample EEG signals The input encoder passes through three downsampling layers of the encoder in sequence: the first downsampling layer, the second downsampling layer, the third downsampling layer and the average pooling layer to obtain the sample encoding result output by the encoder.
[0080] Noisy sample EEG signal The signal is input to the denoising diffusion probability model DDPM, and then processed by three downsampling structures (such as three UNet downsampling structures) of the denoising diffusion probability model: the first downsampling structure, the second downsampling structure, and the third downsampling structure, and three upsampling structures (such as three UNet upsampling structures) of the denoising diffusion probability model: the first upsampling structure, the second upsampling structure, the third upsampling structure, and the first convolution layer (1D convolution) to obtain the denoised sample EEG signal. ; Then, through the jump connection between the third down-sampling structure and the first up-sampling layer, the output of the third down-sampling structure in the denoising diffusion probability model and the sample encoding result are input to the first up-sampling layer of the decoder to obtain the first up-sampling result output by the first up-sampling layer; through the jump connection between the second down-sampling structure and the second up-sampling layer, the output of the second down-sampling structure in the denoising diffusion probability model and the first up-sampling result output by the first up-sampling layer are input to the second up-sampling layer of the decoder to obtain the second up-sampling result output by the second up-sampling layer; and, through the jump connection between the first convolution layer, the first down-sampling structure and the third up-sampling layer, the denoised sample EEG signal output by the first convolution layer in the denoising diffusion probability model is input to the decoder. The output of the first downsampling structure in the noise reduction diffusion probability model and the second upsampling result output by the second upsampling layer in the decoder are input to the third upsampling layer of the decoder to obtain the sample decoding result output by the third upsampling layer , that is, get the sample decoding result output by the decoder ; Finally, the sample decoding result Input the classifier to get the classification result .
[0081] In combination with the above embodiments, in one implementation, the present invention further provides a driving behavior classification method based on a noise reduction diffusion probability model. In this embodiment, in order to balance the reconstruction error and the classification error, the objective function of the driving behavior classification model to be trained is:
[0082] ;
[0083] in, is the denoised sample EEG signal output by the denoising diffusion probability model, is the sample encoding result output by encoder E; It is a decoder The sample decoding result of the output is is the reconstruction error, which is the difference between the denoised sample EEG signal and the sample EEG signal; is the probability that the driving behavior classification result is the driving behavior label corresponding to the sample EEG signal, that is, the cross entropy loss in the classification case; , , and are the trainable parameters of the decoder, encoder, denoising diffusion probability model and classifier, respectively. is the weight coefficient.
[0084] In this embodiment, the model parameters of the driving behavior classification model to be trained may be updated based on the objective function to obtain a trained driving behavior classification model.
[0085] In combination with the above embodiments, in one implementation, the present invention further provides a driving behavior classification method based on a noise reduction diffusion probability model. In this method, in addition to the above steps, steps S31 to S32 may also be included:
[0086] Step S31: obtaining the original EEG signal collected in the simulated driving experiment.
[0087] In this embodiment, the original EEG signals collected in the simulated driving experiment can be obtained. The EEG signals are observable voltage signals generated in the cerebral cortex after the electrical signals transmitted between the cranial nerves are stimulated by the electric field, and are collected on the scalp. The original EEG signals refer to the EEG signals collected by the EEG data acquisition module, and the original EEG signals carry driving behavior labels, which include: acceleration labels, deceleration labels, turning labels, lane change labels, and stable driving labels.
[0088] In an optional implementation, the simulated driving experiment of this embodiment can set regular road events. When the driver's vehicle enters the event triggering area, the road event will be triggered, thereby inducing the corresponding driving behavior. When the driver's vehicle passes through the event triggering area, the EEG data acquisition module records the event identifier on the time axis as the time of occurrence of the stimulus. Accordingly, this embodiment sets four common driving behaviors during road driving: acceleration, deceleration, turning and changing lanes, and uses specific repeatable events to induce these driving behaviors, and sets stable driving as the control group.
[0089] Furthermore, in an optional manner, the corresponding relationship between the driving behavior and the triggering event is as follows:
[0090] (1) Braking behavior (deceleration behavior) is caused by three events: i) the sudden insertion of a vehicle on the side, ii) a pedestrian suddenly crossing the road, iii) the sudden braking of the vehicle in front;
[0091] (2) Turning behavior is caused by two types of events: finding a left / right turn sign;
[0092] (3) Lane-changing behavior is caused by two types of events: detecting an obstacle on the left / right side;
[0093] (4) Acceleration behavior is caused by two types of events: i) congestion ahead and ii) overtaking a slower vehicle.
[0094] Step S32: preprocessing the original EEG signal to construct a training data set, wherein the sample EEG signals in the training data set are obtained according to the following steps.
[0095] In this embodiment, the original EEG signal needs to be preprocessed to construct a training data set to improve data quality and accuracy.
[0096] The training data set includes sample EEG signals, and the sample EEG signals in the training data set are obtained according to the following steps S32-1 to S32-4:
[0097] Step S32-1: Use a FIR filter with a passband of the first Hz to filter the original EEG signal to obtain a filtered EEG signal.
[0098] In this embodiment, a FIR filter with a passband of the first Hz is first applied to the original EEG signal. For example, the first Hz can be: [0.5, 40.0], which is not limited to this. The original EEG signal is filtered using the FIR filter with a passband of the first Hz to obtain a filtered EEG signal.
[0099] Step S32-2: Taking the event occurrence time as time zero, segment the filtered EEG signal into frames according to a first time interval to obtain segmented EEG signals.
[0100] In this embodiment, after obtaining the filtered EEG signal, the filtered EEG signal is segmented according to the triggering moment of the event (i.e., the road event), that is, according to the time when the event occurs: taking the time when the event occurs as the zero time, the filtered EEG signal is segmented into frames according to a first time interval (such as [-0.5s, 1.5s], there is no restriction on this) to obtain a segmented EEG signal.
[0101] Step S32-3: removing the segmented EEG signals whose signal amplitude exceeds the first signal amplitude to obtain the removed EEG signals.
[0102] In this embodiment, after obtaining the segmented EEG signal, the segmented EEG signal with a signal amplitude exceeding the first signal amplitude is removed to obtain the removed EEG signal. The first signal amplitude may be 200 microvolts, which is not limited in this embodiment.
[0103] Step S32-4: Eliminate artifacts in the removed EEG signal through independent component analysis to obtain the sample EEG signal.
[0104] In this embodiment, after obtaining the removed EEG signal, independent component analysis (ICA) can be used to eliminate artifacts in the removed EEG signal to obtain a sample EEG signal after removing artifacts (such as abnormal artifacts), thereby completing the preprocessing of the original EEG signal and obtaining a sample EEG signal that can be used for model training.
[0105] In one embodiment, Figure 3 As shown, Figure 3 FIG. 1 is a general flow chart of a driving behavior classification method based on a noise reduction diffusion probability model according to an embodiment of the present invention. Figure 3 The process is as follows: (1) original data collection (i.e. Figure 3 Data collection in the process: The driver (i.e., the subject) completes a simulated driving experiment on a driving simulator. Pre-designed event stimuli occur on the road to induce specific driving behaviors and collect EEG signals (i.e., EEG cap). (2) Data preprocessing (i.e., Figure 3 Preprocessing in the process): Bandpass filter the EEG signal, and then segment it according to the time of event occurrence, etc. After obtaining the preprocessed EEG signal X0, after the diffusion step, noise is introduced to obtain the noisy EEG signal X t ; (3) Classification model (i.e. Figure 3 Model in): processed by the encoder-decoder structure model and combined with the feature representation learned by DDPM (denoising diffusion probability model) Combined, and then passed through the classifier (i.e. Figure 3 The feedforward neural network in the above example is used to obtain the classification output. .
[0106] In combination with the above embodiments, in one implementation, the present invention further provides a driving behavior classification method based on a noise reduction diffusion probability model. In this method, in addition to the above steps, steps S41 to S42 may also be included:
[0107] Step S41: Taking the time when the event occurs as time zero, obtain the short-time Fourier transform power spectra corresponding to the sample EEG signals of different driving behavior labels corresponding to the first time before the time when the event occurs, and the short-time Fourier transform power spectra corresponding to the sample EEG signals of different driving behavior labels corresponding to the second time and the third time after the time when the event occurs.
[0108] This embodiment sets regular road events in the simulated driving experiment for obtaining sample EEG signals. When the driver's vehicle enters the event triggering area, the road event will be triggered, thereby inducing the corresponding driving behavior. When the driver's vehicle passes through the event triggering area, the EEG data acquisition module records the event identifier on the time axis as the time of the stimulus (i.e., the time of the event). Accordingly, this embodiment sets four common driving behaviors during road driving: acceleration, deceleration, turning and changing lanes, and uses specific repeatable events to induce these driving behaviors, and sets stable driving as the control group.
[0109] In this embodiment, after collecting the sample EEG signals carrying the driving behavior label, the event time is taken as time zero, and the sample EEG signals of different driving behavior labels corresponding to the first time before the event time are obtained, so as to obtain the short-time Fourier transform power spectrum corresponding to the sample EEG signals of different driving behavior labels corresponding to the first time before the event time. And, the sample EEG signals of different driving behavior labels corresponding to the second time and the third time after the event time are obtained, so as to obtain the short-time Fourier transform power spectrum corresponding to the sample EEG signals of different driving behavior labels corresponding to the second time and the third time after the event time.
[0110] The time length from the third moment to the zero moment is greater than the time length from the second moment to the zero moment, that is, the second moment is earlier than the third moment. For example, the first moment before the event moment may be 500ms before the event moment, the second moment after the event moment may be 200ms after the event moment, and the third moment after the event moment may be 1500ms after the event moment, and there is no limitation on the specific values.
[0111] Step S42: Compare the short-time Fourier transform power spectra corresponding to the second moment and the third moment respectively with the short-time Fourier transform power spectra corresponding to the first moment, to determine the moment when the power of the sample EEG signal increases, and the brain areas with increased power corresponding to different driving behavior labels.
[0112] In this embodiment, the short-time Fourier transform power spectrum corresponding to the second moment after the event occurs, the short-time Fourier transform power spectrum corresponding to the third moment after the event occurs, and the short-time Fourier transform power spectrum corresponding to the first moment before the event occurs can be compared to determine the moment when the power of the sample EEG signal increases, and to determine the brain areas with increased power corresponding to different driving behavior labels.
[0113] For example, Figure 4 As shown, Figure 4 It is a short-time Fourier transform power spectrum corresponding to sample EEG signals of different driving behavior labels at different times shown in one embodiment of the present invention. Figure 4In the second moment after the event (i.e., 200ms after the event), the power in multiple short-time Fourier transform power spectra increased significantly, while at the other two moments (the third moment after the event (i.e., 1500ms after the event) and the first moment before the event (i.e., 500ms before the event), the power was at a stable low level. This indicates that the driver produced an EEG response under the stimulation of the road event, confirming the effectiveness of using EEG signals to classify driving behavior.
[0114] and, in Figure 4 In the data, the driver's EEG responses to different events (represented by short-time Fourier transform power spectrum) are also different: in the event of the vehicle cutting in (cut-in) and the pedestrian crossing (Pedestrian Crossing) event, the EEG signal power of the temporal lobe is significantly higher than that in the resting state, and the brain area with increased power corresponding to the deceleration behavior label is the temporal lobe. In the event of emergency braking (Emergency Brake), the EEG signal power density of the driver's parietal and occipital lobes is significantly higher than that in the resting state, and the brain area with increased power corresponding to the deceleration behavior label is the parietal lobe and occipital lobe. The power changes caused by the two driving behaviors of left turning and right turning are mainly concentrated in the parietal lobe and temporal lobe, that is, the brain areas with increased power corresponding to the turning behavior label are the parietal lobe and temporal lobe. In the data Figure 4 It can be seen that braking events have a greater impact on the power enhancement of the driver's EEG signal than turning events. This is because the main reason for the lack of significant power changes is that the event that triggers the turning behavior is the appearance of the turn sign, which is not as urgent as the event that promotes the braking behavior. During the driver's stable driving (Stable Driving), no significant changes in power were observed in the short-time Fourier transform power spectrum at any of the three moments. The difference in the power topology of the EEG signal of each driving behavior can serve as the basis for distinguishing driving behaviors with EEG signals.
[0115] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0116] Based on the same inventive concept, an embodiment of the present invention provides a driving behavior classification device based on a noise reduction diffusion probability model. Figure 5 , Figure 5FIG. 1 is a structural block diagram of a driving behavior classification device based on a noise reduction diffusion probability model provided by an embodiment of the present invention. Figure 5 As shown, the driving behavior classification device 500 based on the noise reduction diffusion probability model of this embodiment may include:
[0117] The sample acquisition module 501 is used to obtain a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, and the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a stable driving label;
[0118] A sample encoding module 502 is used to input the sample EEG signal into an encoder in the driving behavior classification model to be trained for encoding to obtain a sample encoding result;
[0119] A sample diffusion processing module 503 is used to perform diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal;
[0120] The sample denoising diffusion module 504 is used to input the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal;
[0121] A sample decoding module 505 is used to input the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal;
[0122] A sample classification module 506, used for inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal;
[0123] A model training module 507 is used to update the model parameters of the driving behavior classification model to be trained according to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal to obtain a trained driving behavior classification model;
[0124] The behavior classification module 508 is used to input the EEG signal to be classified into the trained driving behavior classification model to obtain the driving behavior classification result of the EEG signal to be classified.
[0125] Optionally, the noise reduction diffusion probability model includes: a first convolution layer and a UNet structure for noise prediction, the UNet structure includes: a first upsampling structure, a second upsampling structure, a third upsampling structure, a first downsampling structure, a second downsampling structure, and a third downsampling structure; the decoder includes: a first upsampling layer, a second upsampling layer, and a third upsampling layer;
[0126] The first convolutional layer and the first down-sampling structure are connected to the third up-sampling layer, the second down-sampling structure is connected to the second up-sampling layer, and the third down-sampling structure is connected to the first up-sampling layer. By the connection, the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
[0127] Optionally, the sample noise reduction diffusion module 504 includes:
[0128] A sample denoising diffusion submodule, configured to input the noisy sample EEG signal into the first down-sampling structure, and sequentially pass through the second down-sampling structure, the third down-sampling structure, the first up-sampling structure, the second up-sampling structure, the third up-sampling structure and the first convolutional layer to obtain the denoised sample EEG signal;
[0129] The sample decoding module 505 comprises:
[0130] A first processing submodule, configured to input the output of the third down-sampling structure and the sample encoding result into the first up-sampling layer to obtain a first up-sampling result;
[0131] A second processing submodule, configured to input the output of the second down-sampling structure and the first up-sampling result into the second up-sampling layer to obtain a second up-sampling result;
[0132] The third processing submodule is used to input the denoised sample EEG signal, the output of the first down-sampling structure and the second up-sampling result into the third up-sampling layer to obtain the sample decoding result.
[0133] Optionally, the objective function of the driving behavior classification model to be trained is:
[0134] ;
[0135] in, is the denoised sample EEG signal, is the sample encoding result; is the sample decoding result, is a reconstruction error, which is the difference between the denoised sample EEG signal and the sample EEG signal; is the probability that the driving behavior classification result is the driving behavior label corresponding to the sample EEG signal; , , and are respectively trainable parameters of the decoder, the encoder, the denoising diffusion probability model and the classifier, is the weight coefficient.
[0136] Optionally, the device 500 further includes:
[0137] A power spectrum acquisition module is used to obtain a short-time Fourier transform power spectrum corresponding to sample EEG signals of different driving behavior labels corresponding to a first moment before the event occurs, and a short-time Fourier transform power spectrum corresponding to sample EEG signals of different driving behavior labels corresponding to a second moment and a third moment after the event occurs, respectively, with the event occurring at the zero moment as the zero moment; wherein the time length from the third moment to the zero moment is greater than the time length from the second moment to the zero moment;
[0138] The moment determination module is used to compare the short-time Fourier transform power spectrum corresponding to the second moment and the third moment respectively with the short-time Fourier transform power spectrum corresponding to the first moment, to determine the moment when the power of the sample EEG signal increases, and the brain area with increased power corresponding to different driving behavior labels.
[0139] Optionally, the device 500 further includes:
[0140] The original signal acquisition module is used to obtain the original EEG signals collected in the simulated driving experiment;
[0141] A data set construction module is used to perform preprocessing operations on the original EEG signals to construct a training data set; the sample EEG signals in the training data set are obtained through the preprocessing module; the data set construction module includes: the preprocessing module; the preprocessing module includes:
[0142] A filtering processing submodule, used for filtering the original EEG signal using an FIR filter with a passband of the first Hz to obtain a filtered EEG signal;
[0143] A segmentation submodule, used for segmenting the filtered EEG signal into frames according to a first time interval, with the event occurrence time as time zero, to obtain a segmented EEG signal;
[0144] A first removal submodule is used to remove the segmented EEG signals whose signal amplitude exceeds the first signal amplitude to obtain the removed EEG signals;
[0145] The second removal submodule is used to eliminate artifacts in the removed EEG signal through independent component analysis to obtain the sample EEG signal.
[0146] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the driving behavior classification method based on the noise reduction diffusion probability model as described in any of the above embodiments of the present invention are implemented.
[0147] Based on the same inventive concept, another embodiment of the present invention provides an electronic device 600, such as Figure 6 shown. Figure 6 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. The electronic device includes a memory 602, a processor 601, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the steps in the driving behavior classification method based on the noise reduction diffusion probability model described in any of the above embodiments of the present invention are implemented.
[0148] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0149] 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.
[0150] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, embodiments of the present invention may take the form of complete hardware embodiments, complete software embodiments, or embodiments combining software and hardware. Furthermore, embodiments of the present invention may take the form of computer program products 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.
[0151] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), 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 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.
[0152] 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.
[0153] 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 implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0154] 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.
[0155] 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.
[0156] The above is a detailed introduction to a driving behavior classification method, device and product based on a noise reduction diffusion probability model 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 limiting the present invention.
Claims
1. A driving behavior classification method based on a noise reduction diffusion probability model, characterized in that: The method comprises: Obtaining a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, wherein the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a stable driving label; Inputting the sample EEG signal into an encoder in a driving behavior classification model to be trained for encoding to obtain a sample encoding result; Performing diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal; Inputting the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal; Inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoised diffusion probability model to capture the representation of the sample EEG signal; Inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal; According to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal, the model parameters of the driving behavior classification model to be trained are updated to obtain a trained driving behavior classification model; Inputting the EEG signal to be classified into the trained driving behavior classification model to obtain a driving behavior classification result of the EEG signal to be classified; The noise reduction diffusion probability model includes: a first convolution layer and a UNet structure for noise prediction, the UNet structure includes: a first upsampling structure, a second upsampling structure, a third upsampling structure, a first downsampling structure, a second downsampling structure, and a third downsampling structure; the decoder includes: a first upsampling layer, a second upsampling layer, and a third upsampling layer; The first convolutional layer and the first down-sampling structure are connected to the third up-sampling layer, the second down-sampling structure is connected to the second up-sampling layer, and the third down-sampling structure is connected to the first up-sampling layer. By the connection, the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
2. The driving behavior classification method based on the noise reduction diffusion probability model according to claim 1 is characterized in that: The step of inputting the noisy sample EEG signal into the noise reduction diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal comprises: Input the noisy sample EEG signal into the first down-sampling structure, and sequentially pass through the second down-sampling structure, the third down-sampling structure, the first up-sampling structure, the second up-sampling structure, the third up-sampling structure and the first convolutional layer to obtain the denoised sample EEG signal; The step of inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result includes: Inputting the output of the third down-sampling structure and the sample encoding result into the first up-sampling layer to obtain a first up-sampling result; Inputting the output of the second down-sampling structure and the first up-sampling result into the second up-sampling layer to obtain a second up-sampling result; The denoised sample EEG signal, the output of the first down-sampling structure and the second up-sampling result are input into the third up-sampling layer to obtain the sample decoding result.
3. The driving behavior classification method based on the noise reduction diffusion probability model according to claim 1 is characterized in that: The objective function of the driving behavior classification model to be trained is: ; in, is the denoised sample EEG signal, is the sample encoding result; is the sample decoding result, is a reconstruction error, which is the difference between the denoised sample EEG signal and the sample EEG signal; is the probability that the driving behavior classification result is the driving behavior label corresponding to the sample EEG signal; , , and are respectively trainable parameters of the decoder, the encoder, the denoising diffusion probability model and the classifier, is the weight coefficient.
4. The driving behavior classification method based on the noise reduction diffusion probability model according to any one of claims 1 to 3, characterized in that: The method further comprises: Taking the time when the event occurs as time zero, obtaining the short-time Fourier transform power spectra corresponding to the sample EEG signals of different driving behavior labels corresponding to the first time before the time when the event occurs, and the short-time Fourier transform power spectra corresponding to the sample EEG signals of different driving behavior labels corresponding to the second time and the third time after the time when the event occurs, respectively; wherein the time length from the third time to the zero time is greater than the time length from the second time to the zero time; The short-time Fourier transform power spectra corresponding to the second moment and the third moment are respectively compared with the short-time Fourier transform power spectra corresponding to the first moment to determine the moment when the power of the sample EEG signal increases, and the brain areas with increased power corresponding to different driving behavior labels.
5. The driving behavior classification method based on the noise reduction diffusion probability model according to any one of claims 1 to 3, characterized in that: The method further comprises: Obtain the original EEG signals collected in the simulated driving experiment; The original EEG signal is preprocessed to construct a training data set, wherein the sample EEG signals in the training data set are obtained according to the following steps: Using a FIR filter with a passband of 1 Hz to filter the original EEG signal to obtain a filtered EEG signal; Taking the time when the event occurs as time zero, segmenting the filtered EEG signal into frames according to a first time interval to obtain segmented EEG signals; Removing the segmented EEG signals whose signal amplitude exceeds the first signal amplitude to obtain removed EEG signals; The artifacts in the removed EEG signal are eliminated by independent component analysis to obtain the sample EEG signal.
6. A driving behavior classification device based on a noise reduction diffusion probability model, characterized in that: The device comprises: A sample acquisition module, used to obtain a sample EEG signal, wherein the sample EEG signal carries a driving behavior label, wherein the driving behavior label includes: an acceleration label, a deceleration label, a turning label, a lane change label, and a stable driving label; A sample encoding module, used for inputting the sample EEG signal into an encoder in the driving behavior classification model to be trained for encoding, and obtaining a sample encoding result; A sample diffusion processing module, used for performing diffusion processing on the sample EEG signal to obtain a noisy sample EEG signal; A sample denoising diffusion module, used for inputting the noisy sample EEG signal into the denoising diffusion probability model in the driving behavior classification model to be trained to obtain a denoised sample EEG signal; the denoising diffusion probability model learns the distribution of the sample EEG signal by denoising and reconstructing the noisy sample EEG signal, so as to perform representation extraction and feature enhancement on the sample EEG signal; A sample decoding module, used for inputting the denoised sample EEG signal and the sample encoding result into a decoder in the driving behavior classification model to be trained to obtain a sample decoding result; the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal; A sample classification module, used for inputting the sample decoding result into the classifier in the driving behavior classification model to be trained to obtain the driving behavior classification result of the sample EEG signal; A model training module, used for updating the model parameters of the driving behavior classification model to be trained according to the driving behavior classification result of the sample EEG signal and the driving behavior label carried by the sample EEG signal, so as to obtain a trained driving behavior classification model; A behavior classification module, used for inputting the EEG signal to be classified into the trained driving behavior classification model to obtain a driving behavior classification result of the EEG signal to be classified; The noise reduction diffusion probability model includes: a first convolution layer and a UNet structure for noise prediction, the UNet structure includes: a first upsampling structure, a second upsampling structure, a third upsampling structure, a first downsampling structure, a second downsampling structure, and a third downsampling structure; the decoder includes: a first upsampling layer, a second upsampling layer, and a third upsampling layer; The first convolutional layer and the first down-sampling structure are connected to the third up-sampling layer, the second down-sampling structure is connected to the second up-sampling layer, and the third down-sampling structure is connected to the first up-sampling layer. By the connection, the decoder uses the reconstruction error of the denoising diffusion probability model to capture the representation of the sample EEG signal.
7. 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 computer program is executed by the processor, the driving behavior classification method based on the noise reduction diffusion probability model as described in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the driving behavior classification method based on the noise reduction diffusion probability model as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method for detecting vigilance state of driver
CN105726046A
Method for recognizing road rage states of drivers on basis of electroencephalography and pulse information
CN109498041A