Driving style determination method and device and electronic equipment
By identifying driving scenarios and using corresponding Gaussian mixture models and neural network models, the problems of low driving style classification accuracy and high computational complexity in existing technologies are solved, and accurate classification and efficient identification of driver styles are achieved, supporting the development of intelligent driving.
Patent Information
- Application Number
- CN202511109699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-10-17
AI Technical Summary
Existing driving style classification methods fail to effectively reveal the complex correlation between driving behavior characteristics and ignore the selection of clustering feature values in different driving scenarios, resulting in low driver modeling and recognition accuracy. In addition, the Gaussian mixture model has high computational complexity and is time-consuming when processing complex data.
By identifying the target driving scenario and extracting features based on the correspondence between the driving scenario and driving behavior characteristics, a neural network model is used to classify the driving scenarios using the corresponding Gaussian mixture model. The model parameters are optimized by combining the adversarial training of the generator and the discriminator to construct the target Gaussian mixture model.
It improves the accuracy and efficiency of driving style classification, reduces computational complexity and memory consumption, can accurately identify driver styles in different driving scenarios, supports the development of advanced vehicle control strategies, and enhances driving comfort and intelligence.
Smart Images

Figure CN120792836A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of driving style classification, and particularly relate to a driving style determination method and device and electronic equipment. BACKGROUND
[0002] In existing research, driving style classification usually relies on statistical features based on natural driving data. However, these statistical features mainly reflect the size of driving behavior characteristic quantities, and fail to reveal the complex correlation between features, thereby possibly reducing the accuracy of driver modeling and identification. In addition, in the existing algorithm for establishing a style using a Gaussian mixture model, the same set of statistics is used for all driving scenarios, and the selection of clustering characteristic values in different scenarios is not considered, ignoring the influence of scenarios on features. SUMMARY
[0003] Embodiments of the present application provide a driving style determination method and device and electronic equipment, aiming to improve the problem of using the same set of statistics for all driving scenarios in the existing algorithm for establishing a style using a Gaussian mixture model.
[0004] In a first aspect, embodiments of the present application provide a driving style determination method, comprising:
[0005] determining a target driving scenario of a target vehicle based on target driving data of the target vehicle in a target time period;
[0006] extracting driving behavior characteristics corresponding to the target driving scenario based on a corresponding relationship between driving scenarios and driving behavior characteristics;
[0007] inputting the driving behavior characteristics corresponding to the target driving scenario into a target Gaussian mixture model corresponding to the target driving scenario to obtain a target driving style in the target driving scenario.
[0008] The above embodiment of the present application first acquires target driving data of a target vehicle, and identifies a target driving scene based on the target driving data. Since the driving scene and the driving behavior feature have a corresponding relationship, the required driving behavior feature in the current scene can be determined through the above corresponding relationship, and the driving behavior feature corresponding to the target driving scene is extracted from the target driving data. The above scheme considers the selection of the clustering feature value in different scenes, and pays attention to the influence of the scene on the feature. Moreover, the driving behavior feature corresponding to the target driving scene is input into a target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style in the target driving scene. Since different driving scenes correspond to different target Gaussian mixture models, the driving behavior feature of different driving scenes is input into the target Gaussian mixture model corresponding to the driving scene, thereby reflecting the connection between the scene and the target Gaussian mixture model, and thus the driving styles of drivers in different driving scenes can be effectively classified.
[0009] In a second aspect, an embodiment of the present application provides a driving style determination apparatus, comprising:
[0010] A determination module configured to determine a target driving scene of a target vehicle based on target driving data of the target vehicle in a target time period.
[0011] An extraction module configured to extract a driving behavior feature corresponding to the target driving scene based on a corresponding relationship between the driving scene and the driving behavior feature.
[0012] An acquisition module configured to input the driving behavior feature corresponding to the target driving scene into a target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style in the target driving scene.
[0013] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory.
[0014] The memory is configured to store a computer program.
[0015] The processor is configured to execute the program stored in the memory to implement the method of the first aspect.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method of the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 FIG. 1 is a flowchart of a driving style determination method according to an embodiment of the present application;
[0018] Figure 2is a training flowchart of a target Gaussian mixture model provided by an embodiment of the present application;
[0019] Figure 3 is a structural diagram of a driving style determination device provided by an embodiment of the present application;
[0020] Figure 4 is a structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the technical problems, technical solutions and beneficial effects solved by the present application clearer, the present application will be further described in detail below in combination with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application.
[0022] In existing research, when using the K-means clustering algorithm, the time sequence mapping relationship between the historical data and the current data of the same driver is often ignored, which may cause the style of the same driver to jump. Since the driving intention has time sequence characteristics, there is correlation and mutual influence between driving intentions at different times, and many studies have failed to fully consider this. Therefore, in the case of large data volume and similar features, it is difficult to accurately distinguish different driving intentions only by relying on clustering methods.
[0023] In the existing algorithm for establishing style using a Gaussian mixture model, the selection of clustering characteristic values in different scenarios is not considered, such as considering the following time interval, following distance and other features in the following scenario, and considering the lane changing time feature in the lane changing scenario. Therefore, when establishing a Gaussian mixture model, an algorithm for selecting different features in different scenarios should be considered. Most existing methods for classifying Gaussian mixture models use KL divergence or EM algorithm, but using these two algorithms will cause overfitting problem, and it is very time-consuming to classify high-dimensional data sets, and the computational complexity and memory consumption will increase.
[0024] The determination method for driving style provided by an embodiment of the present application comprises: determining a target driving scene of a target vehicle based on target driving data of the target vehicle in a target time period; extracting driving behavior features corresponding to the target driving scene based on a corresponding relationship between driving scenes and driving behavior features; inputting the driving behavior features corresponding to the target driving scene into a target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style in the target driving scene.
[0025] Specifically, first, target driving data of a target vehicle (i.e., a current vehicle) in a target time period is acquired, the target time period being a continuous time period including a current time. The target driving data includes, but is not limited to, a driver steering wheel angle, a yaw angle feature, and whether a lane line is crossed. A target driving scene is identified through the target driving data, the target driving scene including, but not limited to, a lane changing scene and a following scene.
[0026] It should be noted that the driver steering wheel angle and the yaw angle feature cannot necessarily identify whether the target driving scene is the lane changing scene or the following scene, because the steering wheel angle and the yaw angle will change when following a vehicle on a curve. Therefore, adding the feature of whether the lane line is crossed can improve the accuracy of identifying the target driving scene.
[0027] Because the driving scene and the driving behavior feature have a corresponding relationship, different driving scenes correspond to different driving behavior features, therefore, after the target driving scene is determined, the corresponding driving behavior feature of the target driving scene is determined according to the corresponding relationship, and the target driving data is input into the neural network model to extract the driving behavior feature corresponding to the target driving scene from the target driving data. Because different driving scenes correspond to different target Gaussian mixture models, the driving behavior feature corresponding to the target driving scene is input into the target Gaussian mixture model corresponding to the target driving scene, and the target driving style under the target driving scene is obtained through the target Gaussian mixture model.
[0028] The above scheme first determines the driving behavior feature required to be extracted in the current scene through the above corresponding relationship because the driving scene and the driving behavior feature have a corresponding relationship, and extracts the driving behavior feature corresponding to the target driving scene from the target driving data. The above scheme considers the selection of the clustering feature value in different scenes and pays attention to the influence of the scene on the feature. Moreover, because different driving scenes correspond to different target Gaussian mixture models, the driving behavior feature of different driving scenes is input into the target Gaussian mixture model corresponding to the driving scene, thereby reflecting the connection between the scene and the target Gaussian mixture model, and thus the driving styles of the driver in different driving scenes can be effectively classified.
[0029] Embodiment one
[0030] An embodiment of the present application provides a driving style determination method, please refer to Figure 1 , comprising the following steps:
[0031] S10: determining a target driving scene of a target vehicle based on target driving data of the target vehicle in a target time period;
[0032] S20: extracting driving behavior features corresponding to the target driving scene based on the correspondence between driving scenes and driving behavior features;
[0033] S30: inputting the driving behavior features corresponding to the target driving scene into the target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style under the target driving scene.
[0034] The above embodiments of the present application first acquire target driving data of a target vehicle, and identify a target driving scene based on the target driving data. Since driving scenes and driving behavior features have a correspondence, the required driving behavior features under the current scene can be determined through the above correspondence, and the driving behavior features corresponding to the target driving scene are extracted from the target driving data. The above scheme considers the selection of clustering feature values under different scenes, and pays attention to the influence of scenes on features. Moreover, the present application inputs the driving behavior features corresponding to the target driving scene into the target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style under the target driving scene. Since different driving scenes correspond to different target Gaussian mixture models, the driving behavior features of different driving scenes are input into the target Gaussian mixture model corresponding to the driving scene, thereby reflecting the connection between the scene and the target Gaussian mixture model, and further enabling the driving styles of drivers under different driving scenes to be effectively classified.
[0035] In an optional embodiment, in step S30, the training process of the target Gaussian mixture model corresponding to different driving scenes specifically includes the following steps:
[0036] acquiring driving data samples and dividing the driving data samples into driving data samples corresponding to each driving scene;
[0037] extracting driving behavior features in the driving data samples corresponding to each driving scene based on the correspondence between driving scenes and driving behavior features to obtain first driving behavior features corresponding to each driving scene;
[0038] constructing a Gaussian mixture model corresponding to each driving scene using the first driving behavior features corresponding to each driving scene;
[0039] based on the Gaussian mixture model corresponding to each driving scene, iteratively optimizing parameters of the generator, parameters of the discriminator, and parameters of the Gaussian mixture model corresponding to each driving scene through adversarial training of the generator and the discriminator to obtain a target Gaussian mixture model corresponding to each driving scene.
[0040] Specifically, first, historical driving data (i.e., driving data samples) are acquired, and whether a driving scene is a following scene or a lane-changing scene is identified through a driver steering wheel angle, a yaw angle feature, whether a lane line is crossed, and the like in the driving data samples, and the driving data samples are divided into driving data samples in the following scene and driving data samples in the lane-changing scene, thereby completing classification of the driving data samples in different driving scenes without manual classification of the driving scenes. The driving data samples can be historical trajectories.
[0041] Since the driving scene and the driving behavior feature have a corresponding relationship, the driving behavior feature corresponding to the following scene is acquired, and the first driving behavior feature corresponding to the following scene is extracted from the driving data samples in the following scene through a neural network model (such as a long short-time neural network model), that is, the driving data samples in the following scene are input into the neural network model to obtain the first driving behavior feature corresponding to the following scene. The driving behavior feature corresponding to the lane-changing scene is acquired, and the first driving behavior feature corresponding to the lane-changing scene is extracted from the driving data samples in the lane-changing scene through the neural network model, that is, the driving data samples in the lane-changing scene are input into the neural network model to obtain the first driving behavior feature corresponding to the lane-changing scene.
[0042] The first driving behavior feature corresponding to the following scene is used to construct a Gaussian mixture model (GMM) corresponding to the following scene. In this process, a plurality of representative driving style models are randomly initialized, each model describes the behavior distribution of a typical driver in the form of a GMM, that is, each model corresponds to a driving style. Based on the GMM corresponding to the following scene, the parameters of the generator, the parameters of the discriminator, and the parameters of the GMM corresponding to the following scene are iteratively optimized through the adversarial training of the generator and the discriminator to obtain a target GMM corresponding to the following scene.
[0043] The first driving behavior feature corresponding to the lane-changing scene is used to construct a GMM corresponding to the lane-changing scene. In this process, a plurality of representative driving style models are randomly initialized, each model describes the behavior distribution of a typical driver in the form of a GMM, that is, each model corresponds to a driving style. Based on the GMM corresponding to the lane-changing scene, the parameters of the generator, the parameters of the discriminator, and the parameters of the GMM corresponding to the lane-changing scene are iteratively optimized through the adversarial training of the generator and the discriminator to obtain a target GMM corresponding to the lane-changing scene.
[0044] It should be noted that the number 5 of the randomly initialized driving style models is only an example, and the extremely cautious type, the prudent conservative type, the safe and steady type, the experienced and flexible type, and the adventurous and aggressive type.
[0045] The GMM model is used for combining a plurality of single Gaussian distribution (normal distribution) into a weighted sum, so as to be able to fit a probability density function of any shape. The specific modeling is as follows:
[0046]
[0047] wherein k is the number of sub Gaussian distribution, i is each integer from 1 to k;
[0048] b i representing the weight of the sub Gaussian distribution;
[0049] representing the sum of the probabilities of all sub Gaussian distributions, and the value is 1;
[0050] representing the i-th sub Gaussian distribution model;
[0051] representing the Gaussian distribution of the feature quantity of each driving style model;
[0052] μ i and σ i are the mean matrix and the covariance matrix of the sub Gaussian distribution, respectively;
[0053] In the above embodiment, whether the driving scene is a following scene or a lane changing scene is identified according to the steering wheel angle, the yaw angle characteristics, whether the lane line is crossed and the like of the driver in the driving data sample, and the driving data sample is classified according to the driving scene, so as to complete the classification of the driving data sample in different driving scenes without manual distinguishing of the driving scene. Furthermore, the driving behavior characteristics required for establishing the Gaussian mixture model in each driving scene are screened out by using the long short-time neural network model, the GMM model of the driver in each driving scene is established, each GMM model can be regarded as a joint probability distribution of multi-dimensional data, the typical characteristics of each driving scene are selected to construct the GMM, and the data is cleaned through the neural network, so as to reduce the complexity of the GMM. Since the more complex the GMM model is, the more super parameters the large model has, and the higher the calculation complexity is, and the more computing power is consumed, the calculation complexity is reduced, and the calculation efficiency is improved. Furthermore, the typical driving scene is trained separately, so as to not only avoid blind data stacking and reduce the mutual interference between different driving scenes, but also to classify the driving style of the driver based on different driving scenes.
[0054] In an optional embodiment, in the case that the driving scene is a following scene, the driving behavior characteristics corresponding to the following scene include vehicle speed, acceleration, steering wheel angle, opening and closing degree of the accelerator pedal of the ego vehicle, opening and closing degree of the brake pedal of the ego vehicle and following distance.
[0055] In a case where the driving scene is a lane changing scene, the driving behavior features corresponding to the lane changing scene include: vehicle speed, acceleration, steering wheel angle, opening and closing degree of the accelerator pedal of the ego vehicle, opening and closing degree of the brake pedal of the ego vehicle, and lane changing time.
[0056] Specifically, the corresponding relationship between the driving scene and the driving behavior features includes: the driving behavior features corresponding to the following scene include: vehicle speed, acceleration, steering wheel angle, opening and closing degree of the accelerator pedal of the ego vehicle, opening and closing degree of the brake pedal of the ego vehicle, and time headway; the driving behavior features corresponding to the lane changing scene include: vehicle speed, acceleration, steering wheel angle, opening and closing degree of the accelerator pedal of the ego vehicle, opening and closing degree of the brake pedal of the ego vehicle, and lane changing time.
[0057] Among them, the steering wheel angle, the opening and closing degree of the brake pedal and the opening and closing degree of the accelerator pedal directly reflect the driving behavior of the driver, the vehicle speed and the acceleration indirectly reflect the driving behavior of the driver, the time headway reflects the driving behavior of the driver in the following scene, and the lane changing time reflects the driving behavior of the driver in the lane changing scene.
[0058] Therefore, when constructing the driving style model in the following scene, the feature quantities of the driving behavior features selected are: vehicle speed v, acceleration a, steering wheel angle steer_wheel_angle, opening and closing degree of the accelerator pedal of the ego vehicle Throttle, opening and closing degree of the brake pedal of the ego vehicle Braking, and time headway Time_headway. When constructing the driving style model in the lane changing scene, the feature quantities of the driving behavior features selected are: vehicle speed v, acceleration a, steering wheel angle steer_wheel_angle, opening and closing degree of the accelerator pedal of the ego vehicle Throttle, opening and closing degree of the brake pedal of the ego vehicle Braking, and lane changing time change_lane_time.
[0059] The steering wheel angle steer_wheel_angle, the opening and closing degree of the accelerator pedal of the ego vehicle Throttle, and the opening and closing degree of the brake pedal of the ego vehicle Braking are preferred, and the reasons are as follows: the steering wheel angle steer_wheel_angle is directly related to the turning action of the vehicle and is an important embodiment of the driver's intention to change the driving direction of the vehicle.
[0060] The opening and closing degree of the accelerator pedal of the ego vehicle Throttle directly reflects the driver's demand for vehicle power. When accelerating, the opening and closing degree of the accelerator pedal increases; when decelerating or cruising, the opening and closing degree of the accelerator pedal may decrease or remain unchanged; by analyzing the opening and closing degree of the accelerator pedal and its change, it can be judged whether the driver tends to aggressive driving (such as: frequently stepping on the accelerator) or stable driving (such as: stepping on the accelerator lightly to maintain constant speed).
[0061] The opening and closing degree Braking of the brake pedal of the ego vehicle is directly related to the braking effect of the vehicle. By analyzing the opening and closing degree of the brake pedal and the change thereof, whether the driver frequently uses the brake, the force and timing of the brake and the like during driving can be determined. Under the aggressive driving style, the driver can be more inclined to frequently and heavily use the brake. Under the conservative driving style, the driver can pay more attention to prediction and avoidance of emergency braking.
[0062] Thus, the driving behavior features required for establishing the Gaussian mixture model under each driving scene can effectively classify the driving styles of the driver under different scenes, and accurate driving intention and driving style recognition can help develop advanced vehicle control strategies, which can effectively improve the driving comfort and the intelligent level of the vehicle.
[0063] It should be noted that in step S20, if the target driving scene is the following scene, the corresponding driving behavior features are: the current vehicle speed, the current acceleration, the current steering wheel angle, the opening and closing degree of the accelerator pedal of the ego vehicle (i.e. the opening and closing degree of the accelerator pedal of the target vehicle at present), the opening and closing degree of the brake pedal of the ego vehicle (i.e. the opening and closing degree of the brake pedal of the target vehicle at present) and the current following time interval (i.e. the time interval of the target vehicle passing through the same point with the tail end of the front vehicle in the same lane at present). If the target driving scene is the lane changing scene, the corresponding driving behavior features are: the current vehicle speed, the current acceleration, the current steering wheel angle, the opening and closing degree of the accelerator pedal of the ego vehicle (i.e. the opening and closing degree of the accelerator pedal of the target vehicle at present), the opening and closing degree of the brake pedal of the ego vehicle (i.e. the opening and closing degree of the brake pedal of the target vehicle at present) and the current lane changing time (i.e. the total time experienced from the target vehicle starting to deviate from the center line of the original lane to completely enter the target lane and resume stable straight driving this time).
[0064] In an optional embodiment, the Gaussian mixture model corresponding to each driving scene is iteratively optimized by the parameters of the generator, the parameters of the discriminator and the parameters of the Gaussian mixture model corresponding to each driving scene through the adversarial training of the generator and the discriminator to obtain the target Gaussian mixture model corresponding to each driving scene, comprising:
[0065] For each driving scene, the random noise, the parameters of the Gaussian mixture model corresponding to the driving scene and the first driving style corresponding to the first driving behavior feature are input into the generator to obtain the second driving behavior feature and the second driving style;
[0066] The first driving behavior feature and the first driving style, the second driving behavior feature and the second driving style are input into the discriminator to obtain a judgment result;
[0067] Based on the judgment result, the parameters of the generator, the parameters of the discriminator and the parameters of the Gaussian mixture model corresponding to each driving scene are iteratively optimized through the adversarial training of the generator and the discriminator until the second driving behavior feature, the second driving style and the judgment result all meet the preset requirements, and the target Gaussian mixture model corresponding to the driving scene is obtained.
[0068] A generator network structure and a discriminator network structure are designed. For the following scene:
[0069] The random noise, the parameters of the Gaussian mixture model corresponding to the following scene and the first driving style corresponding to the first driving behavior feature of the following scene are input into the generator to generate the second driving behavior feature and the second driving style related to the following scene.
[0070] The first driving behavior feature and the first driving style of the following scene, the second driving behavior feature and the second driving style generated by the generator are input into the discriminator to obtain the judgment result.
[0071] Based on the judgment result, the parameters of the generator, the parameters of the discriminator and the parameters of the Gaussian mixture model corresponding to the following scene are iteratively optimized through the adversarial training of the generator and the discriminator, so that the second driving behavior feature under each driving style generated by the generator gradually approaches the first driving behavior feature (i.e. the real driving style), and the recognition ability of the discriminator is continuously improved until the second driving behavior feature, the second driving style and the judgment result all meet the preset requirements, and the target Gaussian mixture model corresponding to the following scene is obtained, i.e. until the difference between the result generated by the generator (i.e. the second driving behavior feature and the second driving style) and the real result (i.e. the first driving behavior feature and the first driving style) meets the preset requirements, and the judgment result obtained by the discriminator also meets the preset requirements, at which time the training is stopped, the parameters of the Gaussian mixture model are taken as the final parameters, and the target Gaussian mixture model of the following scene is obtained.
[0072] In addition, the second driving behavior feature finally generated by the generator can be combined with the first driving behavior feature, and the combined driving behavior feature is input into the target Gaussian mixture model of the following scene, and the obtained driving style is compared with the first driving style to verify the accuracy of the driving style generated by the target Gaussian mixture model of the following scene.
[0073] For the lane changing scene:
[0074] The random noise, the parameters of the Gaussian mixture model corresponding to the lane changing scene and the first driving style corresponding to the first driving behavior feature of the lane changing scene are input into the generator to generate the second driving behavior feature and the second driving style related to the lane changing scene.
[0075] The first driving behavior feature of the lane changing scene and the first driving style, the second driving behavior feature generated by the generator and the second driving style are input into the discriminator to obtain a judgment result.
[0076] Based on the judgment result, the parameters of the generator, the parameters of the discriminator and the parameters of the Gaussian mixture model corresponding to the lane changing scene are iteratively optimized through the adversarial training of the generator and the discriminator, so that the second driving behavior feature generated by the generator under each driving style gradually approaches the first driving behavior feature (i.e. the real driving style), and the discriminator continuously improves the ability to identify the second driving behavior feature and the second driving style generated by the generator, until the second driving behavior feature, the second driving style and the judgment result all meet the preset requirements, obtaining the target Gaussian mixture model corresponding to the lane changing scene, that is, until the difference between the result generated by the generator (i.e. the second driving behavior feature and the second driving style) and the real result (i.e. the first driving behavior feature and the first driving style) meets the preset requirements, and the judgment result obtained by the discriminator also meets the preset requirements, at which point the training is stopped, the parameters of the Gaussian mixture model are taken as the final parameters, and the target Gaussian mixture model of the lane changing scene is obtained.
[0077] In an embodiment, the target loss function of the conditional generative adversarial network is as follows:
[0078] min G max D V(D,G)=E ε~Pdata(ε) [log D(ε|δ)]+E z~Pz(z) [log(1-D(G(z|δ)))]
[0079] Wherein, δ represents the generalization of other information, such as the information affecting the quality of the sample, such as the artificial intervention adjustment value, and the data quality.
[0080] G represents the generator, D represents the discriminator, z is random noise, and ε is the parameter of the driver GMM model and the corresponding driving style parameter.
[0081] The target loss function of the whole adversarial training is obtained by the mutual adversarial training of the generator and the discriminator. The discriminator tries to maximize the prediction probability of the real sample and minimize the prediction probability of the generated sample, and the generator tries to maximize D(G(z)), that is, to make the discriminator misjudge the generated sample as the real sample. The goal of the discriminator is to maximize V(D,G), and the goal of the generator is to minimize V(D,G).
[0082] In addition, the second driving behavior feature finally generated by the generator can be combined with the first driving behavior feature, and the combined driving behavior feature can be input into the target Gaussian mixture model of the lane changing scene, and the driving style obtained can be compared with the first driving style to verify the accuracy of the driving style generated by the target Gaussian mixture model of the lane changing scene, and a more accurate driving style label can be obtained.
[0083] In the above embodiment, the conditional generative adversarial network is used to transmit the conditional information to the generator and the discriminator, so that the sample (i.e., the second driving behavior feature) generated by the generator is related to a specific driving style category, the accurate classification of the driving style of the driver is realized, the problem that it is difficult to deal with complex driving data when the Gaussian mixture model is classified by probability is solved, the limitation of the Gaussian mixture model is overcome, the algorithm running speed is improved, and when facing a large-scale driving data set, the calculation complexity and memory consumption are reduced. Moreover, the generator is used to generate samples, which has strong generalization and reduces the dependence on original data accumulation and coverage. Small data volume can complete training, and the overfitting problem is avoided. The conditional generative adversarial network is used for driving style classification, which overcomes the limitation of the Gaussian mixture model in dealing with complex driving data,
[0084] In an optional embodiment, the method for constructing the target loss function of the generator comprises the following steps:
[0085] Based on the first driving behavior feature and the second driving behavior feature, a feature loss function related to the driving style is obtained.
[0086] Based on the driving behavior feature related to the speed in the second driving behavior feature, a smoothness loss function for stabilizing the driving style is obtained.
[0087] Based on the feature loss function and the smoothness loss function, the target loss function of the generator is constructed.
[0088] Specifically, the target loss function of the generator network is composed of two parts. The first part is the feature loss function related to the driving style, and the other part is the smoothness loss function for stabilizing the driving style. The sum of the two loss functions is the target loss function. The smoothness loss function is to ensure that the generated driving style is more stable in behavior. Through the adversarial training of the target loss function of the generator, the stability of the generated driving style can be improved.
[0089] In an embodiment, the target loss function of the generator is specifically represented by the following formula:
[0090] LOSS G = LOSS style (G) + LOSS smooth
[0091] LOSS style (G) =‖F(G(z))-F(x)‖ 2
[0092]
[0093] wherein LOSS G represents a target loss function of the generator;
[0094] LOSS style (G) represents a feature loss function about driving style;
[0095] LOSS smooth represents a smoothness loss function for stabilizing driving style;
[0096] z represents random noise;
[0097] G represents a generator;
[0098] G(z) represents a second driving behavior feature output by the generator;
[0099] F represents a feature extraction network for extracting driving behavior features, i.e., for extracting driving behavior features of input samples, to ensure that the generator not only generates real samples, but also generates samples similar to real samples in the feature space;
[0100] F(x) represents the first driving behavior feature extracted;
[0101] ‖*‖ 2 represents an L2 norm;
[0102] a t represents a driving behavior feature about speed in the second driving behavior feature corresponding to time t (including speed and acceleration), to ensure that the generated driving style does not appear dramatic fluctuations in time series;
[0103] a t+1 represents a driving behavior feature about speed in the second driving behavior feature corresponding to time t+1, to ensure that the generated driving style does not appear dramatic fluctuations in time series;
[0104] T represents the amount of time data, i.e., the number of discrete times contained in the driving behavior sample.
[0105] In the above embodiment, the first driving behavior feature (i.e., the real sample) and the second driving behavior feature (i.e., the generated sample) are subtracted by a characteristic loss function, and then L2 norm calculation is performed to obtain a first loss value; the driving behavior features about speed of every two adjacent times are subtracted to obtain an absolute value, thereby obtaining a second loss value. The first loss value and the second loss value are added to obtain a total loss value of the generator, which measures the difference between the generated sample and the real sample, and is used to jointly optimize the parameters of the generator and the parameters of the Gaussian mixture model, and the introduction of the second loss value can ensure that the generated driving style is more stable in behavior, so as to improve the stability of the generated driving style.
[0106] In an optional embodiment, the method for constructing the target loss function of the discriminator specifically comprises:
[0107] Based on the first driving style and the second driving style, an adversarial style loss function is obtained;
[0108] Based on the adversarial style loss function, the first driving behavior feature, the second driving behavior feature, and a weight coefficient for controlling driving style loss, a target loss function of the discriminator is constructed.
[0109] The discriminator usually uses a Sigmoid activation function as an output layer to map its output to a probability value, and the value is always between [0, 1]. In the driving style classification algorithm, a style-related loss is introduced to ensure that the discriminator not only judges the authenticity of the sample, but also considers the consistency of the driving style. The target loss function of the improved discriminator network increases the adversarial style loss function to improve the ability of the discriminator network in classifying different driving styles.
[0110] In an embodiment, the target loss function of the discriminator is specifically represented by the following formula:
[0111]
[0112] wherein, LOSS D represents the target loss function of the discriminator;
[0113] LOSS style (D) represents the adversarial style loss function;
[0114] D represents the discriminator;
[0115] x represents the first driving behavior feature;
[0116] D(x) represents the prediction probability of the discriminator that x belongs to the real data distribution;
[0117] G(z) represents the second driving behavior feature output by the generator;
[0118] D(G(z)) represents the prediction probability of the discriminator that G(z) belongs to the real data distribution;
[0119] s represents the driving style corresponding to x and the driving style corresponding to G(z);
[0120] D style (s) represents the prediction probability of the discriminator that the driving style s belongs to the real driving style;
[0121] E represents a mathematical expectation function, and the subscript x ~ P data represents that x is obtained by sampling from the real data distribution P data , and the subscript z ~ P z represents that z is obtained by sampling from the data distribution P z generated by the generator, and the subscript s ~ P style represents that s is obtained by sampling from the driving style distribution P style ;
[0122] λ s represents a weight coefficient for controlling the driving style loss.
[0123] In the above embodiment, the is taken as the first term, is taken as the second term, and λ s LOSS style (D) is taken as the third term. The first term is used to measure the misjudgment loss of the discriminator for the real sample, the second term is used to measure the misjudgment loss of the discriminator for the generated sample, and the third term is used to measure the consistency of the driving style. The addition of the third term of the adversarial style loss function in the loss function of the discriminator can improve the ability of the discriminator network in classifying different driving styles, so as to improve the accuracy of identifying the driving style. By minimizing the value of the target loss function of the discriminator to optimize the parameters of the discriminator, the ability of the discriminator to distinguish between real samples and generated samples is improved.
[0124] The training process of the above target Gaussian mixture model will be described below through a specific embodiment:
[0125] As Figure 2 shown, step 201: dividing driving data samples under different driving scenes according to driving data samples;
[0126] Step 202: extracting driving behavior features in the driving data samples corresponding to each driving scene through a neural network model;
[0127] Step 203: constructing a GMM model of each driving scene based on the driving behavior features of each driving scene;
[0128] Step 204: initializing the driving style model of the five driving styles for the GMM model of each driving scene;
[0129] Step 205: designing the generator network;
[0130] Step 206: designing the discriminator network;
[0131] Step 207: performing adversarial training through the generator network and the discriminator network to obtain the target GMM of each driving scene;
[0132] Step 208: merging the real samples (i.e., the first driving behavior features) and the generated samples (i.e., the second driving behavior features);
[0133] Step 209: merging the samples and inputting them into the target GMM of the corresponding driving scene to obtain the driving style.
[0134] The embodiment of the application further provides a driving style determination apparatus 80, please refer to Figure 3 , comprising:
[0135] The determination module 810 is configured to determine a target driving scene of a target vehicle based on target driving data of the target vehicle in a target time period.
[0136] The extraction module 820 is configured to extract driving behavior features corresponding to the target driving scene based on a corresponding relationship between driving scenes and driving behavior features.
[0137] The acquisition module 830 is configured to input the driving behavior features corresponding to the target driving scene into a target Gaussian mixture model corresponding to the target driving scene to obtain a target driving style under the target driving scene.
[0138] Optionally, in the acquisition module 830, the training process of the target Gaussian mixture model comprises:
[0139] The acquisition unit is configured to acquire driving data samples and divide the driving data samples into driving data samples corresponding to each driving scene.
[0140] The extraction unit is configured to extract driving behavior features in the driving data samples corresponding to each driving scene based on a corresponding relationship between driving scenes and driving behavior features to obtain first driving behavior features corresponding to each driving scene.
[0141] The construction unit is configured to construct a Gaussian mixture model corresponding to each driving scene by using the first driving behavior features corresponding to each driving scene.
[0142] The training unit is configured to, based on the Gaussian mixture model corresponding to each driving scene, iteratively optimize parameters of the generator, parameters of the discriminator, and parameters of the Gaussian mixture model corresponding to each driving scene through adversarial training of the generator and the discriminator, to obtain a target Gaussian mixture model corresponding to each driving scene.
[0143] Optionally, the training unit is specifically configured to:
[0144] For each driving scene, random noise, parameters of the Gaussian mixture model corresponding to the driving scene, and a first driving style corresponding to the first driving behavior feature are input into the generator to obtain a second driving behavior feature and a second driving style;
[0145] The first driving behavior feature and the first driving style, the second driving behavior feature and the second driving style are input into the discriminator to obtain a judgment result;
[0146] Based on the judgment result, the parameters of the generator, the parameters of the discriminator, and the parameters of the Gaussian mixture model corresponding to each driving scene are iteratively optimized through adversarial training of the generator and the discriminator until the second driving behavior feature, the second driving style, and the judgment result all meet preset requirements, to obtain a target Gaussian mixture model corresponding to the driving scene.
[0147] Optionally, in the case where the driving scene is a following scene, the driving behavior feature corresponding to the following scene includes vehicle speed, acceleration, steering wheel angle, opening and closing degree of an accelerator pedal of the ego vehicle, opening and closing degree of a brake pedal of the ego vehicle, and following time distance;
[0148] In the case where the driving scene is a lane changing scene, the driving behavior feature corresponding to the lane changing scene includes vehicle speed, acceleration, steering wheel angle, opening and closing degree of an accelerator pedal of the ego vehicle, opening and closing degree of a brake pedal of the ego vehicle, and lane changing time.
[0149] Optionally, the method for constructing the target loss function of the generator specifically includes:
[0150] Based on the first driving behavior feature and the second driving behavior feature, a feature loss function about driving style is obtained;
[0151] Based on the driving behavior feature about speed in the second driving behavior feature, a smoothness loss function for stabilizing driving style is obtained;
[0152] Based on the feature loss function and the smoothness loss function, the target loss function of the generator is constructed.
[0153] Optionally, the target loss function of the generator is specifically represented by the following formula:
[0154] LOSS G = LOSS style (G) + LOSS smooth
[0155] LOSS style (G) = ‖F(G(z)) - F(x)‖ 2
[0156]
[0157] wherein LOSS G represents the target loss function of the generator;
[0158] LOSS style (G) represents a feature loss function about the driving style;
[0159] LOSS smooth represents a smoothness loss function for stabilizing the driving style;
[0160] z represents random noise;
[0161] G represents the generator;
[0162] G(z) represents the second driving behavior feature output by the generator;
[0163] F represents a feature extraction network for extracting driving behavior features;
[0164] F(x) represents the first driving behavior feature extracted;
[0165] ‖*‖ 2 represents an L2 norm;
[0166] a t represents a driving behavior feature about speed in the second driving behavior feature corresponding to time t;
[0167] a t+1 represents a driving behavior feature about speed in the second driving behavior feature corresponding to time t+1;
[0168] T represents a time data amount.
[0169] Optionally, the construction method of the target loss function of the discriminator specifically comprises:
[0170] based on the first driving style and the second driving style, an adversarial style loss function is obtained;
[0171] The target loss function of the discriminator is constructed based on the adversarial style loss function, the first driving behavior feature, the second driving behavior feature, and a weight coefficient for controlling driving style loss.
[0172] Optionally, the target loss function of the discriminator is specifically represented by the following formula:
[0173]
[0174] wherein, LOSS D represents the target loss function of the discriminator;
[0175] LOSS style (D) represents the adversarial style loss function;
[0176] D represents the discriminator;
[0177] x represents the first driving behavior feature;
[0178] D(x) represents the prediction probability of the discriminator that x belongs to the real data distribution;
[0179] G(z) represents the second driving behavior feature output by the generator;
[0180] D(G(z)) represents the prediction probability of the discriminator that G(z) belongs to the real data distribution;
[0181] s represents the driving style corresponding to x and the driving style corresponding to G(z);
[0182] D style (s) represents the prediction probability of the discriminator that the driving style s belongs to the real driving style;
[0183] E represents a mathematical expectation function, subscript x ~ P data represents that x is obtained by sampling from the real data distribution P data , subscript z ~ P z represents that z is obtained by sampling from the data distribution P z generated by the generator, subscript s ~ P style represents that s is obtained by sampling from the driving style distribution P style ;
[0184] λ s represents the weight coefficient for controlling the driving style loss.
[0185] The embodiments of the present application also provide an electronic device 90, please refer to Figure 4The device includes a processor 910 and a memory 920, wherein the memory 910 is configured to store a computer program, and the processor 920 is configured to execute the computer program stored in the memory 910, so as to implement the method for determining driving style according to any one of the embodiments of the present application.
[0186] The device includes a processor 910 and a memory 920, wherein the memory 910 is configured to store a computer program, and the processor 920 is configured to execute the computer program stored in the memory 910, so as to implement the method for determining driving style according to any one of the embodiments of the present application.
[0187] In the present application, multiple refers to two or more than two.
[0188] In the present application, unless otherwise explicitly limited, the terms "mounting", "connecting", "connecting" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected; it can be mechanically connected, or it can be electrically connected; it can be directly connected, or it can be indirectly connected through an intermediate medium, or it can be connected inside two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0189] In the present application, the terms "first", "second", "third", "fourth" and the like (if any) are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0190] In the present application, the term "and / or" is only used to describe the association relationship between the associated objects, which means that there can be three kinds of relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in the present application generally represents an "or" relationship between the front and rear associated objects.
[0191] If there is no special description, all the steps of the present application can be performed in sequence or randomly. For example, the method includes steps A and B, which means that the method can include steps A and B performed in sequence, or steps B and A performed in sequence. For example, the method can also include step C, which means that step C can be added to the method in any order, for example, the method can include steps A, B and C, or steps A, C and B, or steps C, A and B, etc.
[0192] The above only describes the preferred embodiments of the present application and does not limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining a driving style, characterized in that: include: determining a target driving scenario for the target vehicle based on target driving data of the target vehicle in a target time period; Extracting driving behavior features corresponding to the target driving scenario based on the corresponding relationship between the driving scenario and the driving behavior features; The driving behavior characteristics corresponding to the target driving scenario are input into a target Gaussian mixture model corresponding to the target driving scenario to obtain a target driving style under the target driving scenario.
2. The method according to claim 1, characterized in that The training process of the target Gaussian mixture model includes: Acquire driving data samples, and divide the driving data samples into driving data samples corresponding to various driving scenarios; Based on the correspondence between the driving scenarios and the driving behavior characteristics, the driving behavior characteristics in the driving data samples corresponding to each driving scenario are extracted to obtain a first driving behavior characteristic corresponding to each driving scenario; Using the first driving behavior features corresponding to each driving scenario, a Gaussian mixture model corresponding to each driving scenario is constructed; Based on the Gaussian mixture model corresponding to each driving scenario, through adversarial training of the generator and the discriminator, the parameters of the generator, the parameters of the discriminator, and the parameters of the Gaussian mixture model corresponding to each driving scenario are iteratively optimized to obtain the target Gaussian mixture model corresponding to each driving scenario.
3. The method according to claim 2, characterized in that The Gaussian mixture model corresponding to each driving scenario is based on adversarial training of a generator and a discriminator, and the parameters of the generator, the parameters of the discriminator, and the parameters of the Gaussian mixture model corresponding to each driving scenario are iteratively optimized to obtain a target Gaussian mixture model corresponding to each driving scenario, including: For each driving scenario, inputting random noise, parameters of a Gaussian mixture model corresponding to the driving scenario, and a first driving style corresponding to the first driving behavior feature into the generator to obtain a second driving behavior feature and a second driving style; inputting the first driving behavior feature and the first driving style, the second driving behavior feature and the second driving style into the discriminator to obtain a judgment result; Based on the judgment result, through adversarial training of the generator and the discriminator, the parameters of the generator, the parameters of the discriminator, and the parameters of the Gaussian mixture model corresponding to each driving scenario are iteratively optimized until the second driving behavior characteristics, the second driving style, and the judgment result all meet preset requirements, thereby obtaining a target Gaussian mixture model corresponding to the driving scenario.
4. The method according to any one of claims 1 to 3, characterized in that In the case where the driving scenario is a car-following scenario, the driving behavior characteristics corresponding to the car-following scenario include: vehicle speed, acceleration, steering wheel angle, degree of opening and closing of the accelerator pedal of the own vehicle, degree of opening and closing of the brake pedal of the own vehicle, and following distance; In the case where the driving scenario is a lane changing scenario, the driving behavior characteristics corresponding to the lane changing scenario include: vehicle speed, acceleration, steering wheel angle, opening and closing degree of the own vehicle's accelerator pedal, opening and closing degree of the own vehicle's brake pedal, and lane changing time.
5. The method according to claim 3, characterized in that The method for constructing the target loss function of the generator specifically includes: Obtaining a feature loss function related to driving style based on the first driving behavior feature and the second driving behavior feature; obtaining a stability loss function for stabilizing the driving style based on the driving behavior feature related to speed in the second driving behavior feature; Based on the feature loss function and the stationarity loss function, the target loss function of the generator is constructed.
6. The method according to claim 5, characterized in that The objective loss function of the generator is specifically expressed by the following formula: LOSS G =LOSS style (G)+LOSS smooth LOSS style (G)=||F(G(z))-F(x)|| 2 Among them, LOSS G represents the target loss function of the generator; LOSS style (G) represents the feature loss function of driving style; LOSS smooth represents the stability loss function used to stabilize the driving style; z represents random noise; G represents the generator; G(z) represents the second driving behavior feature output by the generator; F represents the feature extraction network, which is used to extract driving behavior features; F(x) represents the first driving behavior feature extracted; ||*|| 2 represents the L2 norm; a t represents the driving behavior feature about speed in the second driving behavior feature corresponding to time t; a t+1 represents the driving behavior feature related to speed in the second driving behavior feature corresponding to time t+1; T represents the amount of time data.
7. The method according to claim 3, characterized in that The method for constructing the target loss function of the discriminator specifically includes: Obtaining an adversarial style loss function based on the first driving style and the second driving style; A target loss function of the discriminator is constructed based on the adversarial style loss function, the first driving behavior feature, the second driving behavior feature, and a weight coefficient for controlling the driving style loss.
8. The method according to claim 7, characterized in that The objective loss function of the discriminator is specifically expressed by the following formula: Among them, LOSS D represents the target loss function of the discriminator; LOSS style (D) represents the adversarial style loss function; D represents the discriminator; x represents the first driving behavior characteristic; D(x) represents the discriminator’s predicted probability that x belongs to the true data distribution; G(z) represents the second driving behavior feature output by the generator; D(G(z)) represents the discriminator's predicted probability that G(z) belongs to the true data distribution; s represents the driving style corresponding to x and the driving style corresponding to G(z); D style (s) represents the discriminator’s predicted probability that driving style s belongs to the real driving style; E represents the mathematical expectation function, subscript x~P data Indicates that x is distributed from the real data P data Sampling is obtained, subscript z~P z Denotes the data distribution P generated by z from the generator z Sampling is obtained, subscript s~P style Denote s from the driving style distribution P style Obtained by sampling; λ s Represents the weight coefficient used to control the driving style loss.
9. A driving style determination device, characterized in that: include: a determination module, configured to determine a target driving scenario of the target vehicle based on target driving data of the target vehicle in a target time period; an extraction module, configured to extract driving behavior features corresponding to the target driving scenario based on a correspondence between the driving scenario and the driving behavior features; The acquisition module is used to input the driving behavior characteristics corresponding to the target driving scenario into a target Gaussian mixture model corresponding to the target driving scenario to obtain a target driving style under the target driving scenario.
10. An electronic device, characterized in that: comprising a processor and a memory, wherein Memory for storing computer programs; A processor, configured to execute a program stored in a memory to implement the method described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.