A driver state recognition method, device, electronic device and storage medium

By combining the label type and input format of the target model, and using the test data set for score comparison, the cumbersome and inconsistency of driver status recognition model verification is solved, automated and standardized verification is achieved, and the accuracy and efficiency of driver status recognition is improved.

CN120086745BActive Publication Date: 2025-07-29WUHAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510566801.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-29
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The existing driver status recognition model verification methods are cumbersome and error-prone, lack of consistency evaluation standards, making it difficult to achieve comprehensive and standardized verification.

Method used

By determining the optimal comparison model based on the label type and input format of the target model, combining the dynamic performance indicators of the historical driver status identification model, using the test data set for score comparison, and calculating the score based on the preset evaluation dimensions to achieve automated and standardized model verification.

Benefits of technology

It improves the accuracy and efficiency of driver status recognition, ensures the automation and standardization of model verification, reduces human errors, and improves the accuracy and efficiency of model recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086745B_ABST
    Figure CN120086745B_ABST
Patent Text Reader

Abstract

The present application discloses a driver state recognition method, device, electronic device and storage medium, belonging to the technical field of driver state recognition. The method includes: determining the label type of the target model according to the target model task description, and determining the optimal comparison model according to the label type of the target model and the input format in combination with the dynamic performance index of the historical driver state recognition model; inputting the test data set into the target model and the optimal comparison model, and outputting the first recognition result and the second recognition result; scoring the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and scoring the optimal comparison model based on the second recognition result to obtain the second score; verifying the target model according to the first score and the second score, and recognizing the driver state based on the target model. The present invention realizes the automatic, efficient and standardized evaluation and verification of the target model, and improves the accuracy and efficiency of driver state recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of driver state recognition, and particularly to a driver state recognition method, device, electronic device, and storage medium. Background Art

[0002] With the continuous in-depth research on driver state recognition, more and more models and methods have been proposed for identifying and monitoring various states of drivers, such as emotions, fatigue, attention concentration, cognitive load, etc. These models usually rely on various sensor data (such as vision, sound, physiological signals, etc.) and apply advanced technologies such as machine learning and deep learning. At the present stage, model innovations emerge in an endless stream, and it is necessary to verify new models and evaluate their comprehensive effects.

[0003] Traditional methods for verifying driver state recognition models usually require comparing the performance of the newly proposed model with all historical models one by one. This process usually requires manual configuration of test parameters, selection of appropriate data sets, etc. The steps are cumbersome and complex, and human errors are likely to occur. For example, different data sets may require specific preprocessing methods, and the evaluation criteria may also vary depending on the task. Completing these tasks manually not only consumes a lot of time but is also prone to errors. In addition, due to the lack of consistent evaluation criteria and frameworks, it is difficult to conduct comprehensive and standardized verification of models. For the comparison of different models, it may be necessary to repeatedly test and record a large amount of data, further increasing the complexity of the verification process.

[0004] Therefore, there is an urgent need for a driver state recognition method that selects the optimal model according to the test data set and historical test results to compare scores with the new model to be tested, realizes automated, efficient, and standardized evaluation and verification of the new model, and thus obtains the optimal model to recognize the driver state, improving the accuracy and efficiency of driver state recognition. Summary of the Invention

[0005] In view of this, it is necessary to provide a driver state recognition method, device, electronic device, and storage medium that select the optimal model according to the test data set and historical test results to compare scores with the target model, realizing automated, efficient, and standardized evaluation and verification of the target model, and improving the accuracy and efficiency of driver state recognition.

[0006] To solve the above technical problems, on the one hand, the present invention provides a driver state recognition method, including:

[0007] Determine the label type of the target model according to the target model task description, and determine the optimal comparison model in combination with the dynamic performance indicators of the historical driver state recognition model according to the label type of the target model and the target model input format. The target model is a driver state recognition model;

[0008] Input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively;

[0009] Score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain the second score;

[0010] Verify the target model according to the first score and the second score. After the verification passes, recognize the driver's state based on the target model.

[0011] In a possible implementation manner, determining the optimal comparison model according to the label type of the target model and the target model input format in combination with the dynamic performance indicators of the historical driver state recognition model includes:<S

[0012] Construct a platform model library according to the label type of the historical driver state recognition model and its model input format in combination with the dynamic performance indicators of each historical driver state recognition model;

[0013] Based on the platform model library, match the optimal comparison model according to the label type of the target model and the target model input format.

[0014] In a possible implementation manner, constructing a platform model library according to the label type of the historical driver state recognition model and its model input format in combination with the dynamic performance indicators of each historical driver state recognition model includes:

[0015] Determine the label type of the historical driver state recognition model according to the labels of the input test data set with good performance in the historical test feedback results and / or the historical evaluation and verification feedback results and the task description of the historical driver state recognition model;

[0016] Determine the mapping relationship between the label type and the model according to the label type of the historical driver state recognition model, and generate the first mapping relationship;

[0017] Determine the mapping relationship between the model input format and the model according to the data format of the input data of the historical driver state recognition model, and generate the second mapping relationship;

[0018] Real-time update the dynamic performance indicators of each model according to the historical performance indicators of the historical driver state recognition model, and add or modify performance indicator labels for each historical driver state recognition model to generate a platform label model;

[0019] Construct a platform model library according to the first mapping relationship, the second mapping relationship and each platform label model.

[0020] In a possible implementation, matching the optimal comparison model according to the label type and input format of the target model includes:

[0021] Matching the platform label model according to the label type and model input format of the target model, and screening out at least one first matching model;

[0022] Screening out the optimal comparison model according to the dynamic performance indicators of the first matching model.

[0023] In a possible implementation, the preset evaluation dimensions include basic performance, robustness, fittingness, and interpretability; scoring the target model based on the preset evaluation dimensions and the first recognition result to obtain the first score, including:

[0024] Calculating the basic performance indicators of the target model according to the first recognition result;

[0025] Determining the robustness index, fittingness index, and interpretability index of the target model;

[0026] Determining the weight coefficients of each test data in the test data set according to the importance of the test data set, and generating the first weight coefficient;

[0027] Determining the allocation weight coefficients of the basic performance and each evaluation dimension according to the task description of the target model, and generating the second weight coefficient;

[0028] Based on the first weight coefficient and the second weight coefficient, calculating the scoring value of the target model according to the performance indicators of each evaluation dimension of the test data set and the target model, and generating the first score.

[0029] In a possible implementation, calculating the basic performance indicators of the target model according to the first recognition result includes:

[0030] Calculating the first basic performance indicators of the target model according to the first recognition result, where the first basic performance indicators include accuracy, precision, recall, F1 score, AUC-ROC, and AUC-PR;

[0031] Analyzing the balance of the first basic performance indicators, and calculating the balance score of the target model;

[0032] Calculating the cross-validation score of the target model based on cross-validation;

[0033] Based on the preset basic performance weight coefficient, calculating the basic performance indicators of the target model according to the first basic performance indicators, balance score, and cross-validation score.

[0034] In a possible implementation, validating the target model according to the first score and the second score includes:

[0035] When the first score is greater than the second score, the target model is successfully verified. The first score is used as the dynamic performance index of the target model, and the target model is added to the platform model library;

[0036] When the first score is less than or equal to the second score, the verification of the target model fails. The target model is adjusted and optimized, and the optimized model is re-evaluated and verified.

[0037] In a second aspect, the present invention also provides a driver state recognition device, including:

[0038] An optimal comparison model screening module, configured to determine the label type of the target model according to the target model task description, and determine the optimal comparison model according to the label type of the target model and the target model input format in combination with the dynamic performance index of the historical driver state recognition model, where the target model is a driver state recognition model;

[0039] A pattern recognition module, configured to input a test data set into the target model and the optimal comparison model respectively, and output a first recognition result and a second recognition result respectively;

[0040] A scoring module, configured to score the target model based on a preset evaluation dimension and the first recognition result to obtain a first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain a second score;

[0041] An evaluation and verification module, configured to perform optimization verification on the target model according to the first score and the second score. After the verification is passed, the driver state is recognized based on the target model.

[0042] In a third aspect, the present invention also provides an electronic device, including a memory and a processor. The memory is used to store programs and data; the processor is coupled to the memory and is configured to execute the programs stored in the memory to implement the driver state recognition method as described above, and / or implement the driver state recognition as described above.

[0043] In a fourth aspect, the present invention also provides a computer storage medium for storing computer-readable programs or instructions. When the programs or instructions are executed by a processor, the driver state recognition method as described above can be implemented.

[0044] The beneficial effects of the present invention are as follows: First, determine the label type of the target model according to the target model task description, and determine the optimal comparison model based on the label type of the target model and the target model input format in combination with the dynamic performance indicators of the historical driver state recognition model; then, input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively; then, score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain the second score; finally, optimize and verify the target model according to the first score and the second score. After the verification is passed, recognize the driver state based on the target model. The present invention screens out the optimal comparison model according to the label type of the target model and the model input format in combination with the dynamic performance indicators of the historical driver state recognition model, calculates the performance indicators of each dimension of the output of the optimal comparison model and the output of the target model respectively, analyzes and obtains the comprehensive score, and evaluates and verifies the target model according to the comprehensive scores of the optimal comparison model and the target model. Use the finally verified target model to recognize the driver state. By selecting the optimal model through the test data set and historical test results for scoring comparison with the target model, the evaluation and verification of the new model are realized automatically, efficiently and standardly, so as to obtain the optimal model to recognize the driver state, improving the accuracy and efficiency of driver state recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can also be obtained according to these drawings.

[0046] Figure 1 It is a schematic flowchart of an embodiment of the driver state recognition method provided by the present invention;

[0047] Figure 2 For the present invention Figure 1 It is a schematic flowchart of an embodiment of step S101 in the present invention;

[0048] Figure 3 For the present invention Figure 2 It is a schematic flowchart of an embodiment of step S201 in the present invention;

[0049] Figure 4 For the present invention Figure 2 It is a schematic flowchart of an embodiment of step S202 in the present invention;

[0050] Figure 5 For the present invention Figure 1Flow diagram of an embodiment of step S102;

[0051] Figure 6 This invention Figure 5 Flow diagram of an embodiment of step S501 in this invention;

[0052] Figure 7 This invention Figure 1 Flow diagram of an embodiment of step S104 in this invention;

[0053] Figure 8 Schematic structural diagram of an embodiment of the driver state recognition device provided by this invention;

[0054] Figure 9 Schematic structural diagram of an embodiment of the driver state recognition electronic device provided by this invention;

[0055] Figure 10 Schematic diagram of an embodiment of the overall process of each module in the driver state recognition electronic device provided by this invention. Detailed implementation manners

[0056] Next, the technical solutions in the embodiments of this invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this invention. Obviously, the described embodiments are only a part of the embodiments of this invention, rather than all of the embodiments. Based on the embodiments in this invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of this invention.

[0057] In the description of the embodiments of this invention, unless otherwise specified, the meaning of "a plurality of" is two or more.

[0058] The descriptions such as "first" and "second" involved in the embodiments of this invention are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Therefore, the technical features defined with "first" and "second" may explicitly or implicitly include at least one of such features.

[0059] Referring to "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of this invention. The appearance of this phrase at various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0060] This invention provides a driver state recognition method, device, electronic device and storage medium, which will be described separately below.

[0061] Figure 1 The flowchart of an embodiment of the driver state recognition method provided by the present invention is shown as Figure 1 follows. The driver state recognition method includes:

[0062] S101. Determine the label type of the target model according to the target model task description, and determine the optimal comparison model according to the label type of the target model and the target model input format in combination with the dynamic performance index of the historical driver state recognition model. The target model is the driver state recognition model;

[0063] S102. Input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively;

[0064] S103. Score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain the second score;

[0065] S104. Verify the target model according to the first score and the second score. After the verification passes, recognize the driver state based on the target model.

[0066] It should be noted that in this embodiment, the test data set includes two types of data, open-source data and proprietary data. The open-source data is the relevant data obtained through the driver monitoring system DMS or other driver detection devices for face, emotion, and behavior analysis. The proprietary data is the driver's facial expression data, posture data, eye movement data, electroencephalogram data, physiological signal data, etc. collected through the mobile terminal. The test data collected is effectively integrated, integrated, and processed through the database on the mobile terminal and then stored in the database; through the model storage tool on the mobile terminal, the historical driver state recognition models are stored using the Hadoop HDFS distributed file system, a reasonable directory structure is designed, and all historical driver state recognition models are classified and stored according to dimensions such as the input type and format of the model and the task type. A unified model call interface is used to implement the screening and call of the historical driver state recognition models; the models and their output results are evaluated through various model evaluation tools and data analysis tools on the mobile terminal; finally, the data analysis tool analyzes the scores of the models and displays the evaluation and verification results on the mobile terminal. Among them, the mobile terminal can be various electronic devices with a display screen and supporting data analysis, storage, and model classification storage, including but not limited to smartphones, tablets, laptop computers, and desktop computers, etc. The driver state recognition method provided by this embodiment can be implemented by installing an application program, applet, or web page on the mobile terminal.

[0067] Further, it should be noted that data related to face, emotion, and behavior analysis collected from the driver monitoring system DMS or other driver detection devices, as well as data including driver facial expression data, posture data, eye movement data, electroencephalogram data, physiological signal data, etc. collected within the research group or team, are defined in a unified data format, such as image format, video format, and text format, etc. After classifying and converting the obtained data into a unified format, a test database is constructed, and the DVC tool is used to manage the versions of each dataset in the test database to ensure that the data version can be clearly recorded after each data update. For the self-owned datasets with sensitive storage, encryption protection is required. For large-scale open-source datasets and non-sensitive data, fast data sharing and distribution are supported. A unified label standard, such as emotion, fatigue state, etc., is defined, and different types of labels are integrated.

[0068] Specifically, determine the label type of the target model according to the task description and task type of the target model, such as emotional state, fatigue level, attention concentration level, etc. Screen out the corresponding models from all historical driver state recognition models according to the label type, and further screen the matched models according to the format of the input data of the target model. At the same time, add a dynamic performance index to each historical driver state recognition model during the historical test and verification process. These indexes can be dynamically adjusted according to the update of the model and the adjustment of parameters. After screening by the label type and model input format, select an optimal comparison model according to the dynamic performance index of the model; then, evaluate and score the optimal comparison model and the target model respectively using the same evaluation criteria, evaluate and verify the target model according to the score of the optimal comparison model and the score of the target model. Finally, use the target model that passes the verification to identify the driver's state, and optimize and adjust the target model that fails the verification and then re-evaluate and verify it.

[0069] In this embodiment, the optimal comparison model is selected according to the label type and model input format of the target model in combination with the dynamic performance index of the historical driver state recognition model. Calculate the performance indexes of each dimension of the output of the optimal comparison model and the output of the target model respectively, analyze to obtain the comprehensive score, and evaluate and verify the target model according to the comprehensive scores of the optimal comparison model and the target model. Use the finally verified target model to identify the driver state. By selecting the optimal model to compare scores with the target model through the test dataset and historical test results, it realizes the automated, efficient, and standardized evaluation and verification of the new model, so as to obtain the optimal model to identify the driver state, improving the accuracy and efficiency of driver state recognition.

[0070] In some embodiments of the present invention, as Figure 2 shown, Figure 2 provided by the present invention Figure 1Flow diagram of a batch of embodiments of step S101, including:

[0071] S201. Construct a platform model library according to the label types of the historical driver state recognition models and their model input formats, in combination with the dynamic performance indicators of each historical driver state recognition model;

[0072] S202. Based on the platform model library, match the optimal comparison model according to the label type of the target model and the target model input format.

[0073] Specifically, according to the task types and task descriptions of the historical driver state recognition models, in combination with the labels of the input data sets that performed well during historical testing and / or historical evaluation and verification processes, construct the mapping relationship between the label types and the models; construct the mapping relationship between the model input formats and the models according to the input format requirements of the historical driver state recognition models; add performance labels to each historical driver state recognition model according to the performance feedback during historical testing and / or historical evaluation and verification processes, and dynamically adjust the performance labels through the self-learning optimization mechanism. Construct the platform model according to the two mapping relationships and the dynamic performance indicators of the driver state recognition models.

[0074] In this embodiment, a platform model library is constructed through the label types of the input data of the historical driver state recognition models, the model input formats, and the dynamic performance indicators of each recognition model, which can automatically screen out the most matching comparison model according to the data format and label type of the test data, provide an accurate basis for the evaluation and verification of the target model, realize the automation of driver state recognition, and improve the efficiency of driver state recognition.

[0075] In some embodiments of the present invention, as Figure 3 shown, Figure 3 is the flow diagram of a batch of embodiments of step S201 provided by the present invention, including: Figure 2 S301. Determine the label types of the historical driver state recognition models according to the labels of the input test data sets that performed well in the historical test feedback results and / or historical evaluation and verification feedback results, and the task descriptions of the historical driver state recognition models;

[0076] S302. Determine the mapping relationship between the label types and the models according to the label types of the historical driver state recognition models, and generate the first mapping relationship;

[0077] S303. Determine the mapping relationship between the model input formats and the models according to the data formats of the input data of the historical driver state recognition models, and generate the second mapping relationship;

[0078] S304. Add performance labels to each historical driver state recognition model according to the performance feedback during historical testing and / or historical evaluation and verification processes, and dynamically adjust the performance labels through the self-learning optimization mechanism;

[0079] S304. Update the dynamic performance metrics of each model in real time according to the historical performance metrics of the historical driver state recognition model, add or modify performance metric tags for the historical driver state recognition model, and generate a platform tag model;

[0080] S305. Construct a platform model library according to the first mapping relationship, the second mapping relationship, and each platform tag model.

[0081] Specifically, during historical testing or historical evaluation and verification, based on the log information and the feedback information of the model, filter out the good results, and determine the label type of the model according to the label of the corresponding input data set and the task description of the historical driver state recognition model, such as emotional state, fatigue level, and concentration level of attention, and construct the mapping relationship between the label type and the model. In this embodiment, some of the mapping relationships between the label type and the model are listed as follows in Table 1. Table 1 is the mapping relationship table of the label type and the model provided by the present invention.

[0082] Table 1 Mapping relationship table of label type and model

[0083]

[0084] Furthermore, the input data format requirements of each historical driver state recognition model are different, and different model input formats correspond to different feature types. Classify the models according to the model input format to obtain the mapping relationship between the model input format and the model. In this embodiment, some of the mapping relationships between the model input format and the model are listed as follows in Table 2. Table 2 is the mapping relationship table of the model input format and the model provided by the present invention.

[0085] Table 2 Mapping relationship table of model input format and model

[0086]

[0087] Furthermore, each historical driver state recognition model adds a performance metric tag to each model based on its performance in a specific data set task or the score during historical evaluation and verification, and dynamically modifies and adjusts the performance metric tags of each model in combination with the self-learning optimization mechanism and each evaluation and verification process.

[0088] According to the platform model library constructed according to the first mapping relationship, the second mapping relationship, and each platform tag model, the optimal comparison model can be selected according to the label type and model input format of the target model.

[0089] This embodiment classifies each historical driver status recognition model by the model's label type and model input format, and adds performance indicator labels to the model based on historical performance indicators to build a platform model library. It can intelligently match models based on the label type and format of the data, realize automatic matching of the optimal comparison model, and improve the efficiency of driver status recognition.

[0090] In some embodiments of the present invention, Figure 4 As shown, Figure 4 The present invention provides Figure 2 The flowchart of a batch of embodiments of step S202 in FIG. 1 includes:

[0091] S401, matching the platform label model according to the label type and model input format of the target model, and screening out at least one first matching model;

[0092] S402: Filter out the optimal comparison model according to the dynamic performance index of the first matching model.

[0093] This embodiment selects the optimal comparison model based on the label type and model input format of the target model and the dynamic performance indicators of each model in the platform model library to obtain a model that best matches and performs best, providing accurate evaluation and verification basis for subsequent target models.

[0094] In some embodiments of the present invention, Figure 5 As shown, Figure 5 The present invention provides Figure 1 A flow chart of an embodiment of step S102 in FIG. 1 includes:

[0095] S501, calculating the basic performance index of the target model according to the first recognition result;

[0096] S502. Determine the robustness index, fit index, and interpretability index of the target model;

[0097] S503, determining a weight coefficient for each test data in the test data set according to the importance of the test data set, and generating a first weight coefficient;

[0098] S504: Determine the basic performance and the allocation weight coefficients of each evaluation dimension according to the task description of the target model, and generate a second weight coefficient;

[0099] S505 : Based on the first weight coefficient and the second weight coefficient, a score value of the target model is calculated according to the test data set and the performance indicators of each evaluation dimension of the target model to generate a first score.

[0100] It should be noted that appropriate test datasets are selected from the database according to the input of the target model, and these test datasets are input into the target model to output recognition results. These test datasets contain datasets of different scales. For example, small datasets are mainly used to test the performance of the model in the case of data scarcity, evaluate whether the model can learn effective features from limited data and detect whether overfitting occurs. Medium datasets are mainly used to test the performance of the model on a wider range of datasets, evaluate whether the model can learn more complex features without causing overfitting. Large datasets are mainly used to test the performance and efficiency of the model, effectively evaluate whether the model can run under high load and check whether it can process large-scale data. At the same time, they also contain datasets of different data qualities. For example, datasets with noise are used to test the robustness of the model in an imperfect data environment, datasets with missing values are used to evaluate the model's ability to handle missing data, and datasets with outliers are used to evaluate the model's outlier detection ability and robustness to extreme data. In addition, they also contain datasets with different class distributions. For example, datasets with balanced classes, where the number of samples in each class is roughly the same, are suitable for evaluating the performance of the model under balanced classes, especially classification accuracy and training stability. Datasets with imbalanced classes, where the number of samples in some classes is significantly more than that in other classes, are suitable for evaluating the model's ability to handle imbalanced datasets, with particular attention to performance metrics such as F1-score and AUC-PR.

[0101] Specifically, first, calculate the accuracy, precision, recall, F1-Score, AUC-ROC, and AUC-PR of the target model according to the first recognition result, and comprehensively score the model in turn to obtain the basic performance indicators of the target model.

[0102] Furthermore, in this implementation, the most suitable hyperparameter optimization method is selected to optimize the model through factors such as the size of the target model hyperparameter space, computing resources, training time, and accuracy requirements. The specific optimization methods include grid search, random search, and Bayesian optimization. Among them, grid search selects a possible value range for each hyperparameter, and then trains and evaluates all possible hyperparameter combinations. Random search randomly selects several hyperparameter combinations in the predefined hyperparameter space for training and evaluation. Bayesian optimization is a more advanced hyperparameter optimization method that constructs a probability model to predict the most likely optimal region in the hyperparameter space.

[0103] Furthermore, calculating the robustness index, fitting index, and interpretability index of the target model includes the following steps. First, use the test data with added noise or perturbations as the data for the model, record the changes in various indicators of the model before and after the noise perturbations, compare the degree of decline in model performance, and output the final robustness evaluation result according to the percentage of decline in model performance. Then, based on the learning curve, with the training set sample size or the number of training steps as the horizontal axis and the training error and validation error as the vertical axis, help determine whether the model is overfitting or underfitting by showing the changes in the training error and validation error over time or the number of training steps. If the training error of the model continues to decline while the validation error begins to rise, there may be overfitting. If both the training error and the validation error are relatively high and there is no obvious downward trend, there may be underfitting. By comparing the trends of the training error and the validation error, the problems of overfitting or underfitting can be quickly identified, and the fitting analysis result can be output. Finally, use the SHAP method to explain the decision-making process of the model by calculating the contribution of each feature to the final prediction result, improve the credibility of the model, and automatically output the interpretability evaluation result according to actual needs.

[0104] Furthermore, to ensure that different types of test data sets can comprehensively reflect the model performance, weight them according to the importance of the test data sets, and assign weight coefficients to each data set. For example, data sets for key scenarios (such as high-risk driving data sets) are given higher weights. Determine the assigned weights of its evaluation dimensions according to the functional type of the target model, assign weights to the calculated basic performance index, robust performance index, fitting performance index, and interpretability performance index, and calculate the score of the target model based on these two weights in combination with the basic performance index, robust performance index, fitting performance index, and interpretability performance index.

[0105] It should be further noted that the above method is used to score the optimal alignment model according to the second recognition result to obtain the second score.

[0106] In this embodiment, the score of the target model is calculated based on the basic performance index, robust performance index, fitting performance index, interpretability performance index, their weight coefficients, and the weight coefficients of the test data set, providing a standardized data basis for the evaluation and verification of the target model.

[0107] In some embodiments of the present invention, as Figure 6 shown, Figure 6 is a schematic flowchart of an embodiment of step S501 provided by the present invention, including: Figure 5 S601. Calculate the first basic performance index of the target model according to the first recognition result. The first basic performance index includes accuracy, precision, recall, F1 score, AUC-ROC, and AUC-PR;

[0108] ​

[0109] S602. Analyze the balance of the first basic performance indicators and calculate the balance score of the target model;

[0110] S603. Calculate the cross-validation score of the target model based on cross-validation;

[0111] S604. Calculate the basic performance indicators of the target model based on the preset basic performance weight coefficients, the first basic performance indicators, the balance score, and the cross-validation score.

[0112] Specifically, first calculate the accuracy, precision, recall, F1-score, AUC-ROC, and AUC-PR of the target model to measure the basic classification performance of the model in turn;

[0113] Among them, the accuracy is the proportion of the number of samples correctly predicted by the model to the total number of samples. The calculation formula for accuracy is:

[0114] ,

[0115] In the formula, TP is the number of true positive samples, that is, the number of samples correctly classified as positive; TN is the number of true negative samples, that is, the number of samples correctly classified as negative; FP is the number of false positive samples, that is, the number of samples misclassified as positive; FN is the number of false negative samples, that is, the number of samples misclassified as negative;

[0116] The precision is the proportion of correctly predicted samples among the samples predicted as positive by the model. The calculation formula for precision is:

[0117] ,

[0118] In the formula, TP is the number of true positive samples, that is, the number of samples correctly classified as positive; FP is the number of false positive samples, that is, the number of samples misclassified as positive;

[0119] The recall is the proportion of all positive samples correctly identified. The calculation formula for recall is:

[0120] ,

[0121] In the formula, TP is the number of true positive samples, that is, the number of samples correctly classified as positive; FN is the number of false negative samples, that is, the number of samples misclassified as negative;

[0122] The F1-score is the harmonic mean of precision and recall. The calculation formula for the F1-score is:

[0123] ,

[0124] In the formula, is the precision, is the recall;

[0125] The ROC curve evaluates the ability of a classification model by calculating the true positive rate (TPR) and false positive rate (FPR) of the model. AUC-ROC is the area under the ROC curve, and the larger this value, the better the model performance.

[0126] The P-R curve takes the recall rate as the abscissa and the precision rate as the ordinate. By adjusting the classification problem threshold, the recall rate and precision rate under different thresholds are determined, and the scatter points are plotted into a curve. AUC-PR is a comprehensive evaluation of the precision rate and recall rate. The larger the area under the curve, the better the performance of the model.

[0127] Furthermore, the balance analysis is achieved by comparing various performance indicators, with particular attention paid to the balance between the precision rate and recall rate. For example, if the precision rate is high but the recall rate is low, it indicates that the model may be biased towards predicting the negative class. Secondly, judge whether the performance indicators are balanced. If balanced, directly enter the cross-validation step. If there is a large imbalance, there may be potential problems with the model performance, and enter the threshold adjustment and sample weighting step.

[0128] Furthermore, the threshold adjustment and sample weighting step is achieved by adjusting the decision threshold to change the judgment criteria of the model for positive and negative classes. For example, the default classification model usually uses 0.5 as the threshold, but by adjusting the threshold, the model can be made more biased towards predicting a certain class, thereby optimizing the precision rate or recall rate; for a dataset with class imbalance, increase the weight of the minority class samples to optimize the performance of the model, so that the model pays more attention to the minority class during training and further improves the model performance.

[0129] Furthermore, the steps of cross-validation include: first, divide the dataset into k folds (usually 5 or 10), and each time use k - 1 folds as the training set and the remaining one fold as the validation set; then, through multiple trainings and tests, ensure that each data sample has the opportunity to be used as the validation set to avoid the model overfitting to a specific data division; finally, calculate the average performance indicators of all owners (such as accuracy, F1-score, etc.) as the evaluation indicators of cross-validation.

[0130] Furthermore, according to the importance of the first basic performance indicator, balance score, and cross-score, assign appropriate weights to each of these indicators. The sum of the weights is 1, and the weight setting follows two principles: the key objectives of the task and the characteristics of the dataset. For example, in some tasks, the recall rate may be more important than the precision rate, or when the dataset is highly imbalanced, higher weights need to be assigned to indicators such as F1-Score and AUC-PR; weight the first basic performance indicator, balance score, and cross-score according to the corresponding weight coefficients to obtain the basic performance indicator of the model.

[0131] This embodiment calculates the first basic performance indicators of the target model, including accuracy, precision, recall, F1 score, AUC-ROC and AUC-PR, and comprehensively scores the model based on the balance evaluation and cross-validation results, providing accurate data basis for the evaluation and verification of the target model.

[0132] In some embodiments of the present invention, Figure 7 As shown, Figure 7 The present invention provides Figure 1 The flowchart of an embodiment of step S104 includes:

[0133] S701: When the first score is greater than the second score, the target model is successfully verified, the first score is used as the dynamic performance indicator of the target model, and the target model is added to the platform model library;

[0134] S702: When the first score is less than or equal to the second score, the target model verification fails, the target model is adjusted and optimized, and the optimized model is re-evaluated and verified.

[0135] Specifically, the comprehensive scores of the optimal comparison model and the target model are compared. When the first score is greater than the second score, that is, the performance index of the target model is better than the optimal comparison model, the target model is successfully verified. At this time, the first score is used as the dynamic performance index of the target model, and a dynamic performance index label is added to the target model. The target model with the label is stored in the platform model library and used as a new driver state recognition model. It also provides a new comparison model for the verification of the next target model; when the first score is less than or equal to the second score, that is, the performance index of the optimal comparison model is better than the target model, the target model verification is unsuccessful, and the target model needs to be adjusted and optimized, and then the optimized target model is re-scored, and the comprehensive score of the optimized target model is compared with the first score. This cycle is repeated until the comprehensive score of the target model is better than the comprehensive score of the optimal comparison model, and then the action of S701 is performed.

[0136] This embodiment verifies the target model by comparing the comprehensive scores of the target model and the optimal comparison model, and adds the successfully verified target model to the platform model library, thereby achieving timely updates to the platform model library, providing an accurate basis for the next evaluation and verification of the new model, and providing the latest options for the query and use of the model, providing the optimal model for driver status recognition, and improving the accuracy of driver status recognition.

[0137] In order to better implement the driver status recognition method in the embodiment of the present invention, based on the driver status recognition method, correspondingly, Figure 8 As shown, an embodiment of the present invention further provides a driver status recognition device 800 including:

[0138] The optimal comparison model screening module 801 is configured to determine the label type of the target model according to the target model task description, and determine the optimal comparison model according to the label type of the target model and the target model input format in combination with the dynamic performance index of the historical driver state recognition model;

[0139] The pattern recognition module 802 is configured to input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively;

[0140] The scoring module 803 is configured to score the target model based on a preset evaluation dimension according to the first recognition result to obtain a first score, and score the optimal comparison model according to the second recognition result to obtain a second score;

[0141] The evaluation and verification module 804 is configured to perform optimization verification on the target model according to the first score and the second score. After the verification is passed, the driver state is recognized based on the target model.

[0142] The driver state recognition device 800 provided in the above embodiment can implement the technical solutions described in the above embodiment of the driver state recognition method. The specific implementation principles of the above modules or units can be referred to the corresponding content in the above embodiment of the driver state recognition method, and will not be elaborated here.

[0143] In the embodiment of the present invention, the driver state recognition device may be an independent server, or a server network or server cluster composed of servers. For example, the driver state recognition device described in the embodiment of the present invention includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing (Cloud Computing).

[0144] As Figure 9 shown, the present invention also correspondingly provides a driver state recognition electronic device 900. The driver state recognition electronic device 900 includes a processor 901, a memory 902, and a display 903. Figure 9 Only some components of the driver state recognition electronic device 900 are shown, but it should be understood that it is not required to implement all the shown components, and more or fewer components can be alternatively implemented.

[0145] The processor 901 may be a central processing unit (CPU), a microprocessor, or other data processing chips in some embodiments, and is configured to run the program code stored in the memory 902 or process data, such as the driver state recognition method in the present invention.

[0146] In some embodiments of the present invention, the processor 901 may be a single server or a server group. The server group may be centralized or distributed. In some embodiments, the processor 901 may be local or remote. In some embodiments, the processor 901 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, a public cloud, a hybrid cloud, a community cloud, a distributed cloud, an internal cloud, a multi-cloud, etc., or any combination thereof.

[0147] The memory 902 may be an internal storage unit of the driver state recognition electronic device 900 in some embodiments, such as a hard disk or a memory of the driver state recognition electronic device 900. The memory 902 may also be an external storage device of the driver state recognition electronic device 900 in some other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc., equipped on the driver state recognition electronic device 900.

[0148] Furthermore, the memory 902 may include both an internal storage unit and an external storage device of the driver state recognition electronic device 900. The memory 902 is used to store application software installed on the driver state recognition electronic device 900 and various types of data.

[0149] The display 903 may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode) toucher, etc. in some embodiments. The display 903 is used to display information of the driver state recognition electronic device 900 and to display a visual user interface. Components 901 - 903 of the driver state recognition electronic device 900 communicate with each other through a system bus.

[0150] In some embodiments of the present invention, when the processor 901 executes the driver state recognition program in the memory 902, the following steps may be implemented:

[0151] Determine the label type of the target model according to the target model task description, and determine the optimal comparison model according to the label type of the target model and the target model input format in combination with the dynamic performance index of the historical driver state recognition model, where the target model is a driver state recognition model;

[0152] Input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively;

[0153] Score the target model based on a preset evaluation dimension and the first recognition result to obtain a first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain a second score;

[0154] Verify the target model according to the first score and the second score. After the verification passes, identify the driver's state based on the target model.

[0155] It should be understood that when the processor 901 executes the driver state recognition program in the memory 902, in addition to the above functions, other functions can also be implemented. For specific details, please refer to the description of the corresponding method embodiments above.

[0156] Furthermore, the type of the driver state recognition electronic device 900 mentioned in the embodiments of the present invention is not specifically limited. The driver state recognition electronic device 900 can be a mobile phone, a tablet computer, a personal digital assistant (PDA), a wearable device, a laptop computer, etc. Exemplary embodiments of the portable driver state recognition electronic device include, but are not limited to, portable driver state recognition electronic devices equipped with IOS, Android, Microsoft, or other operating systems. The above portable driver state recognition electronic device can also be other portable driver state recognition electronic devices. It should also be understood that in some other embodiments of the present invention, the driver state recognition electronic device 900 may not be a portable driver state recognition electronic device, but a desktop computer with a touch-sensitive surface (such as a touch panel).

[0157] In this embodiment, the driver state recognition electronic device is applied to recognize the driver's state. During the process of constructing the driver state recognition model, the target model is input into this electronic device. In order to comprehensively implement the above driver state recognition method, this electronic device is divided into multiple modules for processing, including a data management module, a model management module, an intelligent matching module, a testing and verification module, and a storage and logging module, as Figure 10 shown, Figure 10 This is the overall process schematic diagram of each module in the driver state recognition electronic device provided by the present invention;

[0158] Among them, the data management module is used to effectively integrate, integrate, process, and store data from different sources, formats, and structures into the database, so that different models can uniformly call the processed data set without caring about the underlying storage and processing details. The specific functions include: data set source integration, data preprocessing and integration, data access and call interface, data security and privacy protection;

[0159] The model management module is used to build a unified and standardized model library, store, manage, and schedule existing driver state recognition models, and ensure that various models are called through a unified interface. Its specific functions include: model storage, metadata management, interface management, and operation logs;

[0160] The user interaction module is used to display the dataset and detailed information of each historical driver state recognition model on the interface, add labels to the target model according to the task description of the target model, and can also adjust and modify the labels as needed, determine the model input format of the target model, and can also display the visual results of model training and evaluation;

[0161] The intelligent matching module is used to formulate a label type matching mechanism, an input format matching mechanism, and a historical performance index matching mechanism. According to the test dataset and historical test data and related rules in the platform model library, it matches the best comparison model to improve the verification process of the target model and improve the verification efficiency;

[0162] The testing and verification module, based on the multi-dimensional testing and evaluation framework of the driver state recognition model, automatically loads the dataset, splits the training and test sets, calls the model to run for the target model to be verified, and then calculates the basic performance indicators of the model and conducts various other dimensional evaluation and analysis. Finally, the total score of the model evaluation is obtained, realizing the comparative evaluation between the target model and the best model matching the platform. Ultimately, the driver state recognition model with the best performance is obtained to identify the driver's state. Specifically, it includes: multi-dataset testing, model basic performance evaluation, parameter tuning and optimization, robustness testing, fitting analysis, interpretability evaluation, and calculation of the total evaluation score;

[0163] The storage and log module uses SQLite to store the platform results, supports quick query of driver state recognition information and test data, records the platform operation logs and error logs, which is convenient for debugging and optimizing the model.

[0164] Correspondingly, an embodiment of the present invention further provides a computer-readable storage medium. The computer-readable storage medium is used to store computer-readable programs or instructions. When the programs or instructions are executed by a processor, the steps or functions in the driver state recognition method provided by the above-mentioned method embodiments can be implemented.

