Distraction detection method, electronic equipment and storage medium

By acquiring the driver's EEG data in the driving state and using the target distraction detection model for distraction detection, the problem of poor driver distraction detection accuracy in the prior art is solved, and higher detection accuracy is achieved.

CN119523485APending Publication Date: 2025-02-28CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311117174.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The prior art is poor in detecting distractions during driving, and it is difficult to effectively identify whether the driver is distracted.

Method used

Distraction detection is performed by obtaining the driver's EEG data in the driving state and based on the target distraction detection model. The model trains the initial distraction detection model through the training data set, and uses the training data set obtained by the first preset N-back experimental task and the second preset N-back experimental task to fully cover the EEG data based on various interference situations in the real driving state.

Benefits of technology

It significantly improves the accuracy of detecting driver distractions, and can effectively identify whether the driver has distractions in the driving state, thereby obtaining accurate distraction detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119523485A_ABST
    Figure CN119523485A_ABST
Patent Text Reader

Abstract

The invention discloses a distraction detection method, electronic equipment and a storage medium. The electronic equipment obtains electroencephalogram data of a driver in a driving state; based on the target distraction detection model, distraction detection is conducted on the electroencephalogram data, and a distraction detection result of the driver in the driving state is obtained; wherein the target distraction detection model is obtained by training the initial distraction detection model by using a training data set, the training data set is obtained based on a first preset N-back experiment task and a second preset N-back experiment task, the first preset N-back experiment task represents the N-back experiment task performed in a visual interference simulated driving state, and the second preset N-back experiment task represents the N-back experiment task performed in a visual interference simulated driving state. The second preset N-back experiment task represents the N-back experiment task performed in the simulated driving state of auditory disturbance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a distraction detection method, an electronic device and a storage medium. Background Art

[0002] During daily driving, drivers may become distracted. Distracted driving means that when driving, the driver's attention is not focused on the road, but is attracted by other things. This situation seriously affects the driver's attention to road conditions and traffic signals, and can easily lead to a large number of traffic accidents.

[0003] Currently, most methods for detecting driver distraction during driving are based on analyzing eye movement data or driving behavior data, or determining whether distraction exists based on some set thresholds. Most of these methods have the problem of poor accuracy; that is, how to improve the accuracy of detecting driver distraction during driving is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The embodiments of the present application provide a distraction detection method, an electronic device, and a storage medium, which can effectively improve the accuracy of detecting driver distraction.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] In a first aspect, an embodiment of the present application provides a distraction detection method, the method comprising:

[0007] Obtain the driver's EEG data while driving;

[0008] Performing distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set;

[0009] The training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0010] In the above embodiment, a training data set is obtained by designing a first preset N-back experimental task and a second preset N-back experimental task. Since the first preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with visual interference, and the second preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with auditory interference, the training data set obtained thereby can fully cover the EEG data of possible distraction obtained based on various interference conditions under a real driving state. Then, the initial distraction detection model is trained with the training data set, so that the target distraction detection model obtained after training can effectively identify whether the driver is distracted in the driving state, thereby obtaining accurate distraction detection results, which greatly improves the accuracy of detecting the driver's distraction.

[0011] Furthermore, in some embodiments of the present application, the method further includes:

[0012] Acquire the EEG data of the experimental target in the undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain an initial data set;

[0013] Performing data calibration processing on the initial data set to obtain a calibrated data set;

[0014] Performing data preprocessing on the calibrated data set to obtain a preprocessed data set;

[0015] Feature extraction is performed based on the preprocessed data set to obtain the training data set.

[0016] In the above embodiment, when acquiring the training data set, the EEG data of the experimental target in the undisturbed simulated driving state and the EEG data in the first preset N-back experimental task and the second preset N-back experimental task with visual interference and auditory interference are first acquired to obtain the initial data set, that is, the initial data set includes the EEG data of the undisturbed normal driving state and the distracted driving state with interference, and then the initial data set is calibrated to calibrate the EEG data of the normal state and the EEG data of the distracted state in the initial data set, and then preprocessing is performed according to the calibrated data set to obtain the preprocessed data set, and then feature extraction processing is performed according to the preprocessed data set. The obtained training data set can effectively improve the training effect of training the initial distraction detection model.

[0017] Further, in some embodiments of the present application, the step of acquiring EEG data of the experimental target in the undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain the initial data set includes:

[0018] Acquiring first EEG data of the experimental subject in the interference-free simulated driving state for a first period of time;

[0019] Acquiring second EEG data of the experimental target under the first preset N-back experimental task for a second time period;

[0020] Acquiring third EEG data of the experimental target under the second preset N-back experimental task for a third time period;

[0021] Acquiring fourth EEG data of the experimental subject in the interference-free simulated driving state for a fourth time period;

[0022] Acquiring fifth EEG data of the experimental subject under the first preset N-back experimental task for a fifth time period;

[0023] Acquiring sixth EEG data of the experimental target under the second preset N-back experimental task for a sixth time period;

[0024] Acquiring seventh EEG data of the experimental subject in the interference-free simulated driving state for a seventh time period;

[0025] The initial data set is obtained based on the first EEG data, the second EEG data, the third EEG data, the fourth EEG data, the fifth EEG data, the sixth EEG data, and the seventh EEG data.

[0026] In the above embodiment, a set of experimental paradigms are designed to obtain EEG data for constructing an initial data set. The experimental paradigm includes first performing a simulated undisturbed driving state for a first time period, then performing a first preset N-back experimental task for a second time period, then performing a second preset N-back experimental task for a third time period, then performing a simulated undisturbed driving state for a fourth time period, then performing a first preset N-back experimental task for a fifth time period, and then performing a second preset N-back experimental task for a sixth time period, and finally performing an undisturbed driving state for a seventh time period, so that the initial data set is constructed according to the corresponding EEG data obtained in the above different time periods, so that the initial data set can include EEG data in multiple driving states, and the data is more comprehensive, and then a training data set is obtained based on the initial data set and a distraction detection model is trained, which can improve the training effect of the distraction detection model.

[0027] Further, in some embodiments of the present application, the first time period is 3 minutes, the second time period is 1 minute, the third time period is 1 minute, the fourth time period is 2 minutes, the fifth time period is 1 minute, the sixth time period is 1 minute, and the seventh time period is 3 minutes.

[0028] In the above embodiment, as an implementation method of the first time period, the second time period, the third time period, the fourth time period, the fifth time period, the sixth time period, and the seventh time period, the first time period can be set to 3 minutes, the second time period can be set to 1 minute, the third time period can be set to 1 minute, the fourth time period can be set to 2 minutes, the fifth time period can be set to 1 minute, the sixth time period can be set to 1 minute, and the seventh time period can be set to 3 minutes. By performing corresponding simulation experiments in these time periods and obtaining corresponding EEG data, an initial data set containing EEG data in multiple driving states in short time periods can be constructed, thereby improving the comprehensiveness of the data and thus improving the training effect of the distraction detection model.

[0029] Furthermore, in some embodiments of the present application, performing data calibration processing on the initial data set to obtain a calibrated data set includes:

[0030] The EEG data obtained based on the first preset N-back experimental task and the second preset N-back experimental task in the initial data set are calibrated as EEG data of a distracted driving state to obtain the calibrated data set.

[0031] In the above embodiment, since the first preset N-back experimental task and the second preset N-back experimental task represent experimental tasks of adding visual interference and auditory interference respectively, the EEG data obtained based on the first preset N-back experimental task and the second preset N-back experimental task are calibrated as EEG data of distracted driving state, and the EEG data in the interference-free simulated driving state is calibrated as EEG data of normal state, thereby completing the calibration of the initial data set and obtaining the calibrated data set, and then after the distraction detection model is trained based on the calibrated data set, the distraction detection effect of the target distraction detection model can be improved.

[0032] Furthermore, in some embodiments of the present application, performing feature extraction processing based on the preprocessed data set to obtain the training data set includes:

[0033] Divide the preprocessed data set according to a preset time window to obtain a divided data set;

[0034] Feature extraction is performed on the divided data set to obtain the training data set.

[0035] In the above embodiment, after preprocessing, it is also necessary to divide the preprocessed data set according to the preset time windows to obtain the divided data sets, so as to perform feature extraction processing on the data under each preset time window in the divided data sets, and obtain the training data set that is finally used to input the initial distraction detection model for training, so as to complete the training of the initial distraction detection model based on this training data set, which can improve the training effect.

[0036] Further, in some embodiments of the present application, the distraction detection is performed on the EEG data based on the target distraction detection model to obtain the distraction detection result of the driver in the driving state, including:

[0037] Performing data preprocessing and feature extraction processing on the EEG data to obtain EEG data to be processed;

[0038] The target distraction detection model is used to perform distraction detection on the EEG data to be processed to obtain the distraction detection result.

[0039] In the above embodiment, when using the target distraction detection model to perform distraction detection on the driver's EEG data while driving, the EEG data is first preprocessed and feature extracted to obtain the EEG data to be processed that can be used to input the target distraction detection model, and then the EEG data to be processed is input into the target distraction detection model for distraction detection. The distraction detection result thus obtained can accurately reflect whether the driver is currently distracted, and effectively improve the accuracy of detecting the driver's distraction.

[0040] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising an acquisition unit and a detection unit,

[0041] The acquisition unit is used to acquire the EEG data of the driver in a driving state;

[0042] The detection unit is used to perform distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0043] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory storing instructions executable by the processor; when the instructions are executed by the processor, the method described in the first aspect is implemented.

[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, which is applied to an electronic device, and when the program is executed by a processor, the method described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of the implementation process of the distraction detection method proposed in the embodiment of the present application;

[0046] Figure 2 A schematic diagram of the experimental paradigm proposed for the embodiments of the present application;

[0047] Figure 3 A schematic diagram of an implementation of the distraction detection method proposed in an embodiment of the present application;

[0048] Figure 4 Schematic diagram of the composition structure of the electronic device proposed in the embodiment of the present application Figure 1 ;

[0049] Figure 5 Schematic diagram of the composition structure of the electronic device proposed in the embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0050] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.

[0051] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0052] In daily travel, drivers may often experience distracted driving. Distracted driving means that when driving, the driver's attention is not focused on the road, but is attracted by other things. This behavior seriously affects the driver's attention to road conditions and traffic signals, leading to a large number of accidents. Driver distraction is generally due to other visual or auditory interference outside of driving tasks, such as using mobile phones or other electronic devices, adjusting the car's audio or air conditioning, smoking or eating, and being interested in other vehicles or pedestrians. These distracting behaviors will cause the driver to be distracted, which may directly lead to driving into the opposite lane or hitting roadside obstacles, ignoring pedestrians or other vehicles causing accidents, and failing to notice road signs or traffic signals in time, resulting in dangerous driving behaviors such as wrong driving direction and failure to maintain lane or speed.

