CN111209796A - Driving behavior detection method and device, electronic equipment and medium - Google Patents
Driving behavior detection method and device, electronic equipment and medium Download PDFInfo
- Publication number
- CN111209796A CN111209796A CN201911319425.8A CN201911319425A CN111209796A CN 111209796 A CN111209796 A CN 111209796A CN 201911319425 A CN201911319425 A CN 201911319425A CN 111209796 A CN111209796 A CN 111209796A
- Authority
- CN
- China
- Prior art keywords
- data
- driver
- tested
- feature
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
- G06V40/23—Recognition of whole body movements, e.g. for sport training
- G06V40/25—Recognition of walking or running movements, e.g. gait recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0414—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means using force sensing means to determine a position
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Social Psychology (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Psychiatry (AREA)
- Probability & Statistics with Applications (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention provides a driving behavior detection method, a driving behavior detection device, an electronic device and a medium. The method can acquire and preprocess attitude data and pressure data on the terminal equipment of the driver to be tested within a first preset time to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed, calculates the pitch angle of the terminal equipment per second by adopting an arcsine function, determining the behavior characteristics of the driver to be detected per second according to the pitch angle per second and the second data, when detecting that the behavior characteristics of the current second are the second result and the behavior characteristics of the previous second of the current second are the first result, extracting the target data of the current second and inputting the target data into a pre-constructed target model to obtain an identification result, when it is determined that the walking feature or the still feature is included in the recognition result and when the walking feature or the still feature continues for a second preset time from the current second, and determining that the driver to be tested uses the terminal equipment from the end of the current second through intelligent decision and enters a walking or static state.
Description
Technical Field
The invention relates to the technical field of intelligent decision, in particular to a driving behavior detection method, a driving behavior detection device, electronic equipment and a driving behavior detection medium.
Background
With the popularization of terminal devices such as mobile phones, the use of terminal devices such as mobile phones in a low head is a common phenomenon, and the probability of accidents caused by the use of terminal devices such as mobile phones during driving is statistically about 23 times higher than that caused by normal driving, so that the behavior of a driver using terminal devices such as mobile phones is very dangerous during the driving process of a vehicle.
In order to reduce the occurrence probability of traffic accidents, a method for detecting the behavior of a driver playing a mobile phone based on deep learning also comes, however, in the existing technical scheme, an additional data acquisition device needs to be installed or detection data needs to be acquired by means of a vehicle data recorder of other vehicles, and secondly, the duration of the driver continuously playing the mobile phone during driving cannot be determined.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a driving behavior detection method, device, electronic device, and medium, which can not only directly solve the problems of data collection difficulty and data quality without using other data collection devices, but also determine the time when the driver to be tested finishes using the terminal device during driving.
A driving behavior detection method, the method comprising:
when a driving behavior detection instruction is received, acquiring attitude data of an acceleration sensor on driver terminal equipment to be detected and pressure data of a touch screen sensor within first preset time;
preprocessing the attitude data and the pressure data to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed;
calculating the first data by adopting an arcsine function to obtain a pitch angle of the terminal equipment per second;
determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data;
when detecting that the behavior feature of the current second is a second result and the behavior feature of the previous second of the current second is a first result, extracting target data of the current second from the first data;
inputting the target data into a pre-constructed target model to obtain a recognition result;
determining whether a walking feature or a still feature is included in the recognition result;
when the walking feature or the static feature is included in the identification result, determining whether the walking feature or the static feature lasts for a second preset time from the current second;
when it is determined that the walking feature or the still feature continues for the second preset time from the current second, it is determined that the driver to be tested uses the terminal device from the end of the current second and enters a walking or still state.
According to a preferred embodiment of the present invention, the preprocessing the attitude data and the pressure data to obtain the first data after the preprocessing of the attitude data and the second data after the preprocessing of the pressure data includes:
performing normal distribution processing on the attitude data and the pressure data to obtain a first normal distribution curve corresponding to the attitude data and a second normal distribution curve corresponding to the pressure data;
acquiring data which does not meet the 99.7 rule from the first normal distribution curve as a first abnormal point of the attitude data, and acquiring data which does not meet the 99.7 rule from the second normal distribution curve as a second abnormal point of the pressure data;
performing data cleaning on the first abnormal point and the second abnormal point to obtain third data corresponding to the attitude data and fourth data corresponding to the pressure data;
and filtering the third data and the fourth data by adopting a band-pass filtering method to obtain the first data after the posture data preprocessing and the second data after the pressure data preprocessing.
According to the preferred embodiment of the invention, determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the second data comprises:
when the pitch angle per second is larger than or equal to the configuration angle and the second data per second is larger than or equal to a first threshold value, determining the second behavior characteristic of the driver to be tested as the first result;
and when the pitch angle per second is smaller than the configuration angle or the second data per second is smaller than the first threshold, determining the second behavior characteristic of the driver to be tested as the second result.
According to a preferred embodiment of the present invention, after determining that the behavior feature of the driver under test is the first result, the method further includes:
acquiring first time corresponding to the first result;
judging whether the driver to be tested is in a driving state at the first time;
when the driver to be tested is determined to be in the driving state at the first time, acquiring road information of a driving road where the driver to be tested is located;
generating prompt information according to the road information;
sending the prompt information to the terminal equipment;
when the fact that the prompt information is not processed is detected, face information of the driver to be detected is obtained;
and storing the face information into a configuration library.
According to a preferred embodiment of the present invention, before inputting the target data into a pre-constructed target model and obtaining a recognition result, the method further comprises:
acquiring first historical data on all driver terminal equipment to be tested;
dividing the first historical data to obtain a training data set and a verification data set;
training the training data set to obtain at least one primary learner;
adjusting the at least one primary learner according to the verification data set to obtain at least one secondary learner;
acquiring test data on the terminal equipment and the total number of the test data;
testing the at least one secondary learner by adopting the test data to obtain the target number of the target test data passing the test in each secondary learner;
dividing the target number by the total number to obtain at least one passing rate;
and determining the secondary learner with the highest passing rate as the target model.
According to a preferred embodiment of the invention, the method further comprises:
and when the recognition result is detected not to include the walking feature and the static feature, determining that the driver to be tested finishes using the terminal equipment in the current second.
According to a preferred embodiment of the invention, the method further comprises:
determining at least one third time for starting using the terminal equipment by the driver to be tested when driving within the first preset time;
acquiring at least one fourth time for finishing using the terminal equipment by the driver to be tested when driving;
performing subtraction operation on the at least one fourth time and the at least one adjacent third time to obtain at least one target time length for the driver to be tested to use the terminal equipment when driving;
determining the target time for using the terminal equipment by the driver to be tested when driving according to the at least one target time length;
calculating the number of the at least one target time length to obtain the target times of using the terminal equipment by the driver to be tested during driving within the first preset time;
dividing the target times by the first preset time to obtain the frequency of the driver to be tested using the terminal equipment;
and generating a behavior report of the driver to be tested according to the frequency and the target time.
A driving behavior detection apparatus, the apparatus comprising:
the acquisition unit is used for acquiring attitude data of an acceleration sensor on the driver terminal equipment to be detected and pressure data of a touch screen sensor in first preset time when a driving behavior detection instruction is received;
the preprocessing unit is used for preprocessing the attitude data and the pressure data to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed;
the calculation unit is used for calculating the first data by adopting an arcsine function to obtain a pitch angle of the terminal equipment per second;
the determining unit is used for determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data;
the extraction unit is used for extracting target data of the current second from the first data when detecting that the behavior feature of the current second is a second result and the behavior feature of the last second of the current second is a first result;
the input unit is used for inputting the target data into a pre-constructed target model to obtain a recognition result;
the determination unit is further configured to determine whether the recognition result includes a walking feature or a static feature;
the determining unit is further configured to determine whether the walking feature or the still feature lasts for a second preset time from the current second when the walking feature or the still feature is included in the recognition result;
the determining unit is further configured to determine that the driver to be tested uses the terminal device from the end of the current second and enters a walking or stationary state when it is determined that the walking feature or the stationary feature continues for the second preset time from the current second.
According to a preferred embodiment of the present invention, the preprocessing unit is specifically configured to:
performing normal distribution processing on the attitude data and the pressure data to obtain a first normal distribution curve corresponding to the attitude data and a second normal distribution curve corresponding to the pressure data;
acquiring data which does not meet the 99.7 rule from the first normal distribution curve as a first abnormal point of the attitude data, and acquiring data which does not meet the 99.7 rule from the second normal distribution curve as a second abnormal point of the pressure data;
performing data cleaning on the first abnormal point and the second abnormal point to obtain third data corresponding to the attitude data and fourth data corresponding to the pressure data;
and filtering the third data and the fourth data by adopting a band-pass filtering method to obtain the first data after the posture data preprocessing and the second data after the pressure data preprocessing.
According to a preferred embodiment of the present invention, the determining unit determines the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the second data, including:
when the pitch angle per second is larger than or equal to the configuration angle and the second data per second is larger than or equal to a first threshold value, determining the second behavior characteristic of the driver to be tested as the first result;
and when the pitch angle per second is smaller than the configuration angle or the second data per second is smaller than the first threshold, determining the second behavior characteristic of the driver to be tested as the second result.
According to a preferred embodiment of the present invention, the obtaining unit is further configured to obtain a first time corresponding to the first result after determining that the behavior characteristic of the driver to be tested is the first result;
the device further comprises:
the judging unit is used for judging whether the driver to be tested is in a driving state at the first time;
the obtaining unit is further used for obtaining road information of a driving road where the driver to be tested is located when the driver to be tested is determined to be in the driving state at the first time;
the generating unit is used for generating prompt information according to the road information;
the sending unit is used for sending the prompt information to the terminal equipment;
the acquisition unit is further used for acquiring the face information of the driver to be detected when the prompt information is not processed;
and the storage unit is used for storing the face information into a configuration library.
According to a preferred embodiment of the present invention, the obtaining unit is further configured to obtain first historical data on all driver terminal devices to be tested before inputting the target data into a pre-constructed target model to obtain a recognition result;
the device further comprises:
the dividing unit is used for dividing the first historical data to obtain a training data set and a verification data set;
a training unit for training the training data set to obtain at least one primary learner;
the adjusting unit is used for adjusting the at least one primary learner according to the verification data set to obtain at least one secondary learner;
the acquiring unit is further configured to acquire the test data on the terminal device and the total amount of the test data;
the testing unit is used for testing the at least one secondary learner by adopting the testing data to obtain the target number of the target testing data passing the test in each secondary learner;
the calculating unit is further configured to divide the target number by the total number to obtain at least one passing rate;
the determining unit is further configured to determine a secondary learner with the highest passing rate as the target model.
According to a preferred embodiment of the present invention, the determining unit is further configured to determine that the driver to be tested uses the terminal device at the end of the current second when it is detected that the recognition result does not include the walking feature and the stationary feature.
According to a preferred embodiment of the present invention, the determining unit is further configured to determine, within the first preset time, at least one third time when the driver to be tested starts to use the terminal device while driving;
the obtaining unit is further configured to obtain at least one fourth time when the driver to be tested finishes using the terminal device during driving;
the computing unit is further configured to perform subtraction operation on the at least one fourth time and the at least one adjacent third time to obtain at least one target duration for the driver to be tested to use the terminal device when driving;
the determining unit is further configured to determine, according to the at least one target duration, a target time for the driver to be tested to use the terminal device when driving;
the calculating unit is further configured to calculate the number of the at least one target duration to obtain a target number of times that the driver to be tested uses the terminal device during driving within the first preset time;
the calculating unit is further configured to divide the target times by the first preset time to obtain the frequency of the driver to be tested using the terminal device;
and the generating unit is further used for generating a behavior report of the driver to be tested according to the frequency and the target time.
An electronic device, the electronic device comprising:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the driving behavior detection method.
A computer-readable storage medium having at least one instruction stored therein, the at least one instruction being executable by a processor in an electronic device to implement the driving behavior detection method.
According to the technical scheme, the data processing method and the data processing device have the advantages that the data processing is performed by directly utilizing the data on the terminal device without other data acquisition devices, the problems that the data are difficult to acquire due to the fact that additional data acquisition devices need to be installed in the prior art are directly solved, the data quality problem caused by the fact that the data are detected by means of driving records of other vehicles is solved, the time that the driver to be tested finishes using the terminal device when driving can be determined, and data support is provided for the problems that the driver to be tested keeps using the terminal device when driving is determined.
Drawings
FIG. 1 is a flow chart of a driving behavior detection method according to a preferred embodiment of the present invention.
Fig. 2 is a functional block diagram of a preferred embodiment of the driving behavior detection apparatus of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device implementing a driving behavior detection method according to a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a driving behavior detection method according to a preferred embodiment of the present invention. The order of the steps in the flow chart may be changed and some steps may be omitted according to different needs.
The driving behavior detection method is applied to one or more electronic devices, where the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and hardware of the electronic devices includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a cloud computing (cloud computing) based cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
And S10, when the driving behavior detection instruction is received, acquiring the attitude data of the acceleration sensor and the pressure data of the touch screen sensor on the driver terminal equipment to be detected within the first preset time.
In at least one embodiment of the present invention, the driving behavior detection instruction may be triggered by a user, or may be automatically triggered when a certain condition is met, which is not limited by the present invention.
Wherein the satisfying of certain conditions includes, but is not limited to: the configuration time is met, the electronic device detects that a driver is driving, and the like.
The configuration time may comprise a certain point in time (e.g., the configuration time may be seven points in the morning each day), or may comprise a time period, etc.
In at least one embodiment of the present invention, the gesture data is obtained from an acceleration sensor on the terminal device of the driver to be tested, the pressure data is obtained from a touch screen sensor on the terminal device of the driver to be tested, and the gesture data and the pressure data are both data generated within the first preset time. Because the attitude data and the pressure data can be directly obtained from the terminal equipment, the detection data of the invention has simple obtaining mode.
The first preset time may be a time period, which is not limited in the present invention.
And S11, preprocessing the attitude data and the pressure data to obtain first data preprocessed by the attitude data and second data preprocessed by the pressure data.
In at least one embodiment of the present invention, the electronic device preprocesses the attitude data and the pressure data to obtain first data after the attitude data preprocessing and second data after the pressure data preprocessing, and the method includes:
the electronic equipment performs normal distribution processing on the attitude data and the pressure data to obtain a first normal distribution curve corresponding to the attitude data and a second normal distribution curve corresponding to the pressure data, acquires data which does not satisfy the 99.7 rule from the first normal distribution curve as a first abnormal point of the attitude data, and acquires data which does not satisfy the 99.7 rule from the second normal distribution curve as a second abnormal point of the pressure data, performing data cleaning on the first abnormal point and the second abnormal point to obtain third data corresponding to the attitude data and fourth data corresponding to the pressure data, and the electronic equipment performs filtering processing on the third data and the fourth data by adopting a band-pass filtering method to obtain the first data after the posture data preprocessing and the second data after the pressure data preprocessing.
Among them, the data satisfying the 99.7 rule refer to data within three positive and negative standard deviation ranges of the data mean value on the normal distribution curve.
Firstly, since the output data of the acceleration sensor and the touch screen sensor usually contains abnormal points, the abnormal points in the attitude data and the pressure data can be eliminated by performing data processing based on the 99.7 rule, and secondly, since a certain vibration exists in the vehicle during the driving process (the driver to be tested is on the vehicle with the engine started but not driving, the acceleration sensor still generates the attitude data due to the vibration of the engine, although the driver to be tested is actually in a static state), the data related to the vibration can be reduced or eliminated by the filtering processing.
And S12, calculating the first data by adopting an arcsine function to obtain the pitch angle of the terminal equipment per second.
In at least one embodiment of the present invention, the pitch angle refers to an angle formed by the terminal device and an X-axis direction of a spatial rectangular coordinate system.
In at least one embodiment of the present invention, the electronic device calculates the first data by using an arcsine function, and obtaining the pitch angle of the terminal device per second includes:
the electronic equipment extracts a first acceleration in the X-axis direction and a second acceleration in the Z-axis direction from the first data, divides the first acceleration in each second by the second acceleration in the corresponding second to obtain a target ratio in each second, and performs arcsine operation on the opposite number of the target ratio to obtain the pitch angle in each second.
For example: the electronic equipment extracts a first acceleration of-1 at 9 o 'clock from the first data, extracts a second acceleration of 2 at 9 o' clock, divides the first acceleration by the second acceleration to obtain a target ratio of-0.5 at 9 o 'clock, and performs arcsine operation on the opposite number of 0.5 of the target ratio to obtain a pitch angle of 30 degrees at 9 o' clock.
Through the implementation mode, the pitch angle of the terminal equipment per second can be accurately determined, and a data basis is provided for subsequently determining the behavior characteristics of the driver to be tested.
In other embodiments, the electronic device may further calculate an inclination angle of the terminal device according to the first data, and process the inclination angle by integrating all angles, so that the determined behavior characteristics of the driver to be tested are more accurate due to more comprehensive data.
And S13, determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data.
In at least one embodiment of the present invention, the behavior feature refers to a behavior generated by the driver to be tested on the terminal device, and the behavior feature includes a first result and a second result.
Specifically, the first result indicates that the driver to be tested is using the terminal device, and further, the second result indicates that the driver to be tested is not using the terminal device currently.
In at least one embodiment of the present invention, the determining, by the electronic device, the behavior characteristics per second of the driver to be tested according to the pitch angle per second and the second data includes:
when the pitch angle per second is larger than or equal to the configuration angle and the second data per second is larger than or equal to the first threshold, the electronic device determines that the behavior characteristic of the driver to be tested corresponding to the second is the first result, and when the pitch angle per second is smaller than the configuration angle or the second data per second is smaller than the first threshold, the electronic device determines that the behavior characteristic of the driver to be tested corresponding to the second is the second result.
Wherein the configuration angle is determined according to a pitch angle of the terminal device used by at least one driver, and the invention is not limited thereto.
Further, the first threshold is determined according to a pressure when at least one driver touches the terminal device, and the invention is not limited thereto.
When the terminal device is used by a driver, the pitch angle of the terminal device changes, and meanwhile, the pressure data sent by the touch screen sensor on the terminal device also changes, so that when the pitch angle is larger than or equal to the configuration angle and the second data (the preprocessed pressure data) is larger than or equal to the first threshold value, the behavior characteristic of the driver to be tested is determined as the first result, and otherwise, the behavior characteristic is determined as the second result.
Through the implementation mode, the behavior characteristics of the driver to be tested can be rapidly determined according to the pitch angle and the second data.
In at least one embodiment of the present invention, after determining that the behavior feature of the driver under test is the first result, the method further includes:
the electronic equipment acquires a first time corresponding to the first result, judges whether the driver to be tested is in a driving state or not in the first time, acquires road information of a driving road where the driver to be tested is located when the driver to be tested is determined to be in the driving state in the first time, generates prompt information according to the road information, further sends the prompt information to the terminal equipment, acquires face information of the driver to be tested when the prompt information is not detected to be processed, and further stores the face information into a configuration library.
Wherein the prompt information includes, but is not limited to: road information, hazard information, driving time, etc.
Further, the configuration library stores face information of a driver who plays a mobile phone while driving.
Through above-mentioned embodiment, not only can detect the driver that awaits measuring is driven and is used during terminal equipment, in time send tip information, avoid the emergence of traffic accident, play the warning the effect of driver that awaits measuring can also be in when tip information is not handled, will driver's the face information that awaits measuring carries out the filing, and it is follow-up right to be convenient for the driver that awaits measuring carries out punishment.
And S14, when detecting that the behavior feature of the current second is a second result and the behavior feature of the previous second of the current second is a first result, extracting the target data of the current second from the first data.
In at least one embodiment of the present invention, the target data refers to data detected by the acceleration sensor in the current second.
In at least one embodiment of the present invention, the electronic device extracting the target data of the current second from the first data includes:
and the electronic equipment judges whether the second time corresponding to each first data is the current second or not, and further determines the data of which the second time is the current second as the target data.
The electronic equipment detects that the behavior feature of the current second is inconsistent with the behavior feature of the last second of the current second, so that the target data of the current second is extracted, and basic data can be provided for judging whether interference data exist in the target data.
And S15, inputting the target data into a pre-constructed target model to obtain a recognition result.
In at least one embodiment of the invention, the target model is a model constructed by using first historical data on the terminal device, and the target model also has adaptive capacity.
The identification result refers to the state of the driver to be tested in the current second, and the identification result may include, but is not limited to: driving state, walking state, resting state, etc.
In at least one embodiment of the present invention, before inputting the target data into the pre-constructed target model and obtaining the recognition result, the method further includes:
the electronic equipment acquires first historical data on all driver terminal equipment to be tested, divides the first historical data to obtain a training data set and a verification data set, further trains the training data set to obtain at least one primary learner, adjusts the at least one primary learner according to the verification data set to obtain at least one secondary learner, acquires test data on the terminal equipment and the total quantity of the test data, tests the at least one secondary learner by adopting the test data to obtain the target quantity of target test data passing the test in each secondary learner, divides the target quantity by the total quantity to obtain at least one passing rate, and determines the secondary learner with the highest passing rate as the target model.
Because the terminal device records the attitude data and the pressure data of the driver to be tested when using the terminal device, the electronic device obtains the attitude data and the pressure data as the test data on the terminal device.
Through the implementation mode, an accurate target model can be obtained through training, so that intelligent decision can be made on the state of the driver to be tested based on the target model.
Specifically, the step of the electronic device dividing the first historical data to obtain a training data set and a verification data set includes:
the electronic equipment randomly divides the first historical data into at least one data packet according to a preset proportion, determines any one data packet in the at least one data packet as the verification data set, determines the rest data packets as the training data set, and repeats the steps until all the data packets are sequentially used as the verification data set.
The preset ratio can be set by user, and the invention is not limited.
For example: the electronic equipment divides the first historical data into 3 data packets, namely a data packet E, a data packet F and a data packet G, and determines the data packet E as the verification data set and the data packet F and the data packet G as the training data set. Next, the data packet F is determined as the verification data set, and the data packets E and G are determined as the training data set. Finally, the data packet G is determined as the verification data set, and the data packets E and F are determined as the training data set.
In the above embodiment, the first history data is divided, and each of the first history data is subjected to training and verification, thereby improving the fitting degree of training the target model.
Further, the electronic device adjusting the at least one primary learner based on the validation data set to obtain at least one secondary learner comprises:
and the electronic equipment determines an optimal hyper-parameter point from the verification data set by adopting a hyper-parameter grid searching method, and further adjusts the at least one primary learner by the electronic equipment through the optimal hyper-parameter point to obtain the at least one secondary learner.
Specifically, the electronic device splits the verification data set according to a fixed step length to obtain a target subset, traverses parameters of end points at two ends of the target subset, verifies the at least one primary learner through the parameters of the end points at the two ends to obtain a learning rate of each parameter, determines a parameter with the best learning rate as a first hyper-parameter point, reduces the step length in a neighborhood of the first hyper-parameter point, and continues traversing until the step length is a preset step length, that is, the obtained hyper-parameter point is the optimal hyper-parameter point, and further, the electronic device adjusts the at least one primary learner according to the optimal hyper-parameter point to obtain the at least one secondary learner.
The preset step length is not limited by the invention.
In at least one embodiment of the invention, after obtaining the target model, the method further comprises:
and the electronic equipment acquires second historical data of an acceleration sensor on the driver terminal equipment to be detected every second preset time, determines the second historical data as a target verification data set, and further performs self-adaptive adjustment on the target model according to the target verification data set to obtain the target model with self-adaptive capacity.
The second history data may be included in the first history data, or may be data sent by an acceleration sensor on any driver terminal device to be tested.
The second preset time can be set by a user, and the invention is not limited.
Through the implementation mode, the target model can perform corresponding negative feedback regulation according to the behavior habit of each driver to be detected, and the obtained recognition result is more accurate.
And S16, determining whether the identification result comprises a walking feature or a static feature.
In at least one embodiment of the invention, the method further comprises:
when the identification result does not include the walking feature and the static feature, the electronic equipment determines that the driver to be tested finishes using the terminal equipment in the current second.
Specifically, the driver to be tested is always in a driving state, and the identification result does not include the walking feature and the static feature in the current second, so that the interference data does not exist in the target data, and it is determined that the driver to be tested finishes using the terminal device in the current second.
The interference data refers to data interfering the electronic equipment to judge the behavior characteristics of the driver to be tested.
And determining that the driver to be tested finishes using the terminal equipment in the current second, so as to obtain the time for finishing using the terminal equipment by the driver to be tested when driving.
S17, when the walking feature or the still feature is included in the recognition result, determining whether the walking feature or the still feature lasts for a second preset time from the current second.
In at least one embodiment of the present invention, the second preset time refers to a period of time from the current second.
In at least one embodiment of the present invention, the electronic device determining whether the walking feature or the still feature lasts for a second preset time from the current second includes:
and the electronic equipment extracts fifth data from the first data lasting for the second preset time from the current second, and further inputs the fifth data into the target model to obtain a third result per second.
And S18, when the walking feature or the static feature is determined to continue for the second preset time from the current second, determining that the driver to be tested uses the terminal device from the end of the current second and enters a walking or static state.
In at least one embodiment of the present invention, when it is detected that the at least one third result is the walking feature or the still feature, the electronic device determines that the walking feature or the parking feature continues for the second preset time from the current second.
In at least one embodiment of the invention, the method further comprises:
in the first preset time, the electronic device determines at least one third time when the driver to be tested starts to use the terminal device, further, the electronic device obtains at least one fourth time when the driver to be tested finishes using the terminal device when driving, the at least one fourth time and the adjacent at least one third time are subtracted to obtain at least one target time when the driver to be tested uses the terminal device when driving, the target time when the driver to be tested uses the terminal device when driving is determined according to the at least one target time, further, the electronic device calculates the number of the at least one target time to obtain the target times when the driver to be tested uses the terminal device when driving in the first preset time, dividing the target times by the first preset time to obtain the frequency of the driver to be tested using the terminal equipment, and generating a behavior report of the driver to be tested according to the frequency and the target time.
Through the implementation mode, the target duration of the terminal device used by the driver to be tested during driving can be determined, the behavior report can be generated, and the intelligent decision-making can be conveniently carried out by the user based on the behavior report.
Wherein the target time is the sum of the time of the driver to be tested using the terminal device during driving within the first preset time, for example: the first preset time is 9: 00-11: 00, within 9: 00-11: 00, the target frequency of using the terminal device by the driver to be tested during driving is 2 times, the target time length of using the terminal device for the first time is 2 minutes, the target time length of using the terminal device for the second time is 5 minutes, and therefore the target time is 7 minutes.
Specifically, the behavior report may be used as basic information for a user decision, and the behavior report may include a UBI (use Based Insurance) car Insurance report, and the like, and by generating the behavior report, the user can be assisted in making an appropriate decision, which is beneficial to the user experience.
For example: when the behavior report is a UBI insurance report, the information in the UBI insurance report may include, but is not limited to: and generating a UBI vehicle insurance report of the driver to be detected by using the risk factor, the target time and the face information of the driver to be detected, so that the UBI vehicle insurance limit of the driver to be detected can be determined.
Specifically, the determining, by the electronic device, at least one third time when the driver to be tested starts to use the terminal device while driving includes:
and when detecting that the behavior feature of the driver to be tested in the target second is the first result and the behavior feature of the driver in the last second of the target second is the second result, the electronic equipment determines the target second as the third time.
According to the technical scheme, when a driving behavior detection instruction is received, attitude data of an acceleration sensor on a terminal device of a driver to be detected and pressure data of a touch screen sensor in a first preset time are obtained, the attitude data and the pressure data are preprocessed to obtain first data preprocessed by the attitude data and second data preprocessed by the pressure data, an arcsine function is adopted to calculate the first data to obtain a pitch angle of the terminal device per second, behavior characteristics of the driver to be detected per second are determined according to the pitch angle of the terminal device per second and the corresponding second data, when the behavior characteristics of the current second are detected to be a second result and the behavior characteristics of the last second of the current second are detected to be a first result, target data of the current second are extracted from the first data, and the target data are input into a pre-constructed target model, obtaining a recognition result, determining whether the recognition result includes a walking feature or a static feature, determining whether the walking feature or the static feature lasts for a second preset time from the current second when the recognition result includes the walking feature or the static feature, and determining that the driver to be tested uses the terminal device from the end of the current second and enters a walking or static state when the walking feature or the static feature lasts for the second preset time from the current second, wherein the data processing is directly performed by using data on the terminal device without using other data acquisition devices, so that the problems that data are not easy to acquire due to the fact that additional data acquisition devices need to be installed in the prior art and data quality is caused when the data are detected by means of driving records of other vehicles are solved directly, the time for finishing using the terminal equipment by the driver to be tested during driving can be determined, and data support is provided for determining the time length for continuously using the terminal equipment by the driver to be tested during driving and other problems.
Fig. 2 is a functional block diagram of a driving behavior detection apparatus according to a preferred embodiment of the present invention. The driving behavior detection device 11 includes an acquisition unit 110, a preprocessing unit 111, a calculation unit 112, a determination unit 113, an extraction unit 114, an input unit 115, a determination unit 116, a generation unit 117, a transmission unit 118, a storage unit 119, a division unit 120, a training unit 121, an adjustment unit 122, and a test unit 123. The module/unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and that can perform a fixed function, and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When a driving behavior detection instruction is received, the obtaining unit 110 obtains attitude data of an acceleration sensor and pressure data of a touch screen sensor on the driver terminal device to be detected within a first preset time.
In at least one embodiment of the present invention, the driving behavior detection instruction may be triggered by a user, or may be automatically triggered when a certain condition is met, which is not limited by the present invention.
Wherein the satisfying of certain conditions includes, but is not limited to: meeting configuration time, detecting a driver driving, etc.
The configuration time may comprise a certain point in time (e.g., the configuration time may be seven points in the morning each day), or may comprise a time period, etc.
In at least one embodiment of the present invention, the gesture data is obtained from an acceleration sensor on the terminal device of the driver to be tested, the pressure data is obtained from a touch screen sensor on the terminal device of the driver to be tested, and the gesture data and the pressure data are both data generated within the first preset time. Because the attitude data and the pressure data can be directly obtained from the terminal equipment, the detection data of the invention has simple obtaining mode.
The first preset time may be a time period, which is not limited in the present invention.
The preprocessing unit 111 preprocesses the attitude data and the pressure data to obtain first data preprocessed by the attitude data and second data preprocessed by the pressure data.
In at least one embodiment of the present invention, the preprocessing unit 111 preprocesses the posture data and the pressure data to obtain the first preprocessed posture data and the second preprocessed pressure data includes:
the preprocessing unit 111 performs normal distribution processing on the attitude data and the pressure data to obtain a first normal distribution curve corresponding to the attitude data and a second normal distribution curve corresponding to the pressure data, acquires data which does not satisfy the 99.7 rule from the first normal distribution curve as a first anomaly point of the attitude data, and acquires data which does not satisfy the 99.7 rule from the second normal distribution curve as a second anomaly point of the pressure data, performing data cleaning on the first abnormal point and the second abnormal point to obtain third data corresponding to the attitude data and fourth data corresponding to the pressure data, the preprocessing unit 111 performs filtering processing on the third data and the fourth data by using a band-pass filtering method to obtain first data after the posture data preprocessing and second data after the pressure data preprocessing.
Among them, the data satisfying the 99.7 rule refer to data within three positive and negative standard deviation ranges of the data mean value on the normal distribution curve.
Firstly, since the output data of the acceleration sensor and the touch screen sensor usually contains abnormal points, the abnormal points in the attitude data and the pressure data can be eliminated by performing data processing based on the 99.7 rule, and secondly, since a certain vibration exists in the vehicle during the driving process (the driver to be tested is on the vehicle with the engine started but not driving, the acceleration sensor still generates the attitude data due to the vibration of the engine, although the driver to be tested is actually in a static state), the data related to the vibration can be reduced or eliminated by the filtering processing.
The calculating unit 112 calculates the first data by using an arcsine function, so as to obtain the pitch angle of the terminal device per second.
In at least one embodiment of the present invention, the pitch angle refers to an angle formed by the terminal device and an X-axis direction of a spatial rectangular coordinate system.
In at least one embodiment of the present invention, the calculating unit 112 calculates the first data by using an arcsine function, and obtaining the pitch angle of the terminal device per second includes:
the calculation unit 112 extracts a first acceleration in the X-axis direction and a second acceleration in the Z-axis direction from the first data, divides the first acceleration per second by the second acceleration in the corresponding second to obtain a target ratio per second, and performs an arcsine operation on the opposite number of the target ratio to obtain the pitch angle per second.
For example: the calculation unit 112 extracts a first acceleration of-1 at 9 o 'clock from the first data, extracts a second acceleration of 2 at 9 o' clock, divides the first acceleration by the second acceleration to obtain a target ratio of-0.5 at 9 o 'clock, and performs arcsine operation on the opposite number of 0.5 of the target ratio to obtain a pitch angle of 30 degrees at 9 o' clock.
Through the implementation mode, the pitch angle of the terminal equipment per second can be accurately determined, and a data basis is provided for subsequently determining the behavior characteristics of the driver to be tested.
In other embodiments, the calculating unit 112 may further calculate the tilt angle of the terminal device according to the first data, and process the tilt angle by integrating all angles, so that the determined behavior characteristics of the driver to be tested are more accurate due to more comprehensive data.
The determining unit 113 determines the behavior characteristics of the driver to be detected per second according to the pitch angle per second and the corresponding second data.
In at least one embodiment of the present invention, the behavior feature refers to a behavior generated by the driver to be tested on the terminal device, and the behavior feature includes a first result and a second result.
Specifically, the first result indicates that the driver to be tested is using the terminal device, and further, the second result indicates that the driver to be tested is not using the terminal device currently.
In at least one embodiment of the present invention, the determining unit 113 determines the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the second data, including:
when the pitch angle per second is greater than or equal to the configuration angle and the second data per second is greater than or equal to the first threshold, the determining unit 113 determines that the second behavior characteristic of the driver to be tested is the first result, and when the pitch angle per second is smaller than the configuration angle or the second data per second is smaller than the first threshold, the determining unit 113 determines that the second behavior characteristic of the driver to be tested is the second result.
Wherein the configuration angle is determined according to a pitch angle of the terminal device used by at least one driver, and the invention is not limited thereto.
Further, the first threshold is determined according to a pressure when at least one driver touches the terminal device, and the invention is not limited thereto.
When the terminal device is used by a driver, the pitch angle of the terminal device changes, and meanwhile, the pressure data sent by the touch screen sensor on the terminal device also changes, so that when the pitch angle is larger than or equal to the configuration angle and the second data (the preprocessed pressure data) is larger than or equal to the first threshold value, the behavior characteristic of the driver to be tested is determined as the first result, and otherwise, the behavior characteristic is determined as the second result.
Through the implementation mode, the behavior characteristics of the driver to be tested can be rapidly determined according to the pitch angle and the second data.
In at least one embodiment of the invention, after determining that the behavior characteristic of the driver under test is the first result, the obtaining unit 110 obtains a first time corresponding to the first result, the determining unit 116 determines whether the driver to be tested is in a driving state at the first time, when it is determined that the driver to be tested is in the driving state at the first time, the obtaining unit 110 obtains road information of a driving road where the driver to be tested is located, the generating unit 117 generates prompt information according to the road information, further, the sending unit 118 sends the prompt information to the terminal device, when it is detected that the prompt information is not processed, the obtaining unit 110 obtains the face information of the driver to be tested, and further, the storage unit 119 stores the face information into a configuration library.
Wherein the prompt information includes, but is not limited to: road information, hazard information, driving time, etc.
Further, the configuration library stores face information of a driver who plays a mobile phone while driving.
Through above-mentioned embodiment, not only can detect the driver that awaits measuring is driven and is used during terminal equipment, in time send tip information, avoid the emergence of traffic accident, play the warning the effect of driver that awaits measuring can also be in when tip information is not handled, will driver's the face information that awaits measuring carries out the filing, and it is follow-up right to be convenient for the driver that awaits measuring carries out punishment.
When detecting that the behavior feature of the current second is the second result and the behavior feature of the second previous to the current second is the first result, the extracting unit 114 extracts the target data of the current second from the first data.
In at least one embodiment of the present invention, the target data refers to data detected by the acceleration sensor in the current second.
In at least one embodiment of the present invention, the extracting unit 114 extracts the target data of the current second from the first data includes:
the extracting unit 114 determines whether the second time corresponding to each first data is the current second, and further, the extracting unit 114 determines the data with the second time being the current second as the target data.
The behavior feature of the current second is detected to be inconsistent with the behavior feature of the previous second of the current second, so that the target data of the current second is extracted, and basic data can be provided for judging whether interference data exist in the target data.
The input unit 115 inputs the target data into a pre-constructed target model to obtain a recognition result.
In at least one embodiment of the invention, the target model is a model constructed by using first historical data on the terminal device, and the target model also has adaptive capacity.
The identification result refers to the state of the driver to be tested in the current second, and the identification result may include, but is not limited to: driving state, walking state, resting state, etc.
In at least one embodiment of the present invention, before inputting the target data into a pre-constructed target model to obtain a recognition result, the obtaining unit 110 obtains first historical data on all terminal devices of the driver to be tested, the dividing unit 120 divides the first historical data to obtain a training data set and a verification data set, further, the training unit 121 trains the training data set to obtain at least one primary learner, the adjusting unit 122 adjusts the at least one primary learner according to the verification data set to obtain at least one secondary learner, the obtaining unit 110 obtains the test data on the terminal devices and the total amount of the test data, the testing unit 123 tests the at least one secondary learner with the test data to obtain a target amount of target test data passing the test in each secondary learner, the calculating unit 112 divides the target number by the total number to obtain at least one passing rate, and the determining unit 113 determines the secondary learner with the highest passing rate as the target model.
Because the terminal device records the attitude data and the pressure data of the driver to be tested when using the terminal device, the electronic device obtains the attitude data and the pressure data as the test data on the terminal device.
Through the implementation mode, an accurate target model can be obtained through training, so that intelligent decision can be made on the state of the driver to be tested based on the target model.
Specifically, the dividing unit 120 divides the first historical data to obtain a training data set and a verification data set, which includes:
the dividing unit 120 randomly divides the first historical data into at least one data packet according to a preset ratio, determines any one data packet of the at least one data packet as the verification data set, determines the rest data packets as the training data set, and repeats the above steps until all the data packets are sequentially used as the verification data set.
The preset ratio can be set by user, and the invention is not limited.
For example: the dividing unit 120 divides the first history data into 3 data packets, which are a data packet E, a data packet F, and a data packet G, and determines the data packet E as the verification data set and the data packets F and G as the training data set. Next, the data packet F is determined as the verification data set, and the data packets E and G are determined as the training data set. Finally, the data packet G is determined as the verification data set, and the data packets E and F are determined as the training data set.
In the above embodiment, the first history data is divided, and each of the first history data is subjected to training and verification, thereby improving the fitting degree of training the target model.
Further, the adjusting unit 122 adjusts the at least one primary learner according to the verification data set, and obtains at least one secondary learner, including:
the adjusting unit 122 determines an optimal hyper-parameter point from the verification data set by using a hyper-parameter grid search method, and further, the adjusting unit 122 adjusts the at least one primary learner by using the optimal hyper-parameter point to obtain the at least one secondary learner.
Specifically, the adjusting unit 122 splits the verification data set according to a fixed step length to obtain a target subset, traverses parameters of end points at two ends of the target subset, verifies the at least one primary learner according to the parameters of the end points at the two ends to obtain a learning rate of each parameter, determines a parameter with the best learning rate as a first hyper-parameter point, and reduces the step length in a neighborhood of the first hyper-parameter point to continue traversing until the step length is a preset step length, that is, the obtained hyper-parameter point is the optimal hyper-parameter point, and further, the adjusting unit 122 adjusts the at least one primary learner according to the optimal hyper-parameter point to obtain the at least one secondary learner.
The preset step length is not limited by the invention.
In at least one embodiment of the present invention, after obtaining the target model, every second preset time, the obtaining unit 110 obtains second historical data of an acceleration sensor on the driver terminal device to be tested, the determining unit 113 determines the second historical data as a target verification data set, and further, the adjusting unit 122 performs adaptive adjustment on the target model according to the target verification data set to obtain a target model with adaptive capability.
The second history data may be included in the first history data, or may be data sent by an acceleration sensor on any driver terminal device to be tested.
The second preset time can be set by a user, and the invention is not limited.
Through the implementation mode, the target model can perform corresponding negative feedback regulation according to the behavior habit of each driver to be detected, and the obtained recognition result is more accurate.
The determination unit 113 determines whether a walking feature or a still feature is included in the recognition result.
In at least one embodiment of the present invention, when it is detected that the recognition result does not include the walking feature and the still feature, the determination unit 113 determines that the driver under test uses the terminal device at the end of the current second.
Specifically, the driver to be tested is always in a driving state, and the identification result does not include the walking feature and the static feature in the current second, so that the interference data does not exist in the target data, and it is determined that the driver to be tested finishes using the terminal device in the current second.
The interference data refers to data interfering with the judgment of the behavior characteristics of the driver to be tested.
And determining that the driver to be tested finishes using the terminal equipment in the current second, so as to obtain the time for finishing using the terminal equipment by the driver to be tested when driving.
When the walking feature or the still feature is included in the recognition result, the determination unit 113 determines whether the walking feature or the still feature lasts for a second preset time from the current second.
In at least one embodiment of the present invention, the second preset time refers to a period of time from the current second.
In at least one embodiment of the present invention, the determining unit 113 determines whether the walking feature or the still feature continues for a second preset time from the current second includes:
the determining unit 113 extracts fifth data from the first data lasting within the second preset time from the current second, and further, the determining unit 113 inputs the fifth data into the target model to obtain a third result per second.
When it is determined that the walking feature or the still feature continues for the second preset time from the current second, the determination unit 113 determines that the driver to be tested uses the terminal device from the end of the current second and enters a walking or still state.
In at least one embodiment of the present invention, when it is detected that the at least one third result is the walking feature or the still feature, the determination unit 113 determines that the walking feature or the parking feature continues for the second preset time from the current second.
In at least one embodiment of the present invention, within the first preset time, the determining unit 113 determines at least one third time when the driver to be tested starts to use the terminal device during driving, further, the obtaining unit 110 obtains at least one fourth time when the driver to be tested finishes using the terminal device during driving, the calculating unit 112 performs a subtraction operation between the at least one fourth time and the adjacent at least one third time to obtain at least one target time when the driver to be tested uses the terminal device during driving, the determining unit 113 determines the target time when the driver to be tested uses the terminal device during driving according to the at least one target time, further, the calculating unit 112 calculates the number of the at least one target time, obtaining the target times of using the terminal device by the driver to be tested during driving within the first preset time, dividing the target times by the first preset time by the calculating unit 112 to obtain the frequency of using the terminal device by the driver to be tested, and generating the behavior report of the driver to be tested according to the frequency and the target time by the generating unit 117.
Through the implementation mode, the target duration of the terminal device used by the driver to be tested during driving can be determined, the behavior report can be generated, and the intelligent decision-making can be conveniently carried out by the user based on the behavior report.
Wherein the target time is the sum of the time of the driver to be tested using the terminal device during driving within the first preset time, for example: the first preset time is 9: 00-11: 00, within 9: 00-11: 00, the target frequency of using the terminal device by the driver to be tested during driving is 2 times, the target time length of using the terminal device for the first time is 2 minutes, the target time length of using the terminal device for the second time is 5 minutes, and therefore the target time is 7 minutes.
Specifically, the behavior report may be used as basic information for a user decision, and the behavior report may include a UBI (use Based Insurance) car Insurance report, and the like, and by generating the behavior report, the user can be assisted in making an appropriate decision, which is beneficial to the user experience.
For example: when the behavior report is a UBI insurance report, the information in the UBI insurance report may include, but is not limited to: and generating a UBI vehicle insurance report of the driver to be detected by using the risk factor, the target time and the face information of the driver to be detected, so that the UBI vehicle insurance limit of the driver to be detected can be determined.
Specifically, the determining unit 113 determining at least one third time when the driver to be tested starts to use the terminal device while driving includes:
when it is detected that the behavior feature of the driver to be tested in the target second is the first result and the behavior feature of the driver in the last second of the target second is the second result, the determining unit 113 determines the target second as the third time.
According to the technical scheme, when a driving behavior detection instruction is received, attitude data of an acceleration sensor on a terminal device of a driver to be detected and pressure data of a touch screen sensor in a first preset time are obtained, the attitude data and the pressure data are preprocessed to obtain first data preprocessed by the attitude data and second data preprocessed by the pressure data, an arcsine function is adopted to calculate the first data to obtain a pitch angle of the terminal device per second, behavior characteristics of the driver to be detected per second are determined according to the pitch angle of the terminal device per second and the corresponding second data, when the behavior characteristics of the current second are detected to be a second result and the behavior characteristics of the last second of the current second are detected to be a first result, target data of the current second are extracted from the first data, and the target data are input into a pre-constructed target model, obtaining a recognition result, determining whether the recognition result includes a walking feature or a static feature, determining whether the walking feature or the static feature lasts for a second preset time from the current second when the recognition result includes the walking feature or the static feature, and determining that the driver to be tested uses the terminal device from the end of the current second and enters a walking or static state when the walking feature or the static feature lasts for the second preset time from the current second, wherein the data processing is directly performed by using data on the terminal device without using other data acquisition devices, so that the problems that data are not easy to acquire due to the fact that additional data acquisition devices need to be installed in the prior art and data quality is caused when the data are detected by means of driving records of other vehicles are solved directly, the time for finishing using the terminal equipment by the driver to be tested during driving can be determined, and data support is provided for determining the time length for continuously using the terminal equipment by the driver to be tested during driving and other problems.
Fig. 3 is a schematic structural diagram of an electronic device according to a preferred embodiment of the driving behavior detection method of the present invention.
In one embodiment of the present invention, the electronic device 1 includes, but is not limited to, a memory 12, a processor 13, and a computer program, such as a driving behavior detection program, stored in the memory 12 and executable on the processor 13.
It will be appreciated by a person skilled in the art that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation of the electronic device 1, and that it may comprise more or less components than shown, or some components may be combined, or different components, e.g. the electronic device 1 may further comprise an input output device, a network access device, a bus, etc.
The Processor 13 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The processor 13 is an operation core and a control center of the electronic device 1, and is connected to each part of the whole electronic device 1 by various interfaces and lines, and executes an operating system of the electronic device 1 and various installed application programs, program codes, and the like.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the various driving behavior detection method embodiments described above, such as the steps shown in fig. 1.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the electronic device 1.
The memory 12 can be used for storing the computer programs and/or modules, and the processor 13 implements various functions of the electronic device 1 by running or executing the computer programs and/or modules stored in the memory 12 and calling data stored in the memory 12. The memory 12 may mainly include a program storage area and a data storage area. Further, the memory 12 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other non-volatile solid state storage device.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
With reference to fig. 1, the memory 12 of the electronic device 1 stores a plurality of instructions to implement a driving behavior detection method, and the processor 13 can execute the plurality of instructions to implement: when a driving behavior detection instruction is received, acquiring attitude data of an acceleration sensor on driver terminal equipment to be detected and pressure data of a touch screen sensor within first preset time; preprocessing the attitude data and the pressure data to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed; calculating the first data by adopting an arcsine function to obtain a pitch angle of the terminal equipment per second; determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data; when detecting that the behavior feature of the current second is a second result and the behavior feature of the previous second of the current second is a first result, extracting target data of the current second from the first data; inputting the target data into a pre-constructed target model to obtain a recognition result; determining whether a walking feature or a still feature is included in the recognition result; when the walking feature or the static feature is included in the identification result, determining whether the walking feature or the static feature lasts for a second preset time from the current second; when it is determined that the walking feature or the still feature continues for the second preset time from the current second, it is determined that the driver to be tested uses the terminal device from the end of the current second and enters a walking or still state.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A driving behavior detection method, characterized in that the method comprises:
when a driving behavior detection instruction is received, acquiring attitude data of an acceleration sensor on driver terminal equipment to be detected and pressure data of a touch screen sensor within first preset time;
preprocessing the attitude data and the pressure data to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed;
calculating the first data by adopting an arcsine function to obtain a pitch angle of the terminal equipment per second;
determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data;
when detecting that the behavior feature of the current second is a second result and the behavior feature of the previous second of the current second is a first result, extracting target data of the current second from the first data;
inputting the target data into a pre-constructed target model to obtain a recognition result;
determining whether a walking feature or a still feature is included in the recognition result;
when the walking feature or the static feature is included in the identification result, determining whether the walking feature or the static feature lasts for a second preset time from the current second;
when it is determined that the walking feature or the still feature continues for the second preset time from the current second, it is determined that the driver to be tested uses the terminal device from the end of the current second and enters a walking or still state.
2. The driving behavior detection method of claim 1, wherein the preprocessing the posture data and the pressure data to obtain the first preprocessed posture data and the second preprocessed pressure data comprises:
performing normal distribution processing on the attitude data and the pressure data to obtain a first normal distribution curve corresponding to the attitude data and a second normal distribution curve corresponding to the pressure data;
acquiring data which does not meet the 99.7 rule from the first normal distribution curve as a first abnormal point of the attitude data, and acquiring data which does not meet the 99.7 rule from the second normal distribution curve as a second abnormal point of the pressure data;
performing data cleaning on the first abnormal point and the second abnormal point to obtain third data corresponding to the attitude data and fourth data corresponding to the pressure data;
and filtering the third data and the fourth data by adopting a band-pass filtering method to obtain the first data after the posture data preprocessing and the second data after the pressure data preprocessing.
3. The driving behavior detection method according to claim 1, wherein determining the behavior characteristics per second of the driver to be tested according to the pitch angle per second and the second data comprises:
when the pitch angle per second is larger than or equal to the configuration angle and the second data per second is larger than or equal to a first threshold value, determining the second behavior characteristic of the driver to be tested as the first result;
and when the pitch angle per second is smaller than the configuration angle or the second data per second is smaller than the first threshold, determining the second behavior characteristic of the driver to be tested as the second result.
4. The driving behavior detection method according to claim 1, characterized in that, after determining that the behavior feature of the driver under test is the first result, the method further comprises:
acquiring first time corresponding to the first result;
judging whether the driver to be tested is in a driving state at the first time;
when the driver to be tested is determined to be in the driving state at the first time, acquiring road information of a driving road where the driver to be tested is located;
generating prompt information according to the road information;
sending the prompt information to the terminal equipment;
when the fact that the prompt information is not processed is detected, face information of the driver to be detected is obtained;
and storing the face information into a configuration library.
5. The driving behavior detection method according to claim 1, characterized in that, before inputting the target data into a pre-constructed target model to obtain a recognition result, the method further comprises:
acquiring first historical data on all driver terminal equipment to be tested;
dividing the first historical data to obtain a training data set and a verification data set;
training the training data set to obtain at least one primary learner;
adjusting the at least one primary learner according to the verification data set to obtain at least one secondary learner;
acquiring test data on the terminal equipment and the total number of the test data;
testing the at least one secondary learner by adopting the test data to obtain the target number of the target test data passing the test in each secondary learner;
dividing the target number by the total number to obtain at least one passing rate;
and determining the secondary learner with the highest passing rate as the target model.
6. The driving behavior detection method according to claim 1, characterized in that the method further comprises:
and when the recognition result is detected not to include the walking feature and the static feature, determining that the driver to be tested finishes using the terminal equipment in the current second.
7. The driving behavior detection method according to claim 1, characterized in that the method further comprises:
determining at least one third time for starting using the terminal equipment by the driver to be tested when driving within the first preset time;
acquiring at least one fourth time for finishing using the terminal equipment by the driver to be tested when driving;
performing subtraction operation on the at least one fourth time and the at least one adjacent third time to obtain at least one target time length for the driver to be tested to use the terminal equipment when driving;
determining the target time for using the terminal equipment by the driver to be tested when driving according to the at least one target time length;
calculating the number of the at least one target time length to obtain the target times of using the terminal equipment by the driver to be tested during driving within the first preset time;
dividing the target times by the first preset time to obtain the frequency of the driver to be tested using the terminal equipment;
and generating a behavior report of the driver to be tested according to the frequency and the target time.
8. A driving behavior detection apparatus, characterized in that the apparatus comprises:
the acquisition unit is used for acquiring attitude data of an acceleration sensor on the driver terminal equipment to be detected and pressure data of a touch screen sensor in first preset time when a driving behavior detection instruction is received;
the preprocessing unit is used for preprocessing the attitude data and the pressure data to obtain first data after the attitude data is preprocessed and second data after the pressure data is preprocessed;
the calculation unit is used for calculating the first data by adopting an arcsine function to obtain a pitch angle of the terminal equipment per second;
the determining unit is used for determining the behavior characteristics of the driver to be tested per second according to the pitch angle per second and the corresponding second data;
the extraction unit is used for extracting target data of the current second from the first data when detecting that the behavior feature of the current second is a second result and the behavior feature of the last second of the current second is a first result;
the input unit is used for inputting the target data into a pre-constructed target model to obtain a recognition result;
the determination unit is further configured to determine whether the recognition result includes a walking feature or a static feature;
the determining unit is further configured to determine whether the walking feature or the still feature lasts for a second preset time from the current second when the walking feature or the still feature is included in the recognition result;
the determining unit is further configured to determine that the driver to be tested uses the terminal device from the end of the current second and enters a walking or stationary state when it is determined that the walking feature or the stationary feature continues for the second preset time from the current second.
9. An electronic device, characterized in that the electronic device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the driving behavior detection method of any of claims 1 to 7.
10. A computer-readable storage medium characterized by: the computer-readable storage medium has stored therein at least one instruction that is executable by a processor in an electronic device to implement the driving behavior detection method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911319425.8A CN111209796B (en) | 2019-12-19 | 2019-12-19 | Driving behavior detection method and device, electronic equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911319425.8A CN111209796B (en) | 2019-12-19 | 2019-12-19 | Driving behavior detection method and device, electronic equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111209796A true CN111209796A (en) | 2020-05-29 |
CN111209796B CN111209796B (en) | 2023-08-29 |
Family
ID=70788194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911319425.8A Active CN111209796B (en) | 2019-12-19 | 2019-12-19 | Driving behavior detection method and device, electronic equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111209796B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107679557A (en) * | 2017-09-19 | 2018-02-09 | 平安科技(深圳)有限公司 | Driving model training method, driver's recognition methods, device, equipment and medium |
CN108549911A (en) * | 2018-04-18 | 2018-09-18 | 清华大学 | Driver based on neural network turns to intervention recognition methods |
WO2019165838A1 (en) * | 2018-03-01 | 2019-09-06 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for identifying risky driving behavior |
-
2019
- 2019-12-19 CN CN201911319425.8A patent/CN111209796B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107679557A (en) * | 2017-09-19 | 2018-02-09 | 平安科技(深圳)有限公司 | Driving model training method, driver's recognition methods, device, equipment and medium |
WO2019165838A1 (en) * | 2018-03-01 | 2019-09-06 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for identifying risky driving behavior |
CN108549911A (en) * | 2018-04-18 | 2018-09-18 | 清华大学 | Driver based on neural network turns to intervention recognition methods |
Also Published As
Publication number | Publication date |
---|---|
CN111209796B (en) | 2023-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110741388B (en) | Confrontation sample detection method and device, computing equipment and computer storage medium | |
CN108701229B (en) | Driving behavior analysis method and driving behavior analysis device | |
CN109740424A (en) | Traffic violations recognition methods and Related product | |
US8615137B2 (en) | Method for recognizing pattern, pattern recognizer and computer program | |
CN103473492A (en) | Method and user terminal for recognizing permission | |
CN112257542A (en) | Obstacle sensing method, storage medium, and electronic device | |
CN112113581A (en) | Abnormal step counting identification method, step counting method, device, equipment and medium | |
CN114626477A (en) | Target detection method, device and equipment | |
CN116011225A (en) | Scene library generation method, test method, electronic device and storage medium | |
CN110853364B (en) | Data monitoring method and device | |
CN110795706B (en) | Hash-based verification method, equipment, storage medium and device | |
CN111090849A (en) | Memory, verification code implementation method, device and equipment | |
EP3444745B1 (en) | System and method for authenticating dynamic movement tracking-based handwritten signature for space division segment | |
CN111209796B (en) | Driving behavior detection method and device, electronic equipment and medium | |
CN108010357B (en) | Speed limit information checking/counting method, device and system | |
CN114996109B (en) | User behavior recognition method, device, equipment and storage medium | |
CN111177878A (en) | Method, device and terminal for screening derivative simulation scenes | |
CN106295559A (en) | Method, fingerprint identification device and the display device that a kind of data process | |
CN112860821A (en) | Human-vehicle trajectory analysis method and related product | |
CN113326829B (en) | Method and device for recognizing gesture in video, readable storage medium and electronic equipment | |
CN114475641A (en) | Lane departure warning method, lane departure warning device, lane departure warning control device, and storage medium | |
CN103617755A (en) | Test result generation unit and device | |
CN114172705A (en) | Network big data analysis method and system based on pattern recognition | |
CN111860661A (en) | Data analysis method and device based on user behavior, electronic equipment and medium | |
CN114078324A (en) | Vehicle jamming behavior detection method and device, road side equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |