Driver fatigue state recognition method and system and storage medium

By extracting information entropy features and building an optimized random forest model, the problem of insufficient accuracy of fatigue driving detection in the prior art is solved, and the high accuracy recognition effect is achieved under complex road conditions.

CN119312213APending Publication Date: 2025-01-14CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411356521.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The existing fatigue driving detection methods based on vehicle behavior characteristics have insufficient accuracy when identifying fatigue states, especially in complex and changeable mountain road conditions, and the adaptability needs to be improved, and traditional methods are difficult to fully capture the dynamic changes and complexity of driving behavior.

Method used

Collect a variety of driving operation data, extract information entropy characteristics, determine key driving behavior characteristics, build a random forest model, and optimize model parameters through the sparrow search algorithm to improve the accuracy of fatigue driving detection.

Benefits of technology

It realizes high-accuracy fatigue driving state recognition under complex road conditions, improves the robustness and generalization ability of the model, and ensures the driver fatigue state recognition effect under mountain road conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312213A_ABST
    Figure CN119312213A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent driving, and particularly discloses a driver fatigue state recognition method and system and a storage medium, and the method comprises the steps: firstly collecting driving operation data under different driver fatigue states, and extracting corresponding information entropy features, so as to excavate the nonlinear features of operation behaviors, and facilitate the recognition of the driver fatigue states; then, information entropy features of all driving operations are screened, information entropy features significantly related to a fatigue state are reserved, and a key feature set is formed, so that driving behavior feature redundancy indexes are effectively removed, and the model response speed and classification performance are improved; and then, adopting a random forest model (RF) as a basic model, and introducing a sparrow search algorithm to optimize training parameters of the RF model in the process of training the RF model by adopting the key feature set to obtain a fatigue driving detection model. According to the invention, the method can achieve high accuracy in the recognition of the fatigue state of the driver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent driving technology, and in particular to a method, system and storage medium for identifying a driver's fatigue state. Background Art

[0002] Fatigue driving refers to the phenomenon that the driver's driving ability is reduced due to physiological and psychological dysfunction caused by long-term repeated operation. Fatigue driving not only threatens the safety of the driver, but also poses a potential threat to other road users. Therefore, the development of effective fatigue driving detection technology is crucial to improving driving safety on mountain roads.

[0003] At present, common fatigue driving detection methods are divided into two categories according to the data source: contact and non-contact. The contact detection method mainly studies the changes in the driver's physiological signals such as brain waves, pulse signals, myoelectric signals and skin electrical signals during driving to determine whether they are fatigued. However, this method requires the driver to wear the detection equipment for a long time, which may distract attention or cause discomfort, affecting normal driving operations. Among the non-contact detection methods, the detection method based on the driver's facial features is greatly affected by external factors such as lighting, obstructions and driver posture, and its stability needs to be improved. In contrast, the fatigue driving detection method based on vehicle behavior characteristics determines the fatigue state by analyzing the differences in data such as the driver's speed, steering wheel angle, yaw angular velocity and acceleration under different conditions. This method detection equipment is easy to install and low-cost. It will not interfere with the driver's normal operation, and can effectively resist the influence of lighting changes and posture changes. It has high practicality and has become a hot spot in fatigue driving detection research.

[0004] Fatigue driving detection based on vehicle behavior characteristics has achieved many results, but the existing literature studies mostly focus on extracting statistical characteristics and time-frequency domain characteristics of driving behavior. These methods have certain limitations in identifying fatigue driving behavior. First, the statistical characteristics relied on by these studies may not fully capture the dynamic changes and complexity of driving behavior. Second, although the time-frequency domain characteristics can provide certain time-frequency information, they may ignore the nonlinear and non-stationary characteristics of driving behavior. In addition, the existing studies have performed poorly in the accuracy of fatigue detection, especially in complex and changeable mountain road conditions. The adaptability of these methods needs to be improved. Summary of the invention

[0005] The present invention provides a method, a system and a storage medium for identifying a driver's fatigue state, and solves the technical problem of how to improve the accuracy of identifying a driver's fatigue state.

[0006] In order to solve the above technical problems, the present invention provides a method for identifying a driver's fatigue state, comprising the steps of:

[0007] S1. Collect various driving operation data under different driver fatigue states;

[0008] S2, extracting information entropy features of driving operation data of various categories under different driver fatigue states;

[0009] S3, determining the key feature categories of driving behaviors that most affect the fatigue state based on the information entropy characteristics of all categories of driving operation data of all drivers in the fatigue state;

[0010] S4, according to the key feature categories of driving behavior, select the corresponding key features of driving behavior from the information entropy features of all categories of driving operation data under all drivers’ fatigue states to form a key feature set;

[0011] S5, constructing a fatigue driving detection model, and using the key feature set to train and test the fatigue driving detection model;

[0012] S6. Acquire driving operation data related to the key feature category of driving behavior in real time, extract corresponding key features of driving behavior, input the fatigue driving detection model generated in step S5, and obtain corresponding fatigue state detection results.

[0013] Furthermore, in step S2, the extracted information entropy features include approximate entropy and sample entropy.

[0014] Furthermore, the approximate entropy is calculated using the following steps:

[0015] 1) Obtain a dynamic time series of a type of driving operation data with a total of N sampling points {x(1), x(2), …x(N)};

[0016] 2) The current sampling point and the next m-1 sampling points are combined into an m-dimensional sampling point, and {x(1), x(2), ... x(N)} are reconstructed to obtain the reconstructed m-dimensional steering wheel angle dynamic time series {X(1), X(2), ... X(N);

[0017] 3)3) Calculate the distance d between any two m-dimensional data X(i) and X(j) in {X(1), X(2), …X(N) ij , the distance is defined as the maximum difference between the elements at the same position in any two m-dimensional data;

[0018] 4) Calculate the value that satisfies d ij The number of m-dimensional data B with the condition ≤ r i , r represents the distance scale factor, and calculates B i Ratio to (N-m+1) and B i Ratio to (Nm)

[0019] 5) According to as well as Calculate the approximate entropy ApEn(m,r,N) of the time series {x(1),x(2),…x(N)}. The approximate entropy is defined as the value in the range from 1 to (N-m+1). The ratio of the sum of (N-m+1) and the range from 1 to (Nm) The difference between the sum and the ratio of (Nm).

[0020] Furthermore, the sample entropy is calculated using the following steps:

[0021] 1) Calculate using the same steps as steps 1) to 4) for calculating the approximate entropy and When calculating sample entropy, and use and replace;

[0022] 2) Calculation The mean and

[0023] 3) Based on the mean and Calculate the sample entropy of the time series {x(1), x(2), …x(N)}. The sample entropy is defined as and difference.

[0024] Further, in step S3, the steps of determining the driving behavior key feature category that most affects the fatigue state are as follows:

[0025] 1) Assume that the mean values ​​of fatigue characteristics are equal under each fatigue state;

[0026] 2) Calculate the mean of the data characteristics under each fatigue state and the overall mean of all fatigue states;

[0027] 3) Calculate the inter-group variation SSB and intra-group variation SSW of different fatigue states based on the calculated data feature mean and overall mean as well as the number of samples under various fatigue states;

[0028] 4) Calculate the inter-group mean square error MSW and the intra-group mean square error MSB of different fatigue states according to the inter-group variation value SSB and the intra-group variation value SSW;

[0029] 5) Calculate the ratio F of the within-group mean square error MSB and the between-group mean square error MSW;

[0030] 6) Given a significance level, calculate the rejection region W that satisfies the assumption in step 1). If the rejection region holds, it means that the selected fatigue feature has a significant correlation with different fatigue states of the driver, and this type of fatigue feature is selected as the pending fatigue feature;

[0031] 7) Calculate the significance coefficient of the pending fatigue feature, and take the pending fatigue feature whose significance coefficient is greater than a preset value as the final key feature of the driving behavior.

[0032] Further, in step S1, different driver fatigue states include awake state, fatigue state and very fatigue state; multiple driving operation data include time series data of vehicle speed, steering wheel angle, throttle opening, lateral acceleration, longitudinal acceleration and yaw angular velocity;

[0033] In step S3, the key features of the driving behavior include yaw rate sample entropy, longitudinal acceleration sample entropy, throttle opening sample entropy, vehicle speed approximate entropy, yaw rate approximate entropy, and longitudinal acceleration approximate entropy.

[0034] Furthermore, in step S5, the constructed fatigue driving detection model adopts a random forest model as a basic model, and a sparrow search algorithm is introduced to optimize the training parameters of the random forest model.

[0035] Furthermore, the steps of the sparrow search algorithm include:

[0036] 1) Initialize parameters, set the initial population size of sparrows, the maximum number of optimizations and the dimension of the search space. Each sparrow individual is a vector representing the number of decision trees and the minimum number of leaves of the random forest model;

[0037] 2) Calculating the recognition accuracy of the random forest model on the training set as the fitness value;

[0038] 3) Update the positions of the discoverer, follower, and scout, and then recalculate the fitness value;

[0039] 4) If the maximum number of iterations is reached, the individual with the highest fitness is output as the final parameter setting, otherwise it switches to step 2);

[0040] 5) Output the best sparrow individual to update the parameters of the random forest model and end the algorithm optimization.

[0041] The present invention also provides a driver fatigue state recognition system, the key of which is: comprising a data acquisition module, an information entropy feature extraction module, a feature screening module, a data set generation module, a model generation module and an application module;

[0042] The data acquisition module, the information entropy feature extraction module, the feature screening module, the data set generation module, the model generation module and the application module are respectively used to execute steps S1 to S6 in the above-mentioned driver fatigue state identification method.

[0043] The present invention also provides a storage medium, the key of which is that: the storage medium stores a computer program, and the computer program is used to execute the above-mentioned driver fatigue state identification method.