[0053] At present, the use of brain-computer interface technology can accurately capture brain activity information, so as to identify and analyze the driver's state during driving as much as possible. Brain-Computer Interface (BCI) is a technology that establishes a direct connection between the human brain and the computer, by detecting brain signals and controlling computers or other devices or detecting the physiological state of the human brain. At present, BCI technology has been widely used in the fields of medical care, entertainment, games, education, etc., and is constantly growing and developing. Brain-computer interface technology can also be used to detect the driver's driving state. By detecting the driver's EEG signals and analyzing its state to judge its state, the driver can be reminded to take measures in time; brain-computer interface technology has broad application prospects in the field of future smart cars.

[0054] Most of the existing methods for detecting driver distraction during driving are based on analysis of eye movement data or driving behavior data, or based on some set thresholds to determine whether there is distraction. These detection methods are easily affected by individual factors, resulting in poor accuracy in distraction detection.

[0055] In order to solve the above problems, the embodiment of the present application provides a distraction detection method, an electronic device and a storage medium, wherein the electronic device obtains the EEG data of the driver in the driving state; performs distraction detection on the EEG data based on the target distraction detection model to obtain the distraction detection result of the driver in the driving state; wherein the target distraction detection model is obtained by training the initial distraction detection model using a training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with auditory interference. The accuracy of detecting the driver's distraction can be effectively improved.

[0056] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0057] The present application embodiment provides a distraction detection method. Figure 1 This is a schematic diagram of the implementation process of the distraction detection method proposed in the embodiment of the present application, such as Figure 1 As shown, the distraction detection method of the electronic device may include the following steps:

[0058] Step 101: Acquire the EEG data of the driver while driving.

[0059] In an embodiment of the present application, the electronic device may first obtain the driver's EEG data while driving.

[0060] It should be noted that, in the embodiments of the present application, EEG frequency domain analysis refers to preprocessing (denoising, filtering, amplification) of brain signals (EEG signals), motor potentials, functional magnetic resonance imaging, etc., and then converting them into frequency and energy distribution diagrams, so as to analyze the corresponding frequency bands, frequency intensities, and spectrum density changes, so as to understand the mechanisms of brain activity and information processing; therefore, the present application obtains the EEG data of the driver in the driving state, and then detects whether the driver is distracted during real-time driving based on the EEG data of the driver, thereby effectively detecting the driver's distraction.

[0061] Step 102: Perform distraction detection on the EEG data based on the target distraction detection model to obtain a distraction detection result of the driver in the driving state; wherein the target distraction detection model is obtained by training the initial distraction detection model using the training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0062] In an embodiment of the present application, after acquiring the EEG data of the driver in a driving state, the electronic device can perform distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0063] It should be noted that, in the embodiments of the present application, the target distraction detection model refers to a trained distraction detection model, which can be directly used to perform distraction detection on the acquired EEG data.

[0064] Furthermore, in an embodiment of the present application, the target distraction detection model is obtained by training on the basis of the initial distraction detection model, and the initial distraction detection model may adopt a support vector machine model based on a radial kernel function (Radial Basis Function, RBF).

[0065] That is to say, in the embodiment of the present application, a support vector machine model based on a radial kernel function is trained using a training data set to obtain a target distraction detection model.

[0066] Furthermore, in an embodiment of the present application, a training data set is used to train an initial distraction detection model, and the training data set is acquired based on a first preset N-back experimental task and a second preset N-back experimental task; the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0067] It should be noted that, in the embodiments of the present application, the N-back experimental task refers to the subject comparing the stimulus (interference) that has just appeared with the previous nth stimulus, and manipulating the load by controlling the number of stimuli between the current stimulus and the target stimulus, so as to simulate the driver's distracted state in daily driving; wherein, the stimulation method is the interference method, and the present application designs different types of interference methods, including visual interference and auditory interference, so that the N-back experimental task performed based on visual interference and auditory interference can comprehensively cover the types of interference that may occur during driving, thereby obtaining the corresponding EEG data under simulated driving conditions.

[0068] Exemplarily, in an embodiment of the present application, visual interference may be subjecting the subject to some visual stimulation, such as by showing some images or numbers to the subject, and auditory interference may be subjecting the subject to some auditory stimulation, such as by playing some sound information to the subject.

[0069] Furthermore, in an embodiment of the present application, when acquiring a training data set, the electronic device may acquire the EEG data of the experimental target in an undisturbed simulated driving state, the EEG data under a first preset N-back experimental task, and the EEG data under a second preset N-back experimental task to obtain an initial data set; perform data calibration processing on the initial data set to obtain a calibrated data set; perform data preprocessing on the calibrated data set to obtain a preprocessed data set; perform feature extraction processing based on the preprocessed data set to obtain a training data set.

[0070] It can be understood that in the embodiments of the present application, the experimental target is the subject, and the initial data set is constructed by acquiring the EEG data of the experimental target in a simulated driving state without interference and in a first preset N-back experimental task and a second preset N-back experimental task with interference.

[0071] It should be noted that, in the embodiments of the present application, the number of experimental targets is not limited in this application and can be multiple, that is, the EEG data of multiple experimental targets in an undisturbed simulated driving state and the EEG data under the first preset N-back experimental task and the EEG data under the second preset N-back experimental task can be acquired to construct an initial data set.

[0072] It can be understood that, in the embodiment of the present application, the undisturbed driving state is a state without adding any type of interference during the simulated driving process of the experimental target, that is, the undisturbed driving state can represent a driving state in which the experimental target is not distracted.

[0073] It should be noted that, in the embodiments of the present application, a set of experimental paradigms are designed, which include a simulated driving state without interference, a first preset N-back experimental task and a second preset N-back experimental task.

