Multi-mode driver distraction state recognition algorithm

By combining the driver's physiological and vehicle multi-modal data, using data pre-processing and attention module processing, the problem of incomplete multi-modal data processing in the existing technology is solved, and the accuracy and accuracy of identifying the driver's distracted state are improved. Spend.

CN118690120APending Publication Date: 2024-09-24JILIN UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410781136.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing driver distraction state identification algorithms cannot effectively utilize multi-modal data. In particular, image or video modalities cannot fully reflect the driver's distracted state, and traditional algorithms cannot effectively handle the correlation and timing between modalities. information, resulting in insufficient recognition accuracy and accuracy.

Method used

It adopts a multi-modal driver distraction state recognition algorithm, combines the driver's physiological information (pulse, electroencephalogram, electroencephalogram), eye movement information and vehicle information (vehicle speed, steering angle, lane deviation), and performs data preprocessing , convolutional coding and time channel attention module processing to achieve alignment and correlation analysis of multi-modal data and improve recognition accuracy and accuracy.

Benefits of technology

By combining multi-modal data, a more accurate recognition of the driver's distracted state is achieved, the recognition precision and accuracy are improved, the problem of correlation and timing information between modalities is solved, and the influence of invalid information is avoided. It is suitable for Desynchronization of physiological data and vehicle data during distracted driving tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690120A
    Figure CN118690120A
Patent Text Reader

Abstract

The invention provides a multi-modal driver distraction state recognition algorithm, which comprises the following steps of: performing convolution processing on modal data # imgabs0 # comprising # imgabs1 # through an input coding module to obtain alignment modal data # imgabs2 #, splicing alignment modal parameters # imgabs3 # comprising # imgabs4 # and # imgabs5 # in a channel dimension for each alignment modal parameter # imgabs6 # in the same time period to obtain alignment modal data # imgabs2 #; obtaining spliced data X, # imgabs7 # passing time amp; the channel attention module processes the spliced data X to obtain a correlation result OCTA1 of X time attention and channel attention; performing three-layer full connection operation on the correlation result OCTA1 through a full connection module, performing batch normalization and activation after full connection of each layer, and finally giving a classification result Y; the classification result Y comprises distraction and non-distraction; the advantages of different modal data in driving distraction recognition are exerted, processing close to the real process is carried out on multi-modal data, the correlation problem among all modals and the time sequence information problem contained in all the modal data are solved, and the driving distraction recognition precision and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of driver distraction state recognition algorithms, and more specifically, to the field of a multi-modal driver distraction state recognition algorithm method. Background Art

[0002] At present, most driver status recognition algorithms are developed based on image or video data. Due to the characteristics of distracted driving, the driver may not show obvious changes in facial expressions or driving behavior after being distracted. Image or video modality data cannot fully reflect the driver's distracted state.

[0003] Traditional algorithms for detecting driver distraction based on multimodal data are mostly based on machine learning methods, which cannot solve the correlation between the various modes and the time series information contained in the data of each mode, and fail to effectively mine and utilize multimodal data. Therefore, it is impossible to achieve multimodal data processing close to the real process;

[0004] Therefore, how to achieve unified and combined processing of the driver's distracted physiological data and the corresponding vehicle data to be close to the real fact process, analyze the distracted state close to the real situation, and how to invent such a distracted state recognition algorithm have become difficult problems that need to be solved urgently in this field. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a multi-modal driver distraction state recognition algorithm, which can simultaneously identify the driver's distraction state in three dimensions: driver's physiological information (pulse, skin electricity, brain electricity), eye movement information, and vehicle information (vehicle speed, steering angle, lane deviation), give full play to the advantages of different modal data in driving distraction recognition, realize the processing of multi-modal data close to the real process, solve the correlation problem between each modality and the time series information problem contained in each modal data, and improve the precision and accuracy of driving distraction recognition.

[0006] The present invention provides a multi-modal driver distraction state recognition algorithm, comprising the following steps:

[0007] Acquire multimodal information; the multimodal information includes: pulse wave information, electroencephalogram information, electrodermal activity information, eye movement signal information, and vehicle signal information; the vehicle signal information includes vehicle speed, steering angle, and lane deviation; the eye movement signal information includes viewpoint position information and blinking frequency information;

[0008] The multimodal information is preprocessed through the data preprocessing module to obtain the instantaneous heart rate sequence HR, effective electroencephalogram information EEG, effective skin electrode information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset;

[0009] The preprocessed multimodal information is segmented according to the specified time length to obtain the modal data X of each channel. i Ini ; The modal data include

[0010] The modal data is convolved through the input encoding module to obtain the aligned modal data The alignment modal parameters include

[0011] For each alignment modal parameter in the same time period Splicing is performed in the channel dimension to obtain the spliced ​​data X,