[0044] The driver fatigue state recognition method, system and storage medium provided by the present invention first collect driving operation data of various categories under different driver fatigue states and extract corresponding information entropy features, so as to mine the nonlinear features of operation behavior to facilitate the recognition of driver fatigue state; then, the information entropy features of all driving operations are screened, and the information entropy features significantly related to fatigue state are retained to form a key feature set, so as to effectively remove redundant indicators of driving behavior features and improve the model response speed and classification performance; then, a random forest model (RF) is used as a basic model, and in the process of training the RF model using the key feature set, a sparrow search algorithm (SSA) is introduced to optimize the training parameters of the RF model to obtain a fatigue driving detection model. The random forest model overcomes the problem of overfitting that is easy to occur in traditional decision trees by randomly selecting features and samples, and has good robustness. The parallel search capability of the SSA algorithm significantly improves the efficiency of model parameter optimization. SSA balances the search strategy of exploration and development, effectively avoids the model from falling into local optimality under complex terrain conditions, and ensures the generalization ability of the model. The present invention can achieve a high accuracy in the recognition of driver fatigue state. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 is a flow chart of a method for identifying a driver's fatigue state provided by an embodiment of the present invention;

[0046] Figure 2 is an example diagram of the approximate entropy distribution of the vehicle yaw rate provided by an embodiment of the present invention;

[0047] Figure 3 is an example diagram of entropy distribution of vehicle yaw rate samples provided by an embodiment of the present invention;

[0048] Figure 4 is a flowchart of driving behavior entropy feature extraction provided by an embodiment of the present invention;

[0049] Figure 5 is a flow chart of a sparrow search algorithm provided by an embodiment of the present invention;

[0050] Figure 6 is a diagram of SSA-RF model recognition results provided by an embodiment of the present invention;

[0051] Figure 7 4 is a diagram showing comparison results of different models provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The following specifically illustrates the implementation mode of the present invention in conjunction with the accompanying drawings. The embodiments are provided for illustrative purposes only and cannot be understood as limiting the present invention. The accompanying drawings are provided for reference and illustration only and do not constitute a limitation on the scope of patent protection of the present invention, because many changes can be made to the present invention without departing from the spirit and scope of the present invention.

[0053] The method for identifying the driver's fatigue state provided by the embodiment of the present invention is as follows: Figure 1 As shown, the steps include:

[0054] S1. Collect various driving operation data under different driver fatigue states;

[0055] S2, extracting information entropy features of driving operation data of various categories under different driver fatigue states;

[0056] S3, determining the key feature categories of driving behaviors that most affect the fatigue state based on the information entropy characteristics of all categories of driving operation data of all drivers in the fatigue state;

[0057] S4, according to the key feature categories of driving behavior, select the corresponding key features of driving behavior from the information entropy features of all categories of driving operation data under all drivers’ fatigue states to form a key feature set;

[0058] S5, constructing a fatigue driving detection model, and using the key feature set to train and test the fatigue driving detection model;

[0059] S6. Acquire driving operation data related to the key feature category of driving behavior in real time, extract corresponding key features of driving behavior, input the fatigue driving detection model generated in step S5, and obtain corresponding fatigue state detection results.

[0060] The following describes each step in more detail.

[0061] (1) Step S1: Collecting driving operation data under various driving behaviors in various driver fatigue states

[0062] The experimental data collected sample data in a balanced manner in the states of wakefulness, fatigue, and very fatigue. To ensure the accuracy of the data, the time series data was carefully segmented into 1-minute units, and the consistency of the driving behavior and the driver's facial video was verified by a synchronous pulse signal. According to the driver's facial fatigue scoring standard, each data segment was scored as 1 (fatigue), 2 (very tired), and 3 (awake), and finally a fatigue driving dataset containing 259 samples was constructed. Among them, there are 159 awake samples, 70 fatigue samples, and 30 very tired samples. In view of the imbalance in the number of three-level fatigue samples, this example expanded 491 samples of each type, bringing the total number of samples to 750, providing a more robust and diverse data foundation for subsequent model training and verification.

[0063] In each fatigue state, there are multiple driving operation behaviors with time series characteristics, such as vehicle yaw rate, steering wheel angle, etc. The driving operation behaviors in this example include vehicle speed, steering wheel angle, throttle opening, lateral acceleration, longitudinal acceleration, and yaw rate.

[0064] (2) S2: Extracting information entropy features of various driving operation behaviors under each driver’s fatigue state

[0065] Driving behavior data has sequential and nonlinear characteristics. Mining the nonlinear characteristics of operating behavior is conducive to the identification of driver fatigue status.

[0066] Approximate entropy and sample entropy, as two key concepts in information entropy theory, have significant advantages in extracting the characteristics of driver's operation behavior under different states. These characteristics can not only reveal the inherent laws of driving behavior data, but also reflect the uncertainty and complexity in the data.