[0074] Further, in some embodiments of the present application, when the electronic device obtains the EEG data of the experimental target in the undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain the initial data set, it can obtain the first EEG data of the experimental target in the undisturbed simulated driving state for a first time period; obtain the second EEG data of the experimental target under the first preset N-back experimental task for a second time period; obtain the third EEG data of the experimental target under the second preset N-back experimental task for a third time period; obtain the fourth EEG data of the experimental target in the undisturbed simulated driving state for a fourth time period; obtain the fifth EEG data of the experimental target under the first preset N-back experimental task for a fifth time period; obtain the sixth EEG data of the experimental target under the second preset N-back experimental task for a sixth time period; obtain the seventh EEG data of the experimental target in the undisturbed simulated driving state for a seventh time period; and obtain the initial data set based on the first EEG data, the second EEG data, the third EEG data, the fourth EEG data, the fifth EEG data, the sixth EEG data, and the seventh EEG data.

[0075] It should be noted that, in the embodiments of the present application, the specific duration of the first time period, the second time period, the third time period, the fourth time period, the fifth time period, the sixth time period and the seventh time period is not limited in the present application.

[0076] Furthermore, in some embodiments of the present application, with regard to an implementation method of the duration of each experiment in the experimental paradigm, the first time period may be 3 minutes, the second time period may be 1 minute, the third time period may be 1 minute, the fourth time period may be 2 minutes, the fifth time period may be 1 minute, the sixth time period may be 1 minute, and the seventh time period may be 3 minutes.

[0077] For example, in the embodiments of the present application, Figure 2 A schematic diagram of the experimental paradigm proposed in the embodiment of the present application, such as Figure 2As shown, the duration of a complete experimental process can be 12 minutes, wherein, in the first 3 minutes (first time period), an interference-free simulated driving state experiment is conducted, and the electronic device can obtain the first EEG data of these 3 minutes, and then in the 1 minute from the 3rd minute to the 4th minute (second time period), the first preset N-back experimental task is conducted, and the electronic device can obtain the second EEG data of this 1 minute, and then in the 1 minute from the 4th minute to the 5th minute (third time period), the second preset N-back experimental task is conducted, and the electronic device can obtain the third EEG data of this 1 minute. Then, within the 2 minutes from the 5th minute to the 7th minute (the fourth time period), the electronic device can obtain the fourth EEG data of these 2 minutes, and then within the 1 minute from the 7th minute to the 8th minute (the fifth time period), the electronic device can obtain the fifth EEG data of this 1 minute, and then within the 1 minute from the 8th minute to the 9th minute (the sixth time period), the electronic device can obtain the sixth EEG data of this 1 minute, and finally within the 3 minutes from the 9th minute to the 12th minute (the seventh time period), the electronic device can obtain the seventh EEG data of these 3 minutes, thereby obtaining the initial data set based on all the above EEG data.

[0078] Exemplarily, in the embodiment of the present application, for the duration of each experiment in the experimental paradigm, the first time period can be 1 minute, the second time period can be 3 minutes, the third time period can be 2 minutes, the fourth time period can be 1 minute, the fifth time period can be 2 minutes, the sixth time period can be 2 minutes, and the seventh time period can be 2 minutes, that is, the duration of the complete experimental process can be 13 minutes; thus, in the first 1 minute (first time period), an interference-free simulated driving state experiment can be performed, and the electronic device can obtain the first EEG data of this 1 minute; then in the next 3 minutes (second time period), the first preset N-back Experimental task, the electronic device can obtain the second EEG data of these 3 minutes; then within the next 2 minutes, the second preset N-back experimental task is carried out, and the electronic device can obtain the third EEG data of these 2 minutes; then within the next 1 minute (fourth time period), the electronic device can obtain the fourth EEG data of these 1 minute; then within the next 2 minutes (fifth time period), the electronic device can obtain the fifth EEG data of these 2 minutes; then within the next 2 minutes (sixth time period), the electronic device can obtain the sixth EEG data of these 2 minutes; in the last 2 minutes (seventh time period), the electronic device can obtain the seventh EEG data of these 2 minutes.

[0079] Exemplarily, in the embodiment of the present application, for the duration of each experiment in the experimental paradigm, the first time period can be 3 minutes, the second time period can be 3 minutes, the third time period can be 3 minutes, the fourth time period can be 1 minute, the fifth time period can be 2 minutes, the sixth time period can be 2 minutes, and the seventh time period can be 1 minute, that is, the duration of the complete experimental process can be 15 minutes; thus, in the first 3 minutes (the first time period), an interference-free simulated driving state experiment can be performed, and the electronic device can obtain the first EEG data of these 3 minutes; then in the next 3 minutes (the second time period), the first preset N-back Experimental task, the electronic device can obtain the second EEG data of these 3 minutes; then within the next 3 minutes, the second preset N-back experimental task is carried out, and the electronic device can obtain the third EEG data of these 3 minutes; then within the next 1 minute (fourth time period), the electronic device can obtain the fourth EEG data of this 1 minute; then within the next 2 minutes (fifth time period), the electronic device can obtain the fifth EEG data of these 2 minutes; then within the next 2 minutes (sixth time period), the electronic device can obtain the sixth EEG data of these 2 minutes; in the last 1 minute (seventh time period), the electronic device can obtain the seventh EEG data of this 1 minute.

[0080] Furthermore, in the embodiments of the present application, the number of executions and the execution order of the interference-free simulated driving state experiment, the first preset N-back experimental task and the second preset N-back experimental task included in the experimental paradigm are also not limited in the present application.

[0081] It can be seen that in the embodiments of the present application, the initial data set is formed according to the corresponding EEG data obtained in the above-mentioned different time periods, so that the initial data set can include EEG data under multiple driving states, and the data is more comprehensive. Then, a training data set is obtained based on the initial data set and a distraction detection model is trained, which can improve the training effect of the distraction detection model.