[0012] The time & channel attention module processes the calculated splicing data X to obtain the correlation result O of X time attention and channel attention. TCA1 ;

[0013] Through the fully connected module, the correlation result O TCA1 A three-layer full connection operation is performed, and batch normalization and activation are performed after each layer of full connection, and finally a classification result Y is given; the classification result Y includes distraction and non-distraction.

[0014] Compared with the prior art, the present invention has the following beneficial effects: through the multimodal information including: pulse wave information, electrodermal activity information, eye movement signal information, and vehicle signal information; the vehicle signal information includes vehicle speed, steering angle, and lane deviation; the eye movement signal information includes viewpoint position information and blinking frequency information, it is possible to identify the driver's distraction state in three dimensions: the driver's physiological information (pulse, electrodermal activity, and electroencephalogram), eye movement information, and vehicle information (vehicle speed, steering angle, and lane deviation); it is beneficial to improve the accuracy and precision of identifying driving distraction.

[0015] The multimodal information is preprocessed through the data preprocessing module to remove invalid information, avoid the problem that the invalid data contained in the collected information will cause deviations in subsequent data analysis and processing, and avoid wasting computing power by performing invalid processing;

[0016] By segmenting the pre-processed multimodal information according to the specified time length, it is possible to process the segmented modal data and then perform fusion after alignment processing to obtain data that better reflects the real situation, that is, spliced ​​data X;

[0017] The modal data is convolved through the input encoding module to obtain the aligned modal data It can solve the problem that different lengths of different modal data are caused by different sampling rates during acquisition; the aligned modal data obtained It can realize the alignment of multi-modal data, thereby solving the correlation problem between various modalities;

[0018] The spliced ​​data X is processed by the time & channel attention module to avoid the problem of inconsistent change time of different modal data when the state changes; that is, it avoids the problem that after the driver is distracted, the physiological data will change first, and the change of vehicle data will have a certain delay; therefore, the time dimension and channel dimension can be considered at the same time, and the correlation between data of different modalities at different times can be obtained through one calculation; it can be applied to the situation in distracted driving tasks where the physiological data changes first and the vehicle data changes later; thus solving the problem of time series information contained in each modal data;

[0019] This enables processing of multimodal data that is close to the real process, solves the correlation problem between each modality and the timing information problem contained in each modal data, and improves the accuracy and precision of driver distraction recognition.

[0020] Furthermore, the data preprocessing module includes a method for obtaining an instantaneous heart rate sequence HR;

[0021] The instantaneous heart rate sequence HR is obtained by filtering the pulse wave information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.5 and 8 Hz respectively;

[0022] The Pan-Tompkins algorithm is used to detect the R peak of the pulse wave information, obtain the position of each R wave peak in the pulse wave information, calculate the distance L between every two adjacent R peaks, and then divide L by the sampling rate O to obtain the RR interval list RRI in the pulse wave information;

[0023] RRI_i is the i-th element in the list, indicating the time difference between the i+1-th R peak and the i-th R peak in the pulse wave information. The RRI_i is arranged in chronological order to obtain the instantaneous heart rate sequence HR.

[0024] Furthermore, the data preprocessing module includes a method for obtaining effective skin electrical information EDA;

[0025] The method for obtaining the effective skin electrical information EDA is to filter the skin electrical activity information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.05 and 0.50 Hz respectively;

[0026] The filtered skin electrical information is screened, and if the impedance value of the filtered skin electrical information at a certain moment is not within the range of [28,628] KΩ, the information at this moment is discarded to obtain the previous effective skin electrical information EDA;

[0027] The method for obtaining the eye movement signal information is to obtain null values ​​in the eye movement signal information, and if the proportion of null values ​​not caused by blinking to the total null values ​​is greater than 50%, the eye movement signal information is discarded; the eye movement signal information in which the proportion of null values ​​not caused by blinking to the total null values ​​is less than or equal to 50% is valid eye movement information;

[0028] and / or,

[0029] Extracting effective viewpoint position information Gaze and effective blink frequency information BR from the effective eye movement information;

[0030] The data preprocessing module also includes a method for obtaining effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset;

[0031] The method for obtaining the vehicle signal information is to check whether there is an abnormal value in the vehicle signal, and if there is an abnormal value, process it by using an abnormal value processing method;

[0032] Preferably, the outlier processing method includes: removing signal sample processing or performing interpolation processing on signal samples;

[0033] The abnormal value is that the detected vehicle signal is empty or 0;

[0034] When the number of abnormal values ​​in the vehicle signal is greater than 8, the signal sample is removed;

[0035] When there are 1-8 abnormal values ​​in the vehicle signal, the signal samples are interpolated. The specific method is: replace the abnormal value with the signal average value, and the signal average value is the average value of all other signal values ​​excluding the abnormal value;