[0067] Approximate Entropy (ApEn) is specifically designed to measure the self-similarity of time series data and the regularity of its signal patterns. A lower ApEn value implies that the time series exhibits higher predictability and regularity, while a higher ApEn value reveals the complexity and unpredictability of the time series.

[0068] Sample Entropy (SampEn) is an advanced statistic designed to quantify the complexity and uncertainty of time series. It shares the goal of evaluating the self-similarity and regularity of time series with Approximate Entropy (ApEn), but Sample Entropy is more efficient in design and solves the problem of high sensitivity to parameters and high computational complexity of Approximate Entropy in the calculation process.

[0069] During driving, the complexity and changing patterns of time series data such as vehicle yaw rate and steering wheel angle can reflect the driver's fatigue state. By deeply analyzing the approximate entropy and sample entropy of these time series data, the complexity and regularity of driving operation behavior can be quantified. These quantitative indicators are used to gain insight into the driver's behavior patterns under different fatigue driving conditions.

[0070] Taking the steering wheel angle as an example, the steps for calculating the approximate entropy are as follows:

[0071] 1) Obtain the dynamic time series of steering wheel angles {x(1), x(2), …x(N)} with a total of N sampling points;

[0072] 2) The current sampling point and the next m-1 sampling points form an m-dimensional sampling point, and reconstruct {x(1), x(2), ... x(N)} to obtain the reconstructed m-dimensional steering wheel angle dynamic time series {X(1), X(2), ... X(N), where the i-th and j-th (i≠j) m-dimensional data are expressed as:

[0073] X(i)=[x(i),x(i+1),…,x(i+m-1)] (1)

[0074] X(j)=[x(j),x(j+1),…,x(j+m-1)] (2)

[0075] 3) Calculate the distance between any two m-dimensional data in {X(1), X(2), …X(N). The distance is defined as the maximum difference between the elements at the same position in any two m-dimensional data. Take two m-dimensional data X(i) and X(j) as an example. The distance d between X(i) and X(j) is ij It is expressed as:

[0076] d ij =d[X(i),X(j)]=max|x(i+k)-x(j+k)| (3)

[0077] Among them, k∈[0,m-1].

[0078] 4) Calculate the value that satisfies d ij The number of m-dimensional data (j) with the condition ≤ r B i , r represents the distance scale factor, usually r = 0.2 × SD (SD represents the standard deviation of the steering wheel angle time series), and calculate B i Ratio to (N-m+1) and B i Ratio to (Nm)

[0079] 5) According to as well as Calculate the approximate entropy ApEn(m,r,N) of the time series {x(1),x(2),…x(N)}. The approximate entropy is defined as the value in the range from 1 to (N-m+1). The ratio of the sum of (N-m+1) and the range from 1 to (Nm) The difference between the sum and the ratio of (Nm) is expressed as:

[0080]

[0081] Taking the steering wheel angle as an example, the sample entropy calculation steps are as follows:

[0082] 1) Calculate using the same steps as steps 1) to 4) for calculating the approximate entropy and When calculating sample entropy, and use and replace;

[0083] 2) Calculation The mean and

[0084]

[0085] 3) Based on the mean and Calculate the sample entropy SampEn(m,r,N) of the time series {x(1),x(2),…x(N)}. The sample entropy is defined as and The difference is:

[0086]

[0087] By deeply analyzing the approximate entropy and sample entropy of these time series data, the complexity and regularity of driving behavior can be quantified. These quantitative indicators are used to gain insight into the behavior patterns of drivers under different states.

[0088] Taking the vehicle yaw rate as an example, the approximate entropy and sample entropy distribution of the vehicle yaw angle under different driver fatigue states are extracted as follows: Figure 2 and Figure 3 As shown. Figure 2 It can be seen that the approximate entropy of the vehicle yaw angle has different distribution characteristics when the driver is in different states, which provides an important basis for exploring the fatigue characteristics of the vehicle yaw angle. Figure 3 It can be seen that the entropy of vehicle yaw angle samples under different driver conditions is very different. Figure 2 and Figure 3From the distribution phenomenon, we can see that the approximate entropy and sample entropy of driving operation behavior can fully reflect the driver's operating characteristics under different states.

[0089] Therefore, in this embodiment, the extracted driving behavior features are as follows: Figure 4 As shown in Figure 2, the approximate entropy and sample entropy features of the driver in different states were extracted for the M = 6 main driving operation behaviors with time series characteristics, namely, vehicle speed, steering wheel angle, throttle opening, lateral acceleration, longitudinal acceleration, and yaw rate.

[0090] (3) Step S3: Optimal fatigue characteristics screening

[0091] In order to effectively remove redundant indicators of driving behavior characteristics and improve the model response speed and classification performance, this step screens the approximate entropy and sample entropy characteristics of various driving operation behaviors. The influencing factor levels are the three states of driver alertness, fatigue and extreme fatigue, and the response variable is a single driving behavior entropy feature.