[0082] Illustratively, in an embodiment of the present application, when the electronic device obtains the EEG data of the experimental target in an undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain the initial data set, it can obtain the first EEG data of the experimental target under the first preset N-back experimental task lasting for a first time period; obtain the second EEG data of the experimental target under the second preset N-back experimental task lasting for a second time period; obtain the third EEG data of the experimental target in an undisturbed simulated driving state lasting for a third time period; wherein the first time period is 4 minutes, the second time period is 3 minutes, and the third time period is 4 minutes; thereby obtaining the initial data set based on the first EEG data, the second EEG data, and the third EEG data.

[0083] Exemplarily, in an embodiment of the present application, when the electronic device obtains the EEG data of the experimental target in an undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain the initial data set, it can also obtain the first EEG data of the experimental target under the second preset N-back experimental task lasting for a first time period; obtain the second EEG data of the experimental target under the first preset N-back experimental task lasting for a second time period; obtain the third EEG data of the experimental target in an undisturbed simulated driving state lasting for a third time period; obtain the fourth EEG data of the experimental target under the second preset N-back experimental task lasting for a fourth time period; obtain the fifth EEG data of the experimental target under the first preset N-back experimental task lasting for a fifth time period; wherein the first time period is 2 minutes, the second time period is 3 minutes, the third time period is 1 minute, and the fourth time period is 3 minutes; thereby obtaining the initial data set based on the first EEG data, the second EEG data, the third EEG data, and the fourth EEG data.

[0084] That is to say, in the embodiments of the present application, the interference-free simulated driving state experiment, the first preset N-back experimental task and the second preset N-back experimental task can be arbitrarily combined or arranged to form an experimental paradigm; in the experimental paradigm, the number of executions and the duration of the interference-free simulated driving state experiment, the first preset N-back experimental task and the second preset N-back experimental task can be set according to actual conditions to be close to the actual driving scene, thereby improving the data reliability of the initial data set and further improving the training effect of the distraction detection model.

[0085] Furthermore, in some embodiments of the present application, the electronic device performs data calibration processing on the initial data set. When the calibrated data set is obtained, the EEG data obtained based on the first preset N-back experimental task and the second preset N-back experimental task in the initial data set can be calibrated as EEG data of a distracted driving state, and the EEG data corresponding to an undisturbed simulated driving state in the initial data set can be calibrated as EEG data of a normal state; the calibrated data set is obtained based on the EEG data of the distracted state and the EEG data of the normal state.

[0086] Illustratively, in an embodiment of the present application, the EEG data corresponding to the simulated driving state under the visual interference and auditory interference appearing in the experimental process are calibrated, and this part of the data is calibrated as the EEG data in the distracted driving state, while the uncalibrated data can be considered as the EEG data in the normal driving state without distraction, thereby using the data set calibrated for the distracted driving state as the calibrated data set.

[0087] Exemplarily, in an embodiment of the present application, when performing data calibration processing, the EEG data corresponding to the simulated driving state under visual interference and auditory interference appearing in the experimental process can be calibrated as EEG data in a distracted driving state, so that the label information corresponding to this part of the EEG data is the first label information, and the first label information represents the label information of the distracted driving state, while the remaining data is not calibrated, so that the remaining uncalibrated data is considered to be the EEG data in a normal driving state without distraction.

[0088] It should be noted that in the embodiments of the present application, by calibrating the EEG data corresponding to the simulated driving state under visual interference and auditory interference as the EEG data of the distracted driving state, and then performing subsequent training of the distraction detection model based on the calibrated data set, the training effect can be improved, thereby improving the accuracy of distraction detection of the target distraction detection model.

[0089] Furthermore, in an embodiment of the present application, data preprocessing may at least include scalp electrode position positioning processing, re-reference processing, and filtering processing.

[0090] It should be noted that, in the embodiments of the present application, scalp electrode position positioning processing refers to marking the scalp position corresponding to the EEG data. For example, if a certain data in the EEG data corresponds to position A on the scalp, that is, the data is collected based on position A on the scalp, then the scalp position information corresponding to the data is marked as position A.

[0091] It should be noted that in the embodiments of the present application, re-reference processing is used to determine the reference electrode; the re-reference processing method of the present application can be whole-head averaging, and when there are enough electrodes to cover the entire head, it is considered to be one of the best re-reference methods.

[0092] It should be noted that in the embodiments of the present application, filtering processing is used for EEG data within a certain frequency range. For example, when performing filtering processing, a 0.1-30 Hz FIR filter can be used to digitally filter the EEG data to reduce low-frequency drift and high-frequency noise, where the downsampling is 200 Hz.

[0093] Furthermore, in an embodiment of the present application, the above-mentioned data preprocessing may also include replacing bad electrodes and removing artifacts; wherein, replacing bad electrodes refers to replacing the electrodes judged as bad channels in the EEG data through a spherical interpolation algorithm; removing artifacts refers to removing artifacts such as eye movements, muscles, and head movements through independent component analysis.

[0094] Furthermore, in an embodiment of the present application, data with data loss and quality problems in the preprocessed data set may be eliminated, and then feature extraction processing may be performed to obtain a training data set.

[0095] It can be understood that in the embodiments of the present application, pure EEG data can be obtained by preprocessing the calibrated data set and further eliminating problematic data, and then feature extraction processing is performed based on the pure EEG data to obtain a training data set.

[0096] Furthermore, in some embodiments of the present application, the electronic device performs feature extraction processing based on the preprocessed data set. When obtaining the training data set, the preprocessed data set can be divided according to a preset time window to obtain a divided data set; and feature extraction processing is performed based on the divided data set to obtain the training data set.