[0036] Preferably, the method for obtaining effective EEG information includes segmenting and baseline correction processing of the EEG information, deleting bad segments and bad leads, and removing artifacts;

[0037] The segmentation and baseline correction processing of the EEG information includes segmenting the EEG information to obtain segmented data (epochs), then performing regression-based baseline correction on the segmented information and performing linear transformation; removing the excessively drifted data after segmentation and displaying all channels at one scale; which is conducive to eliminating noise in the EEG signal;

[0038] The bad segment and bad conductor removal process of the EEG information includes rejecting a single epoch based on visual inspection, or automatically rejecting by defining a threshold of peak-to-peak amplitude and flat signal detection; realizing that the channels of rejected epochs can be visualized while removing the bad segment and bad conductor processing, thereby facilitating the determination of whether the bad channel is missed by visual inspection, and facilitating the confirmation of whether the filtering method is sufficient;

[0039] The artifact removal of the electroencephalogram (EEG) information includes artifact removal by using a signal decomposition method; the signal decomposition method includes one of a regression method, a signal space projection (SSP; Uusitalo and Ilmoniemi, 1997) method, and an independent component analysis (ICA) method.

[0040] The beneficial effect of adopting the previous step is that it can improve the validity of the data by removing invalid information and data without affecting the comprehensiveness of the data, which is conducive to improving the efficiency of subsequent processing and improving the accuracy and precision of driving distraction identification.

[0041] Furthermore, the modal data The acquisition method is to segment the instantaneous heart rate sequence HR, effective skin electrical information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset according to the specified time length, and avoid the data of the vehicle's forced lane change stage during the segmentation process;

[0042] The segmented instantaneous heart rate sequence HR, effective skin electrical information EDA, effective viewpoint position information Gaze, effective blink frequency information BR, effective vehicle speed information Speed, and effective steering angle information Steering are used to obtain the modal data of each channel.

[0043] Furthermore, the input encoding module includes mutually independent convolution layers;

[0044] The volume layer includes modality data The corresponding Conv i , the Conv i Include Conv HR 、ConvEEG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset ;

[0045] Confirmation Conv HR 、Conv EEG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameters;

[0046] The process of confirming the volume base parameters includes: The lowest sampling rate by The output sequence length is The output sequence length of

[0047] The Input to the corresponding volume layer Conv i Convolution, respectively Corresponding alignment modal data

[0048] Each of the alignment modality data The sequences have the same length.

[0049] Adopt the beneficial effect of the previous step to align the multi-modal data and achieve After the convolution of the convolution layer, the output sequences have the same length, which avoids the problem of different lengths of different modal data caused by different sampling rates during acquisition. The aligned modal data obtained It can realize the alignment of multi-modal data, thereby solving the correlation problem between various modalities.

[0050] Further, confirm that Conv HR 、Conv EGG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameter process includes the following steps:

[0051] The Conv iConvolution layer parameters include: kernel size kernel_size, stride, and padding length Padding;

[0052] Get the preset Conv through the preset convolution layer parameter acquisition method. i Convolutional layer parameters, preset Conv i Convolution layer parameters include: preset convolution kernel size kernel_size de , preset step length stride de , preset padding length Padding de ;

[0053] By presetting Conv i The convolutional layer parameters will be Bring in Conv i Convolutional layer, we get The corresponding output sequence length is The output sequence length is The corresponding preset Conv when the output sequence length is the same i The convolution layer parameters are set to Conv i Convolutional layer parameters;

[0054] The method for obtaining the preset convolution layer parameters includes the following steps:

[0055] confirm The lowest sampling rate confirm The actual sampling rate len_in, according to formula 1 to obtain the total step length Stride_all de ;

[0056] Formula 1: S1 = len_in / len_out, the Stride_all is obtained by taking an integer from S1 de ; The len_out is The sampling rate;

[0057] The convolutional layer is two layers, according to Stride_all de =stride de _1*stride de _2, stride de _1. stride de _2 are both integers, stride de _1. stride de _2 is the preset step size of each convolutional layer;

[0058] Use formula 2 to get the convolution kernel size kernel_size of each volume base layer de;kernel_size de Including kernel_size de _1, kernel_size de _2;

[0059] Formula 2: kernel_size de >=stride de +2; kernel_sizede is an integer. When stridede>5, kernel_sizede is a multiple of 5. de Including stride de _1. stride de _2;

[0060] Use formula 3 to get the preset padding length of each base layer. de ;Padding de Including Paddingde_1, Padding de _2;

[0061] Formula 3: Padding de =kernel_size de / 2;Padding de is an integer.

[0062] The beneficial effect of adopting the previous step is that through the above steps, Conv i Convolutional layer parameters, thus achieving Aligned modal data obtained after convolution of the convolutional layer It can realize the alignment of multi-modal data, thereby solving the correlation problem between various modalities.