[0092] The steps to determine the key characteristics of driving behavior that most influence fatigue status are as follows:

[0093] 1) Assume that the mean values ​​of fatigue characteristics are equal under different fatigue states:

[0094] H0:μ1=μ2=μ3=μ (8)

[0095] Among them, μ1, μ2, and μ3 represent the feature means under the awake, tired, and very tired states, respectively, and μ represents the feature mean under all tired states.

[0096] 2) The data features in the awake, tired and very tired states are represented as Z0, Z1 and Z2. The mean of the data features and the overall mean of the three states are calculated and represented as and

[0097] 3) According to the data characteristic means and overall means of the three fatigue states and the number of samples under various fatigue states, the inter-group variation SSB and intra-group variation SSW of different fatigue states are calculated:

[0098]

[0099] Among them, n0, n1 and n2 represent the number of samples of awake, tired and very tired, respectively, and Z 0o Indicates the oth sample feature of the awake state, Z 1p The pth sample feature representing the fatigue state, Z 2q The qth sample feature represents a very fatigued state.

[0100] 4) According to the inter-group variation value SSB and the intra-group variation value SSW, calculate the inter-group mean square error MSW and the intra-group mean square error MSB of different fatigue states:

[0101]

[0102] Among them, f w is the within-group degrees of freedom, f b is the degree of freedom between groups, and n is the number of samples of all fatigue characteristics.

[0103] 5) Calculate the ratio F of the within-group mean square error MSB and the between-group mean square error MSW.

[0104] 6) Given a significance level of α = 0.05, calculate the rejection region W of H0:

[0105] W={F≥F α (f w ,f b )} (13)

[0106] Among them, F α (f w ,f b ) means that when α = 0.05 and the degree of freedom within the group is f w and the degrees of freedom between groups is f b If the rejection region is established, it means that the selected fatigue feature has a significant correlation with different fatigue states of the driver, and the fatigue feature is selected as the pending fatigue feature.

[0107] 7) Search the F distribution table according to the F value and the degrees of freedom within and between groups to obtain the corresponding significance coefficient P value, and take the pending fatigue feature with a P value greater than the preset value as the final key feature of driving behavior.

[0108] After the samples given in step S1 are screened as above, combined with the two key indicators of F value and significance coefficient P value (P<0.05), the optimal fatigue characteristic parameter set determined in this example is shown in Table 1, including six key characteristics of driving behavior: yaw rate sample entropy, longitudinal acceleration sample entropy, throttle opening sample entropy, vehicle speed approximate entropy, yaw rate approximate entropy, and longitudinal acceleration approximate entropy.

[0109] Table 1

[0110]

[0111] (4) Step S4: Constructing a dataset

[0112] Among the information entropy features of all categories of driving operation data under all drivers' fatigue states, six key features of driving behaviors, namely yaw rate sample entropy, longitudinal acceleration sample entropy, throttle opening sample entropy, vehicle speed approximate entropy, yaw rate approximate entropy and longitudinal acceleration approximate entropy, were screened out to form a key feature set and normalized. The key feature set was divided into a training set and a test set in a ratio of 8:2 for training and testing the fatigue driving detection model.

[0113] (5) Build a fatigue driving detection model and conduct training and testing

[0114] The fatigue driving detection model constructed in this example uses the random forest model (RF) as the basic model. At the same time, in order to improve the parameter selection efficiency and detection accuracy of the RF model, the sparrow search algorithm (SSA) is introduced to optimize the training parameters of the RF model. This example is called the RF-SSA model. First, the parallel search capability of the SSA algorithm significantly improves the efficiency of model parameter optimization; second, SSA balances the search strategy of exploration and development, effectively avoiding the model from falling into the local optimum under complex terrain conditions, and ensuring the generalization ability of the model; finally, the simplicity of SSA not only simplifies the implementation process of the algorithm, but also improves the flexibility of model adjustment, which is very beneficial for rapid deployment in fatigue driving recognition systems.

[0115] The Random Forest (RF) model is an integrated learning algorithm that combines decision tree theory and random subspace. By randomly selecting features and samples, it overcomes the problem of overfitting in traditional decision trees, has good robustness, and has good results in the field of multidimensional data classification. The specific implementation steps of the Random Forest model are as follows:

[0116] 1) For the existing fatigue driving feature dataset D, a random sampling technique with replacement is used to select N samples from the training dataset, where N is the number of samples in the training dataset, so that the training data of each decision tree is different.

[0117] 2) During each decision tree node split, a subset is randomly selected, the size of which is the number of input features. For the selected fatigue feature subset, calculate the purity of the child nodes after splitting. In this example, the Gini coefficient is used as a measure of purity. Gini coefficient calculation formula:

[0118]

[0119] Among them, p i is the proportion of samples in the i-th category, and c is the number of categories.

[0120] 3) Select the feature with the smallest Gini coefficient at this node as the optimal feature and the best splitting point, and then allocate the optimal fatigue feature parameters to the two child nodes.

[0121] 4) Recursively repeat the random selection of fatigue features and node splitting for each new node until the minimum number of samples in the leaf node is reached, and stop splitting.

[0122] 5) Each decision tree gives a driver status category to the output samples, and select the status with the most occurrences as the final status output.

[0123] The implementation process of the sparrow search algorithm is mainly divided into three stages: the position update of discoverers, followers, and scouters. The principle is as follows:

[0124] 1) Position update of discoverers

[0125] The position update formula of discoverers is as follows:

[0126]

[0127] Among them, is the information of the i-th sparrow in the j-th dimension, t is the number of optimization times; T max is the maximum number of optimization times; R2 and ST are the early warning value and the safety value respectively. When R2 < ST, it means that the discoverer can conduct a large-scale search. When R2 ≥ ST, it means that the scouter discovers danger and narrows the search range. Here, α ∈ [0, 1] represents a random number, and Q represents a random number obeying the standard normal distribution.

[0128] 2) Position update of followers

[0129] Except for the discoverers, the remaining sparrows are followers, and their positions are updated according to the following formula:

[0130]

[0131] In the formula, and are the sparrows with the best and worst positions in the population respectively; when i > n / 2, it means that the i-th joiner with lower fitness has not obtained food and has low fitness, so it updates its position to forage; otherwise, it forages randomly nearby. n represents the population size, L represents a matrix of size 1×d with all elements being 1, and d represents the dimension.

[0132] 3) Position update of scouters

[0133] The position update formula for the sparrows with scouting early warnings is:

[0134]

[0135] Among them, β is the step size control parameter, K is a random number between [-1,1]; is a smaller number to prevent the denominator from being 0; f g and f worst is the optimal and worst fitness value of the sparrow population, f i is the fitness value of the i-th sparrow population; represents the global optimal position, represents the global worst position. i >f g When the sparrow is in a dangerous position; when f i =f g At this time, the sparrows in the middle of the population began to move towards a safe position.

[0136] The SSA algorithm flow chart is as follows Figure 5 As shown, the steps are as follows:

[0137] 1) Initialize the parameters, set the initial population size of sparrows, the maximum number of optimizations, and the dimension of the search space. Each sparrow individual is a vector, representing the number of decision trees and the minimum number of leaves of the RF model.

[0138] 2) The recognition accuracy of the RF model on the training set is used as the fitness value. The higher the accuracy, the better the position of the sparrow population.

[0139] 3) Update the positions of the discoverer, follower, and scout according to formulas (15), (16), and (17), and then recalculate the fitness value so that the sparrow can gradually find the optimal position.

[0140] 4) If the maximum number of iterations is reached, the individual with the highest fitness is output as the final parameter setting, otherwise it switches to step 2).

[0141] 5) Output the best sparrow individual, update the parameters of the RF model, and end the algorithm optimization.

[0142] SSA helps control the complexity of the RF model, reduces the risk of overfitting, and improves the response speed and recognition accuracy of the model in complex terrain road driving by adaptively adjusting the number of decision trees and the minimum number of leaves of the RF model.

[0143] In the sparrow search algorithm, the design of the fitness function not only guides the direction of the algorithm search, but also is directly related to the evaluation of the model performance. In this embodiment, the accuracy of predicting the fatigue state on the training set is used as the core criterion of the fitness function. Specifically, the fitness function is defined as the difference between the prediction accuracy on the training set and 1. This design ensures that the algorithm always pursues the maximization of the prediction accuracy of the model during the optimization process. The fitness value calculation formula is as follows:

[0144]

[0145] Among them, P true represents the number of samples accurately classified in the training set, T sum Represents the total number of samples in the training set. The prediction accuracy is obtained by applying the RF model under the current parameter settings to the training set and evaluating the consistency between the model output and the actual fatigue state. The smaller the fitness value, the higher the prediction accuracy and the better the model performance.

[0146] In each iteration of SSA, each sparrow represents a set of parameters of the RF model. By calculating the fitness value corresponding to each set of parameters, SSA can identify the optimal or near-optimal parameter combination. When the algorithm reaches the preset maximum number of optimization times, the parameter group with the minimum fitness value will be selected and applied to the RF model to obtain the best prediction performance. Finally, the parameter settings of the SSA-RF model are shown in Table 2.

[0147] Table 2 SSA-RF model parameter settings

[0148]

[0149] The recognition results of the SSA-RF model for driver fatigue status are as follows: Figure 6 As shown. Figure 6 It can be seen that the SSA-RF model provided by the present invention achieves an accuracy rate of about 92.7%.

[0150] The comparison of the recognition accuracy of the SSA-RF model and the RF model for the driver’s fatigue status is shown in Table 3.

[0151] Table 3

[0152]

[0153] As shown in Table 3, the SSA-RF model has an accuracy rate of 86.0% for awake state, 92.0% for fatigue state, 100% for very fatigue state, and an overall percentage of 92.7%. Compared with the RF model, the overall recognition accuracy rate is improved by 8.7%.