[0097] It should be noted that, in the embodiments of the present application, the size of the preset time window is not specifically limited in the present application.

[0098] Exemplarily, in an embodiment of the present application, the size of the preset time window is 60 seconds. Every 60 seconds of data in the preprocessed data set can be taken as a data segment, and the data label of each data segment can be calibrated as a sample data, thereby obtaining the divided data set; that is, the divided data set may include multiple sample data, and each sample data is obtained based on the preset time window of 60 seconds.

[0099] Furthermore, in the embodiments of the present application, the specific method of feature extraction processing is not limited in the present application. For example, feature extraction processing can be achieved by performing fast Fourier transform processing on each sample data in the divided data set to obtain the energy value of the lead corresponding to each sample data and the average brain topography corresponding to each sample data as the EEG frequency domain features, thereby constructing a training data set based on these EEG frequency domain features.

[0100] Exemplarily, in some embodiments of the present application, feature extraction processing of sample data can also be implemented based on one-dimensional feature extraction technologies such as time domain and decomposition domain, and multi-dimensional feature extraction technologies such as time-frequency joint domain or spatial domain.

[0101] It should be noted that in the embodiments of the present application, since the EEG data is highly dynamic and nonlinear in time and space, and has high dimensions, a large amount of correlation and a complex noise structure, these characteristics make it difficult for traditional statistical analysis methods to process these data, while machine learning algorithms can extract useful information by learning the features of the data. Therefore, the present application is based on the training data set obtained through feature extraction processing and input into a support vector machine model based on a radial kernel function, so that an efficient and accurate target distraction detection model can be constructed.

[0102] Exemplarily, in an embodiment of the present application, since the training data set contains EEG frequency domain features corresponding to multiple sample data, as well as labels calibrated by whether there is distraction due to interference, the training data set is input into a support vector machine model based on a radial kernel function for training, and a trained target distraction detection model can be obtained. The target distraction detection model can then be used to perform distraction detection on the EEG data of the driver while driving in daily driving scenarios, thereby obtaining a distraction detection result.

[0103] It can be seen that in the embodiments of the present application, a training data set is constructed by designing an N-back experimental task conducted under a simulated driving state with visual interference and auditory interference, so that the training data set can simulate the EEG data of a distracted driving state obtained based on various interference conditions under a real driving state, and then the initial distraction detection model is trained with the training data set, so that the target distraction detection model obtained after training can effectively identify whether the driver is distracted while driving, thereby accurately detecting the driver's distraction in a real driving scenario, greatly improving the accuracy of detecting the driver's distraction.

[0104] Furthermore, in an embodiment of the present application, when the distraction detection result indicates that a distraction exists, a warning message may be generated to remind the driver that a distraction occurs and that the driver needs to pay attention to safe driving.

[0105] It should be noted that in the embodiments of the present application, when the electronic device performs distraction detection on the EEG data based on the target distraction detection model to obtain the distraction detection result of the driver in the driving state, it can perform data preprocessing and feature extraction processing on the EEG data to obtain the EEG data to be processed; and use the target distraction detection model to perform distraction detection on the EEG data to be processed to obtain the distraction detection result.

[0106] It can be understood that in the embodiments of the present application, when using the target distraction detection model to perform distraction detection on the EEG data, it is still necessary to perform some processing on the EEG data, wherein the data preprocessing and feature extraction processing are the same as the data preprocessing and feature extraction processing in the process of acquiring the training data set used when training the initial distraction detection model.

[0107] Further, in an embodiment of the present application, the distraction detection result may include a result indicating the presence of a distraction and a result indicating the absence of a distraction.

[0108] Furthermore, in an embodiment of the present application, the results of the presence of distraction in the distraction detection results may also include results of distraction at different levels. For example, three levels of distraction results may be included, namely, a first level distraction result, a second level distraction result, and a third level distraction result, wherein the first level distraction result is a result with a weaker degree of distraction, the second level distraction result is a result with a medium degree of distraction, and the third level distraction result is a result with a stronger degree of distraction.

[0109] For example, in the embodiments of the present application, Figure 3 This is a schematic diagram of an implementation of the distraction detection method proposed in the embodiment of the present application, such as Figure 3As shown, the experimental data can be collected, wherein the experimental data is the EEG data of the experimental target obtained through the experiment, specifically, the EEG data of the experimental target in a simulated driving state without interference, as well as the EEG data under a first preset N-back experimental task and the EEG data under a second preset N-back experimental task can be collected, the first preset N-back experimental task is an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task is an N-back experimental task performed under a simulated driving state with auditory interference; after the experimental data are collected, calibration processing can be performed, and the calibration processing refers to calibrating the EEG data obtained in the simulated driving state with visual and auditory interference in the data as data corresponding to the distraction situation, by calibrating the labels of these data as having a distraction situation, thereby The calibration process is completed; after the calibration process, data cleaning and data preprocessing can be performed to obtain pure EEG data, and then feature extraction processing can be performed on the EEG data to obtain a training data set, and a support vector machine model based on a radial kernel function is trained according to the training data set to obtain a target distraction detection model, and then the target distraction detection model can be tested to generate a model evaluation result, etc.; after obtaining the target distraction detection model, the target distraction detection model can be used to perform real-time distraction detection on the driver's EEG data during driving. For example, in the application process, after the EEG data of the driver in the driving state is collected, the EEG data can be preprocessed and feature extracted to obtain the EEG data to be processed, so as to input the EEG data to be processed into the target distraction detection model to obtain the distraction detection result.

