Driving style category determination method and device, equipment and storage medium
By using the variational autoencoder-clustering model to feature encoding and classification processing of vehicle driving data, the problems of low efficiency and poor accuracy of driving style classification in the prior art are solved, and higher accuracy and processing efficiency are achieved.
Patent Information
- Application Number
- CN202510030068.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-03-25
AI Technical Summary
In the driving style classification, the calculation efficiency is low and the classification results deviate from the real category, resulting in low accuracy.
The trained variational autoencoder-clustering model is used to feature encoding and classification processing of vehicle driving data, and the target driving style category is determined through the first posterior probability distribution of the driving style category, closely related to the feature encoding and classification process.
It improves the accuracy and processing efficiency of driving style classification, ensures the intrinsic connection between driving style categories and hidden space representation vectors, and enhances the accuracy of classification results.
Smart Images

Figure CN119682767A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, equipment and storage medium for determining a driving style category. Background Art
[0002] With the rapid development of the new energy vehicle industry, power and endurance have become the two major focuses of the industry. In order to improve the power performance of the vehicle, the power of the drive motor has been continuously increased, which has a great impact on the vehicle's cruising range. Due to technical and cost limitations, it is difficult to achieve a leapfrog breakthrough in battery capacity in the short term. Meeting power requirements while reasonably reducing energy consumption has become a hot topic in industry research. During vehicle driving, driving style has a great relationship with energy consumption. Adopting a suitable driving style can not only reduce the energy consumption of the vehicle, but also improve the comfort and safety of passengers. Although the vehicle itself provides a variety of driving modes, different drivers have different driving styles in the same mode, and there are certain differences in vehicle energy consumption data. In order to quantify the impact of different driving styles on energy consumption and provide users with a certain reference, it is necessary to classify the data samples of driving styles.
[0003] In the related technology, autoencoders are usually used for feature encoding, and the feature encoding of vehicle driving data and driving style classification are processed as two independent parts, which has low computational efficiency. In addition, the classification results in this type of method are only determined based on the feature encoding itself and are irrelevant to the distribution characteristics of the feature encoding. As a result, the classification results may deviate from the true category and the accuracy of driving style classification cannot be guaranteed. Summary of the invention
[0004] The present application provides a method, device, equipment and storage medium for determining a driving style category, which can improve the processing efficiency of driving style classification and improve the accuracy of driving style classification.
[0005] The technical solution of this application is implemented as follows:
[0006] An embodiment of the present application provides a method for determining a driving style category, comprising: acquiring vehicle driving data; using a trained variational autoencoder-clustering model to sequentially perform feature encoding processing and classification processing on the vehicle driving data to obtain a target driving style category of the vehicle driver; wherein the target driving style category is determined by a first posterior probability distribution of the driving style category, and the first posterior probability distribution is a posterior probability distribution of the driving style category with respect to a latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data by the variational autoencoder.
[0007] According to the above technical means, since the target driving style category is determined based on the posterior probability distribution of the driving style category with respect to the latent space representation vector, that is, the driving style category is related to the distribution of the latent space representation vector after the vehicle driving data is encoded, the inherent connection between the driving style category and the latent space representation vector is closer, thereby improving the accuracy of driving style classification. In addition, by determining the target driving style category through the first posterior probability distribution of the driving style, the feature encoding of the vehicle driving data and the driving style classification are related to each other instead of being two independent parts, thereby improving the processing efficiency of driving style classification.
[0008] Furthermore, the variational autoencoder-clustering model also includes a clustering module; the use of the trained variational autoencoder-clustering model to perform feature encoding processing and classification processing on the vehicle driving data in sequence to obtain the target driving style category of the vehicle driver includes: using the variational autoencoder to encode the vehicle driving data to obtain a target latent space representation vector; and analyzing and processing the target latent space representation vector through the clustering module to obtain the target driving style category.
[0009] According to the above technical means, the vehicle driving data is encoded by a variational autoencoder to obtain a target latent space representation vector, and the target latent space representation vector is analyzed and processed using a clustering module. The joint processing of feature encoding and driving style classification can be realized, so that the target driving style category corresponding to the vehicle driving data can be quickly determined.
[0010] Furthermore, the clustering module includes a data calculation submodule and a driving style determination module; the analyzing and processing the latent space representation vector by the clustering module to obtain the target driving style category includes: using the data calculation module to determine the mean and variance corresponding to the target latent space representation vector; determining the first posterior probability distribution according to the mean and variance by the driving style determination module, and determining the target driving style category based on the first posterior probability distribution.
[0011] According to the above technical means, by determining the mean and variance corresponding to the target latent space representation vector, and determining the target driving style category based on the first posterior probability distribution corresponding to the mean and variance, the driving style category is matched with the spatial distribution characteristics corresponding to the target latent space representation vector, thereby improving the driving style category determination and the distribution compactness of the latent space representation vector, thereby making the target driving style category finally determined more accurate.
[0012] Furthermore, the training method of the variational autoencoder-clustering model includes: obtaining multiple vehicle driving data samples; inputting the multiple vehicle driving data samples into an initial variational autoencoder-clustering model to obtain multiple first driving style categories and cluster centers of each first driving style category; determining a clustering index value based on the number of the multiple first driving style categories and the cluster centers of each first driving style category; if the clustering index value is less than a clustering index threshold, performing back-propagation training on the initial variational autoencoder-clustering model until a first convergence condition is met to obtain the trained variational autoencoder-clustering model.
[0013] According to the above technical means, based on the cluster center of the first driving style category determined by the initial variational autoencoder-clustering model and the number of the first driving style categories, a clustering index value is determined, and when the clustering index value is less than the clustering index threshold, the initial variational autoencoder-clustering model is trained by directional propagation, so that the clustering ability of the initial variational autoencoder-clustering model can be continuously optimized, thereby ensuring the classification effect of the variational autoencoder-clustering model finally trained.
[0014] Furthermore, the training method of the variational autoencoder-clustering model also includes: inputting the multiple vehicle driving data samples into the initial variational autoencoder-clustering model, determining a first parameter corresponding to the posterior probability distribution of the vehicle driving data samples with respect to the second latent space representation vector, a second parameter corresponding to the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data samples, a third parameter corresponding to the posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and a fourth parameter corresponding to the probability distribution of the first driving style category; the second latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data samples by the initial variational autoencoder-clustering model; determining a corresponding target loss function value according to the first parameter, the second parameter, the third parameter and the fourth parameter, and a pre-established target loss function; and performing back-propagation training on the initial variational autoencoder-clustering model based on the target loss function value until the second convergence condition is met to obtain the trained variational autoencoder-clustering model.
[0015] According to the above technical means, by determining the target loss function value through the first parameter corresponding to the posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the second parameter corresponding to the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, the third parameter corresponding to the posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and the fourth parameter corresponding to the probability distribution of the first driving style category, the feature encoding ability and classification effect of the initial variational autoencoder-clustering model can be continuously improved, so that the processing capability of the variational autoencoder-clustering model finally trained is stronger.
[0016] Furthermore, the target loss function includes a vehicle driving data reconstruction loss function, a first association loss function between a latent space representation vector and a driving style category, and a second association loss function between the latent space representation vector and the driving style category.
[0017] According to the above technical means, since the target loss function includes the vehicle driving data reconstruction loss function, the first association loss function of the latent space representation vector and the driving style category, and the second association loss function of the latent space representation vector and the driving style category, the model can be used to reconstruct data that is closer to the actual vehicle driving data in the subsequent training process of the variational autoencoder based on the loss function, and a more accurate driving style classification result can be obtained based on the intrinsic connection between the latent space representation vector and the driving style category.
[0018] Furthermore, the method also includes: creating the vehicle driving data reconstruction loss function based on a first probability density function corresponding to the posterior probability distribution of the vehicle driving data with respect to the latent space representation vector.
[0019] According to the above technical means, a vehicle driving data reconstruction loss function is created based on the first probability density function, so that the encoded latent space representation vector can retain the information of the input vehicle driving data as completely as possible.
[0020] Furthermore, the method also includes: creating the first association loss function based on a second probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category, a third probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the vehicle driving data, and a fourth probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category.
[0021] According to the above technical means, a first association loss function is established based on the second probability density function, the third probability density function and the fourth probability density function, which can make the connection between the latent space representation vector and the driving style category closer, thereby improving the accuracy of driving style classification.
[0022] Furthermore, the method further includes: creating the second association loss function based on the second probability density function and a fifth probability density function corresponding to the probability distribution of the driving style category.
[0023] According to the above technical means, the constraint of the second probability density function can make the connection between the driving style category and the latent space representation vector closer, and the fifth probability density function is a uniform distribution, which can ensure that the driving style samples in each category can be distributed as evenly as possible after the clustering module. Therefore, a second association loss function is established based on the second probability density function and the fifth probability density function, which can ensure the correctness and rationality of the driving style classification in the subsequent training of the model based on the second association loss function.
[0024] Furthermore, the posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, and the posterior probability distribution of the first driving style category with respect to the second latent space representation vector are all normally distributed, and the probability distribution of the first driving style category is uniformly distributed.
[0025] According to the above technical means, the distribution of vehicle driving data, the second latent space representation vector and the first driving style category can be made similar by restricting the normal distribution, and the result of driving style classification can be made more balanced by restricting the uniform distribution, thereby improving the accuracy and rationality of driving style classification.
[0026] The embodiment of the present application provides a device for determining a driving style category, which is characterized by comprising:
[0027] A first acquisition module, used to acquire vehicle driving data;
[0028] A first data processing module is used to use a trained variational autoencoder-clustering model to perform feature encoding processing and classification processing on the vehicle driving data in sequence to obtain a target driving style category of the vehicle driver;
[0029] The target driving style category is determined by a first posterior probability distribution of the driving style category, and the first posterior probability distribution is the posterior probability distribution of the driving style category with respect to a latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data by the variational autoencoder.
[0030] The embodiment of the present application provides a device for determining a driving style category, including:
[0031] a memory for storing instructions for determining a driving style category;
[0032] The processor is used to implement the method provided in the embodiment of the present application when executing the executable driving style category determination instruction stored in the memory.
[0033] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are configured to execute the above-mentioned method for determining the driving style category. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A schematic diagram of a flow chart of a method for determining a driving style category provided in an embodiment of the present application;
[0035] Figure 2 A flowchart of a driving style classification method based on variational autoencoder clustering provided in an embodiment of the present application;
[0036] Figure 3 A schematic diagram of the principle of a variational autoencoder provided in an embodiment of the present application;
[0037] Figure 4 A schematic diagram of the structure of a variational encoder-clustering algorithm module provided in an embodiment of the present application;
[0038] Figure 5 A schematic diagram of the structure of another variational encoder-clustering algorithm module provided in an embodiment of the present application;
[0039] Figure 6 A schematic diagram of the structure of a driving style determination device provided in an embodiment of the present application;
[0040] Figure 7 A schematic diagram of the composition structure of a driving style category determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0042] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0043] In the following description, reference is made to “some embodiments\other embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments\other embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0044] In the following description, the terms "first\second\third\fourth\fifth" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third\fourth\fifth" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0046] In the related art, a driving behavior analysis method provides a driving behavior analysis method: historical data of the vehicle driving process is obtained, divided according to a preset speed range, and a driving behavior data set containing several driving-related parameters is obtained, and the data set includes several parameters related to driving behavior. According to the driving behavior data set, a preset driving behavior influencing parameter weight table, and a preset driving behavior influencing parameter scoring table, the driving behavior is scored. Among them, the driving behavior influencing parameter weight table records the weights of different driving behavior influencing parameters corresponding to different speed ranges. This method requires artificially preset speed ranges and driving behavior influencing parameter weight tables, and the classification is not necessarily accurate, and it cannot accurately reflect the classification of driving behavior.
[0047] A driving behavior prediction method uses vehicle trajectories to extract driving behavior preference features, and then realizes short-term driving behavior (speed) prediction based on Monte Carlo Dropout (MC-Dropout) and uncertainty analysis of the prediction results based on the fusion of multi-source geospatial information. First, the vehicle's driving data is collected and preprocessed, and the data is divided into a training set and a test set. Then, a deep autoencoder is used to extract the behavior feature vector and the feature vector of the information point or point of interest (POI) of the vehicle's driving. Then, the driving behavior prediction is performed based on the behavior feature vector and the POI feature vector. This method extracts feature vectors through a deep autoencoder, which has the following shortcomings: The deep autoencoder is an autoencoder based on a deep neural network, which has stronger representation ability and higher learning ability, but has some inherent defects. It is prone to overfitting problems when the amount of data is small or the network structure is too complex; it is sensitive to outliers, and the data representation is learned by minimizing the reconstruction error, which is easily affected by noisy data; when processing highly nonlinear or high-dimensional data, the representation ability is limited due to the optimization difficulty and the problem of gradient disappearance / explosion.
[0048] Based on the problems existing in the related art, the embodiment of the present application provides a method for determining a driving style category, which can improve the processing efficiency of driving style classification and improve the accuracy of driving style classification. Figure 1 FIG. 1 is a flow chart of a method for determining a driving style category provided in an embodiment of the present application, the method comprising the following steps:
[0049] S101, obtaining vehicle driving data.
[0050] It should be noted that the vehicle driving data may be data collected during the actual driving process of the vehicle. The vehicle driving data may include vehicle-side data and Global Positioning System (GPS) data when the vehicle is in a driving state. The vehicle-side data may include vehicle speed and energy consumption data, etc. The GPS data may include vehicle trajectory, timestamp, altitude information, etc.
[0051] In some embodiments, the vehicle driving data may be collected in real time during the vehicle driving process, for example, it may be driving data collected when the vehicle is driving on a current road section, or it may be driving data collected when the vehicle is driving on a historical road section, or it may be driving data collected when the vehicle is driving in a historical time period.
[0052] In some embodiments, the vehicle driving data may be data obtained after preprocessing the original vehicle driving data. The preprocessing may be filtering, denoising, removing abnormal data, etc. of the original vehicle driving data. For example, preprocessing the original vehicle driving data may include eliminating data with a small number of GPS trajectory points (such as poor network, short mileage, etc.), eliminating data with more than 10 abnormal points in the GPS trajectory (large deviations from the vehicle-side data or large deviations from adjacent trajectory points), and performing eigenvalue smoothing on points in the GPS trajectory with less than 10 abnormal points.
[0053] In some embodiments, the vehicle driving data may include one or more groups, and the types and numbers of data included in different groups of vehicle driving data are the same. The target driving style categories finally determined by different groups of vehicle driving data may be the same or different. Each group of vehicle driving data may include at least one type of data. For example, a group of vehicle driving data may include vehicle speed, energy consumption, vehicle trajectory and altitude information, that is, the group of vehicle driving data includes four types of data. The types and numbers of data in each group of vehicle driving data are merely illustrative and are not limited in this application.
[0054] S102: using the trained variational autoencoder-clustering model to perform feature encoding processing and classification processing on the vehicle driving data in sequence to obtain a target driving style category of the vehicle driver.
[0055] In some embodiments, the driving style may be the driving style that the vehicle driver is accustomed to when driving the vehicle, such as the driving style in the vehicle starting phase, stable operation phase, acceleration phase, and braking conditions. The driving style categories may be different categories obtained by classifying the driver's habitual driving style. Different driving conditions or driving phases correspond to driving style categories, and the number of driving style categories may be different. For example, the driving style categories corresponding to the stable operation phase may include aggressive driving, safe driving, slow driving, etc.
[0056] In some embodiments, the trained variational autoencoder-clustering model includes an interconnected variational autoencoder and a clustering module. The variational autoencoder can be used to encode the input vehicle driving data to obtain the corresponding latent vector, and the clustering model is used to perform clustering analysis based on the spatial distribution characteristics of the vector and the latent vector, thereby determining the target driving style category corresponding to the vehicle driver.
[0057] In some embodiments, the target driving style category is determined by the first posterior probability distribution of the driving style category, and the first posterior probability distribution is the posterior probability distribution of the driving style category with respect to the latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained by performing feature encoding processing on the vehicle driving data by the variational autoencoder. The first posterior probability distribution can be a normal distribution, and the distribution of the latent space representation vector can also be a normal distribution. The means of the two normal distributions may be the same or different, and the variances may be the same or different.
[0058] In an embodiment of the present application, vehicle driving data is obtained; the vehicle driving data is sequentially subjected to feature encoding processing and classification processing using a trained variational autoencoder-clustering model to obtain a target driving style category of the vehicle driver. In this way, since the target driving style category is determined based on the posterior probability distribution of the driving style category with respect to the latent space representation vector, that is, the driving style category is related to the distribution of the latent space representation vector after the vehicle driving data is encoded, the inherent connection between the driving style category and the latent space representation vector is closer, thereby improving the accuracy of driving style classification. In addition, by determining the target driving style category through the first posterior probability distribution of the driving style, the feature encoding of the vehicle driving data and the driving style classification are related to each other rather than being two independent parts, thereby improving the processing efficiency of driving style classification.
[0059] In some embodiments of the present application, a trained variational autoencoder-clustering model is used to perform feature encoding processing and classification processing on the vehicle driving data in sequence to obtain the target driving style category of the vehicle driver, that is, the above-mentioned step S102 can be implemented by the following steps S1021 to S1022, and each step is described separately below.
[0060] S1021. Encode the vehicle driving data using a variational autoencoder to obtain a target latent space representation vector.
[0061] In some embodiments, the variational autoencoder in the variational autoencoder-clustering model can encode the input vehicle driving data, and the encoding process can extract features from the vehicle driving data to obtain the corresponding target latent space representation vector. The target latent space representation vector can perform feature dimensionality reduction on the vehicle driving data. The feature vector in the high-dimensional nonlinear space can be represented by mapping the features of the vehicle driving data to the high-dimensional space using the encoding part of the autoencoder.
[0062] In some embodiments, the target latent space representation vector corresponding to the vehicle driving data can be obtained through the encoding part of the variational autoencoder. The encoding part of the variational autoencoder can calculate the mean and variance corresponding to the input vehicle driving data, and sample from the normal distribution corresponding to the mean and variance to obtain the corresponding latent space representation vector.
[0063] S1022. Analyze and process the target latent space representation vector through a clustering module to obtain a target driving style category.
[0064] In some embodiments, after obtaining the target latent space representation vector corresponding to the vehicle driving data, a clustering module can be used to analyze the distribution characteristics of the target space representation vector and process the target space representation vector to obtain the target driving style category.
[0065] According to the above technical means, the vehicle driving data is encoded by a variational autoencoder to obtain a target latent space representation vector, and the target latent space representation vector is analyzed and processed using a clustering module. The joint processing of feature encoding and driving style classification can be realized, so that the target driving style category corresponding to the vehicle driving data can be quickly determined.
[0066] In some embodiments of the present application, the clustering module includes a data calculation submodule and a driving style determination module. Based on this, the latent space representation vector is analyzed and processed by the clustering module to obtain the target driving style category, that is, the above-mentioned step S1022 can be implemented by the following steps S201 to S202. Each step is explained separately below.
[0067] S201. Determine the mean and variance corresponding to the target latent space representation vector using a data calculation module.
[0068] In some embodiments, after the vehicle driving data is input and output into the trained variational encoder-clustering model, the vehicle driving data can first be feature encoded through an autoencoder to obtain a target latent space representation vector, and then the data calculation module is used to calculate the mean and variance corresponding to the target latent space representation vector.
[0069] S202: Determine a first posterior probability distribution according to the mean and the variance through a driving style determination module, and determine a target driving style category based on the first posterior probability distribution.
[0070] In some embodiments, the first posterior probability distribution can be a normal distribution. The corresponding probability density function of the normal distribution can be uniquely determined by determining the mean and variance. Then, the corresponding probability distribution graph can be determined based on the probability density function of the normal distribution, and sampling can be performed from the probability distribution graph to obtain the target driving style category.
[0071] According to the above technical means, by determining the mean and variance corresponding to the target latent space representation vector, and determining the target driving style category based on the first posterior probability distribution corresponding to the mean and variance, the driving style category is matched with the spatial distribution characteristics corresponding to the target latent space representation vector, thereby improving the driving style category determination and the distribution compactness of the latent space representation vector, thereby making the target driving style category finally determined more accurate.
[0072] In some embodiments of the present application, the training method of the variational autoencoder-clustering model can be implemented by the following steps S301 to S304, and each step is described below.
[0073] S301. Acquire multiple vehicle driving data samples.
[0074] In some embodiments, the vehicle driving data sample may be the historical driving data of the vehicle, which may include vehicle-side data and GPS data of the vehicle during its historical driving process. Each vehicle driving data sample includes multiple data collected at the same time or within the same preset time period, such as historical vehicle speed, historical driving trajectory, historical timestamp, historical altitude information, etc.
[0075] In some embodiments, the vehicle driving sample data and the vehicle driving data may be the same or different, and the number of vehicle driving sample data may be much larger than the number of vehicle driving data. The vehicle driving data samples may be obtained from a storage area of an onboard device, a storage area of another device, or a database server. The multiple vehicle driving data samples may come from multiple vehicles of the same model, or from only one vehicle.
[0076] S302: Input a plurality of vehicle driving data samples into an initial variational autoencoder-clustering model to obtain a plurality of first driving style categories and a cluster center of each first driving style category.
[0077] In some embodiments, the initial variational autoencoder-clustering model may be an untrained variational autoencoder-clustering model, and the variational encoder may perform feature encoding and classification processing on multiple vehicle driving data samples input thereto, thereby obtaining a first driving style category corresponding to each vehicle driving number. The first driving style category may be one of multiple driving style categories, and the first driving style category and the target driving style category may be the same or different.
[0078] In some embodiments, multiple vehicle driving data samples may be the same or different. For example, multiple vehicle driving data samples may all correspond to a first driving style category. Some vehicle driving data samples may correspond to the same first driving style category, while other vehicle driving data samples may correspond to different first driving style categories. For example, if the vehicle driving data samples include 1,000 samples, they are ultimately divided into four driving style categories, of which 500 vehicle driving data samples may correspond to the first driving style category of category A, 300 vehicle driving data samples may correspond to the first driving style category of category B, 150 vehicle driving data samples may correspond to the first driving style category of category C, and 50 vehicle driving data samples may correspond to the first driving style category of category D.
[0079] In some embodiments, the cluster center of the first driving style category can be determined by the latent space representation vector corresponding to the vehicle driving data samples belonging to the category. For example, if the first driving style category is category A and the vehicle driving data samples corresponding to the category A include 80, then the latent space representation vector corresponding to the i-th (greater than 0 and less than or equal to 80) vehicle driving sample data and the sum of the squared distances between the latent space representation vectors corresponding to each of the other vehicle driving data samples can be calculated, and then the latent space representation vector corresponding to the vehicle driving data sample with the smallest sum of the squared distances is determined as the cluster center corresponding to category A.
[0080] S303: Determine a clustering index value based on the number of the plurality of first driving style categories and the cluster center of each first driving style category.
[0081] In some embodiments, the clustering index value may be a Calinski-Harabaz (CH) index, and the inter-class closeness and intra-class closeness may be determined according to the cluster center, and the clustering index value may be determined based on the intra-class closeness and the inter-class closeness. Exemplarily, when the clustering index value is a CH value, the CH value may be calculated by formula (1):
[0082]
[0083] Among them, SS B is the intra-class closeness, SS W is the inter-class closeness, N is the total number of vehicle driving data samples, and k is the number of the first driving style categories.
[0084] S304: If the clustering index value is less than the clustering index threshold, back-propagation training is performed on the initial variational autoencoder-clustering model until the first convergence condition is met to obtain a trained variational autoencoder-clustering model.
[0085] In some embodiments, the first convergence condition may be that the clustering index value is greater than or equal to a clustering index threshold. The clustering index threshold may be any predetermined threshold that can be used to measure the effect of driving style classification.
[0086] In some embodiments, if the calculated clustering index value is less than a preset threshold, it means that the classification effect of each driving style category is not good. In this case, the network parameters of the initial variational autoencoder-clustering model can be adjusted until the determined clustering index value is greater than or equal to the clustering index threshold. Then, the training can be stopped to obtain a trained variational subencoder-clustering model.
[0087] According to the above technical means, based on the cluster center of the first driving style category determined by the initial variational autoencoder-clustering model and the number of the first driving style categories, a clustering index value is determined, and when the clustering index value is less than the clustering index threshold, the initial variational autoencoder-clustering model is trained by directional propagation, so that the clustering ability of the initial variational autoencoder-clustering model can be continuously optimized, thereby ensuring the classification effect of the variational autoencoder-clustering model finally trained.
[0088] In some embodiments of the present application, after step S301, the variational autoencoder-clustering model can also be trained through the following steps S401 to S403.
[0089] S401. Input multiple vehicle driving data samples into an initial variational autoencoder-clustering model to determine a first parameter corresponding to the posterior probability distribution of the vehicle driving data samples with respect to the second latent space representation vector, a second parameter corresponding to the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data samples, a third parameter corresponding to the posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and a fourth parameter corresponding to the probability distribution of the first driving style category.
[0090] In some embodiments, the second latent space representation vector is a feature vector obtained by performing feature encoding processing on the vehicle driving data sample through the initial variational autoencoder-clustering model. The posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, and the posterior probability distribution of the first driving style category with respect to the second latent space representation vector can all be normal distributions, and the probability distribution of the first driving style category can be uniform distribution. Among them, the first parameter, the second parameter, and the third parameter can all include the mean and variance of the normal distribution, and the fourth parameter can be the upper and lower bounds of the corresponding interval of the uniform distribution. Through the restriction of the normal distribution, the distributions of the vehicle driving data, the second latent space representation vector, and the first driving style category can be similar, thereby improving the accuracy of driving style classification.
[0091] S402: Determine a corresponding target loss function value according to the first parameter, the second parameter, the third parameter, the fourth parameter, and the pre-established target loss function.
[0092] In some embodiments, the target loss function may be pre-established, and after the first parameter, the second parameter, the third parameter, and the fourth parameter are determined, the target loss function value may be calculated by bringing the first parameter, the second parameter, the third parameter, and the fourth parameter into the target function.
[0093] In some embodiments, the target loss function includes a vehicle driving data reconstruction loss function, a first association loss function between the latent space representation vector and the driving style category, and a second association loss function between the latent space representation vector and the driving style category.
[0094] In some embodiments, the vehicle driving data reconstruction loss function can be used to constrain the reconstruction error of the variational autoencoder. The first associated loss function can make the latent space representation vector match as much as possible to a specific normal distribution for a driving style category; the second associated loss function can make the latent space representation vector in the prior requirement match as evenly as possible to the distribution in the corresponding driving style category.
[0095] According to the above technical means, since the target loss function includes the vehicle driving data reconstruction loss function, the first association loss function of the latent space representation vector and the driving style category, and the second association loss function of the latent space representation vector and the driving style category, the model can be used to reconstruct data that is closer to the actual vehicle driving data in the subsequent training process of the variational autoencoder based on the loss function, and a more accurate driving style classification result can be obtained based on the intrinsic connection between the latent space representation vector and the driving style category.
[0096] S403. Based on the target loss function value, the initial variational autoencoder-clustering model is back-propagated and trained until the second convergence condition is met, thereby obtaining a trained variational autoencoder-clustering model.
[0097] In some embodiments, the second convergence condition may be that the target loss function value is less than a preset threshold, which can evaluate the overall performance of the variational autoencoder-clustering model (including feature encoding, clustering, etc.). If it is determined that the target loss function value is greater than the preset threshold, it means that the overall performance of the current initial variational autoencoder-clustering model is poor, and the model parameters of the initial variational autoencoder-clustering model need to be adjusted until the calculated new target loss function value is less than the preset threshold. The training process can be stopped to obtain a trained variational autoencoder-clustering model.
[0098] According to the above technical means, by determining the target loss function value through the first parameter corresponding to the posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the second parameter corresponding to the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, the third parameter corresponding to the posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and the fourth parameter corresponding to the probability distribution of the first driving style category, the feature encoding ability and classification effect of the initial variational autoencoder-clustering model can be continuously improved, so that the processing capability of the variational autoencoder-clustering model finally trained is stronger.
[0099] In some embodiments of the present application, before training the variational autoencoder-clustering model, the following step S501 may also be performed, which is described below.
[0100] S501. Create a vehicle driving data reconstruction loss function based on a first probability density function corresponding to the posterior probability distribution of the vehicle driving data with respect to a latent space representation vector.
[0101] In some embodiments, the posterior probability distribution of the vehicle driving data with respect to the latent space representation vector may be a normal distribution, and correspondingly, the first probability density function may be a probability density function corresponding to the normal distribution. The vehicle driving data reconstruction loss function is created based on the first probability density function, so that the encoded latent space representation vector can retain the information of the input vehicle driving data as completely as possible. Exemplarily, the vehicle driving data reconstruction loss function is L1, which can be expressed by formula (2):
[0102] L1=-logq(x|z) (2);
[0103] in, x represents the vehicle driving data sample, and z represents the latent space representation vector.
[0104] In some embodiments of the present application, before training the variational autoencoder-clustering model, the following step S601 may also be performed, which is described below.
[0105] S601. Create a first association loss function based on a second probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category, a third probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the vehicle driving data, and a fourth probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category.
[0106] In some embodiments, the posterior probability distribution of the latent space representation vector based on the driving style category, the posterior probability distribution of the latent space representation vector on the vehicle driving data, and the posterior probability distribution of the latent space representation vector on the driving style category can all be normal distributions. Correspondingly, the second probability density function, the third probability density function, and the fourth probability density function can all be probability density functions corresponding to the normal distribution. Exemplarily, the first association loss function L2 can be expressed by formula (3):
[0107]
[0108] in, represent the second probability density function, the third probability density function and the fourth probability density function respectively.
[0109] In some embodiments, when the posterior probability distribution of the driving style category with respect to the latent space representation vector, the posterior probability distribution of the latent space representation vector with respect to the vehicle driving data, and the posterior probability distribution of the latent space representation vector with respect to the driving style category are all normally distributed, the means and variances of the three normal distributions may be different.
[0110] According to the above technical means, a first association loss function is established based on the second probability density function, the third probability density function and the fourth probability density function, which can make the connection between the latent space representation vector and the driving style category closer, thereby improving the accuracy of driving style classification.
[0111] In some embodiments of the present application, before training the variational autoencoder-clustering model, the following step S701 may also be performed, which is described below.
[0112] S701: Create a second association loss function based on the second probability density function and a fifth probability density function corresponding to the probability distribution of the driving style category.
[0113] In some embodiments, as described above, the second probability density function is a probability density function corresponding to a normal distribution, and the probability distribution of the driving style category may be a uniform distribution. Correspondingly, the fifth probability density function may be a probability density function corresponding to a uniform distribution. Exemplarily, the second association loss function may be represented by formula (4):
[0114] L3=KL(p(c|z)||q(c)) (4);
[0115] Wherein, KL represents KL (Kullback-Leibler Divergence) divergence, or relative entropy. q(c)=1 / (ba), which is the fifth probability density function, a and b represent the lower bound and upper bound of uniform distribution respectively.
[0116] According to the above technical means, the constraint of the second probability density function can make the connection between the driving style category and the latent space representation vector closer, and the fifth probability density function is a uniform distribution, which can ensure that the driving style samples in each category can be distributed as evenly as possible after the clustering module. Therefore, a second association loss function is established based on the second probability density function and the fifth probability density function, which can ensure the correctness and rationality of the driving style classification in the subsequent training of the model based on the second association loss function.
[0117] In an embodiment of the present application, vehicle driving data is obtained; the vehicle driving data is sequentially subjected to feature encoding processing and classification processing using a trained variational autoencoder-clustering model to obtain a target driving style category of the vehicle driver. In this way, since the target driving style category is determined based on the posterior probability distribution of the driving style category with respect to the latent space representation vector, that is, the driving style category is related to the distribution of the latent space representation vector after the vehicle driving data is encoded, the inherent connection between the driving style category and the latent space representation vector is closer, thereby improving the accuracy of driving style classification. In addition, by determining the target driving style category through the first posterior probability distribution of the driving style, the feature encoding of the vehicle driving data and the driving style classification are related to each other rather than being two independent parts, thereby improving the processing efficiency of driving style classification.
[0118] Next, the implementation process of the application embodiment in the actual application scenario is introduced.
[0119] Figure 2 A flowchart of a driving style classification method based on variational autoencoder clustering is provided in an embodiment of the present application. The method can be implemented through the following steps S801 to S806, and each step is described separately below.
[0120] S801. Construct a training data set (equivalent to the "vehicle driving data sample" in other embodiments) based on the vehicle-side data and GPS data collected while the vehicle is driving.
[0121] In some embodiments, vehicle-side data and GPS data of the vehicle in driving state can be collected and the data can be preprocessed. After completing data collection and preprocessing, a training data set can be generated based on the preprocessed data. The training data set can be used for subsequent training of variational autoencoders and clustering models.
[0122] S802. Construct a variational autoencoder model.
[0123] In some embodiments, the construction of the variational autoencoder model can be achieved through the following steps S8021 to S8026, and each step is described below.
[0124] S8021. Determine the basic conditions and assumptions of the variational autoencoder.
[0125] The schematic diagram of the variational autoencoder is as follows Figure 3 As shown, suppose there are N sample data of vehicle driving status and latent space representation vectors of sample data, which are represented as X = [x (1) ,x (2) ,...,x (N) ] and Z=[z( 1) ,z (2) ,...,z (N) ], assuming that each sample data is independent, that is, any two samples x in X (i) and x (j) Independent of each other. The conversion between real samples and sampled variables can be achieved through the generative model p(x|z). The generative model p(x|z) is usually a normal distribution p(xz) = N(x; g(z), σ 2 I), where g(z) is learned through a neural network.
[0126] From the perspective of the autoencoder, the variational autoencoder model is a decoder, which belongs to the x→z recognition model. The algorithm mainly calculates the parameters of the probability model p(xz) of the driving style data and uses the logarithmic maximum likelihood method to maximize the following logarithmic likelihood function:
[0127] Since it is impossible to directly obtain the analytical solution of the posterior probability distribution p(x|z) of a given driving style data sample and latent space representation vector, VAE uses the recognition model q θ The posterior probability p(z|x) of the latent space representation vector z is approximated to the real driving style data, and the KL divergence is used to measure the similarity between the two distributions.
[0128] S8022. Construct the loss function of the variational autoencoder.
[0129] pass Approximate the posterior probability Finally, KL divergence is used to measure the similarity of the two distributions, where the prior probability distribution of a sample x, z of the vehicle driving state data is p(z) = N(z; 0, I), so the following formula (5) can be obtained:
[0130]
[0131] The above formula encodes the given driving style data x into a latent space representation vector z. Combining the log-likelihood function formula and the KL divergence formula, we can get formula (6):
[0132] log p(x)-KL(q θ (z|x)||p(z|x))=E z~q [log p(x|z)]-KL(q θ (z|x)||p(z)) (6);
[0133] Maximizing the variable on the left side of formula (6) is the goal of the VAE model. By maximizing the objective function of the VAE model and iteratively updating the parameters using the optimization algorithm, the probability distribution q of the driving style encoded as the latent space representation vector z can be obtained. θ (z|x).
[0134] Let l = KL(q θ (z|x)||p(z))-E z~q [logp(x|z)], observe the first term E on the right side of the equal sign z~q [log p(x|z)] found that since the posterior probability of the latent space representation vector z forms a conjugate distribution with the prior probability, we can get q θ (z|x)=N(z;μ q ,∑ q ). Substituting it into the formula, we can get formula (7):
[0135]
[0136] For l = KL(q θ (z|x)||p(z))-E z~q [log p(x|z)] The second term on the right side of the equal sign is used here to use gradient descent later. z~q [log p(x|z)] is written in integral form and the derivation process is as follows:
[0137]
[0138] The gradient here is for θ = [μ q ,Σ q ] Take the derivative and we get μ q Represents the mean of the normal distribution of the latent space vector z obtained by self-encoding the driving state data, ∑ q The variance of the normal distribution of the latent space vector z obtained after the self-encoding of the driving state data is represented. For all driving style data samples X = [x (1) ,x (2),...,x (N) ], the loss function can be expressed by formula (9):
[0139]
[0140] The gradient of the loss function can be calculated by the following formula (10):
[0141]
[0142] Therefore, the gradient optimization algorithm can be used to obtain the parameters of the optimal posterior probability distribution, and then the driving style sample data can be self-encoded to obtain the latent space representation vector. After multiple iterations of the optimization algorithm, the parameters can be obtained. Then, the vector posterior probability distribution is represented by the hidden space of VAE Calculate the given sample x, and finally get the encoding about x through the posterior probability distribution of z.
[0143] Formula log p(x)-KL(q θ (z|x)||p(z|x))=E z~q [log p(x|z)]-KL(q θ The integral form of the objective function in (z|x)||p(z)) is shown in equation (11):
[0144]
[0145] S803. Construct a clustering model based on variational autoencoder.
[0146] The variational autoencoder proposed in this application is to perform further variational processing on the autoencoder model so that the output of the encoder can correspond to the mean and variance of the target distribution. Figure 4 As shown, the core algorithm of the model is the variational auto-encoder cluster (VAEC) algorithm module 900, which mainly includes a variational auto-encoder module 901 and a clustering network layer module 902.
[0147] The characteristic data of driving style is tabular data after entity embedding mapping, so each layer in the network structure constructed by the VAEC algorithm module adopts fully connected layer calculation. The specific structure is as follows: Figure 5 The model is based on the variational autoencoder (VAE) technology. Through the feature extraction and dimensionality reduction process of the input data set, the encoded latent space representation vector features are input into the clustering neuron layer, so as to perform "one-step fusion" clustering on the driving style data to obtain the cluster centers of each level.
[0148] In some embodiments, step S803 may be implemented by the following steps S8031 to S8033, each of which is described below.
[0149] S8031: Improve VAE algorithm to construct objective function.
[0150] The VAEC algorithm module is to carry out driving style rating after the VAE autoencoder module generates the driving style latent space representation vector, and then passes through the clustering layer module. The core idea of the VAEC algorithm clustering layer module is to further improve the VAE objective function, and obtain a new VAEC algorithm by improving the VAE to achieve driving style classification. To facilitate algorithm derivation and understanding, the VAE objective function is written in integral form, as shown in formula (12):
[0151]
[0152] Based on the VAEC algorithm, the latent space representation vector z obtained after the vehicle driving state data sample is encoded by the VAE autoencoder is transformed into (z, c), where z represents the encoding vector generated by the input driving style data after entity embedding and encoder; c k is a discrete variable representing the driving style level category, that is, a clustering network layer is added after the encoder, and the objective function of VAEC is further rewritten in integral form as follows:
[0153]
[0154] By p(z,c k |x)=p(y|z)p(z|x),q(x|z,c k )=q(x|z),q(z,c k )=q(z|c k )q(c k ) The above objective function can be further written as formula (14):
[0155]
[0156] The process described in the above formula is: collect data of various driving styles as samples, calculate p(z|x) through the encoding part of the VAE autoencoder to obtain the encoding features of the driving style data samples (latent space representation vector z), and then construct a classifier p(z|c k) to classify its encoding features, thereby obtaining the driving style classification category. First, in the decoding part of the autoencoder, a category y related to the driving style evaluation is obtained according to the driving style category distribution q(c), and then a driving style random latent space representation vector z is selected from the distribution q(z|c), and then the original sample is generated through the generator q(x|z), and then the generated original sample is made as close as possible to the distribution of the actual sample through a continuous iterative algorithm. For a single sample x, the objective function is finally rewritten as follows:
[0157]
[0158] Referring to the above formula, consider all driving style data samples X = [x (1) ,x (2) ,...,x (N) ] and its classification C=[c (1) ,c (2) ,...,c (N) ] is used for this model, and the final VAEC goal is to minimize the objective function (equivalent to the "objective loss function" in other embodiments):
[0159]
[0160] S8032: Propose hypotheses to further optimize the objective function.
[0161] In order to calculate the objective function, it is necessary to make assumptions about some probability distributions and further optimize the objective function form. According to the Bayesian view and the common practice of VAE, p(z|x) in the VAEC algorithm can be assumed to have a mean of μ x , the variance is , q(x|z) is assumed to be a normal distribution with mean G(z) and variance constant, and q(z|c) is assumed to be a normal distribution with mean μ c , the variance is a normal distribution of 1. In order to ensure that the driving style samples in each category can be as balanced as possible after the clustering layer, this algorithm assumes that the distribution q(c) of the driving style level division is uniformly distributed. The above objective function can be further derived as follows:
[0162]
[0163] From the above formula, we can see that the parameter to be optimized in the objective function is θ = [σ, w c ,μ x ,σ x ,μ c ], the purpose is to obtain the probability density functions p(z|x) and p(c|z) after driving style classification by solving the parameters, so as to realize driving style classification.
[0164] The gradient is obtained by differentiating each parameter, and the optimal value of the parameter estimation is obtained by solving the optimization algorithm. Thus, we can obtain the probability distribution functions, namely and For example: For a given sample data x (i) , first of all, you can Get the latent space representation vector z (i) , and then calculate Implement driving style classification.
[0165] For the VAEC algorithm after the final transformation, the actual meaning of its objective function is as follows:
[0166] (1)-logq(x i |z i ) indicates that the model hopes that the reconstruction error is as small as possible, that is, the encoded latent space representation vector z retains the input driving style data information as completely as possible.
[0167] (2) The latent space representation vector z needs to be matched as much as possible to a specific normal distribution in c for the driving style level category. It is this link that plays the role of clustering and grading.
[0168] (3)KL(p(c (i) |z (i) )||q(c (i) )) means that the latent space representation vector encoded in the driving style data in the prior requirement should be matched to the distribution in the corresponding category as evenly as possible. So far, the goal of the VAEC algorithm is to solve the parameter θ that minimizes the objective function. t .
[0169] S8033: Entity embedding size selection.
[0170] The entity embedding size refers to the length of the vector representing each category field corresponding to the driving style evaluation index. The size of this vector length can be set according to the number of categories in each field. There is no hard and fast rule for choosing the embedding size, so the data embedding size in this chapter can be selected according to formula (18):
[0171] D = min{(c+1) / 2,50} (18);
[0172] Among them, D represents the embedding size, and c represents the number of feature categories, which can be obtained using VAEC. After determining the entity embedding size, the entity embedding method can be used to embed and map the category vectors involved in some features of the driver risk driving assessment data, and the corresponding representation vectors of these features can be obtained.
[0173] S804: Construct an index for the number of driving style classifications.
[0174] The driving style dataset used in this application is unsupervised data, and the internal clustering evaluation index can be used to evaluate the clustering effect. Since the VAEC clustering algorithm is based on the idea of probability distribution transformation, it is most appropriate to choose the CH value based on covariance to calculate the similarity as the clustering evaluation index.
[0175] The intra-class closeness SS can be obtained by calculating the sum of the squares of the distances between each point in each driving style level and the class center. W Based on the compactness value, the inter-class separation SS can be calculated B , the CH value can be calculated by formula (1). If the CH index value is relatively high, it means that the class itself has a good compactness, otherwise it is relatively scattered.
[0176] Step S805: Calculate the optimal number of clustering categories.
[0177] The number of driving styles is divided into k, different k values are selected, the driving style sample data and k values are substituted into the model calculation, and the k value corresponding to the value with the largest similarity is found, which is the optimal number of clustering categories.
[0178] Step S806: Perform testing using actual samples.
[0179] In actual testing, a set of test data of vehicle driving status can be input, and then the distance between the feature data of the test data and the cluster center of each driving style can be calculated to finally determine the driving style of the test data.
[0180] In some embodiments, during the testing process using actual samples, the driver information and the collected vehicle-side data and GPS data can be input into the clustering model of the trained variational autoencoder to calculate the driving style and obtain a specific driving style. Based on the driver's driving style information, the driving data of different stages such as vehicle starting, acceleration and deceleration, and overtaking are analyzed. Combined with the energy consumption data of each stage and the overall energy consumption data, the driving behavior is judged and targeted suggestions are given to reduce vehicle energy consumption, improve vehicle endurance, and protect passenger driving safety while ensuring driving comfort. At the same time, driving style data can be used for personalized settings of the intelligent driving system to achieve a better riding experience by learning the driver's driving style.
[0181] The driving style classification method of variational autoencoder clustering provided in the present application can obtain latent space representation vector features after applying VAE to encode driving style data, and apply the latent space representation vector features to perform clustering analysis, which is equivalent to performing feature dimensionality reduction on the original data before performing driving style evaluation. The experimental effect is more accurate and the clustering conclusion is better. The VAEC algorithm proposed in the present application forms an integrated neural network structure, which not only realizes the clustering of unsupervised driver data, but also realizes the conditional generation of original data. Compared with traditional machine learning clustering algorithms, a large amount of feature selection work is required in the early stage on similar driver risk driving assessment data sets, while the VAEC algorithm introduced with deep learning does not require any complicated and time-consuming feature selection engineering, and can also achieve good performance in these types of tasks. The present application adds a clustering network layer after the variational autoencoder output layer, constructs an integrated neural network for driving style classification, and establishes an end-to-end model, overcoming the problems of insufficient integrity of the clustering structure and low computational efficiency caused by the hard connection between the variational autoencoder and the traditional clustering method.
[0182] The present application embodiment provides a device for determining a driving style category. Figure 6 A schematic diagram of the structure of a driving style determination device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the driving style category determination device 10 includes:
[0183] A first acquisition module 11 is used to acquire vehicle driving data;
[0184] A first data processing module 12 is used to perform feature encoding processing and classification processing on the vehicle driving data in sequence using a trained variational autoencoder-clustering model to obtain a target driving style category of the vehicle driver;
[0185] The target driving style category is determined by a first posterior probability distribution of the driving style category, and the first posterior probability distribution is the posterior probability distribution of the driving style category with respect to a latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data by the variational autoencoder.
[0186] In some embodiments, the variational autoencoder-clustering model further includes a clustering module; the first data processing module 12 includes:
[0187] An encoding processing submodule, used for encoding the vehicle driving data using the variational autoencoder to obtain a target latent space representation vector;
[0188] The analysis and processing submodule is used to analyze and process the target latent space representation vector through the clustering module to obtain the target driving style category.
[0189] In some embodiments, the clustering module includes a data calculation submodule and a driving style determination module; the analysis and processing submodule includes:
[0190] A first determination unit, configured to determine a mean and a variance corresponding to the target latent space representation vector using the data calculation module;
[0191] The second determination unit is configured to determine the first posterior probability distribution according to the mean and the variance through the driving style determination module, and determine the target driving style category based on the first posterior probability distribution.
[0192] In some embodiments, the driving style category determination device 10 further includes:
[0193] A second acquisition module is used to acquire multiple vehicle driving data samples;
[0194] A first determination module, configured to input the plurality of vehicle driving data samples into an initial variational autoencoder-clustering model to obtain a plurality of first driving style categories and a cluster center of each first driving style category;
[0195] a second determination module, configured to determine a clustering index value based on the number of the plurality of first driving style categories and the cluster center of each first driving style category;
[0196] The first training module is used to perform back-propagation training on the initial variational autoencoder-clustering model if the clustering index value is less than the clustering index threshold until the first convergence condition is met to obtain the trained variational autoencoder-clustering model.
[0197] In some embodiments, the driving style category determination device further includes:
[0198] a third determination module, for inputting the plurality of vehicle driving data samples into the initial variational autoencoder-clustering model, and determining a first parameter corresponding to a posterior probability distribution of the vehicle driving data samples with respect to a second latent space representation vector, a second parameter corresponding to a posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data samples, a third parameter corresponding to a posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and a fourth parameter corresponding to the probability distribution of the first driving style category; the second latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data samples by the initial variational autoencoder-clustering model;
[0199] a fourth determination module, configured to determine a corresponding target loss function value according to the first parameter, the second parameter, the third parameter, the fourth parameter, and a pre-established target loss function;
[0200] The second training module is used to perform back-propagation training on the initial variational autoencoder-clustering model based on the target loss function value until a second convergence condition is met to obtain the trained variational autoencoder-clustering model.
[0201] In some embodiments, the target loss function includes a vehicle driving data reconstruction loss function, a first association loss function between a latent space representation vector and a driving style category, and a second association loss function between the latent space representation vector and the driving style category.
[0202] In some embodiments, the driving style category determination device further includes:
[0203] The first creation module is used to create the vehicle driving data reconstruction loss function based on the first probability density function corresponding to the posterior probability distribution of the vehicle driving data with respect to the latent space representation vector.
[0204] In some embodiments, the driving style category determination device further includes:
[0205] The second creation module is used to create the first association loss function based on a second probability density function corresponding to the posterior probability distribution of the latent space representation vector of the driving style category, a third probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the vehicle driving data, and a fourth probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category.
[0206] In some embodiments, the driving style category determination device further includes:
[0207] The third creation module is used to create the second association loss function based on the second probability density function and a fifth probability density function corresponding to the probability distribution of the driving style category.
[0208] In some embodiments, the a posteriori probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the a posteriori probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, and the a posteriori probability distribution of the first driving style category with respect to the second latent space representation vector are all normally distributed, and the probability distribution of the first driving style category is uniformly distributed.
[0209] It should be noted that the description of the driving style category determination device in the embodiment of the present application is similar to the description of the corresponding method embodiment above, and has similar beneficial effects as the method embodiment, so it is not repeated here. For technical details not disclosed in the embodiment of the device, please refer to the description of the method embodiment of the present application for understanding.
[0210] It should be noted that in the embodiment of the present application, if the above-mentioned method for determining the driving style category is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or in other words, the part that contributes to the relevant solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0211] Accordingly, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining the driving style category provided in the above embodiment is implemented.
[0212] An embodiment of the present application also provides a device for determining a driving style category. Figure 7 A schematic diagram of the structure of a driving style determination device provided in an embodiment of the present application is as follows: Figure 7 As shown, the driving style category determination device 20 includes: a memory 21, a processor 22, a communication interface 23 and a communication bus 24. The memory 21 is used to store an executable driving style category determination instruction; the processor 22 is used to execute the executable driving style category determination instruction stored in the memory 21 to implement the driving style category determination method provided in the above embodiment.
[0213] The description of the above driving style category determination device and storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the driving style category determination device and storage medium embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0214] It should be noted that, in this article, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises at least one ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0215] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0216] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0217] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0218] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, disks or optical disks.
[0219] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a product to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0220] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technical object familiar with the technical field can be easily conceived of within the technical scope disclosed in the present application. Changes or substitutions should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for determining a driving style category, characterized in that: include: Obtain vehicle driving data; Using a trained variational autoencoder-clustering model, the vehicle driving data is sequentially subjected to feature encoding processing and classification processing to obtain a target driving style category of the vehicle driver; The target driving style category is determined by a first posterior probability distribution of the driving style category, and the first posterior probability distribution is the posterior probability distribution of the driving style category with respect to a latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data by the variational autoencoder.
2. The method according to claim 1, characterized in that The variational autoencoder-clustering model also includes a clustering module; The method of using the trained variational autoencoder-clustering model to sequentially perform feature encoding processing and classification processing on the vehicle driving data to obtain the target driving style category of the vehicle driver includes: Using the variational autoencoder to encode the vehicle driving data to obtain a target latent space representation vector; The target latent space representation vector is analyzed and processed by the clustering module to obtain the target driving style category.
3. The method according to claim 2, characterized in that The clustering module includes a data calculation submodule and a driving style determination module; the clustering module analyzes and processes the latent space representation vector to obtain the target driving style category, including: Determine the mean and variance corresponding to the target latent space representation vector using the data calculation module; The first posterior probability distribution is determined by the driving style determination module according to the mean and the variance, and the target driving style category is determined based on the first posterior probability distribution.
4. The method according to claim 1, characterized in that The training method of the variational autoencoder-clustering model comprises: Acquire multiple vehicle driving data samples; Inputting the plurality of vehicle driving data samples into an initial variational autoencoder-clustering model to obtain a plurality of first driving style categories and a cluster center of each first driving style category; determining a clustering index value based on the number of the plurality of first driving style categories and the cluster center of each of the first driving style categories; If the clustering index value is less than the clustering index threshold, back-propagation training is performed on the initial variational autoencoder-clustering model until the first convergence condition is met to obtain the trained variational autoencoder-clustering model.
5. The method according to claim 4, characterized in that The training method of the variational autoencoder-clustering model further includes: Input the plurality of vehicle driving data samples into the initial variational autoencoder-clustering model, determine a first parameter corresponding to the posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, a second parameter corresponding to the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, a third parameter corresponding to the posterior probability distribution of the first driving style category with respect to the second latent space representation vector, and a fourth parameter corresponding to the probability distribution of the first driving style category; the second latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data sample by the initial variational autoencoder-clustering model; Determine a corresponding target loss function value according to the first parameter, the second parameter, the third parameter, the fourth parameter, and a pre-established target loss function; Based on the target loss function value, back-propagation training is performed on the initial variational autoencoder-clustering model until a second convergence condition is met, thereby obtaining the trained variational autoencoder-clustering model.
6. The method according to claim 5, characterized in that The target loss function includes a vehicle driving data reconstruction loss function, a first association loss function between a latent space representation vector and a driving style category, and a second association loss function between the latent space representation vector and the driving style category.
7. The method according to claim 6, characterized in that The method further comprises: The vehicle driving data reconstruction loss function is created based on a first probability density function corresponding to the posterior probability distribution of the vehicle driving data with respect to the latent space representation vector.
8. The method according to claim 6, characterized in that The method further comprises: The first association loss function is created based on a second probability density function corresponding to the posterior probability distribution of the driving style category with respect to the latent space representation vector, a third probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the vehicle driving data, and a fourth probability density function corresponding to the posterior probability distribution of the latent space representation vector with respect to the driving style category.
9. The method according to claim 8, characterized in that The method further comprises: The second association loss function is created based on the second probability density function and a fifth probability density function corresponding to the probability distribution of the driving style category.
10. The method according to any one of claims 5 to 9, characterized in that: The posterior probability distribution of the vehicle driving data sample with respect to the second latent space representation vector, the posterior probability distribution of the second latent space representation vector with respect to the vehicle driving data sample, and the posterior probability distribution of the first driving style category with respect to the second latent space representation vector are all normally distributed, and the probability distribution of the first driving style category is uniformly distributed.
11. A device for determining a driving style category, characterized in that: include: A first acquisition module, used to acquire vehicle driving data; A first data processing module is used to use a trained variational autoencoder-clustering model to perform feature encoding processing and classification processing on the vehicle driving data in sequence to obtain a target driving style category of the vehicle driver; The target driving style category is determined by a first posterior probability distribution of the driving style category, and the first posterior probability distribution is the posterior probability distribution of the driving style category with respect to a latent space representation vector; the variational autoencoder-clustering model includes a variational autoencoder, and the latent space representation vector is a feature vector obtained after feature encoding processing is performed on the vehicle driving data by the variational autoencoder.
12. A device for determining a driving style category, characterized in that: include: processor and memory; wherein, The memory is used to store a computer program that can be run on the processor; The processor is configured to execute the method according to any one of claims 1 to 10 when running the computer program.
13. A computer-readable storage medium, characterized in that: The storage medium stores computer program code, and when the computer program code is executed by a computer, the method according to any one of claims 1 to 10 is executed.