[0154] This example introduces three evaluation indicators, namely recall rate (Recall, R), false negative rate (Condition Positive, CP) and F1 score (F1-Score, F1), to conduct a more comprehensive comprehensive evaluation of the SSA-RF model. In order to comprehensively evaluate the performance of the SSA-RF model and establish its superior performance in fatigue driving detection, the SSA-RF model is comprehensively compared with several other mainstream machine learning models. The models selected for comparison include the decision tree model optimized by the whale algorithm (WOA-CART), the support vector machine model optimized by the ant colony algorithm (ACO-SVM) model, and the back propagation network optimized by the particle swarm (PSO-BP). The experimental results of each model are shown in Table 4, and are analyzed through Figure 7 The comparison results are presented intuitively.

[0155] Table 4 Comparative experiments of different models

[0156]

[0157] Comprehensively comparing the evaluation indicators of each model, the SSA-RF model has shown excellent performance in key performance indicators such as recognition accuracy, recall rate, false negative rate and F1 score of driver fatigue status. Among them, the SSA-RF model has an accuracy rate of 92.7%, a recall rate of 92.8%, a false negative rate as low as 7.2%, and an F1 score of 92.6%, showing its comprehensive performance advantage in fatigue driving detection.

[0158] (6) Step S6: Practical Application

[0159] After completing the training and testing of the model, in the actual application of the model, it is only necessary to obtain in real time the driving operation data (yaw rate sample entropy, longitudinal acceleration sample entropy, throttle opening sample entropy, vehicle speed approximate entropy, yaw rate approximate entropy, longitudinal acceleration approximate entropy) related to the six key features of driving behavior (yaw rate time series data, longitudinal acceleration time series data, vehicle speed time series data, throttle opening time series data), extract the corresponding six key features of driving behavior, and input them into the fatigue driving detection model to obtain the corresponding fatigue state detection result.

[0160] Based on the above-mentioned driver fatigue state recognition method, an embodiment of the present invention also provides a driver fatigue state recognition system, which includes a data acquisition module, an information entropy feature extraction module, a feature screening module, a data set generation module, a model generation module and an application module;

[0161] The data acquisition module, the information entropy feature extraction module, the feature screening module, the data set generation module, the model generation module and the application module are respectively used to execute steps S1 to S6 in the above-mentioned driver fatigue state identification method.

[0162] An embodiment of the present invention further provides a storage medium storing a computer program for executing the above-mentioned driver fatigue state identification method.

[0163] In summary, the driver fatigue state recognition method, system and storage medium provided by the embodiments of the present invention first collect driving operation data of various categories under different driver fatigue states and extract corresponding information entropy features, so as to mine the nonlinear characteristics of the operation behavior to facilitate the recognition of the driver fatigue state; then, the information entropy features of all driving operations are screened, and the information entropy features significantly related to the fatigue state are retained to form a key feature set, so as to effectively remove redundant indicators of driving behavior features and improve the model response speed and classification performance; then, a random forest model (RF) is used as a basic model, and in the process of training the RF model using the key feature set, a sparrow search algorithm (SSA) is introduced to optimize the training parameters of the RF model to obtain a fatigue driving detection model. The random forest model overcomes the problem of overfitting that traditional decision trees are prone to by randomly selecting features and samples, and has good robustness. The parallel search capability of the SSA algorithm significantly improves the efficiency of model parameter optimization. SSA balances the search strategy of exploration and development, effectively avoids the model from falling into local optimality under complex terrain conditions, and ensures the generalization ability of the model. After testing with real vehicle data, the model's recognition accuracy for the driver's three-level fatigue state reached 92.7%, an 8.7% improvement over the unoptimized RF model. Comparative experiments with other machine models show that the SSA-RF model has excellent performance in various key evaluation indicators, fully demonstrating the comprehensive performance advantages of the SSA-RF model in fatigue driving detection.

[0164] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.

Claims

1. A method for identifying a driver's fatigue state, characterized in that: Includes steps: S1. Collect various driving operation data under different driver fatigue states; S2, extracting information entropy features of driving operation data of various categories under different driver fatigue states; S3, determining the key feature categories of driving behaviors that most affect the fatigue state based on the information entropy characteristics of all categories of driving operation data of all drivers in the fatigue state; S4, according to the key feature categories of driving behavior, select the corresponding key features of driving behavior from the information entropy features of all categories of driving operation data under all drivers’ fatigue states to form a key feature set; S5, constructing a fatigue driving detection model, and using the key feature set to train and test the fatigue driving detection model; S6. Acquire driving operation data related to the key feature category of driving behavior in real time, extract corresponding key features of driving behavior, input the fatigue driving detection model generated in step S5, and obtain corresponding fatigue state detection results.

2. The method for identifying driver fatigue state according to claim 1, characterized in that: In step S2, the extracted information entropy features include approximate entropy and sample entropy.