[0110] In summary, in the embodiments of the present application, an experimental task suitable for detecting driver distraction is designed, including an N-back experiment with added visual and auditory interference, to simulate the visual and auditory interference in daily driving conditions; and the EEG data is divided according to a preset time window to construct a training data set for accurate data calibration in multiple driving conditions in a short period of time; the present application can extract specific EEG features after data cleaning, calibration and preprocessing of the EEG data obtained in the experiment, so as to train the distraction detection model using the training data set, and the obtained target distraction detection model can effectively detect the driver's distraction under multiple interferences; and distraction detection based on EEG data, that is, attention loss detection, can be unaffected by the driver's driving habits, daily emotions, etc. , directly detect physiological signals, and have the advantages of good stability and high detection accuracy; the designed experimental task suitable for detecting driver distraction can achieve accurate data calibration, effectively distinguish interference data from non-interference data, reduce the impact of interference type and inaccurate data calibration, and can lay the foundation for improving the accuracy of driver distraction detection; in addition, the application collects EEG data of multiple types of interference states in simulated daily driving scenarios through designed experiments, constructs a training data set with precise classification labels, and puts the training data set containing EEG frequency domain features and precise classification labels into the machine learning algorithm for training, which can effectively improve the performance of the target distraction detection model obtained after training, improve the prediction accuracy, provide more sufficient time for distracted driving warning, and contribute to the construction of a distracted driving warning system.

[0111] In an embodiment of the present application, a distraction detection method is provided, and an electronic device can obtain EEG data of a driver in a driving state; distraction detection is performed on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set, and the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, the first preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with auditory interference. It can be seen that the training data set is obtained by designing the first preset N-back experimental task and the second preset N-back experimental task. Since the first preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with visual interference, and the second preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with auditory interference, the training data set obtained thereby can fully cover the EEG data of possible distraction obtained based on various interference situations under a real driving state. Then, the initial distraction detection model is trained with the training data set, so that the target distraction detection model obtained after training can effectively identify whether the driver is distracted in the driving state, thereby obtaining accurate distraction detection results, which greatly improves the accuracy of detecting the driver's distraction.

[0112] Based on the above embodiment, in another embodiment of the present application, Figure 4 Schematic diagram of the composition structure of the electronic device proposed in the embodiment of the present application Figure 1 ,like Figure 4 As shown, the electronic device 10 may include an acquisition unit 101 and a detection unit 102 .

[0113] The acquisition unit 101 is used to acquire the EEG data of the driver in a driving state;

[0114] The detection unit 102 is used to perform distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0115] Furthermore, the acquisition unit 101 is also used to acquire the EEG data of the experimental target in an undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain an initial data set; and perform data calibration processing on the initial data set to obtain a calibrated data set; and perform data preprocessing on the calibrated data set to obtain a preprocessed data set; and perform feature extraction processing based on the preprocessed data set to obtain the training data set.

[0116] Furthermore, the acquisition unit 101 is also used to acquire first EEG data of the experimental target in the interference-free simulated driving state for a first time period; acquire second EEG data of the experimental target under the first preset N-back experimental task for a second time period; acquire third EEG data of the experimental target under the second preset N-back experimental task for a third time period; acquire fourth EEG data of the experimental target in the interference-free simulated driving state for a fourth time period; acquire fifth EEG data of the experimental target under the first preset N-back experimental task for a fifth time period; acquire sixth EEG data of the experimental target under the second preset N-back experimental task for a sixth time period; acquire seventh EEG data of the experimental target in the interference-free simulated driving state for a seventh time period; and obtain the initial data set based on the first EEG data, the second EEG data, the third EEG data, the fourth EEG data, the fifth EEG data, the sixth EEG data and the seventh EEG data.

[0117] Furthermore, the first time period is 3 minutes, the second time period is 1 minute, the third time period is 1 minute, the fourth time period is 2 minutes, the fifth time period is 1 minute, the sixth time period is 1 minute, and the seventh time period is 3 minutes.

[0118] Furthermore, the acquisition unit 101 is also used to calibrate the EEG data obtained based on the first preset N-back experimental task and the second preset N-back experimental task in the initial data set as EEG data of a distracted driving state to obtain the calibrated data set.

[0119] Furthermore, the data preprocessing at least includes scalp electrode position positioning processing, re-reference processing and filtering processing.

[0120] Furthermore, the acquisition unit 101 is further configured to divide the preprocessed data set according to a preset time window to obtain a divided data set; and perform feature extraction processing on the divided data set to obtain the training data set.

[0121] Furthermore, the detection unit 102 is also used to perform data preprocessing and feature extraction processing on the EEG data to obtain the EEG data to be processed; and use the target distraction detection model to perform distraction detection on the EEG data to be processed to obtain the distraction detection result.

[0122] In the embodiments of the present application, further, Figure 5 Schematic diagram of the composition structure of the electronic device proposed in the embodiment of the present application Figure 2 ,like Figure 5 As shown, the electronic device 11 proposed in the embodiment of the present application may also include a processor 103 and a memory 104 storing executable instructions of the processor 103; further, the electronic device 10 may also include a communication interface 105, and a bus 106 for connecting the processor 103, the memory 104 and the communication interface 105.

[0123] In the embodiment of the present application, the processor 103 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the function of the processor can also be other, and the embodiment of the present application is not specifically limited. The electronic device 10 can also include a memory 104, which can be connected to the processor 103, wherein the memory 104 is used to store executable program code, the program code includes computer operation instructions, and the memory 104 may include a high-speed RAM memory, and may also include a non-volatile memory, for example, at least two disk memories.

[0124] In the embodiment of the present application, the bus 106 is used to connect the communication interface 105, the processor 103 and the memory 104, and the mutual communication between these devices.