[0165] Those skilled in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The computer program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a disk, an optical disc, a read-only memory, or a random access memory, etc.

[0166] The above has introduced in detail the driver state recognition method, device, equipment and storage device provided by the present invention. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present invention.

Claims

1. A driver state recognition method, characterized in that, Including: Determine the label type of the historical driver state recognition model according to the labels of the input test data set with good performance in the historical test feedback results and / or historical evaluation and verification feedback results, and the task description of the historical driver state recognition model; Determine the mapping relationship between the label type and the model according to the label type of the historical driver state recognition model, and generate the first mapping relationship; Determine the mapping relationship between the model input format and the model according to the data format of the input data of the historical driver state recognition model, and generate the second mapping relationship; Real-time update the dynamic performance indicators of each model according to the historical performance indicators of the historical driver state recognition model, add or modify performance indicator labels for each historical driver state recognition model, and generate a platform label model; Construct a platform model library according to the first mapping relationship, the second mapping relationship, and each platform label model; Determine the label type of the target model according to the target model task description and the first mapping relationship, where the target model is a driver state recognition model; Determine the optimal comparison model according to the label type of the target model, the input format of the target model, the second mapping relationship, and the dynamic performance indicators of each historical driver state recognition model in the platform model library; Input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result; Score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain the second score; When the first score is greater than the second score, the target model verification is successful. Use the first score as the dynamic performance indicator of the target model, and add the target model to the platform model library; When the first score is less than or equal to the second score, the target model verification fails. Adjust and optimize the target model, and re-evaluate and verify the optimized model; After passing the verification, recognize the driver state based on the target model.

2. The driver state recognition method according to claim 1, wherein, Match the optimal comparison model according to the label type of the target model and the input format of the target model, including: Match the platform label model according to the label type and model input format of the target model, and screen out at least one first matching model; Screen out the optimal comparison model according to the dynamic performance indicators of the first matching model.

3. The driver state recognition method according to claim 1, characterized in that, The preset evaluation dimension includes basic performance, robustness, fittingness, and interpretability; Score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, including: Calculate the basic performance indicator of the target model according to the first recognition result; Determine the robustness indicator, fittingness indicator, and interpretability indicator of the target model; Determine the weight coefficient of each test data in the test data set according to the importance of the test data set, and generate the first weight coefficient; Determine the allocation weight coefficient of the basic performance and each evaluation dimension according to the task description of the target model, and generate the second weight coefficient; Based on the first weight coefficient and the second weight coefficient, calculate the score value of the target model according to the test data set and the performance indicators of each evaluation dimension of the target model, and generate the first score.

4. The driver state recognition method according to claim 1, characterized in that, Calculate the basic performance metrics of the target model according to the first recognition result, including: Calculate the first basic performance metrics of the target model according to the first recognition result, where the first basic performance metrics include accuracy, precision, recall, F1 score, AUC-ROC, and AUC-PR; Analyze the balance of the first basic performance metrics and calculate the balance score of the target model; Based on cross-validation, calculate the cross score of the target model; Based on the preset basic performance weight coefficients, calculate the basic performance metrics of the target model according to the first basic performance metrics, balance score, and cross score.

5. A driver state recognition device, characterized in that, Including: Optimal comparison model screening module, which is used to determine the label type of the historical driver state recognition model according to the labels of the input test data sets with good performance in the historical test feedback results and / or historical evaluation and verification feedback results and the task description of the historical driver state recognition model; determine the mapping relationship between the label type and the model according to the label type of the historical driver state recognition model, and generate the first mapping relationship; determine the mapping relationship between the model input format and the model according to the data format of the input data of the historical driver state recognition model, and generate the second mapping relationship; update the dynamic performance metrics of each model in real time according to the historical performance metrics of the historical driver state recognition model, add or modify performance metric labels for each historical driver state recognition model, and generate a platform label model; construct a platform model library according to the first mapping relationship, the second mapping relationship, and each platform label model; Determine the label type of the target model according to the target model task description and the first mapping relationship, where the target model is a driver state recognition model; Determine the optimal comparison model according to the label type of the target model, the target model input format, the second mapping relationship, and the dynamic performance metrics of each historical driver state recognition model in the platform model library; Pattern recognition module, which is used to input the test data set into the target model and the optimal comparison model respectively, and output the first recognition result and the second recognition result respectively; Scoring module, which is used to score the target model based on the preset evaluation dimension and the first recognition result to obtain the first score, and score the optimal comparison model based on the preset evaluation dimension and the second recognition result to obtain the second score; Evaluation and verification module, which is used to determine that the target model is successfully verified when the first score is greater than the second score, use the first score as the dynamic performance metric of the target model, and add the target model to the platform model library; 6. An electronic device for driver state recognition, characterized in that, When the first score is less than or equal to the second score, the target model verification fails, the target model is adjusted and optimized, and the optimized model is re-evaluated and verified; after the verification passes, the driver state is recognized based on the target model. Including a processor and a memory, where a computer program is stored on the memory, and when the computer program is executed by the processor, the steps of the driver state recognition method according to any one of claims 1 to 4 are implemented.

7. A storage medium, characterized in that, The storage medium stores computer program instructions that, when executed by a computer, cause the computer to execute the driver state recognition method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Multi-index extensible multi-agent code generation evaluation system and method

    CN118838629A

  • Systems, methods, devices, and platforms for industrial internet of things

    WO2024155584A1