3. The method for identifying driver fatigue state according to claim 2, characterized in that: The approximate entropy is calculated using the following steps: 1) Obtain a dynamic time series of a type of driving operation data with a total of N sampling points {x(1), x(2), …x(N)}; 2) The current sampling point and the next m-1 sampling points are combined into an m-dimensional sampling point, and {x(1), x(2), ... x(N)} are reconstructed to obtain the reconstructed m-dimensional steering wheel angle dynamic time series {X(1), X(2), ... X(N); 3) Calculate the distance d between any two m-dimensional data X(i) and X(j) in {X(1), X(2), …X(N) ij , the distance is defined as the maximum difference between the elements at the same position in any two m-dimensional data; 4) Calculate the value that satisfies d ij The number of m-dimensional data B with the condition ≤ r i , r represents the distance scale factor, and calculates B i Ratio to (N-m+1) and B i Ratio to (Nm) 5) According to as well as Calculate the approximate entropy ApEn(m,r,N) of the time series {x(1),x(2),…x(N)}. The approximate entropy is defined as the value in the range from 1 to (N-m+1). The ratio of the sum of (N-m+1) and the range from 1 to (Nm) The difference between the sum and the ratio of (Nm).

4. The method for identifying driver fatigue state according to claim 3, characterized in that: The sample entropy is calculated using the following steps: 1) Calculate using the same steps as steps 1) to 4) for calculating the approximate entropy and When calculating sample entropy, and use and replace; 2) Calculation The mean and 3) Based on the mean and Calculate the sample entropy of the time series {x(1), x(2), …x(N)}. The sample entropy is defined as and difference.

5. The method for identifying driver fatigue state according to claim 1, characterized in that: In step S3, the steps of determining the key feature categories of driving behavior that most affect the fatigue state are as follows: 1) Assume that the mean values ​​of fatigue characteristics are equal under each fatigue state; 2) Calculate the mean of the data characteristics under each fatigue state and the overall mean of all fatigue states; 3) Calculate the inter-group variation SSB and intra-group variation SSW of different fatigue states based on the calculated data feature mean and overall mean as well as the number of samples under various fatigue states; 4) Calculate the inter-group mean square error MSW and the intra-group mean square error MSB of different fatigue states according to the inter-group variation value SSB and the intra-group variation value SSW; 5) Calculate the ratio F of the within-group mean square error MSB and the between-group mean square error MSW; 6) Given a significance level, calculate the rejection region W that satisfies the assumption in step 1). If the rejection region holds, it means that the selected fatigue feature has a significant correlation with different fatigue states of the driver, and this type of fatigue feature is selected as the pending fatigue feature; 7) Calculate the significance coefficient of the pending fatigue feature, and take the pending fatigue feature whose significance coefficient is greater than a preset value as the final key feature of the driving behavior.

6. The method for identifying driver fatigue state according to claim 5, characterized in that: In step S1, different driver fatigue states include awake state, fatigue state and very fatigue state; multiple driving operation data include time series data of vehicle speed, steering wheel angle, throttle opening, lateral acceleration, longitudinal acceleration and yaw angular velocity; In step S3, the key features of the driving behavior include yaw rate sample entropy, longitudinal acceleration sample entropy, throttle opening sample entropy, vehicle speed approximate entropy, yaw rate approximate entropy, and longitudinal acceleration approximate entropy.

7. The method for identifying driver fatigue state according to claim 1, characterized in that: In step S5, the constructed fatigue driving detection model adopts the random forest model as the basic model, and introduces the sparrow search algorithm to optimize the training parameters of the random forest model.

8. The method for identifying driver fatigue state according to claim 7, characterized in that: The steps of the sparrow search algorithm include: 1) Initialize parameters, set the initial population size of sparrows, the maximum number of optimizations and the dimension of the search space, and each individual sparrow is a vector representing the number of decision trees and the minimum number of leaves of the random forest model; 2) Calculating the recognition accuracy of the random forest model on the training set as the fitness value; 3) Update the positions of the discoverer, follower, and scout, and then recalculate the fitness value; 4) If the maximum number of iterations is reached, the individual with the highest fitness is output as the final parameter setting, otherwise it switches to step 2); 5) Output the best sparrow individual to update the parameters of the random forest model and end the algorithm optimization.

9. Driver fatigue state recognition system, characterized by: It includes data acquisition module, information entropy feature extraction module, feature screening module, data set generation module, model generation module and application module; The data acquisition module, the information entropy feature extraction module, the feature screening module, the data set generation module, the model generation module and the application module are respectively used to execute steps S1 to S6 in the driver fatigue state identification method described in any one of claims 1 to 8.

10. A storage medium, characterized in that: It stores a computer program, which is used to execute the driver fatigue state identification method described in any one of claims 1 to 8.

Citation Information

Cited By

  • Fatigue intervention method, system, equipment, medium and product

    CN119818800A