[0063] Further, the correlation result of the spliced ​​data is calculated by the time & channel attention module. TCA1 The following steps are involved:

[0064] All elements in the spliced ​​data X are repeatedly tiled using the repeated tiling formula to obtain a repeated tiling matrix B is the batch size, S is the sequence length, and C is the channel.

[0065] By X B×S×C , Construct the Query, Key, and Value matrices of data X;

[0066] The specific construction process includes: The matrix is ​​transformed once to obtain the matrix QB×S*C×S×C ;

[0067] X B×S×C Perform two transformations to get the matrix K B×S×C and the matrix V B×S×C ;

[0068] The matrix Q B×S*C×S×C is the Query matrix corresponding to the concatenated data X, the matrix K B×S×C is the Key matrix corresponding to the spliced ​​data X, the matrix V B×S×C It is the Value matrix corresponding to the spliced ​​data X;

[0069] The Query, Key, and Value matrices are processed through the calculation formula of the self-attention mechanism, and the feedforward neural network in Self-Attention is used to introduce nonlinearity and residuals to obtain the correlation result O of the time attention and channel attention of the splicing splicing X. TCA1 .

[0070] Furthermore, the repeated tiling formula is:

[0071]

[0072] Furthermore,

[0073] K B×S×C =W K *X B×S×C

[0074] V B×S×C =W V *X B×S×C

[0075] The W Q , W K , W V are the weight matrices of Query, Key, and Value matrices respectively; W Qi , W Ki , W Vi is W after i training cycles Q , W K , W V ;

[0076] W Qi =kaiming_uniform(var i-1 ,E i-1 )

[0077] W Ki =kaiming_uniform(var i-1,E i-1 )

[0078] W Vi =kaiming_uniform(var i-1 ,E i-1 )

[0079] var i-1 、E i-1 They represent the variance and expectation of the loss function obtained in the previous cycle, i.e., the i-1th cycle.

[0080] The beneficial effect of adopting the previous step is that, through the time & channel attention module, a channel attention module is added on the basis of the original time attention module, and the time dimension and the channel dimension can be considered at the same time. The correlation between any mode and other modes in different modal data at different times under the same stimulus and the correlation between the same modality at different times can be obtained through one calculation, which can be applicable to the asynchronous phenomenon that physiological data changes first and vehicle data changes later in distracted driving tasks; the correlation between the awakening moments of different modal data caused by a certain stimulus can be calculated, and the greater the correlation, the stronger the correlation between different moments;

[0081] pass The matrix is ​​transformed once to obtain Q B×S*C×S×C , and the untiled X B×S×C Perform two transformations to obtain K B×S×C and V B×S×C , the data of each modality at each moment in the Query (a total of S*C) are respectively calculated with the elements corresponding to the Key and Value, so as to consider the correlation between data of different modalities at different moments.

[0082] Using the He Kaiming initialization method in the field of computer vision, according to W Qi , W Ki , W Vi Obtaining the formula and the weight matrix avoids the problem that manually setting the weight matrix cannot well guarantee the randomness of weight parameter selection. If the weight setting is unreasonable, it will cause gradient instability during training; at the same time, it realizes gradient stability in the training stage.

[0083] Furthermore, the attention mechanism calculation formula is:

[0084]

[0085] and / or

[0086] Get the correlation result O of X's time attention and channel attention TCA1 After that, O TCA1Mapping is performed on the channel dimension and projected to a higher-dimensional space to improve the separability between different categories of data. The specific method is to convert O TCA1 Input to a fully connected layer to obtain the intermediate variable O h_proj ;

[0087] O h_proj Calculate again using the self-attention mechanism calculation formula to get the correlation result again;

[0088] Then, the correlation result obtained again is subjected to a three-layer full connection operation, and batch normalization and activation are performed after each layer of full connection, and finally a classification result Y is given; the classification result Y includes distraction and non-distraction.

[0089] The beneficial effect of adopting the previous step is to calculate the correlation between the data of each mode at each moment and the data of other modes at other moments, realize the fusion of the two dimensions of time and channel, and finally give the classification result Y. DETAILED DESCRIPTION

[0090] In order to make the objectives, technical solutions and advantages of the present invention more clear, various aspects of the present invention will be described in detail below in conjunction with specific embodiments. However, these specific embodiments are only used to illustrate the present invention and do not constitute any limitation on the scope of protection and essential content of the present invention.

[0091] Embodiment 1

[0092] The present embodiment provides a multimodal driver distraction state recognition algorithm, comprising the following steps: acquiring multimodal information; the multimodal information comprising: pulse wave information, electroencephalogram information, electrodermal activity information, eye movement signal information, and vehicle signal information; the vehicle signal information comprising vehicle speed, steering angle, and lane deviation; the eye movement signal information comprising viewpoint position information and blinking frequency information.

[0093] The multimodal information is preprocessed through the data preprocessing module to obtain the instantaneous heart rate sequence HR, effective electroencephalogram information EEG, effective skin electrode information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset.

[0094] The data preprocessing module includes a method for obtaining an instantaneous heart rate sequence HR;

[0095] The instantaneous heart rate sequence HR is obtained by filtering the pulse wave information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.5 and 8 Hz respectively;

[0096] The Pan-Tompkins algorithm is used to detect the R peak of the pulse wave information, obtain the position of each R wave peak in the pulse wave information, calculate the distance L between every two adjacent R peaks, and then divide L by the sampling rate O to obtain the RR interval list RRI in the pulse wave information;

[0097] RRI_i is the i-th element in the list, indicating the time difference between the i+1-th R peak and the i-th R peak in the pulse wave information. The RRI_i is arranged in chronological order to obtain the instantaneous heart rate sequence HR.

[0098] The data preprocessing module includes a method for obtaining effective skin electrical information EDA;

[0099] The method for obtaining the effective skin electrical information EDA is to filter the skin electrical activity information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.05 and 0.50 Hz respectively;

[0100] The filtered skin electrical information is screened, and if the impedance value of the filtered skin electrical information at a certain moment is not within the range of [28,628] KΩ, the information at this moment is discarded to obtain the previous effective skin electrical information EDA;

[0101] The method for obtaining the eye movement signal information is to obtain null values ​​in the eye movement signal information, and if the proportion of null values ​​not caused by blinking to the total null values ​​is greater than 50%, the eye movement signal information is discarded; the eye movement signal information in which the proportion of null values ​​not caused by blinking to the total null values ​​is less than or equal to 50% is valid eye movement information;

[0102] Extracting effective viewpoint position information Gaze and effective blink frequency information BR from the effective eye movement information;

[0103] The data preprocessing module also includes a method for obtaining effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset;

[0104] The method for obtaining the vehicle signal information is to check whether there is an abnormal value in the vehicle signal, and if there is an abnormal value, process it by using an abnormal value processing method;

[0105] The outlier processing method includes: removing signal samples or performing interpolation processing on signal samples;

[0106] The abnormal value is that the detected vehicle signal is empty or 0;

[0107] When the number of abnormal values ​​in the vehicle signal is greater than 8, the signal sample is removed;

[0108] When the number of outliers in the vehicle signal is 1-8, interpolation processing is performed on the signal samples. The specific method is: replacing the outliers with signal average values, where the signal average value is the average value of all other signal values ​​excluding the outliers.

[0109] The preprocessed multimodal information is segmented according to the specified time length to obtain the modal data of each channel The modality data include

[0110] The modality data The acquisition method is to segment the instantaneous heart rate sequence HR, effective electroencephalogram information EEG, effective skin electrodermal information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset according to the specified time length, and avoid the data of the vehicle's forced lane change stage during the segmentation process;

[0111] The segmented instantaneous heart rate sequence HR, effective skin electrical information EDA, effective viewpoint position information Gaze, effective blink frequency information BR, effective vehicle speed information Speed, and effective steering angle information Steering are used to obtain the modal data of each channel.

[0112] The modal data is convolved through the input encoding module to obtain the aligned modal data The alignment modal parameters include

[0113] The input encoding module includes independent convolution layers;

[0114] The volume layer includes modality data The corresponding Conv i , the Conv i Include Conv HR 、Conv EEG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset ;

[0115] Confirmation Conv HR 、Conv EEG 、Conv EDA 、Conv Gaze 、Conv BR、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameters;

[0116] The process of confirming the volume base parameters includes: The lowest sampling rate by The output sequence length is The output sequence length of

[0117] The Input to the corresponding volume layer Conv i Convolution, respectively Corresponding alignment modal data

[0118] Each of the alignment modality data The sequences have the same length.

[0119] Confirmation Conv HR 、Conv EGG 、Conv EDA ,Conv Gaze ,Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameter process includes the following steps:

[0120] The Conv i Convolution layer parameters include: kernel size kernel_size, stride, and padding length Padding;

[0121] Get the preset Conv through the preset convolution layer parameter acquisition method. i Convolutional layer parameters, preset Conv ii Convolution layer parameters include: preset convolution kernel size kernel_size de , preset step length stride de , preset padding length Padding de ;

[0122] By presetting Conv i The convolutional layer parameters will be Bring in Conv i Convolutional layer, we get The corresponding output sequence length is The output sequence length is The corresponding preset Conv when the output sequence length is the same i The convolution layer parameters are set to Convi Convolutional layer parameters;

[0123] The method for obtaining the preset convolution layer parameters includes the following steps:

[0124] confirm The lowest sampling rate confirm The actual sampling rate len_in, according to formula 1 to obtain the total step length Stride_all de ;