[0125] In the embodiment of the present application, the memory 104 is used to store instructions and data.

[0126] Furthermore, in an embodiment of the present application, the processor 103 is used to obtain EEG data of the driver in a driving state; perform distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set, and the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0127] In practical applications, the memory 104 may be a volatile memory, such as a random access memory (RAM); or a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or a combination of the above types of memories, and provide instructions and data to the processor 103.

[0128] In addition, each functional module in this embodiment can be integrated into one analysis unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.

[0129] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0130] An embodiment of the present application provides an electronic device, which obtains EEG data of a driver in a driving state; performs distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in the driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set, and the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, the first preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed in a simulated driving state with auditory interference. It can be seen that the present application obtains a training data set by designing a first preset N-back experimental task and a second preset N-back experimental task. Since the first preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with visual interference, and the second preset N-back experimental task is an N-back experimental task performed by simulating the experimental target in a driving state with auditory interference, the training data set obtained in this way can fully cover the EEG data of possible distraction obtained based on various interference conditions under a real driving state, and then the initial distraction detection model is trained with the training data set, so that the target distraction detection model obtained after training can effectively identify whether the driver is distracted in the driving state, thereby obtaining accurate distraction detection results, which greatly improves the accuracy of detecting the driver's distraction.

[0131] Specifically, the program instructions corresponding to a distraction detection method in this embodiment can be stored on a storage medium such as a CD, a hard disk, a USB flash drive, etc.; when the program instructions corresponding to a distraction detection method in the storage medium are read or executed by an electronic device, the following steps are included:

[0132] Obtain the driver's EEG data while driving;

[0133] The EEG data is subjected to distraction detection based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set, and the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

[0134] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.

[0135] The present application is described with reference to implementation flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. 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.

[0136] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing 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 is implemented in the implementation flow diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

Claims

1. A distraction detection method, characterized in that: The method comprises: Obtain the driver's EEG data while driving; Performing distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; Wherein, the target distraction detection model is obtained by training the initial distraction detection model using the training data set; The training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

2. The method according to claim 1, characterized in that The method further comprises: Acquire the EEG data of the experimental target in the undisturbed simulated driving state, the EEG data under the first preset N-back experimental task, and the EEG data under the second preset N-back experimental task to obtain an initial data set; Performing data calibration processing on the initial data set to obtain a calibrated data set; Performing data preprocessing on the calibrated data set to obtain a preprocessed data set; Feature extraction is performed based on the preprocessed data set to obtain the training data set.

3. The method according to claim 2, characterized in that The step of acquiring the EEG data of the experimental target in the undisturbed simulated driving state, the EEG data of the experimental target in the first preset N-back experimental task, and the EEG data of the experimental target in the second preset N-back experimental task to obtain an initial data set includes: Acquiring first EEG data of the experimental subject in the interference-free simulated driving state for a first period of time; Acquiring second EEG data of the experimental target under the first preset N-back experimental task for a second time period; Acquiring third EEG data of the experimental target under the second preset N-back experimental task for a third time period; Acquiring fourth EEG data of the experimental subject in the interference-free simulated driving state for a fourth time period; Acquiring fifth EEG data of the experimental subject under the first preset N-back experimental task for a fifth time period; Acquiring sixth EEG data of the experimental target under the second preset N-back experimental task for a sixth time period; Acquiring seventh EEG data of the experimental subject in the interference-free simulated driving state for a seventh time period; The initial data set is obtained based on the first EEG data, the second EEG data, the third EEG data, the fourth EEG data, the fifth EEG data, the sixth EEG data, and the seventh EEG data.

4. The method according to claim 3, characterized in that The first time period is 3 minutes, the second time period is 1 minute, the third time period is 1 minute, the fourth time period is 2 minutes, the fifth time period is 1 minute, the sixth time period is 1 minute, and the seventh time period is 3 minutes.

5. The method according to any one of claims 2 to 4, characterized in that: The performing data calibration processing on the initial data set to obtain a calibrated data set includes: The EEG data obtained based on the first preset N-back experimental task and the second preset N-back experimental task in the initial data set are calibrated as EEG data of a distracted driving state to obtain the calibrated data set.

6. The method according to any one of claims 2 to 4, characterized in that: The performing feature extraction processing based on the preprocessed data set to obtain the training data set includes: Divide the preprocessed data set according to a preset time window to obtain a divided data set; Feature extraction is performed on the divided data set to obtain the training data set.

7. The method according to any one of claims 1 to 4, characterized in that: The distraction detection is performed on the EEG data based on the target distraction detection model to obtain the distraction detection result of the driver in the driving state, including: Performing data preprocessing and feature extraction processing on the EEG data to obtain EEG data to be processed; The target distraction detection model is used to perform distraction detection on the EEG data to be processed to obtain the distraction detection result.

8. An electronic device, characterized in that: The electronic device comprises an acquisition unit and a detection unit. The acquisition unit is used to acquire the EEG data of the driver in a driving state; The detection unit is used to perform distraction detection on the EEG data based on a target distraction detection model to obtain a distraction detection result of the driver in a driving state; wherein the target distraction detection model is obtained by training an initial distraction detection model using a training data set; the training data set is obtained based on a first preset N-back experimental task and a second preset N-back experimental task, wherein the first preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with visual interference, and the second preset N-back experimental task represents an N-back experimental task performed under a simulated driving state with auditory interference.

9. An electronic device, characterized in that: The electronic device includes a processor and a memory storing instructions executable by the processor; when the instructions are executed by the processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a program stored thereon, applied to an electronic device, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.