CN114332520B - Abnormal driving behavior recognition model construction method based on deep learning - Google Patents
Abnormal driving behavior recognition model construction method based on deep learning Download PDFInfo
- Publication number
- CN114332520B CN114332520B CN202210243693.1A CN202210243693A CN114332520B CN 114332520 B CN114332520 B CN 114332520B CN 202210243693 A CN202210243693 A CN 202210243693A CN 114332520 B CN114332520 B CN 114332520B
- Authority
- CN
- China
- Prior art keywords
- data
- dimension
- loss
- encoder
- abnormal driving
- 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.)
- Active
Links
- 230000006399 behavior Effects 0.000 title claims abstract description 123
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 95
- 238000013135 deep learning Methods 0.000 title claims abstract description 25
- 238000010276 construction Methods 0.000 title claims description 7
- 238000000034 method Methods 0.000 claims abstract description 64
- 238000012549 training Methods 0.000 claims abstract description 51
- 230000008569 process Effects 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 239000000725 suspension Substances 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 description 33
- 230000006870 function Effects 0.000 description 16
- 230000001133 acceleration Effects 0.000 description 6
- 206010000117 Abnormal behaviour Diseases 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 206010039203 Road traffic accident Diseases 0.000 description 2
- 230000001174 ascending effect Effects 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000013136 deep learning model Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 235000006629 Prosopis spicigera Nutrition 0.000 description 1
- 240000000037 Prosopis spicigera Species 0.000 description 1
- 230000002547 anomalous effect Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Traffic Control Systems (AREA)
Abstract
The embodiment of the invention discloses a method for constructing an abnormal driving behavior recognition model based on deep learning, which comprises the following steps: the method comprises the steps of obtaining operation data of an automobile at a plurality of moments, wherein the operation data reflect driving behaviors of a driver at the plurality of moments; training the self-encoder to be trained by utilizing the running data at the multiple moments; constructing an abnormal driving behavior recognition model by using the trained self-encoder and the cluster recognizer; the clustering recognizer is used for clustering the output data of the trained self-encoder and recognizing abnormal driving behaviors. The embodiment gives consideration to the main information of each dimension, and can improve the identification accuracy.
Description
Technical Field
The embodiment of the invention relates to the technical field of artificial intelligence, in particular to a method for constructing an abnormal driving behavior recognition model based on deep learning.
Background
The driving behavior of the driver has an important influence on the running process of the automobile, and the abnormal driving behavior can generate serious traffic accidents. In order to improve the driving behavior of the driver, it is necessary to analyze the driving behavior and identify abnormal driving behavior.
In the existing abnormal driving behavior recognition method based on deep learning, a deep learning network model is usually trained by using feature data representing driving behaviors and labeled abnormal driving behaviors, only a final recognition result is concerned, and whether specific information in the feature data is reserved or not is not concerned, so that the recognition accuracy is influenced.
Disclosure of Invention
The embodiment of the invention provides a method for constructing an abnormal driving behavior recognition model based on deep learning, which considers the main information of each dimension in characteristic data and improves the recognition accuracy.
In a first aspect, an embodiment of the present invention provides a method for constructing an abnormal driving behavior recognition model based on deep learning, including:
the method comprises the steps of obtaining operation data of an automobile at a plurality of moments, wherein the operation data reflect driving behaviors of a driver at the plurality of moments;
training the self-encoder to be trained by utilizing the running data at the multiple moments;
constructing an abnormal driving behavior recognition model by using the trained self-encoder and the cluster recognizer; the clustering recognizer is used for clustering the output data of the trained self-encoder and recognizing abnormal driving behaviors;
wherein, the training process comprises the following operations:
selecting operation data at one moment from the multiple moments and inputting the operation data into the self-encoder to be trained to obtain first data; calculating a first loss based on the operational data and the first data;
respectively inputting the operation data of each dimension in the multiple dimensions at the moment into the self-encoder to be trained to respectively obtain data corresponding to each dimension; calculating a loss corresponding to each dimension according to the first data and the data corresponding to each dimension;
updating parameters of the self-encoder to be trained according to the first loss and the loss corresponding to each dimension;
and selecting the running data of a moment from the unselected moments to input into the updated self-encoder, and returning to the calculation operation of the first loss until the training suspension condition is met.
In a second aspect, an embodiment of the present invention further provides a method for identifying abnormal driving behavior based on deep learning, including:
the method comprises the steps of obtaining operation data of an automobile at a plurality of moments, wherein the operation data reflect driving behaviors of a driver at the plurality of moments;
inputting the operation data into an abnormal driving behavior recognition model, and recognizing abnormal driving behaviors in the driving behaviors; the abnormal driving behavior recognition model is constructed by adopting the method of any one of claims 1 to 7 and comprises a trained self-encoder and a cluster recognizer;
the identification process comprises the following operations:
respectively inputting the running data of each moment into the trained self-encoder to respectively obtain first data of each moment;
and inputting the first data of the plurality of moments into the cluster recognizer to obtain abnormal driving behaviors in the driving behaviors.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for constructing the abnormal driving behavior recognition model based on deep learning or the method for recognizing the abnormal driving behavior based on deep learning according to any embodiment.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for constructing the abnormal driving behavior recognition model based on deep learning or the method for recognizing the abnormal driving behavior based on deep learning according to any embodiment.
Different driving behavior dimensions are considered in the self-encoder training process, the overall loss is calculated according to overall information loss in multiple dimensions and independent information loss in each dimension, so that the encoded data can maintain overall main information and give consideration to main information in each dimension, the requirements of driver abnormal driving behavior identification in different dimensions are met, and the identification accuracy is improved. Meanwhile, the embodiment optimizes the training mode, and performs parameter updating once after encoding the whole operation data of multiple dimensions and the operation data of each dimension once, so that compared with the parameter updating performed after each encoding, the method reduces the parameter updating times, avoids invalid parameter fluctuation caused by updating before the whole loss function is calculated, and enables the network convergence speed to be faster.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for constructing an abnormal driving behavior recognition model based on deep learning according to an embodiment of the present invention.
Fig. 2 is a flowchart of an abnormal driving behavior recognition method based on deep learning according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The embodiment of the invention provides a method for constructing an abnormal driving behavior recognition model based on deep learning, which is suitable for recognizing the abnormal driving behavior of a driver through the running data of an automobile, and is executed by electronic equipment. The flowchart of the method is shown in fig. 1, and the method provided by this embodiment specifically includes:
and S110, acquiring the running data of the automobile at a plurality of moments, wherein the running data reflects the driving behaviors of the driver at the plurality of moments.
The operating data of the vehicle means data generated during the operation of the vehicle. The driving behavior of the driver is objectively reflected in the vehicle data, and each time corresponds to one driving behavior. Table 1 shows several types of operational data, and as shown in table 1, 10 types of operational data of the vehicle at a time point reflect the driving behavior of the driver at that time point. The actual operation data types are far more than 10, and the more the data types are, the more accurate the driving behavior is reflected. And the running data at the multiple moments are used for training the self-encoder to be trained.
TABLE 1
Data type | |
1 | Mileage proportion of hand brake per hundred kilometers |
2 | Average parking time per hundred kilometers |
3 | Number of rapid accelerations per hundred kilometers |
4 | Number of emergency braking per hundred kilometers |
5 | Ratio of sliding in neutral gear of hundred kilometers per |
6 | Low-grade high-speed operation ratio of every hundred kilometers |
7 | High-grade low-speed operation proportion per hundred kilometers |
8 | Proportion of overspeed operation per hundred kilometers |
9 | Every hundred kilometersAverage number of stops |
10 | Number of accelerator steps per hundred kilometers of parking |
In particular, optionally, the operating data of the vehicle is acquired via a vehicle networking big data, a T-BOX or CAN bus or the like. In addition, due to the reasons of automobile gear shifting, data transmission fluctuation, sensor abnormity and the like, the acquired operation data comprises noise and invalid data, and the noise and the invalid data can be filtered by using Kalman filtering.
And S120, training the self-encoder to be trained by utilizing the running data at the multiple moments.
S130, constructing an abnormal driving behavior recognition model by using the trained self-encoder and the cluster recognizer; the clustering recognizer is used for clustering the output data of the trained self-encoder and recognizing abnormal driving behaviors.
The abnormal driving behavior recognition model constructed in the embodiment includes: a trained self-encoder and a cluster recognizer. The trained self-encoder is used for carrying out compression encoding on the running data of the automobile at each moment so as to reduce the data types; the cluster recognizer is used for clustering the coded data and recognizing abnormal driving behaviors. It should be noted that the reduced data type retains the information of the original data type, but is not necessarily a subset of the original data type.
Specifically, the types of the acquired operation data are more, and the modules of the automobile are coupled to operate, so that the operation data of each type are strongly correlated, and more noise, details and repeated information are reserved in the operation data. If the clustering recognizer is directly used for clustering the running data, the problems of high operation complexity, low accuracy and the like can occur. The run data is therefore first encoded using self-encoding, reducing the data type. And the self-encoder can analyze the relation among the operation data while reducing the dimension, and key information in the operation data is reserved. In addition, the self-coding is an unsupervised learning mode and can solve the problem that training samples are not labeled.
In the embodiment shown in table 1, it is assumed that the operation data at each time includes 30 data types (10 of which are shown in table 1). And inputting 30 types of operation data into a self-encoder to be trained, and then performing compression encoding, so that the encoded data comprises 4 data types. The 4 data types are not necessarily 4 of the 30 data types.
For simplicity, 30 types of operation data can be understood as 30-dimensional operation data, and output data can be understood as 4-dimensional output data, so that the most representative information in the 30-dimensional operation data is retained in the 4-dimensional output data. The clustering recognizer is used for clustering the 4-dimensional data at the multiple moments, and finally recognizing abnormal driving behaviors of the driver at the multiple moments.
The training process for the self-encoder is detailed below. The present embodiment divides a plurality of data types into a plurality of dimensions. Optionally, the plurality of dimensions comprises: driving risk and driving cost. The present embodiment classifies data types from both security and cost perspectives. On the one hand, abnormal driving behavior may cause serious traffic accidents, resulting in huge casualties and property loss, and thus improper driving behavior of drivers may increase driving risks. On the other hand, the non-normative driving behaviors can increase the operation cost of the motor vehicle, for example, behaviors such as a driver who steps on an accelerator suddenly and a high-grade low-grade driver can generate extra oil consumption, the driving economy is reduced, and the driving operation cost (referred to as the driving cost for short) is increased.
For example, the operational data for the driving risk dimension includes: the driving mileage proportion of the hand brake per hundred kilometers, the number of times of rapid acceleration per hundred kilometers, the number of times of rapid braking per hundred kilometers and the like; operational data for the driving cost dimension includes: average parking time per hundred kilometers, times of rapid acceleration per hundred kilometers, times of rapid braking per hundred kilometers and the like. Table 2 shows the dimensions to which the 10 data types in table 1 belong.
TABLE 2
As shown in table 2, there are some data types that have intersections in different dimensions, for example, the number of hard accelerations per hundred kilometers and the number of hard brakes per hundred kilometers belong to both the driving risk dimension and the driving cost dimension.
In order to ensure that the coded data contains information of each dimension, the traditional self-coder needs to train two sets of deep learning models and respectively code the running data of the driving risk dimension and the driving cost dimension. The embodiment provides an improved self-encoder training method, which ensures that a trained self-encoder can keep information of each dimension while reducing data types by optimizing a training process and a loss function, and can complete running data encoding of multiple dimensions by using a deep learning model.
Specifically, the following operations are also included in the training process of the self-encoder:
s121, selecting running data at one moment from the multiple moments and inputting the running data into the self-encoder to be trained to obtain first data; a first loss is calculated based on the operational data and the first data.
In this embodiment, the running data at one time is selected from the multiple times as a training sample, and the self-encoder to be trained is trained. The operating data includes information of a plurality of dimensions. Specifically, firstly, the running data at that time is input into a self-encoder to be trained for encoding, and encoded data is obtained. For convenience of distinction and description, the encoded data is referred to as first data.
Then, a first loss is calculated based on the operational data and the first data. The first loss is used for representing the loss of the running data caused by the coding.
Optionally, calculating a first loss from the operational data and the first data comprises: decoding the first data by using a decoder to obtain second data; a first loss is calculated based on the operational data and the second data.
Since the data type in the first data is less than the data type in the running data, there is no comparability. Therefore, in the embodiment, the decoder corresponding to the self-encoder is adopted to decode the encoded data, so that the decoded data is used to restore the operating data. For convenience of distinction and description, the decoded data is referred to as second data. The data type in the second data is the same as the operation data, and the data type and the operation data are comparable. And calculating the first loss through the restored second data and the real operation data.
Optionally, the first loss is calculated according to the following formula:
wherein,L 0the first loss is represented by the first loss,nindicating the number of data types in the operating data,x i is shown asiA second data of the respective data type,y i is shown asiRun data of a data type. In the specific embodiments shown in tables 1 and 2,n=30。
s122, respectively inputting the operation data of each dimension in the multiple dimensions at the moment into the self-encoder to be trained to respectively obtain data corresponding to each dimension; calculating a loss corresponding to each dimension based on the first data and the data corresponding to each dimension.
Since the running data of multiple dimensions are put together for encoding in S121, it cannot be guaranteed that the encoded data retains information of different dimensions at the same time. This step therefore increases the information loss for each dimension as a constraint term for the loss function.
Specifically, firstly, one dimension is selected from the multiple dimensions as a target dimension, and the running data of the target dimension is input into the self-encoder to be trained as a training sample for encoding to obtain encoded data. For simplicity, this data is referred to as data corresponding to the target dimension.
Then, based on the first data and the data corresponding to the target dimension, information loss in the target dimension is calculated. For simplicity, this loss is referred to as the loss corresponding to the target dimension.
Optionally, the penalty corresponding to the target dimension is calculated according to the following formula:
wherein,mindicating the number of data types the operational data corresponding to each dimension includes,L j to indicate thatjThe loss in one of the dimensions is,f i,j the representation corresponds tojData of individual dimensioniThe data of the individual data types is,f i,0indicating the first data toiData of a data type. In the embodiments shown in tables 1 and 2,m=4;jand =1 and 2, respectively representing two dimensions of driving risk and driving cost.
And finally, selecting one dimension from the unselected dimensions as a new target dimension, and returning to the encoding operation of the running data of the target dimension until each dimension is selected.
S123, updating the parameters of the self-encoder to be trained according to the first loss and the loss corresponding to each dimension.
Constructing an overall loss function of the self-coding training by taking the loss corresponding to each dimension as a constraint term of the first loss:
in the embodiments shown in tables 1 and 2, the number of information dimensionsNNumber of data types in run data =2n=30, number of data types in the encoded first data and data corresponding to each dimensionm=4。
In the overall loss function (3), the first lossL 0The loss of the running data of multiple dimensions caused by coding is limited, namely the information loss of the whole running data after coding; corresponding to the loss of each dimensionL j The information loss of the encoded data in each dimension is limited. By minimizing the overall loss function, the overall main information of the running data can be kept in the encoded data, important information in each dimension is considered, and a large amount of information loss in the dimension concerned by a user is avoided. Taking two dimensions of driving risk and driving cost as an example, the present embodiment can obtain driving risk information and driving cost information in data encoding, and further give consideration to driving safety and driving cost in the recognition of abnormal driving behavior.
And S124, selecting the running data of a moment from the unselected moments to input into the updated self-encoder, and returning to the calculation operation of the first loss until the training suspension condition is met.
Unlike the conventional method of performing a parameter update after a data encoding, the present embodiment performs a parameter update after a data encodingNAfter +1 times of data coding, according toNAnd calculating the integral loss once according to the coding result +1 times, updating the parameters once, wherein each updating is based on the integral loss function, so that the updating times are reduced, unnecessary fluctuation of network parameters caused by updating the parameters before the integral loss function is calculated is avoided, and the network convergence speed is improved.
Optionally, the training termination condition comprises at least one of: the overall loss is less than a set threshold (e.g., 0.01), the number of trains reaches a set threshold (e.g., 50000), or the plurality of time instants are all selected. This embodiment is not limited thereto.
The technical effects of the embodiment are as follows: in the embodiment, different driving behavior dimensions are considered in the self-encoder training process, and the overall loss is calculated according to the overall information loss in multiple dimensions and the independent information loss in each dimension, so that the encoded data can maintain the overall main information and also take the main information in each dimension into consideration, and the requirements of identifying abnormal driving behaviors of drivers in different dimensions are met. Meanwhile, the embodiment optimizes the training mode, and performs parameter updating once after encoding the whole operation data of multiple dimensions and the operation data of each dimension once, so that compared with the parameter updating performed after each encoding, the method reduces the parameter updating times, avoids invalid parameter fluctuation caused by updating before the whole loss function is calculated, and enables the network convergence speed to be faster.
On the basis of the above embodiment and the following embodiment, the operation data of the target dimension is refined. Optionally, the respectively inputting the operation data of each of the multiple dimensions of the time point into the self-encoder to be trained includes: and setting the operation data of other dimensions of the moment to zero to obtain the operation data of each dimension of the moment, wherein the other dimensions refer to the dimensions except for each dimension in the plurality of dimensions.
In the specific embodiments shown in tables 1 and 2, in order to ensure that the sizes of data input from the encoder are consistent, the operation data not belonging to the driving risk dimension is set to 0, and the operation data of the driving risk dimension is formed; and setting the operation data which do not belong to the driving cost dimension to be 0 to form the operation data of the driving cost dimension. Namely:
on the basis of the above-described embodiment and the following embodiments, the present embodiment optimizes the overall loss function. Optionally, updating parameters of the to-be-trained self-encoder according to the first loss and the loss corresponding to each dimension includes: weighting the loss corresponding to each dimension according to the weight of each dimension; and updating the parameters of the self-encoder to be trained according to the first loss and the weighted loss corresponding to each dimension.
This embodiment sets a different weight for each dimension for weighting the loss corresponding to each dimension. The greater the weight of a dimensionThe more stringent the loss control in the overall loss function for that dimension, the less information is lost in that dimension for the newly encoded data. At this time, the overall loss functionLThe calculation formula of (a) is optimized as follows:
In one embodiment, two ways of determining the weights are provided.
The first mode is that different weights are determined according to the requirements of users.
And acquiring the weight value input by the user. If the weight of the input of one dimension is larger, the dimension is indicated as the dimension which is focused on by the user. If the weight of a dimension input is small, it indicates that the user has a low degree of interest in the dimension.
And secondly, determining different weights according to the information loss in each dimension in the first loss.
Alternatively, if the overall loss is still greater than a set threshold (e.g., 0.2) after a set number of trainings (e.g., 20000), then different weights may be modified according to the first loss of the last training. Specifically, in the calculation process of the first loss of the latest training, after the decoder is used for decoding the first data to obtain the second data, the weight of each dimension is determined according to the running data and the second data of each dimension.
According to the embodiment, the data dimension causing large overall loss is determined according to the operation data and the second data, and a large weight is set for the determined dimension.
Alternatively, if the number of data types having a degree of difference greater than a set percentage (e.g., 50%) is greater than the other dimensions in the operational data and the second data of one dimension, the weight of the dimension is increased. Shown in tables 1 and 2In a specific embodiment, it is assumed that four data types with a difference degree greater than 50% are provided in the operation data of the driving risk dimension and the second data, and the four data types are respectively a ratio of driving mileage with a hand brake per hundred kilometers, a number of rapid acceleration times per hundred kilometers, a number of rapid braking times per hundred kilometers and a low-grade high-speed operation ratio per hundred kilometers; in the operation data and the second data of the driving cost dimension, two data types with the difference degree larger than 50% are provided, namely the number of times of rapid acceleration per hundred kilometers and the number of times of rapid braking per hundred kilometers. This indicates that in the conventional self-encoder, the driving risk dimension is the main cause of the large overall loss, and the weight of the driving risk dimension is increased accordingly, so that the overall loss function is implementedLThe loss limit of the driving risk dimension is stricter, and the convergence speed of the driving risk dimension is accelerated.
Optionally, if the data type data with the difference degree in the ascending trend is larger than that of the other dimensions in the running data and the second data of one dimension, the weight of the dimension is increased. In the specific embodiment shown in table 1 and table 2, it is assumed that the difference degree of 1 data type in the operation data and the second data of the driving risk dimension is in an ascending trend in the previous 5000 times of encoding and decoding processes; in the running data and the second data of the driving cost dimension, the difference degree of one data type does not trend to rise in the previous 5000 times of encoding and decoding processes. This indicates that in the conventional self-encoder, the driving risk dimension is the main cause of the large overall loss, and the weight of the driving risk dimension is increased accordingly, so as to accelerate the convergence speed of the driving risk dimension.
It should be noted that, in the second method, the weights of different dimensions are not adjusted before each parameter update, but the weights are adjusted once when the overall loss cannot achieve the desired effect after a set number of training. The adjusted weight is kept stable in the subsequent training for a certain number of times; and performing the next weight adjustment until the whole loss can not achieve the expected effect after the training for the set times. Therefore, unstable interference brought to the network by frequent adjustment can be avoided.
This embodiment sets for each dimensionDifferent weights for overall lossLThe loss corresponding to each dimension is weighted, and the influence of the information loss of different dimensions on the network convergence is controlled. The weights of different dimensions can be set according to the requirements of the user, and the attention degree of the user to the different dimensions is highlighted; it is also possible to make settings according to the first loss to speed up the minimization of the first loss.
On the basis of the above-described embodiment and the following-described embodiment, the present embodiment adds training to the abnormal driving behavior recognition model as a whole. Through the training of the self-encoder, the self-encoder is basically stable, and a certain encoding effect can be ensured. The embodiment continues to train the self-encoder and the cluster recognizer as a whole to ensure that abnormal driving behaviors are accurately recognized.
Optionally, after the trained self-encoder and cluster recognizer are used to construct the abnormal driving behavior recognition model, the method further includes the following steps:
and S140, dividing the operating data at a plurality of moments into a plurality of groups, wherein each group comprises at least two moments of operating data.
For example, 50000 pieces of time-point operation data are divided into 100 groups, and each group includes 500 pieces of time-point operation data.
And S150, training the abnormal driving behavior recognition model by using a plurality of groups of operation data obtained by division.
Wherein, the training process comprises the following operations:
and S151, selecting one group of operation data from the plurality of groups of operation data.
And the group of operation data is used as a training sample to train the abnormal driving behavior recognition model.
S152, respectively inputting the operation data of each moment in the group of operation data into the trained self-encoder to respectively obtain first data corresponding to each moment; and calculating a first loss corresponding to each time and a loss corresponding to each dimension according to the operation data and the first data of each time.
For any time, the calculation method of the first loss and the loss corresponding to each dimension is as described in any of the above embodiments, and is not described herein again.
S153, clustering first data corresponding to at least two moments in the group of running data by using the clustering recognizer, and recognizing abnormal driving behaviors in the group of running data; and calculating a second loss according to the identified abnormal driving behavior and the marked abnormal driving behavior.
The second loss is used for representing the loss of the identification result of the abnormal driving behavior identification model, and the loss is related to the self-encoder and the cluster identifier.
Specifically, first, a cluster recognizer is used to cluster first data corresponding to the at least two moments, and to recognize at which moment of the multiple selected moments the abnormal driving behavior occurs to the driver. Optionally, the DBSCAN clustering algorithm is used to cluster the operation data corresponding to most of the normal driving behaviors together to form a normal cluster, and the data deviating from the normal cluster can be determined as the abnormal driving behaviors.
Then, a second loss is calculated based on the identified abnormal driving behavior and the noted abnormal driving behavior. Optionally, if a plurality of abnormal behaviors are identified and the marked abnormal behavior is also a plurality, calculating a second loss by identifying the number of correct abnormal behaviors:
wherein,N l indicating the number of abnormal behaviors that are flagged,N t indicating the number of correctly identified anomalous behaviors.
And S154, updating the parameters of the to-be-trained self-encoder according to the second loss, the first loss corresponding to each moment and the loss corresponding to each dimension.
Optionally, constructing a loss function of the abnormal driving behavior recognition model according to the second loss and the overall loss of the self-encoder:
wherein,L T representing a second loss.
S155, selecting one group of running data from the unselected groups of running data, inputting the running data into the updated self-encoder, and returning to the calculation operation of the first data until a new training suspension condition is met.
Optionally, the new training termination condition comprises at least one of: the loss of the abnormal driving behavior recognition model is less than a set threshold (e.g., 0.01), the number of times of training of the abnormal driving behavior recognition model reaches a set threshold (e.g., 50000), or the sets of operation data are all selected. This embodiment is not limited thereto.
And S160, taking the trained abnormal driving behavior recognition model as a final abnormal driving behavior recognition model.
In this embodiment, a loss function of the abnormal driving behavior recognition model is constructed according to the second loss and the overall loss of the self-encoder, and the abnormal driving behavior recognition model continues to be trained. The method ensures the coding accuracy and the main information of each dimension, and ensures that the identification result of the whole abnormal driving behavior identification model has ideal accuracy. In addition, in the embodiment, after the self-encoder reaches the required encoding accuracy, the training of the abnormal driving behavior recognition model is performed; because the calculated amount of each training of the abnormal driving behavior recognition model is far greater than that of each training of the self-encoder, the calculated amount is greatly reduced compared with the method for directly training the abnormal driving behavior recognition model. In practical application, after the self-encoder reaches the required encoding accuracy, the abnormal driving behavior recognition model can ensure higher recognition accuracy as a whole, and can meet the performance requirement only through a small amount of training.
The embodiment of the invention also provides an abnormal driving behavior recognition method based on deep learning, which is suitable for recognizing the abnormal driving behavior of the driver through the running data of the automobile in the running process, and is executed by electronic equipment. The flowchart of the method is shown in fig. 2, and the method provided by this embodiment specifically includes:
s210, obtaining the running data of the automobile at a plurality of moments, wherein the running data reflects the driving behaviors of the driver at the plurality of moments.
The operation data in the above embodiment is operation data for training, and the operation data acquired in the present embodiment is operation data to be recognized. The operational data of the present embodiment also includes a plurality of dimensions, each dimension including a plurality of data types. The specific dimensions and data types are the same as those in any of the above embodiments, and are not described herein again.
In the specific embodiment shown in tables 1 and 2, the operational data used for training includes two dimensions of driving risk and driving cost, each dimension including 10 data types; accordingly, the operation data to be identified in the present embodiment also includes two dimensions of driving risk and driving cost, each of which includes 30 data types. Except that the specific data values are not exactly the same during the training phase and the recognition phase.
And S220, inputting the operation data into an abnormal driving behavior recognition model, and recognizing abnormal driving behaviors in the driving behaviors.
The abnormal driving behavior recognition model is constructed by adopting the method of any one of the embodiments, and comprises a trained self-encoder and a cluster recognizer. Performing the following operations in the abnormal driving behavior recognition model:
and S221, respectively inputting the running data of each moment into the trained self-encoder to respectively obtain first data of each moment.
S222, inputting the first data at the multiple moments into the cluster recognizer to obtain abnormal driving behaviors in the driving behaviors.
The present embodiment is implemented based on any one of the above embodiments, and has the technical effects of any one of the above embodiments. It should be noted that, when the training process includes the training of the whole abnormal driving behavior recognition model, the trained self-encoder and the trained cluster recognizer refer to the final self-encoder and the final cluster recognizer obtained after the training of the whole abnormal driving behavior recognition model is finished.
Fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device includes a processor 40, a memory 41, an input device 42, and an output device 43; the number of processors 40 in the device may be one or more, and one processor 40 is taken as an example in fig. 3; the processor 40, the memory 41, the input means 42 and the output means 43 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 3.
The memory 41 is a computer-readable storage medium, and can be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the abnormal driving behavior recognition model construction method based on deep learning in the embodiment of the present invention, or the abnormal driving behavior recognition method based on deep learning. The processor 40 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 41, namely, implementing the above-described abnormal driving behavior recognition model construction method based on deep learning, or the abnormal driving behavior recognition method based on deep learning.
The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, memory 41 may further include memory located remotely from processor 40, which may be connected to the device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 42 is operable to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 43 may include a display device such as a display screen.
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for constructing an abnormal driving behavior recognition model based on deep learning or the method for recognizing abnormal driving behavior based on deep learning according to any embodiment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for constructing an abnormal driving behavior recognition model based on deep learning is characterized by comprising the following steps:
the method comprises the steps of obtaining operation data of an automobile at a plurality of moments, wherein the operation data reflect driving behaviors of a driver at the plurality of moments;
training the self-encoder to be trained by utilizing the running data at the multiple moments;
constructing an abnormal driving behavior recognition model by using the trained self-encoder and the cluster recognizer; the clustering recognizer is used for clustering the output data of the trained self-encoder and recognizing abnormal driving behaviors;
wherein, the training process comprises the following operations:
selecting operation data at one moment from the multiple moments and inputting the operation data into the self-encoder to be trained to obtain first data; calculating a first loss based on the operational data and the first data;
respectively inputting the operation data of each dimension in the multiple dimensions at the moment into the self-encoder to be trained to respectively obtain data corresponding to each dimension; calculating a loss corresponding to each dimension according to the first data and the data corresponding to each dimension;
updating parameters of the self-encoder to be trained according to the first loss and the loss corresponding to each dimension;
and selecting the running data of a moment from the unselected moments to input into the updated self-encoder, and returning to the calculation operation of the first loss until the training suspension condition is met.
2. The build method of claim 1, wherein calculating a first loss from the operational data and the first data comprises:
decoding the first data by using a decoder to obtain second data;
a first loss is calculated based on the operational data and the second data.
3. The building method according to claim 1, wherein updating the parameters of the to-be-trained self-encoder according to the first loss and the loss corresponding to each dimension comprises:
weighting the loss corresponding to each dimension according to the weight of each dimension;
and updating the parameters of the self-encoder to be trained according to the first loss and the weighted loss corresponding to each dimension.
4. The build method of claim 3 wherein calculating a first loss from the operational data and the first data comprises:
decoding the first data by using a decoder to obtain second data; calculating a first loss based on the operational data and the second data;
weighting the loss corresponding to each dimension according to the weight of each dimension, comprising:
determining a weight for each dimension based on the operational data and the second data for each dimension.
5. The construction method according to claim 1, wherein after constructing the abnormal driving behavior recognition model by using the trained self-encoder and the cluster recognizer, the construction method further comprises:
dividing the operating data at a plurality of moments into a plurality of groups, wherein each group comprises at least two moments of operating data;
training the abnormal driving behavior recognition model by using a plurality of groups of operation data obtained by division;
taking the trained abnormal driving behavior recognition model as a final abnormal driving behavior recognition model;
wherein, the training process comprises the following operations:
selecting one set of operation data from the plurality of sets of operation data;
respectively inputting the operation data of each moment in the group of operation data into the trained self-encoder to respectively obtain first data corresponding to each moment; calculating a first loss corresponding to each moment and a loss corresponding to each dimension according to the operation data and the first data of each moment;
clustering first data corresponding to at least two moments in the group of operating data by using the cluster recognizer, and recognizing abnormal driving behaviors in the group of operating data; calculating a second loss according to the identified abnormal driving behavior and the marked abnormal driving behavior;
updating the parameters of the to-be-trained self-encoder according to the second loss, the first loss corresponding to each moment and the loss corresponding to each dimension;
and selecting one group of running data from the unselected groups of running data, inputting the selected running data into the updated self-encoder, and returning the calculation operation of the first data until a new training suspension condition is met.
6. The building method according to claim 1, wherein the step of inputting the operation data of each of the plurality of dimensions of the time into the self-encoder to be trained comprises:
and setting the operation data of other dimensions of the moment to zero to obtain the operation data of each dimension of the moment, wherein the other dimensions refer to the dimensions except for each dimension in the plurality of dimensions.
7. The build method of claim 1, wherein the plurality of dimensions comprises: driving risk and driving cost; there is an intersection between the types of data included in the operational data for the driving risk dimension and the operational data for the driving cost dimension.
8. An abnormal driving behavior recognition method based on deep learning is characterized by comprising the following steps:
the method comprises the steps of obtaining operation data of an automobile at a plurality of moments, wherein the operation data reflect driving behaviors of a driver at the plurality of moments;
inputting the operation data into an abnormal driving behavior recognition model, and recognizing abnormal driving behaviors in the driving behaviors; the abnormal driving behavior recognition model is constructed by adopting the method of any one of claims 1 to 7 and comprises a trained self-encoder and a cluster recognizer;
the identification process comprises the following operations:
respectively inputting the running data of each moment into the trained self-encoder to respectively obtain first data of each moment;
and inputting the first data of the plurality of moments into the cluster recognizer to obtain abnormal driving behaviors in the driving behaviors.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the abnormal driving behavior recognition model building method of any one of claims 1-7, or the abnormal driving behavior recognition method of claim 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the abnormal driving behavior recognition model construction method according to any one of claims 1 to 7, or the abnormal driving behavior recognition method according to claim 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210243693.1A CN114332520B (en) | 2022-03-14 | 2022-03-14 | Abnormal driving behavior recognition model construction method based on deep learning |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210243693.1A CN114332520B (en) | 2022-03-14 | 2022-03-14 | Abnormal driving behavior recognition model construction method based on deep learning |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114332520A CN114332520A (en) | 2022-04-12 |
CN114332520B true CN114332520B (en) | 2022-06-17 |
Family
ID=81033222
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210243693.1A Active CN114332520B (en) | 2022-03-14 | 2022-03-14 | Abnormal driving behavior recognition model construction method based on deep learning |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114332520B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116226787B (en) * | 2023-05-04 | 2023-08-01 | 中汽信息科技(天津)有限公司 | Commercial vehicle danger probability prediction method, equipment and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106875511A (en) * | 2017-03-03 | 2017-06-20 | 深圳市唯特视科技有限公司 | A kind of method for learning driving style based on own coding regularization network |
CN107704918A (en) * | 2017-09-19 | 2018-02-16 | 平安科技(深圳)有限公司 | Driving model training method, driver's recognition methods, device, equipment and medium |
CN108491859A (en) * | 2018-02-11 | 2018-09-04 | 郭静秋 | The recognition methods of driving behavior heterogeneity feature based on automatic coding machine |
WO2019056497A1 (en) * | 2017-09-19 | 2019-03-28 | 平安科技(深圳)有限公司 | Driving model training method, driver recognition method, device, apparatus and medium |
CN111666714A (en) * | 2020-06-05 | 2020-09-15 | 北京百度网讯科技有限公司 | Method and device for identifying automatic driving simulation scene |
CN112926510A (en) * | 2021-03-25 | 2021-06-08 | 深圳市商汤科技有限公司 | Abnormal driving behavior recognition method and device, electronic equipment and storage medium |
CN114067243A (en) * | 2021-11-10 | 2022-02-18 | 清华大学 | Automatic driving scene recognition method, system, device and storage medium |
-
2022
- 2022-03-14 CN CN202210243693.1A patent/CN114332520B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106875511A (en) * | 2017-03-03 | 2017-06-20 | 深圳市唯特视科技有限公司 | A kind of method for learning driving style based on own coding regularization network |
CN107704918A (en) * | 2017-09-19 | 2018-02-16 | 平安科技(深圳)有限公司 | Driving model training method, driver's recognition methods, device, equipment and medium |
WO2019056498A1 (en) * | 2017-09-19 | 2019-03-28 | 平安科技(深圳)有限公司 | Driving model training method, driver recognition method, device, apparatus and medium |
WO2019056497A1 (en) * | 2017-09-19 | 2019-03-28 | 平安科技(深圳)有限公司 | Driving model training method, driver recognition method, device, apparatus and medium |
CN108491859A (en) * | 2018-02-11 | 2018-09-04 | 郭静秋 | The recognition methods of driving behavior heterogeneity feature based on automatic coding machine |
CN111666714A (en) * | 2020-06-05 | 2020-09-15 | 北京百度网讯科技有限公司 | Method and device for identifying automatic driving simulation scene |
CN112926510A (en) * | 2021-03-25 | 2021-06-08 | 深圳市商汤科技有限公司 | Abnormal driving behavior recognition method and device, electronic equipment and storage medium |
CN114067243A (en) * | 2021-11-10 | 2022-02-18 | 清华大学 | Automatic driving scene recognition method, system, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114332520A (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112201069B (en) | Deep reinforcement learning-based method for constructing longitudinal following behavior model of driver | |
CN114332520B (en) | Abnormal driving behavior recognition model construction method based on deep learning | |
CN111666714B (en) | Automatic driving simulation scene recognition method and device | |
CN111784699B (en) | Method and device for carrying out target segmentation on three-dimensional point cloud data and terminal equipment | |
CN116415200A (en) | Abnormal vehicle track abnormality detection method and system based on deep learning | |
CN116453343A (en) | Intelligent traffic signal control optimization algorithm, software and system based on flow prediction in intelligent networking environment | |
CN114137967B (en) | Driving behavior decision method based on multi-network joint learning | |
CN113255750B (en) | VCC vehicle attack detection method based on deep learning | |
CN114005297A (en) | Motorcade coordinated driving method based on Internet of vehicles | |
CN112462759B (en) | Evaluation method, system and computer storage medium of rule control algorithm | |
CN116258088B (en) | Tire tightening control parameter optimization method, electronic device and storage medium | |
CN117237475A (en) | Vehicle traffic track generation method and device based on diffusion generation model | |
CN112699836A (en) | Segmentation method and device for low-altitude paddy field image and electronic equipment | |
CN116461507A (en) | Vehicle driving decision method, device, equipment and storage medium | |
CN115080388B (en) | Automatic driving system-oriented simulation test scene generation method | |
CN113918475B (en) | Test processing method and device, computer equipment and storage medium | |
CN113954863B (en) | Vehicle track prediction method based on dual-attention mechanism and improved Social Gan | |
CN113361649B (en) | Autonomous ship navigation scene clustering method for improving fuzzy C-means algorithm | |
CN115438786A (en) | Robust neural network training method based on sample-driven target loss function optimization | |
CN114332699A (en) | Road condition prediction method, device, equipment and storage medium | |
CN116567719B (en) | Data transmission method, vehicle-mounted system, device and storage medium | |
CN112734030B (en) | Unmanned platform decision learning method for empirical playback sampling by using state similarity | |
CN117523821B (en) | System and method for predicting vehicle multi-mode driving behavior track based on GAT-CS-LSTM | |
CN118172941B (en) | Traffic light control method and device based on wireless communication | |
CN115828638B (en) | Automatic driving test scene script generation method and device and electronic equipment |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230704 Address after: Room 416, scientific research building, 68 Xianfeng East Road, Dongli District, Tianjin Patentee after: China automobile information technology (Tianjin) Co.,Ltd. Patentee after: DONGFENG AUTOMOBILE Co.,Ltd. Address before: Room 416, scientific research building, 68 Xianfeng East Road, Dongli District, Tianjin Patentee before: China automobile information technology (Tianjin) Co.,Ltd. |
|
TR01 | Transfer of patent right |