[0125] Formula 1: S1 = len_in / len_out, the Stride_all is obtained by taking an integer from S1 de ; The len_out is The sampling rate;

[0126] The convolutional layer is two layers, according to Stride_all de =stride de _1*stride de _2, stride de _1. stride de _2 are both integers, stride de _1. stride de _2 is the preset step size of each convolutional layer;

[0127] Use formula 2 to get the convolution kernel size kernel_size of each volume base layer de ;kernel_size de Including kernel_size de _1, kernel_size de _2;

[0128] Formula 2: kernel_size de >=stride de +2; when The actual sampling rate is less than the minimum sampling rate When kernel_size de is an integer, when stride de >5, kernel_size de is a multiple of 5; the stride de Including stride de _1. stride de _2;

[0129] Use formula 3 to get the preset padding length of each base layer. de ;Paddingde Including Paddingde_1, Padding de _2;

[0130] Formula 3: Padding de =kernel_size de / 2;Padding de is an integer.

[0131] For example, The actual sampling frequency is 256HZ, the minimum sampling rate

[0132] Stride_all de The integer is 25.6, so Stride_all de =25;Stride_all de =stride de _1*stride de _2, so the preset step size stridede_1 and stridede_2 of each convolution layer are both 5;

[0133] kernel_size de >=stride de +2, stride de >5, so kernel_size de It is a multiple of 5, so each convolution layer presets the convolution kernel size kernel_size de _1, kernel_size de _2 is one of 10, 15, etc.;

[0134] Padding de =kernel_size de / 2;Padding de is an integer, so each layer has a preset padding length of Paddingde_1 and Padding de _2 is one of 5, 7, etc.;

[0135] By presetting Conv EEG The convolutional layer parameters will be Bring in Conv EEG Convolutional layer, we get The corresponding output sequence length, when Conv is preset BR The convolution layer parameters include: the preset step size stride_1 and stride_2 of each convolution layer are both 5;

[0136] Each convolution layer presets the convolution kernel size kernel_size de _1, kernel_size de _2 are both 15; each layer has a preset filling length of Paddingde_1, Padding de _2 are both 7 o'clock, The corresponding output sequence length is The output sequence length of Conv EEG Convolutional layer parameters;

[0137] Follow these steps to get The corresponding Conv BR Convolutional layer parameters, see Table 1 below;

[0138] Table 1 is as follows

[0139]

[0140] For each alignment modal parameter in the same time period Splicing is performed in the channel dimension to obtain the spliced ​​data X,

[0141] The time & channel attention module calculates the correlation result of the spliced ​​data. TCA1 The following steps are involved:

[0142] All elements in the spliced ​​data X are repeatedly tiled using the repeated tiling formula to obtain a repeated tiling matrix B is the batch size, S is the sequence length, and C is the channel.

[0143] The repeated tiling formula is:

[0144]

[0145] By X B×S×C , Construct the Query, Key, and Value matrices of data X;

[0146] The specific construction process includes: The matrix is ​​transformed once to obtain the matrix Q B×S*C×S×C ;

[0147] X B×S×C Perform two transformations to get the matrix K B×S×C and the matrix V B×S×C ;

[0148] The matrix Q B×S*C×S×Cis the Query matrix corresponding to the concatenated data X, the matrix K B×S×C is the Key matrix corresponding to the spliced ​​data X, the matrix V B×S×C It is the Value matrix corresponding to the spliced ​​data X;

[0149]

[0150] K B×S×C =W K *X B×S×C

[0151] V B×S×C =W V *X B×S×C

[0152] The W Q , W K , W V are the weight matrices of Query, Key, and Value matrices respectively; W Qi , W Ki , W Vi

[0153] is W after i training cycles Q , W K , W V ;

[0154] W Qi =kaiming_uniform(var i-1 ,E i-1 )

[0155] W Ki =kaiming_uniform(var i-1 ,E i-1 )

[0156] W Vi =kaiming_uniform(var i-1 ,E i-1 )

[0157] var i-1 、E i-1 They represent the variance and expectation of the loss function obtained in the previous cycle, i.e., the i-1th cycle;

[0158] The Query, Key, and Value matrices are processed through the calculation formula of the self-attention mechanism, and the feedforward neural network in Self-Attention is used to introduce nonlinearity and residuals to obtain the correlation result O of the time attention and channel attention of the splicing splicing X. TCA1 .

[0159] The spliced ​​data X is processed by the time & channel attention module to obtain the correlation result O of X time attention and channel attention. TCA1 ; O TCA1 Mapping is performed on the channel dimension and projected to a higher-dimensional space to improve the separability between different categories of data. The specific method is to convert O TCA1 Input to a fully connected layer to obtain the intermediate variable O h_proj ;

[0160] O h_proj Calculate again using the self-attention mechanism calculation formula to get the correlation result again;

[0161] Then the correlation result obtained again is subjected to a three-layer full connection operation, and batch normalization and activation are performed after each layer of full connection, and finally a classification result Y is given; the classification result Y includes distraction and non-distraction;

[0162] The calculation formula of the attention mechanism is:

[0163]

[0164] The present invention has been described above in conjunction with specific embodiments. These specific embodiments are merely exemplary and cannot be used to limit the scope of protection of the present invention. Those skilled in the art may make various modifications, changes or substitutions without departing from the essence of the present invention. Therefore, various equivalent changes made according to the present invention still fall within the scope covered by the present invention.

Claims

1. A multi-modal driver distraction state recognition algorithm, characterized in that: The following steps are involved: Acquire multimodal information; the multimodal information includes: pulse wave information, electroencephalogram information, electrodermal activity information, eye movement signal information, and vehicle signal information; the vehicle signal information includes vehicle speed, steering angle, and lane deviation; the eye movement signal information includes viewpoint position information and blinking frequency information; The multimodal information is preprocessed through the data preprocessing module to obtain the instantaneous heart rate sequence HR, effective electroencephalogram information EEG, effective skin electrode information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset; The preprocessed multimodal information is segmented according to the specified time length to obtain the modal data of each channel The modality data include The modal data is convolved through the input encoding module to obtain the aligned modal data The alignment modal parameters include For each alignment modal parameter X in the same time period i * Splicing is performed in the channel dimension to obtain the spliced ​​data X, The spliced ​​data X is processed by the time & channel attention module to obtain the correlation result O of X time attention and channel attention. TCA1 ; Through the fully connected module, the correlation result O TCA1 A three-layer full connection operation is performed, and batch normalization and activation are performed after each layer of full connection, and finally a classification result Y is given; the classification result Y includes distraction and non-distraction.

2. The multi-modal driver distraction state recognition algorithm according to claim 1, characterized in that: The data preprocessing module includes a method for obtaining an instantaneous heart rate sequence HR; The instantaneous heart rate sequence HR is obtained by filtering the pulse wave information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.5 and 8 Hz respectively; The Pan-Tompkins algorithm is used to detect the R peak of the pulse wave information, obtain the position of each R wave peak in the pulse wave information, calculate the distance L between every two adjacent R peaks, and then divide L by the sampling rate O to obtain the RR interval list RRI in the pulse wave information; RRI_i is the i-th element in the list, indicating the time difference between the i+1-th R peak and the i-th R peak in the pulse wave information. The RRI_i is arranged in chronological order to obtain the instantaneous heart rate sequence HR.

3. The multi-modal driver distraction state recognition algorithm according to claim 1, characterized in that: The data preprocessing module includes a method for obtaining effective skin electrical information EDA; The method for obtaining the effective skin electrical information EDA is to filter the skin electrical activity information through a second-order Butterworth bandpass filter, with the upper and lower cutoff frequencies being 0.05 and 0.50 Hz respectively; The filtered skin electrical information is screened, and if the impedance value of the filtered skin electrical information at a certain moment is not within the range of [28,628] KΩ, the information at this moment is discarded to obtain the previous effective skin electrical information EDA; The method for obtaining the eye movement signal information is to obtain null values ​​in the eye movement signal information, and if the proportion of null values ​​not caused by blinking to the total null values ​​is greater than 50%, the eye movement signal information is discarded; the eye movement signal information in which the proportion of null values ​​not caused by blinking to the total null values ​​is less than or equal to 50% is valid eye movement information; and / or Extracting effective viewpoint position information Gaze and effective blink frequency information BR from the effective eye movement information; The data preprocessing module also includes a method for obtaining effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset; The method for obtaining the vehicle signal information is to check whether there is an abnormal value in the vehicle signal, and if there is an abnormal value, process it through an abnormal value processing method.

4. The multi-modal driver distraction state recognition algorithm according to claim 1, characterized in that: The modality data The acquisition method is to segment the instantaneous heart rate sequence HR, effective electroencephalogram information EEG, effective skin electrodermal information EDA, effective viewpoint position information Gaze, effective blinking frequency information BR, effective vehicle speed information Speed, effective steering angle information Steering, and effective lane offset information Lane Offset according to the specified time length, and avoid the data of the vehicle's forced lane change stage during the segmentation process; The segmented instantaneous heart rate sequence HR, effective EEG information, effective skin electrical information EDA, effective viewpoint position information Gaze, effective blink frequency information BR, effective vehicle speed information Speed, and effective steering angle information Steering are used to obtain the modal data of each channel.

5. The multi-modal driver distraction state recognition algorithm according to claim 1, characterized in that: The input encoding module includes independent convolution layers; The volume layer includes modality data The corresponding Conv i , the Conv i Include Conv HR 、Conv EEG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset ; Confirmation Conv HR 、Conv EEG 、Conv EDA 、Conv Gaze 、Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameters; The process of confirming the volume base parameters includes: The lowest sampling rate by The output sequence length is The output sequence length of The Input to the corresponding volume layer Conv i Convolution, respectively Corresponding alignment modal data Each of the alignment modality data The sequences have the same length.

6. The multi-modal driver distraction state recognition algorithm according to claim 5 is characterized in that: Confirmation Conv HR 、Conv EGG 、Conv EDA ,Conv Gaze ,Conv BR 、Conv Speed 、Conv Steering 、Conv LaneOffset The volume base parameterization process includes the following steps: The Conv i The convolution layer parameters include: kernel size kernel_size, stride, and padding length Padding; Get the preset Conv through the preset convolution layer parameter acquisition method. i Convolutional layer parameters, preset Conv i Convolution layer parameters include: preset convolution kernel size kernel_size de , preset step length stride de , preset padding length Padding de ; By presetting Conv i The convolutional layer parameters will be Bring in Conv i Convolutional layer, we get The corresponding output sequence length is The output sequence length is The corresponding preset Conv when the output sequence length is the same i The convolution layer parameters are set to Conv i Convolutional layer parameters; The method for obtaining the preset convolution layer parameters includes the following steps: confirm The lowest sampling rate confirm The actual sampling rate len_in, according to formula 1 to obtain the total step length Stride_all de ; Formula 1: S1 = len_in / len_out, the Stride_all is obtained by taking an integer from S1 de ; The len_out is The sampling rate; The convolutional layer is two layers, according to Stride_all de =stride de _1*stride de _2, stride de _1. stride de _2 are both integers, stride de _1. stride de _2 is the preset step size of each convolutional layer; Use formula 2 to get the convolution kernel size kernel_size of each volume base layer de ;kernel_size de Including kernel_size de _1, kernel_size de _2; Formula 2: kernel_size de >=stride de +2;kernel_size de is an integer, when stride de >5, kernel_size de is a multiple of 5; the stride de Including stride de _1. stride de _2; Use formula 3 to get the preset padding length of each base layer. de ;Padding de Including Paddingde_1, Padding de _2; Formula 3: Padding de =kernel_size de / 2;Padding de is an integer.

7. The multi-modal driver distraction state recognition algorithm according to claim 1, characterized in that: The time & channel attention module calculates the correlation result of the spliced ​​data. TCA1 The following steps are involved: All elements in the spliced ​​data X are repeatedly tiled using the repeated tiling formula to obtain a repeated tiling matrix B is the batch size, S is the sequence length, and C is the channel. By X B×S×C , Construct the Query, Key, and Value matrices of data X; The specific construction process includes: The matrix is ​​transformed once to obtain the matrix Q B×S*C×S×C ; X B×S×C Perform two transformations to get the matrix K B×S×C and the matrix V B×S×C ; The matrix Q B×S*C×S×C is the Query matrix corresponding to the concatenated data X, the matrix K B×S×C is the Key matrix corresponding to the spliced ​​data X, the matrix V B×S×C It is the Value matrix corresponding to the spliced ​​data X; The Query, Key, and Value matrices are processed through the calculation formula of the self-attention mechanism, and the feedforward neural network in Self-Attention is used to introduce nonlinearity and residuals to obtain the correlation result O of the time attention and channel attention of the splicing splicing X. TCA1 .

8. The multi-modal driver distraction state recognition algorithm according to claim 7, characterized in that: The repeated tiling formula is:

9. The multi-modal driver distraction state recognition algorithm according to claim 7, characterized in that: K B×S×C =W K *X B×S×C V B×S×C =W V *X B×S×C The W Q , W K , W V are the weight matrices of Query, Key, and Value matrices respectively; W Qi , W Ki , W Vi is W after i training cycles Q , W K , W V ; W Qi =kaiming_uniform(var i-1 ,E i-1 ) W Ki =kaiming_uniform(var i-1 ,E i-1 ) W Vi =kaiming_uniform(var i-1 ,E i-1 ) var i-1 、E i-1 They represent the variance and expectation of the loss function obtained in the previous cycle, i.e., the i-1th cycle.

10. The multi-modal driver distraction state recognition algorithm according to claim 7, characterized in that: The calculation formula of the attention mechanism is: and / or Get the correlation result O of X's time attention and channel attention TCA1 After that, O TCA1 Mapping is performed on the channel dimension and projected to a higher-dimensional space to improve the separability between different categories of data. The specific method is to convert O TCA1 Input to a fully connected layer to obtain the intermediate variable O h_proj ; O h_proj Calculate again using the self-attention mechanism calculation formula to get the correlation result again; Then, the correlation result obtained again is subjected to a three-layer full connection operation, and batch normalization and activation are performed after each layer of full connection, and finally a classification result Y is given; the classification result Y includes distraction and non-distraction.