Driving behavior recognition method and device, storage medium and electronic equipment
By acquiring the driver's hand motion data and using two-layer classification rules to identify driving behavior and issue warnings, the problem of difficulty in identifying bad driving behavior in existing technologies is solved, and driving safety and recognition accuracy are improved.
Patent Information
- Application Number
- CN202510574385.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Existing technologies are difficult to effectively identify and alert drivers of bad driving behaviors, which affects driving safety.
By acquiring the driver's hand motion data, feature extraction and processing are performed using two-layer classification rules, including the first classification rule and the second classification rule, which use a neural network model and a decision tree classifier respectively to identify driving behavior and issue a warning when it is identified as bad behavior.
It improves the accuracy and safety of driving behavior recognition, reduces the complexity of decision boundaries, and can effectively identify and alert bad driving behaviors.
Smart Images

Figure CN120670889A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a driving behavior recognition method, device, storage medium, and electronic device. Background Art
[0002] There are many driving behaviors during driving, among which some bad driving behaviors bring hidden dangers to driving safety. Therefore, effectively identifying these bad driving behaviors and reminding drivers can improve driving safety and reduce traffic accidents. Summary of the Invention
[0003] The present invention aims to provide a driving behavior recognition method, device, storage medium and electronic device to improve the accuracy of driving behavior recognition.
[0004] To achieve the above objectives, in a first aspect, the present disclosure provides a driving behavior recognition method, comprising: Obtaining driver's hand motion data; Processing the first feature data based on a first classification rule to obtain a first category result, wherein the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data; The second feature data is processed based on a second classification rule corresponding to the first category result to obtain the driver's driving behavior, and the second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
[0005] Optionally, the first classification rule includes multiple first sub-classification models, and the training method of the first sub-classification models includes: Obtain a first training data set, where the first training data set includes a plurality of training samples, each training sample including sample feature data corresponding to the first feature type and a first category label; Performing supervised training on a plurality of different types of initial neural network models using the first training data set to obtain the plurality of first sub-classification models; A prediction error dataset of the first training dataset relative to each of the first sub-classification models is obtained, where the sample feature data in the prediction error dataset is a training sample misclassified by the first sub-classification model.
[0006] Optionally, the processing the first feature data based on the first classification rule to obtain a first category result includes: Determining target sample feature data associated with the first feature data based on the correlation between the first feature data and each of the sample feature data; Determining the prediction classification results of each of the first sub-classification models according to the subordinate relationships between the target sample feature data and each of the prediction error data sets; determining a target classification rule from the first classification rules based on each of the predicted classification results; The first feature data is processed based on the target classification rule to obtain the first category result.
[0007] Optionally, the predicted classification result includes a first result, wherein the first result indicates that the target sample feature data does not belong to a prediction error data set of at least one first sub-classification model, and determining a target classification rule from the first classification rules based on each of the predicted classification results includes: determining each candidate first sub-classification model corresponding to the first result; Obtain the classification accuracy of each candidate first sub-classification model in the test data set; The candidate first sub-classification model with the highest classification accuracy is determined as the target classification rule.
[0008] Optionally, the first classification rule further includes a second sub-classification rule, the predicted classification result includes a second result, the second result characterizing that the target sample feature data belongs to a prediction error dataset of each first sub-classification model, and determining a target classification rule from the first classification rule based on each of the predicted classification results includes: In a case where all predicted classification results are the second results, the second sub-classification rule is determined as the target classification rule.
[0009] The processing of the first feature data based on the target classification rule to obtain the first category result includes: In a case where the target classification rule is the second sub-classification rule, the first category label corresponding to the target sample feature data is determined as the first category result.
[0010] Optionally, the first category result includes a first subcategory and a second subcategory, the action amplitude of the driving behavior in the first subcategory is greater than the action amplitude of the driving behavior in the second subcategory, the second feature includes a frequency domain feature and a mean feature corresponding to the motion data, and the processing of the second feature data based on the second classification rule corresponding to the first category result to obtain the driving behavior of the driver includes: When the first category result is the first subcategory, processing the frequency domain features based on a pre-trained decision tree classifier to obtain the driving behavior of the driver; In a case where the first category result is the second subcategory, the mean feature is processed based on a pre-trained supervised classifier neural network to obtain the driving behavior of the driver.
[0011] Optionally, the motion data includes sub-motion data corresponding to different sampling moments within a preset time period, and the sub-motion data corresponding to one sampling moment includes the 3-axis acceleration and 3-axis angular velocity of the driver's left hand, and the 3-axis acceleration and 3-axis angular velocity of the driver's right hand; The first feature type includes the maximum absolute value of the acceleration of each axis sampled within the preset time period, and the variance of the acceleration of each axis sampled within the preset time period; the frequency domain features corresponding to the motion data include the energy and a preset number of maximum peaks in the discrete Fourier transform spectrum of the acceleration of each axis sampled within the preset time period; the mean features corresponding to the motion data include the mean of the acceleration of each axis sampled within the preset time period, and the mean of the angular velocity of each axis sampled within the preset time period; The driving behaviors include driving with the phone on, eating while driving, smoking while driving, driving with the window held up, and driving with both hands normally.
[0012] Optionally, obtaining the driver's hand motion data includes: Acquiring the driver's hand motion data through intelligent sensor devices worn on the driver's left and right hands; The method further comprises: When it is determined that the driver's driving behavior is bad driving behavior, the intelligent sensor device outputs a driving warning message in the form of vibration or voice.
[0013] In a second aspect, an embodiment of the present disclosure provides a driving behavior recognition device, comprising: A first acquisition module is used to acquire the motion data of the driver's hand; a first processing module, configured to process first feature data based on a first classification rule to obtain a first category result, wherein the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data; The second processing module is used to process the second feature data based on the second classification rule corresponding to the first category result to obtain the driving behavior of the driver, and the second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
[0014] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides an electronic device, including: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of any one of the methods of the first aspect.
[0016] Through the above technical solution, the driver's hand motion data is first obtained. Then, the first feature data corresponding to the first feature type can be processed based on the first classification rule to obtain a first category result. Then, the second feature data corresponding to the second feature type can be processed based on the second classification rule corresponding to the first category result to obtain the driver's driving behavior. Because the second classification rule requires the processing result of the first classification rule, it is equivalent to using two different levels of classification rules. And because the first classification rule and the second classification rule respectively use the first feature data and the second feature data, each level of classification can specifically select the most appropriate features, thereby effectively reducing the complexity of the decision boundary and improving the accuracy of driving behavior recognition.
[0017] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings: Figure 1 It is a flowchart of a driving behavior recognition method shown in an exemplary embodiment of the present disclosure.
[0019] Figure 2 4 is a flowchart of another driving behavior recognition method shown in an exemplary embodiment of the present disclosure.
[0020] Figure 3 It is a schematic diagram of classification results of a first sub-classification model shown in an exemplary embodiment of the present disclosure.
[0021] Figure 4 It is a block diagram of a driving behavior recognition device shown in an exemplary embodiment of the present disclosure.
[0022] Figure 5 It is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.
[0024] Figure 1 This is a flowchart of a driving behavior recognition method according to an exemplary embodiment of the present disclosure. The driving behavior recognition method can be executed by an electronic device, specifically a driving behavior recognition device. The device can be implemented by software and / or hardware and configured in an electronic device. The electronic device can be an on-board terminal in a vehicle, or a mobile phone, computer, wearable device, etc. outside the vehicle. Figure 1 , the driving behavior recognition method includes the following steps: S101, obtaining motion data of the driver's hand.
[0025] In some embodiments, the motion data may include sub-motion data corresponding to different sampling moments within a preset time period, and the sub-motion data corresponding to each sampling moment include the 3-axis acceleration and 3-axis angular velocity of the driver's left hand, and the 3-axis acceleration and 3-axis angular velocity of the right hand.
[0026] In some embodiments, smart sensing devices worn on the driver's hands can collect 3-axis acceleration and 3-axis angular velocity of the left hand, and 3-axis acceleration and 3-axis angular velocity of the right hand, for a total of 12-axis data. Alternatively, the smart sensing devices can be smart bracelets, smart wristbands, smart watches, etc. equipped with accelerometers and gyroscopes.
[0027] S102 , processing the first feature data based on the first classification rule to obtain a first category result, where the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data.
[0028] In the disclosed embodiments, the first classification rule refers to a classification rule for processing the first feature data to obtain a first category result. Optionally, the first classification rule may include a first sub-classification rule and a second sub-classification rule, wherein the first sub-classification rule may be a classification rule based on a neural network model, and the second sub-classification rule may be a classification rule based on a preset correspondence relationship.
[0029] In some embodiments, the first classification rule may include multiple first sub-classification rules obtained by training through a first training data set. Here, the first sub-classification rule may also be referred to as a first sub-classification model. The first training data set includes multiple sample feature data corresponding to the first feature type and a first category label.
[0030] Here, the type of the first category label may be the same as the type of the first category result. For example, the first category label may include a first subcategory and a second subcategory, and the action amplitude of the driving behavior in the first subcategory is greater than the action amplitude of the driving behavior in the second subcategory.
[0031] In some embodiments, the training method of the first sub-classification model includes: A first training data set is obtained, where the first training data set includes multiple training samples, and one training sample includes sample feature data corresponding to a first feature type and a first category label; supervised training is performed on multiple different types of initial neural network models using the first training data set to obtain multiple first sub-classification models; a prediction error data set of the first training data set relative to each first sub-classification model is obtained, where the sample feature data in the prediction error data set is a training sample that is misclassified by the first sub-classification model.
[0032] In the embodiment of the present disclosure, supervised training can be performed on multiple different types of initial neural network models using the same set of data (i.e., the first training data set) to obtain multiple different types of first sub-classification models.
[0033] For example, the first training data set can be used to train the BP neural network, support vector machine, naive Bayesian classifiers to be trained, respectively, to obtain trained BP neural network, support vector machine, naive Bayesian classifiers. Optionally, several trained classifiers with the highest classification accuracy in the first training data set can be selected as the first sub-classification model.
[0034] In addition, when a first sub-classification model classifies training samples in the first training data set, the training samples with classification errors can be obtained, and a prediction error data set relative to the first sub-classification model can be obtained.
[0035] The process of supervised training of the initial neural network model using the training data set can be referred to in related technologies and will not be described in detail in the present embodiment. For example, the sample feature data can be predicted by the initial neural network model to obtain a predicted classification result, and then the parameters of the initial neural network model can be updated based on the difference between the predicted classification result and the first category label to achieve the process of supervised training of the initial neural network model.
[0036] In some embodiments, the first category of results includes a first subcategory and a second subcategory, and the magnitude of the driving behavior in the first subcategory is greater than the magnitude of the driving behavior in the second subcategory.
[0037] For example, taking the example of driving behaviors including talking on the phone while driving, eating while driving, smoking while driving, holding the window while driving, and driving normally with both hands, the first subcategory may include behaviors with larger movements, namely, eating while driving and smoking while driving, and the second subcategory may include behaviors with smaller movements, namely, talking on the phone while driving, holding the window while driving, and driving normally with both hands.
[0038] Considering that behaviors with larger movement amplitudes have larger variances and maximum absolute values of acceleration, and behaviors with smaller movement amplitudes have smaller variances and maximum absolute values of acceleration, therefore, in some embodiments, the first feature type includes the maximum absolute value of the acceleration of each axis sampled within a preset time period, and the variance of the acceleration of each axis sampled within the preset time period.
[0039] S103, processing the second feature data based on the second classification rule corresponding to the first category result to obtain the driver's driving behavior, the second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
[0040] In the embodiment of the present disclosure, the second classification rule refers to a classification rule for processing the second feature data to obtain the driver's driving behavior.
[0041] In some embodiments, different first category results correspond to different second classification rules used, and each second classification rule has corresponding second feature data.
[0042] In some embodiments, the second feature data includes frequency domain features and mean features corresponding to the motion data.
[0043] Furthermore, in some embodiments, the second feature type includes the energy in the discrete Fourier transform spectrum diagram of each axis acceleration sampled within a preset time period and a preset number of maximum peaks. In this case, the second classification rule is a second classification model trained by a second training data set. The second classification model is a decision tree classifier. The second training data set includes multiple sample feature data and driving behavior labels corresponding to the second feature type.
[0044] In some embodiments, the second feature type includes the mean acceleration of each axis sampled within a preset time period, and the mean angular velocity of each axis sampled within a preset time period. In this case, the second classification rule is a third classification model trained by a third training data set. The third classification model is a supervised classifier neural network. The third training data set includes multiple sample feature data corresponding to the second feature type and driving behavior labels.
[0045] Using the above method, the driver's hand motion data is first obtained. Then, the first feature data corresponding to the first feature type can be processed based on the first classification rule to obtain a first category result. Then, the second feature data corresponding to the second feature type can be processed based on the second classification rule corresponding to the first category result to obtain the driver's driving behavior. Because the second classification rule requires the processing results of the first classification rule, it is equivalent to using two different levels of classification rules. And because the first and second classification rules use the first and second feature data respectively, each level of classification can specifically select the most appropriate features, thereby effectively reducing the complexity of the decision boundary and improving the accuracy of driving behavior recognition.
[0046] In combination with the foregoing, it can be seen that in some embodiments, the first classification rule includes multiple first sub-classification models trained by a first training data set, and the first training data set includes multiple sample feature data corresponding to a first feature type and a first category label. In this case, the first feature data is processed based on the first classification rule to obtain a first category result, including: Determining target sample feature data associated with the first feature data based on the correlation between the first feature data and each sample feature data; Determining the prediction classification results of each first sub-classification model according to the subordinate relationships between the target sample feature data and each prediction error data set; determining a target classification rule from the first classification rules based on each predicted classification result; The first feature data is processed based on the target classification rule to obtain a first category result.
[0047] In the embodiment of the present disclosure, the sample feature data and the first feature data are both data under the first feature type. Therefore, in some embodiments, the correlation between the first feature data and each sample feature data can be calculated using the Pearson correlation coefficient. Furthermore, the sample feature data with the greatest correlation can be determined as the target sample feature data associated with the first feature data.
[0048] In some embodiments, the predicted classification results include two types: a first result and a second result. The first result represents that the target sample feature data does not belong to a prediction error data set of at least one first sub-classification model, that is, the first category result of processing the target sample feature data by the first sub-classification model is the same as the first category label corresponding to the target sample feature data, that is, the first sub-classification model can accurately predict the target sample feature data; the second result represents that the target sample feature data belongs to a prediction error data set of each first sub-classification model, that is, the result of processing the target sample feature data by the first sub-classification model is different from the first category label corresponding to the target sample feature data, that is, the first sub-classification model cannot accurately predict the target sample feature data.
[0049] In some embodiments, after multiple first sub-classification models are obtained through training of the first training data set, the target sample feature data can be input into the trained first sub-classification model again for prediction processing to obtain the first category result corresponding to the target sample feature data, and then the first category result is compared with the first category label carried by the target sample feature data to obtain a predicted classification result.
[0050] In combination with the foregoing, it can be seen that in some embodiments, the predicted classification result includes a first result, and the first result indicates that the target sample feature data does not belong to the prediction error data set of at least one first sub-classification model. In this case, based on each predicted classification result, determining the target classification rule from the first classification rule includes the following steps: Determining each candidate first sub-classification model corresponding to the first result; Obtain the classification accuracy of each candidate first sub-classification model in the test data set; The candidate first sub-classification model with the highest classification accuracy is determined as the target classification rule.
[0051] In the embodiment of the present disclosure, after obtaining the predicted classification results of the target sample feature data in each first sub-classification model, each candidate first sub-classification model corresponding to the first result can be determined, that is, the target sample feature data does not belong to the predicted error data set corresponding to at least one candidate first sub-classification model, thereby determining the candidate first sub-classification model that can accurately classify the target sample feature data. Then, in order to ensure the accuracy of processing the first feature data as much as possible, the classification accuracy of each candidate first sub-classification model in the test data set can be obtained, and then the candidate first sub-classification model with the highest classification accuracy can be determined as the target classification rule.
[0052] In combination with the foregoing, it can be seen that in some embodiments, the first classification rule further includes a second sub-classification rule, and the predicted classification result includes the second result, which represents the target sample feature data belonging to the prediction error data set of each first sub-classification model. In this case, based on each predicted classification result, determining the target classification rule from the first classification rule includes: In a case where all predicted classification results are the second results, the second sub-classification rule is determined as the target classification rule.
[0053] In the embodiment of the present disclosure, if the predicted classification results of the target sample feature data in each first sub-classification model are all the second results, that is, no first sub-classification model can accurately classify the target sample feature data, in this case, using the first sub-classification model for processing will result in an inaccurate first classification result. Therefore, it can be considered to determine the second sub-classification rule as the target classification rule, that is, use the second sub-classification rule to process the first feature data.
[0054] In some implementations, when the target classification rule is the second sub-classification rule, processing the first feature data based on the target classification rule to obtain a first category result may include the following steps: When the target classification rule is the second sub-classification rule, the first category label corresponding to the target sample feature data is determined as the first category result.
[0055] In the embodiment of the present disclosure, considering that the first feature data has a strong correlation with the target sample feature data, the corresponding first category results are likely to be the same. Therefore, if there is no first sub-classification model that can accurately classify the target sample feature data, the first category label corresponding to the target sample feature data can be directly determined as the first category result.
[0056] In combination with the foregoing, it can be seen that in some embodiments, the first category result includes a first subcategory and a second subcategory, the action amplitude of the driving behavior in the first subcategory is greater than the action amplitude of the driving behavior in the second subcategory, and the second feature includes a frequency domain feature and a mean feature corresponding to the motion data. In this case, the second feature data is processed based on the second classification rule corresponding to the first category result to obtain the driver's driving behavior, including: When the first category result is the first subcategory, the frequency domain features are processed based on the pre-trained decision tree classifier to obtain the driver's driving behavior; when the first category result is the second subcategory, the mean features are processed based on the pre-trained supervised classifier neural network to obtain the driver's driving behavior.
[0057] In this disclosed embodiment, for behaviors with larger motion amplitudes, initially classified as driving behaviors in the first subcategory, such as eating while driving and smoking while driving, the frequency domain features corresponding to the motion data can effectively distinguish these driving behaviors, given the frequency differences in acceleration between eating while driving and smoking while driving. Furthermore, the multi-level decision tree classifier can effectively process high-dimensional features, improving the accuracy of driving behavior recognition while maintaining low computational complexity and expediting recognition speed.
[0058] For driving behaviors with smaller movements, initially classified as the second subcategory, such as talking on the phone while driving, holding the window, and driving with both hands on, the use of mean features corresponding to the motion data can effectively distinguish these behaviors, given the significant differences in acceleration or angular velocity between these behaviors. Furthermore, the use of supervised classifier neural networks can further improve the accuracy of driving behavior recognition.
[0059] The training methods for the pre-trained decision tree classifier and the pre-trained supervised classifier neural network can be referenced in related technologies and will not be further described here. It should be noted that the pre-trained decision tree classifier can be trained using the frequency domain features corresponding to the sample motion data and the driving behavior labels, and the pre-trained supervised classifier neural network can be trained using the mean features corresponding to the sample motion data and the driving behavior labels.
[0060] In some embodiments, the motion data includes sub-motion data corresponding to different sampling moments within a preset time period, the sub-motion data corresponding to a sampling moment include the 3-axis acceleration and 3-axis angular velocity of the driver's left hand, and the 3-axis acceleration and 3-axis angular velocity of the right hand, the first feature type includes the maximum absolute value of each axis acceleration sampled within the preset time period, and the variance of each axis acceleration sampled within the preset time period, the frequency domain features corresponding to the motion data include the energy and a preset number of maximum peaks in the discrete Fourier transform spectrum of each axis acceleration sampled within the preset time period, the mean features corresponding to the motion data include the mean of each axis acceleration sampled within the preset time period, and the mean of each axis angular velocity sampled within the preset time period; driving behaviors include driving while talking on the phone, driving while eating, smoking while driving, driving with the hand on the window, and driving normally with both hands.
[0061] In combination with the foregoing, it can be seen that in some embodiments, the motion data of the driver's hands can be obtained by smart sensor devices worn on the driver's left and right hands. In this case, the method of the embodiment of the present disclosure may further include the following steps: When it is determined that the driver's driving behavior is bad driving behavior, the intelligent sensor device outputs driving warning information in the form of vibration or voice.
[0062] In the embodiment of the present disclosure, when it is determined that the driver's driving behavior is bad driving behavior, a driving warning message can be output in the form of vibration or voice through the intelligent sensing device to remind the user to correct the bad driving behavior.
[0063] Figure 2 This is a flow chart of another driving behavior recognition method according to an exemplary embodiment of the present disclosure. The driving behavior recognition method can be executed by an electronic device, specifically a driving behavior recognition device, which can be implemented by software and / or hardware and configured in an electronic device. The electronic device can be an onboard terminal in a vehicle, or a mobile phone, computer, wearable device, etc. outside the vehicle. Figure 2 , the driving behavior recognition method includes the following steps: S201, obtaining motion data of the driver's hand.
[0064] S202: Extract features from the motion data to obtain first feature data.
[0065] S203 : Determine target sample feature data associated with the first feature data based on the correlation between the first feature data and each sample feature data used to train the first sub-classification model.
[0066] S204: Obtain prediction classification results of the target sample feature data in each first sub-classification model.
[0067] S205 : When the first result exists in the predicted classification results, determine each candidate first sub-classification model corresponding to the first result.
[0068] S206: Obtain the classification accuracy of each candidate first sub-classification model in the test data set.
[0069] S207: Determine the candidate first sub-classification model with the highest classification accuracy as the target classification rule.
[0070] S208 : When all predicted classification results are the second result, determine the second sub-classification rule as the target classification rule.
[0071] S209: Process the first feature data based on the target classification rule to obtain a first category result.
[0072] S210 , extracting features from the motion data to obtain a second feature corresponding to the first category result.
[0073] S211 : Processing the extracted second feature based on a second classification rule corresponding to the first category result to obtain the driver's driving behavior.
[0074] The detailed description of steps S201-S211 can refer to the aforementioned embodiment and will not be repeated here.
[0075] The driving behavior recognition method of the embodiment of the present disclosure is described below with reference to an example.
[0076] In this example, five types of vehicle driving behaviors are identified by using acceleration and gyroscope sensor data, including normal driving with both hands, driving with the window held up, driving while talking on the phone, driving while smoking, and driving while eating.
[0077] The above five types of vehicle driving behaviors are divided into two major subcategories: the first subcategory (hereinafter referred to as Category A) is defined as dynamic behaviors with larger movement amplitudes, including smoking while driving and eating while driving; the second subcategory (hereinafter referred to as Category B) is defined as dynamic behaviors with smaller movement amplitudes, including normal driving with both hands, driving with the hand on the window, and driving while talking on the phone.
[0078] First, start the model training process before driving behavior recognition, as follows: The driver wears micro sensors containing three-axis accelerometers and three-axis gyroscopes on both hands to The window length of seconds is used as the action window to collect the acceleration and angular velocity signals generated when the above five driving behaviors occur. Each sampling will obtain a total of 12-axis data (the left hand contains 3-axis acceleration and 3-axis angular velocity, and the right hand contains 3-axis acceleration and 3-axis angular velocity). The data sampled within the second window is used as the driver's hand movement data.
[0079] For each driving behavior, multiple sets of data are collected and stored; The 7-order moving average filtering algorithm is used to low-pass filter the collected motion data. A sequence of data ,in, Indicates the data of 12 axes obtained by one sampling. Represents the number of sampling times, and the formula of the moving average filter algorithm is as follows:
[0080] The filtered data sequence is: .
[0081] For each group , extract the maximum absolute value of each axis acceleration and the variance of each axis acceleration to obtain sample feature data. At the same time, combined with the first category label to which the driving behavior belongs, the first training data set for training the first sub-classification model is obtained. , and through the first training data set The training process to obtain the first sub-classification model is as follows: Use a supervised classifier to classify the first training data set Conduct training, for example, using BP neural network, support vector machine, naive Bayes classifier, etc. After the training in the above steps is completed, find the The two classifiers with the highest recognition accuracy are used as the first sub-classification model, and they are set as and ( Higher accuracy than ); Get and The classification results of the samples in the first training data set are The samples that are misclassified are recorded as ,Will The samples that are misclassified are recorded as ,Will and The samples with average classification error are recorded as (not shown in the figure), the schematic diagram is as follows Figure 3 As shown; It should be noted that the classification results obtained here can be obtained and Afterwards, the samples in the first training dataset are input again into and It can also be directly obtained based on the first training data set in the previous training process. The data obtained during training.
[0082] For each group , extracting the energy and the five maximum peaks from the discrete Fourier transform spectrum of each axis acceleration, and combining them with the driving behavior label to obtain a second training data set for training the second classification model, and training the decision tree classifier with the second training data set to obtain the second classification model in the second classification rule; For each group , extracting the mean value of the acceleration of each axis and the mean value of the angular velocity of each axis, and combining them with the driving behavior label to obtain a third training data set for training the third classification model, and training the supervised classifier with the third training data set to obtain the third classification model in the second classification rule; After completing the above model training process, the driving behavior recognition process can be carried out. The specific recognition process is as follows: by Seconds window length as action window, get The acceleration and angular velocity signals are collected at each sampling moment of 1 second. Each sampling will get a total of 12-axis data (the left hand contains 3-axis acceleration, 3-axis angular velocity, the right hand contains 3-axis acceleration, 3-axis angular velocity). The data sampled within the second window is used as the driver's hand movement data.
[0083] The collected motion data is low-pass filtered using a 7-order moving average filter algorithm to obtain the driver's hand motion data; The filtered data sequence is: .
[0084] from Extract the maximum absolute value of the acceleration of each axis and the variance of the acceleration of each axis to obtain the first feature data; The Pearson correlation coefficient is used to calculate the correlation between the first feature data and each group of sample feature data, and the sample feature data with the largest correlation is determined as the target sample feature data. ,in, ; if , then directly use the one with the highest classification accuracy The classifier classifies it and obtains the first category result; if ,and ,illustrate The classifier may make classification errors. The classifier has a good recognition effect on it, so we choose The classifier classifies it and obtains the first category result; if ,and (Right now ),illustrate and The classifier may make classification errors, so the second sub-classification rule is used for classification, that is, The corresponding first category label is taken as the first category result; According to whether the first classification result in the above step is Class A or Class B, the second classification rule is selected accordingly to further classify it; For the two behaviors in Class A, In the process, the energy and the five maximum peaks in the discrete Fourier transform spectrum of each axis acceleration are extracted, totaling 36 dimensions (6 axes * 6 features) for the identification of the second classification model; For the three behaviors in category B, In the dataset, the mean value of the acceleration of each axis and the mean value of the angular velocity of each axis (12 dimensions, 12 axes * 1 feature) are extracted for the recognition of the third classification model; If it is finally identified as bad driving behavior, such as driving while talking on the phone, eating while driving, smoking while driving, or driving with the window held up, the driver can be warned through vibration, voice, etc., and the relevant data and driving behavior type can be uploaded to the relevant management platform for subsequent processing.
[0085] The aforementioned driving behavior recognition method utilizes a layered structure, which offers excellent flexibility and scalability. Each layer of recognition can specifically select the most appropriate features, effectively reducing the complexity of the decision boundary and improving recognition accuracy. Furthermore, the top-level system (first classification rule) utilizes a combination of unsupervised (second sub-classification rule) and supervised training and recognition methods, providing accurate classification results for the bottom-level system (second classification rule).
[0086] Based on the same inventive concept, an embodiment of the present disclosure provides a driving behavior recognition device. Figure 4 is a block diagram of a driving behavior recognition device 400 shown in an exemplary embodiment of the present disclosure, with reference to Figure 4 , the driving behavior recognition device 400 includes: A first acquisition module 401 is used to acquire the motion data of the driver's hand; A first processing module 402 is configured to process first feature data based on a first classification rule to obtain a first category result, wherein the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data; The second processing module 403 is used to process the second feature data based on the second classification rule corresponding to the first category result to obtain the driving behavior of the driver. The second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
[0087] In some embodiments, the first classification rule includes a plurality of first sub-classification models, and the driving behavior recognition device 400 includes: A second acquisition module is configured to acquire a first training data set, where the first training data set includes a plurality of training samples, and each training sample includes sample feature data corresponding to the first feature type and a first category label; a training module, configured to perform supervised training on a plurality of different types of initial neural network models using the first training data set to obtain the plurality of first sub-classification models; The third acquisition module is used to obtain a prediction error dataset of the first training dataset relative to each of the first sub-classification models, where the sample feature data in the prediction error dataset is a training sample misclassified by the first sub-classification model.
[0088] In some embodiments, the first processing module 402 includes: a first determining submodule, configured to determine target sample characteristic data associated with the first characteristic data based on the correlation between the first characteristic data and each of the sample characteristic data; A prediction classification result determination submodule, configured to determine the prediction classification results of each of the first sub-classification models according to the subordinate relationships between the target sample feature data and each of the prediction error data sets; a second determining submodule, configured to determine a target classification rule from the first classification rules based on each of the predicted classification results; The first processing submodule is configured to process the first feature data based on the target classification rule to obtain the first category result.
[0089] In some embodiments, the predicted classification result includes a first result, wherein the first result indicates that the target sample feature data does not belong to a prediction error dataset of at least one first sub-classification model, and the second determination submodule includes: a first determining unit, configured to determine each candidate first sub-classification model corresponding to the first result; an acquisition unit, configured to acquire the classification accuracy of each candidate first sub-classification model in a test data set; The second determining unit is configured to determine the candidate first sub-classification model with the highest classification accuracy as the target classification rule.
[0090] In some embodiments, the first classification rule further includes a second sub-classification rule, the predicted classification result includes a second result, the second result represents the prediction error data set of the target sample feature data belonging to each first sub-classification model, and the second determination submodule includes: The third determining unit is configured to determine the second sub-classification rule as the target classification rule when all predicted classification results are the second results.
[0091] In some embodiments, the first processing submodule includes: The fourth determining unit is configured to determine, when the target classification rule is the second sub-classification rule, the first category label corresponding to the target sample feature data as the first category result.
[0092] In some embodiments, the first category result includes a first subcategory and a second subcategory, the movement amplitude of the driving behavior in the first subcategory is greater than the movement amplitude of the driving behavior in the second subcategory, the second feature includes a frequency domain feature and a mean feature corresponding to the motion data, and the second processing module 403 includes: a second processing submodule, configured to, when the first category result is the first subcategory, process the frequency domain features based on a pre-trained decision tree classifier to obtain the driving behavior of the driver; The third processing submodule is used to process the mean feature based on a pre-trained supervised classifier neural network to obtain the driving behavior of the driver when the first category result is the second subcategory.
[0093] In some embodiments, the motion data includes sub-motion data corresponding to different sampling moments within a preset time period, and the sub-motion data corresponding to a sampling moment includes the 3-axis acceleration and 3-axis angular velocity of the driver's left hand, and the 3-axis acceleration and 3-axis angular velocity of the right hand; the first feature type includes the maximum absolute value of the acceleration of each axis sampled within the preset time period, and the variance of the acceleration of each axis sampled within the preset time period; the frequency domain features corresponding to the motion data include the energy and a preset number of maximum peaks in the discrete Fourier transform spectrum of the acceleration of each axis sampled within the preset time period; the mean features corresponding to the motion data include the mean of the acceleration of each axis sampled within the preset time period, and the mean of the angular velocity of each axis sampled within the preset time period; the driving behaviors include driving while talking on the phone, driving while eating, smoking while driving, driving with the hand on the window, and driving normally with both hands.
[0094] In some implementations, the first acquisition module 401 includes: A second acquisition submodule is configured to acquire the motion data of the driver's hands through the smart sensor devices worn on the driver's left and right hands; The driving behavior recognition device 400 further includes: The output module is used to output driving warning information in the form of vibration or voice through the intelligent sensing device when it is determined that the driver's driving behavior is bad driving behavior.
[0095] Regarding the driving behavior recognition device 400 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method and will not be elaborated here.
[0096] Based on the same inventive concept, an embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the driving behavior recognition method described in any embodiment of the present disclosure are implemented.
[0097] Based on the same inventive concept, an embodiment of the present disclosure further provides an electronic device, including: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of the driving behavior recognition method described in any embodiment of the present disclosure.
[0098] Figure 5 FIG. 5 is a block diagram of an electronic device 500 according to an exemplary embodiment. Figure 5 As shown, the electronic device 500 may include: a processor 501 , a memory 502 , and may further include one or more of a multimedia component 503 , an input / output (I / O) interface 504 , and a communication component 505 .
[0099] The processor 501 is used to control the overall operation of the electronic device 500 to complete all or part of the steps in the aforementioned driving behavior recognition method. The memory 502 is used to store various types of data to support the operation of the electronic device 500. This data may include, for example, instructions for any application or method operating on the electronic device 500, as well as application-related data such as contact information, sent and received messages, images, audio, video, etc. The memory 502 may be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 503 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 502 or sent through the communication component 505. The audio component also includes at least one speaker for outputting audio signals. The I / O interface 504 provides an interface between the processor 501 and other interface modules, and the above-mentioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G or 4G, or a combination of one or more of them, so the corresponding communication component 505 may include: a Wi-Fi module, a Bluetooth module, an NFC module.
[0100] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned driving behavior recognition method.
[0101] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the aforementioned driving behavior recognition method. For example, the computer-readable storage medium may be the aforementioned memory 502 including the program instructions. The program instructions may be executed by the processor 501 of the electronic device 500 to perform the aforementioned driving behavior recognition method.
[0102] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned driving behavior recognition method when executed by the programmable device.
[0103] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple modifications can be made to the technical solutions of the present disclosure, and these simple modifications all fall within the scope of protection of the present disclosure.
[0104] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0105] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A driving behavior recognition method, characterized in that: include: Obtaining driver's hand motion data; Processing the first feature data based on a first classification rule to obtain a first category result, wherein the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data; The second feature data is processed based on a second classification rule corresponding to the first category result to obtain the driver's driving behavior, and the second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
2. The method according to claim 1, characterized in that The first classification rule includes a plurality of first sub-classification models, and the training method of the first sub-classification models includes: Obtain a first training data set, where the first training data set includes a plurality of training samples, each training sample including sample feature data corresponding to the first feature type and a first category label; Performing supervised training on a plurality of different types of initial neural network models using the first training data set to obtain the plurality of first sub-classification models; A prediction error dataset of the first training dataset relative to each of the first sub-classification models is obtained, where the sample feature data in the prediction error dataset is a training sample misclassified by the first sub-classification model.
3. The method according to claim 2, characterized in that The processing of the first feature data based on the first classification rule to obtain a first category result includes: Determining target sample feature data associated with the first feature data based on the correlation between the first feature data and each of the sample feature data; Determining the prediction classification results of each of the first sub-classification models according to the subordinate relationships between the target sample feature data and each of the prediction error data sets; determining a target classification rule from the first classification rules based on each of the predicted classification results; The first feature data is processed based on the target classification rule to obtain the first category result.
4. The method according to claim 3, characterized in that The predicted classification result includes a first result, wherein the first result indicates that the target sample feature data does not belong to a prediction error data set of at least one first sub-classification model, and determining a target classification rule from the first classification rules based on each of the predicted classification results includes: determining each candidate first sub-classification model corresponding to the first result; Obtain the classification accuracy of each candidate first sub-classification model in the test data set; The candidate first sub-classification model with the highest classification accuracy is determined as the target classification rule.
5. The method according to claim 3, characterized in that The first classification rule further includes a second sub-classification rule, the predicted classification result includes a second result, the second result represents the target sample feature data belonging to the prediction error data set of each first sub-classification model, and determining the target classification rule from the first classification rule based on each of the predicted classification results includes: In a case where all predicted classification results are the second results, determining the second sub-classification rule as the target classification rule; The processing of the first feature data based on the target classification rule to obtain the first category result includes: In a case where the target classification rule is the second sub-classification rule, the first category label corresponding to the target sample feature data is determined as the first category result.
6. The method according to claim 1, characterized in that The first category result includes a first subcategory and a second subcategory, the action amplitude of the driving behavior in the first subcategory is greater than the action amplitude of the driving behavior in the second subcategory, the second feature includes a frequency domain feature and a mean feature corresponding to the motion data, and the processing of the second feature data based on the second classification rule corresponding to the first category result to obtain the driving behavior of the driver includes: When the first category result is the first subcategory, processing the frequency domain features based on a pre-trained decision tree classifier to obtain the driving behavior of the driver; In a case where the first category result is the second subcategory, the mean feature is processed based on a pre-trained supervised classifier neural network to obtain the driving behavior of the driver.
7. The method according to claim 6, characterized in that The motion data includes sub-motion data corresponding to different sampling moments within a preset time period, and the sub-motion data corresponding to a sampling moment includes the three-axis acceleration and three-axis angular velocity of the driver's left hand, and the three-axis acceleration and three-axis angular velocity of the driver's right hand; The first feature type includes the maximum absolute value of the acceleration of each axis sampled within the preset time period, and the variance of the acceleration of each axis sampled within the preset time period; the frequency domain features corresponding to the motion data include the energy and a preset number of maximum peaks in the discrete Fourier transform spectrum of the acceleration of each axis sampled within the preset time period; the mean features corresponding to the motion data include the mean of the acceleration of each axis sampled within the preset time period, and the mean of the angular velocity of each axis sampled within the preset time period; The driving behaviors include driving with the phone on, eating while driving, smoking while driving, driving with the window held up, and driving with both hands normally.
8. A driving behavior recognition device, characterized in that: The device comprises: A first acquisition module is used to acquire the motion data of the driver's hand; a first processing module, configured to process first feature data based on a first classification rule to obtain a first category result, wherein the first feature data is feature data corresponding to a first feature type obtained by extracting features from the motion data; The second processing module is used to process the second feature data based on the second classification rule corresponding to the first category result to obtain the driving behavior of the driver, and the second feature data is feature data corresponding to the second feature type obtained by feature extraction of the motion data.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method, device and wearable device for gesture-based driving status detection
CN105677039A
Method and system for recognizing dangerous driving behaviors of driver based on intelligent equipment
CN110171426A
Driver action recognition method and device
CN110363093A
Driving behavior analysis system and method
CN117218631A
Driving behavior detection system and method
CN117842054A