Driving mode prediction model training method and system and driving mode recommendation method
By using the bidirectional long and short-term memory network layer to extract the two-way hidden state of time step data, the problem of poor driving mode recommendation adaptability caused by ignoring the time dependence in the prior art is solved, and a more accurate driving mode prediction and a better driving experience are achieved.
Patent Information
- Application Number
- CN202510029803.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-28
AI Technical Summary
The dependence between the state characteristics of the vehicle at different times is ignored in the prior art, resulting in poor adaptability of driving mode recommendations and unable to provide a better driving experience.
By obtaining the training set, including multiple feature sets and corresponding driving mode tags, each feature set contains multiple time step data, the two-way long and short-term memory network layer is used to extract the two-way hidden state of the time step data, and the model is trained based on the prediction results and labels.
By extracting the two-way hidden state of time step data, the model can capture the front and back dependencies of features in the time series, improve the accuracy of driving mode prediction, and provide a better driving experience.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and in particular to a driving mode prediction model training method, system and driving mode recommendation method. Background Art
[0002] With the continuous advancement of intelligent driving technology, the diversification of driving modes has become an important means to improve vehicle performance and driving experience. Different driving scenarios and driver needs have prompted automakers to develop a variety of driving modes, such as economic mode, sports mode, and comfort mode. These driving modes enable vehicles to optimize performance under different conditions by adjusting parameters such as engine response, transmission shifting logic, and suspension system hardness.
[0003] Currently, driving mode recommendations are usually made based on vehicle status features, such as speed and acceleration, etc. However, this approach ignores the dependencies between status features at different times, resulting in poor adaptability of the recommended driving mode and failure to provide a good driving experience. Summary of the invention
[0004] The present application provides a driving mode prediction model training method, system and driving mode recommendation method to solve the problem in the prior art that the dependency between the state characteristics of the vehicle at different times is ignored, resulting in poor adaptability of the recommended driving mode and failure to provide a good driving experience.
[0005] The present application provides a driving mode prediction model training method, comprising: obtaining a training set, the training set comprising: a plurality of feature sets, and driving mode labels corresponding to the feature sets one by one, the feature sets comprising a plurality of time step data, the time step data comprising a target vehicle state feature;
[0006] Inputting the training set into a preset driving mode prediction model to perform driving mode prediction to obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data;
[0007] The driving mode prediction model is trained according to the driving mode prediction result and the corresponding driving mode label.
[0008] In one embodiment of the present application, the step of obtaining a training set includes:
[0009] Acquire time series data, wherein the time series data includes a plurality of the time step data and the driving mode labels corresponding one to one to the time step data;
[0010] According to the preset window length and sliding step length, the window is slid starting from the starting position of the time series data to obtain a plurality of feature sets of fixed lengths, wherein the driving mode labels corresponding to the time step data in the feature sets are the same.
[0011] In one embodiment of the present application, the step of obtaining the time series data includes:
[0012] Acquire an original data set, the original data set comprising a plurality of original time step data and the driving mode labels corresponding one-to-one to the original time step data, the original time step data comprising original vehicle state features;
[0013] Obtaining the mean and standard deviation of the original vehicle state characteristics;
[0014] According to the mean and the standard deviation, the original vehicle state feature is standardized to obtain the target vehicle state feature;
[0015] When the state characteristics of the target vehicle are obtained, the time step data is obtained to complete the acquisition of the time series data.
[0016] In one embodiment of the present application, the training set is input into a preset driving mode prediction model to perform driving mode prediction, and the step of obtaining a driving mode prediction result includes:
[0017] According to a preset batch size, a plurality of target feature sets are obtained from the training set, the number of the target feature sets being the batch size, and the driving mode labels corresponding to the plurality of target feature sets being the same;
[0018] splicing the obtained multiple target feature sets to obtain spliced data;
[0019] Inputting the spliced data into the bidirectional long short-term memory network layer to perform bidirectional hidden state extraction to obtain the bidirectional hidden state of each time step data;
[0020] According to the bidirectional hidden state of the time step data, a driving mode prediction is performed to obtain the driving mode prediction result.
[0021] In one embodiment of the present application, the driving mode prediction is performed according to the bidirectional hidden state of the time step data, and the step of obtaining the driving mode prediction result includes:
[0022] Inputting the bidirectional hidden state of the time step data into an attention mechanism layer in the driving mode prediction model to obtain a weight score of the time step data;
[0023] By performing soft maximization processing on the weight score, a normalized attention weight of the time step data is obtained;
[0024] According to the attention weight, weighted averaging is performed on the bidirectional hidden state of the time step data to obtain target feature information;
[0025] The driving mode prediction is performed according to the target feature information to obtain the driving mode prediction result.
[0026] In one embodiment of the present application, the step of performing driving mode prediction according to the target feature information to obtain the driving mode prediction result includes:
[0027] Inputting the target feature information into a fully connected unit in the driving mode prediction model, performing linear transformation and activation, and obtaining final feature information of a preset dimension, wherein the fully connected unit includes at least one fully connected subunit, and the fully connected subunit includes an intermediate fully connected layer and a nonlinear activation function layer connected in sequence;
[0028] The final feature information is input into a classification network in the driving mode prediction model to perform driving mode prediction to obtain the driving mode prediction result, wherein the classification network includes a final fully connected layer and a target activation function layer connected in sequence.
[0029] In one embodiment of the present application, the step of training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label includes:
[0030] Obtaining a target loss according to a gap between the driving mode prediction result and the corresponding driving mode label;
[0031] Back propagation is performed according to the target loss until convergence to obtain the trained driving mode prediction model.
[0032] The present application also provides a driving mode prediction model training system, comprising:
[0033] A training set acquisition module, used to acquire a training set, the training set comprising: a plurality of feature sets, and driving mode labels corresponding to the feature sets one by one, the feature sets comprising a plurality of time step data, the time step data comprising a target vehicle state feature;
[0034] A prediction module, used for inputting the training set into a preset driving mode prediction model to perform driving mode prediction and obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data;
[0035] A training module is used to train the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label.
[0036] The present application also provides a driving mode recommendation method, comprising:
[0037] Acquire the data to be processed uploaded by the vehicle end, wherein the data to be processed includes vehicle state characteristics of multiple consecutive time steps;
[0038] Perform driving mode prediction according to the data to be processed and the driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained using the driving mode prediction model training method described in any one of the above;
[0039] A driving mode recommendation is made according to the driving mode prediction result.
[0040] The present application also provides a driving mode recommendation system, comprising:
[0041] A module for acquiring data to be processed, used to acquire the data to be processed uploaded by the vehicle end, wherein the data to be processed includes original vehicle state characteristics of multiple consecutive time steps;
[0042] a processing module, configured to perform driving mode prediction according to the data to be processed and a driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained by using any of the driving mode prediction model training methods described above;
[0043] The driving mode recommendation module is used to make a driving mode recommendation based on the driving mode prediction result.
[0044] Beneficial effects of the present application: The present application provides a driving mode prediction model training method, system and driving mode recommendation method, which obtains a training set, the training set includes: multiple feature sets, and driving mode labels corresponding to the feature sets one by one, the feature sets include multiple time step data, and the time step data include target vehicle state characteristics; inputs the training set into a preset driving mode prediction model, performs driving mode prediction, and obtains a driving mode prediction result, the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data; trains the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label. This method can obtain the front-to-back dependency relationship of each feature in the time series by extracting the bidirectional hidden state of the time step data, which helps to improve the prediction accuracy of the driving mode prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flowchart of a driving mode prediction model training method provided in one embodiment of the present application;
[0046] Figure 2 A schematic diagram of the structure of a driving mode prediction model in a driving mode prediction model training method provided in an embodiment of the present application;
[0047] Figure 3 A schematic diagram of the structure of a driving mode prediction model training system provided in one embodiment of the present application;
[0048] Figure 4 A schematic diagram of a driving mode recommendation method according to an embodiment of the present application;
[0049] Figure 5 A schematic diagram of the structure of a driving mode recommendation system provided in one embodiment of the present application;
[0050] Figure 6 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0052] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0053] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0054] Combine the following Figures 1 to 6 , the driving mode prediction model training method, system and driving mode recommendation method provided in this application are explained.
[0055] See also Figure 1 , Figure 1A flowchart of a driving mode prediction model training method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:
[0056] S110: Acquire a training set, wherein the training set includes: a plurality of feature sets, and driving mode labels corresponding one-to-one to the feature sets, wherein the feature sets include a plurality of time step data, and the time step data include target vehicle state features.
[0057] It should be noted that each time step data corresponds to one time step. The target vehicle state characteristics are standardized vehicle state characteristics, and the vehicle state characteristics include vehicle speed, acceleration, motor speed, engine speed, brake pedal state, gear position, road mode, and energy recovery state, etc. The road mode is city mode, highway mode, off-road mode, or snow / ice mode, etc.
[0058] It should also be noted that, in some embodiments, the time step data also includes weather data and traffic data, such as traffic network data and traffic flow data, etc. By acquiring the above time step data, a more comprehensive coverage of available features can be achieved, thereby improving the prediction accuracy of the driving mode prediction model.
[0059] It should be mentioned that the lengths of the feature sets are the same, that is, the time step data included in each feature set is the same. Moreover, the number of features included in each time step data is the same, which facilitates the subsequent driving mode prediction.
[0060] It is also worth mentioning that in this embodiment, a feature set and its corresponding driving mode label are determined as a sample to facilitate subsequent model training.
[0061] S120: Inputting the training set into a preset driving mode prediction model to perform driving mode prediction to obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network (LSTM) layer for extracting a bidirectional hidden state of the time step data.
[0062] It should be noted that by setting a bidirectional long short-term memory network layer in the driving mode prediction model, the data of each time step, or the bidirectional hidden state of each time step, can be extracted. The bidirectional hidden state includes: a forward hidden state and a backward hidden state. The forward hidden state is the sequence information from the forward LSTM processing, and the backward hidden state is the sequence information from the backward LSTM processing. The bidirectional hidden state can be obtained by splicing the forward hidden state and the backward hidden state. The bidirectional hidden state clarifies the changes and dependencies of features (such as vehicle speed, acceleration, motor speed, engine speed, brake pedal status, gear position, road mode, and energy recovery status) in the time series, which is helpful for subsequent driving mode prediction and improves the accuracy of driving mode prediction.
[0063] S130: Training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label.
[0064] It should be noted that the driving mode prediction model training method in the above embodiment can well improve the prediction accuracy of the driving mode prediction model, has low cost and strong real-time performance.
[0065] In some embodiments, the step of obtaining a training set includes:
[0066] 1. Acquire time series data, wherein the time series data includes a plurality of time step data and the driving mode labels corresponding to the time step data one by one.
[0067] 2. According to the preset window length and sliding step length, starting from the starting position of the time series data, the window is slid to obtain multiple feature sets of fixed lengths, and the driving mode labels corresponding to the time step data in the feature sets are the same.
[0068] It should be noted that the window length and the sliding step can be set according to actual needs. For example: the window length is 10 (10 time steps (data)), 20 (20 time steps (data)), etc., and the sliding step is 1 (1 time step (data)), 2 (2 time steps (data)), etc. Assuming that there are 100 time step data in the current time series data, each time step data corresponds to a time step, and assuming that the currently set window length is 50 and the sliding step is 1, then starting from the first time step data, the window is slid, and the feature sets obtained are feature set 1 {first time step data, second time step data...50th time step data}, feature set 2 {second time step data, third time step data...51st time step data}...
[0069] Similarly, assuming that there are 100 time step data in the current time series data, each time step data corresponds to a time step, and assuming that the currently set window length is 50 and the sliding step length is 2, then starting from the first time step data, the window slides, and the obtained feature sets are feature set 1 {first time step data, second time step data...50th time step data}, feature set 2 {third time step data, third time step data...52nd time step data}...
[0070] It should also be noted that, during the window sliding process, if the driving mode labels corresponding to the time step data in the same window are the same, the time step data in the window constitute a feature set. If the driving mode labels corresponding to the time step data in the same window are different, the current window is discarded or the window boundary is adjusted. Adjusting the window boundary can be to adjust the forward boundary of the current window forward and the backward boundary forward, or to adjust the forward boundary of the current window backward and the boundary of the current window backward.
[0071] In some embodiments, the step of obtaining the time series data includes:
[0072] 1. Obtain an original data set, wherein the original data set includes a plurality of original time step data and the driving mode labels corresponding one-to-one to the original time step data, and the original time step data includes original vehicle state features.
[0073] It should be noted that the original vehicle state characteristics are vehicle state characteristics that have not been standardized.
[0074] 2. Obtain the mean and standard deviation of the original vehicle state characteristics.
[0075] 3. Standardize the original vehicle state characteristics according to the mean and the standard deviation to obtain the target vehicle state characteristics.
[0076] Specifically, each eigenvalue in the original vehicle state feature (vehicle speed, acceleration, motor speed, engine speed, brake pedal state, gear position, road mode, and energy recovery state, etc. The road mode is the eigenvalue of signals such as city mode, highway mode, off-road mode or snow / ice mode) is subtracted from the mean, and then divided by the standard deviation, so that all eigenvalues are scaled to the vicinity of 0, so that the scales of different features or signals are consistent, forming a distribution with a mean of 0 (the sum of the deviations of all eigenvalues relative to the mean is zero) and a standard deviation of 1, which helps to subsequently improve the performance of the driving mode prediction model.
[0077] 4. When the state characteristics of the target vehicle are obtained, the time step data is obtained to complete the acquisition of the time series data.
[0078] It should be mentioned that, in some embodiments, the data set obtained by the above-mentioned normalization processing and sliding window processing can be divided into a preset ratio, such as a ratio of 8:1:1, to obtain a training set, a validation set and a test set.
[0079] In some embodiments, the step of inputting the training set into a preset driving mode prediction model to perform driving mode prediction and obtaining a driving mode prediction result includes:
[0080] 1. According to a preset batch size, multiple target feature sets are obtained from the training set, the number of the target feature sets is the batch size, and the driving mode labels corresponding to the multiple target feature sets are the same.
[0081] It should be noted that the batch size can be set according to actual needs, such as 6 feature sets, 7 feature sets, etc.
[0082] It should also be noted that the multiple target feature sets obtained are continuous feature sets.
[0083] 2. Splicing the obtained multiple target feature sets to obtain spliced data.
[0084] It should be noted that by splicing the target feature sets of the same batch and using the spliced data as the input of the driving mode prediction model (the shape of the input data is (batch_size, sequence_length, num_features), where batch_size represents the batch size, sequence_length represents the window length, and num_features represents the number of features in each time step data), it is possible to easily mine the dependencies between more time steps (data) and facilitate subsequent driving mode prediction.
[0085] It should be mentioned that the shape of the data describes the size of the data in different dimensions, and batch_size, sequence_length, and num_features correspond to different dimensions.
[0086] 3. Input the spliced data into the bidirectional long short-term memory network layer to perform bidirectional hidden state extraction to obtain the bidirectional hidden state of each time step data.
[0087] It should be noted that by inputting the concatenated data into the bidirectional long short-term memory network layer and performing bidirectional hidden state extraction, the model can better understand the context information of each time step (data). The data shape output by the bidirectional long short-term memory network layer is (batch_size, sequence_length, hidden_size*2), where hidden_size is the number of hidden layers in the forward or backward direction of the LSTM.
[0088] 4. Perform driving mode prediction based on the bidirectional hidden state of the time step data to obtain the driving mode prediction result.
[0089] It should be noted that by predicting the driving mode based on the bidirectional hidden state of each time step (data), the prediction accuracy can be improved.
[0090] In some embodiments, the step of performing driving mode prediction according to the bidirectional hidden state of the time step data and obtaining the driving mode prediction result includes:
[0091] 1. Inputting the bidirectional hidden state of the time step data into the attention mechanism layer in the driving mode prediction model to obtain a weight score of the time step data.
[0092] Specifically, a weight score of each time step data is obtained by performing a dot product operation on a trainable parameter vector and the bidirectional hidden state of each time step data.
[0093] 2. By performing soft maximization (Softmax) processing on the weight score, the normalized attention weight of the time step data is obtained.
[0094] 3. According to the attention weight, weighted averaging is performed on the bidirectional hidden state of the time step data to obtain target feature information.
[0095] Specifically, according to the attention weight, the bidirectional hidden states of all the time step data are weighted averaged to obtain the target feature information.
[0096] 4. Perform driving mode prediction based on the target feature information to obtain the driving mode prediction result.
[0097] It should be noted that by inputting the bidirectional hidden state of the time step data into the attention mechanism layer in the driving mode prediction model and performing the above operation, the features of important time steps can be given higher weights, and the features of unimportant time steps can be given lower weights, thereby realizing the extraction of important feature information to improve the accuracy of subsequent driving mode prediction. The data shape output by the attention mechanism layer is (batch_size, hidden_size*2).
[0098] In some embodiments, the step of performing driving mode prediction based on the target feature information to obtain the driving mode prediction result includes:
[0099] 1. Inputting the target feature information into a fully connected unit in the driving mode prediction model, performing linear transformation and activation, and obtaining final feature information of a preset dimension, wherein the fully connected unit includes at least one fully connected subunit, and the fully connected subunit includes an intermediate fully connected layer and a nonlinear activation function layer connected in sequence.
[0100] It should be noted that by inputting the target feature information into the fully connected unit in the driving mode prediction model, feature extraction and dimensionality reduction of the target feature information can be further achieved. The activation function corresponding to the nonlinear activation function layer can be a ReLU (Rectified Linear Unit, linear rectified function) activation function, etc.
[0101] It should be noted that if a fully connected unit includes two or more fully connected subunits, the fully connected subunits are connected in sequence. For example, if a fully connected unit includes two fully connected subunits, the shape of the input data of the first fully connected subunit is (batch_size, hidden_size*2), and the shape of the output data is (batch_size, 128), the shape of the input data of the second fully connected subunit is (batch_size, 128), and the shape of the output data is (batch_size, 64), etc.
[0102] 2. Inputting the final feature information into a classification network in the driving mode prediction model to perform driving mode prediction to obtain the driving mode prediction result, wherein the classification network includes a final fully connected layer and a target activation function layer connected in sequence.
[0103] It should be noted that the activation function corresponding to the target activation function layer may be a Softmax (soft maximization) activation function, etc. The Softmax activation function can output the probability distribution of each category (driving mode), thereby obtaining a driving mode prediction result with high accuracy.
[0104] In some embodiments, the step of training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label includes:
[0105] 1. Obtaining a target loss according to the difference between the driving mode prediction result and the corresponding driving mode label.
[0106] It should be noted that each batch of spliced data corresponds to a driving mode prediction result.
[0107] 2. Perform back propagation according to the target loss until convergence to obtain the trained driving mode prediction model.
[0108] It should be noted that the cross-entropy loss function can be used to measure the gap between the driving mode prediction result and the corresponding driving mode label. In addition, the Adam (Adaptive Moment Estimation Optimizer) optimizer can be used to minimize the loss function and update the model parameters through the back propagation algorithm until convergence, thereby improving the accuracy of the driving mode prediction model.
[0109] Figure 2 This is a schematic diagram of the structure of the driving mode prediction model in the driving mode prediction model training method provided in one embodiment of the present application. Please refer to Figure 2 , the driving mode prediction model includes:
[0110] The bidirectional long short-term memory network layer, the attention mechanism layer, the first intermediate fully connected layer, the first nonlinear activation function layer, the second intermediate fully connected layer, the second nonlinear activation function layer, the final fully connected layer, and the target activation function layer are connected in sequence. The input of the bidirectional long short-term memory network layer is a plurality of spliced feature sets (such as feature set 1, feature set 2...feature set m, m represents the number of feature sets in this batch), that is, a window fragment. Each feature set includes a fixed number of time step data, such as feature set 1 includes T11...T1w, feature set 2 includes T21...T2w, feature set m includes Tm1...Tmw, etc., T represents the time step data, w represents the number of time step data, and Tmw represents the wth time step data in feature set m. By splicing multiple feature sets, a splicing vector is obtained, and the splicing vector is used as the input of the bidirectional long short-term memory network layer.
[0111] It should be mentioned that the above embodiment takes two fully connected sub-units as an example to explain the structure of the driving mode prediction model, namely, the first intermediate fully connected layer, the first nonlinear activation function layer, the second intermediate fully connected layer, and the second nonlinear activation function layer in the above embodiment. In the specific implementation process, the number of fully connected sub-units can be adaptively adjusted.
[0112] It is also worth mentioning that the vector splicing method can be adopted as follows Figure 2 The horizontal splicing method in the example, that is, {T11, T12...T1w, T21, T22...T2w, Tm1, Tm2...Tmw}, can also be used in the vertical splicing method, that is, {T11, T21...Tm1, T12, T22...Tm2...T1w, T2w...Tmw}. In addition, vector splicing can be performed according to the type of target vehicle state features in the time step data, that is, the target vehicle state features of the same type are arranged in time sequence, and the arranged target vehicle state features of different types are spliced together, which has high flexibility.
[0113] The driving mode prediction model training system provided in the present application is described below. The driving mode prediction model training system described below and the driving mode prediction model training method described above can be referenced to each other.
[0114] Please refer to Figure 3 , the driving mode prediction model training system provided in this embodiment includes:
[0115] A training set acquisition module 310 is used to acquire a training set, wherein the training set includes: a plurality of feature sets and driving mode labels corresponding to the feature sets one by one, wherein the feature sets include a plurality of time step data, and the time step data include target vehicle state features;
[0116] A prediction module 320, configured to input the training set into a preset driving mode prediction model to perform driving mode prediction and obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data;
[0117] The training module 330 is used to train the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label. Figure 4 The training system can better combine the forward and backward dependencies of each feature in the time series, thereby improving the prediction accuracy of the driving mode prediction model and achieving accurate prediction of driving modes.
[0118] In some embodiments, the training set acquisition module 310 is specifically used to acquire time series data, where the time series data includes a plurality of the time step data and the driving mode labels corresponding to the time step data one by one;
[0119] According to the preset window length and sliding step length, the window is slid starting from the starting position of the time series data to obtain a plurality of feature sets of fixed lengths, wherein the driving mode labels corresponding to the time step data in the feature sets are the same.
[0120] In some embodiments, the training set acquisition module 310 is further specifically used to acquire an original data set, the original data set including a plurality of original time step data and the driving mode labels corresponding to the original time step data one by one, the original time step data including original vehicle state features;
[0121] Obtaining the mean and standard deviation of the original vehicle state characteristics;
[0122] According to the mean and the standard deviation, the original vehicle state feature is standardized to obtain the target vehicle state feature;
[0123] When the state characteristics of the target vehicle are obtained, the time step data is obtained to complete the acquisition of the time series data.
[0124] In some embodiments, the prediction module 320 is specifically used to obtain multiple target feature sets from the training set according to a preset batch size, the number of the target feature sets is the batch size, and the driving mode labels corresponding to the multiple target feature sets are the same;
[0125] splicing the obtained multiple target feature sets to obtain spliced data;
[0126] Inputting the spliced data into the bidirectional long short-term memory network layer to perform bidirectional hidden state extraction to obtain the bidirectional hidden state of each time step data;
[0127] According to the bidirectional hidden state of the time step data, a driving mode prediction is performed to obtain the driving mode prediction result.
[0128] In some embodiments, the prediction module 320 is further specifically configured to input the bidirectional hidden state of the time step data into an attention mechanism layer in the driving mode prediction model to obtain a weight score of the time step data;
[0129] By performing soft maximization processing on the weight score, a normalized attention weight of the time step data is obtained;
[0130] According to the attention weight, weighted averaging is performed on the bidirectional hidden state of the time step data to obtain target feature information;
[0131] The driving mode prediction is performed according to the target feature information to obtain the driving mode prediction result.
[0132] In some embodiments, the prediction module 320 is further specifically used to input the target feature information into a fully connected unit in the driving mode prediction model, perform linear transformation and activation, and obtain final feature information of a preset dimension, wherein the fully connected unit includes at least one fully connected subunit, and the fully connected subunit includes an intermediate fully connected layer and a nonlinear activation function layer connected in sequence;
[0133] The final feature information is input into a classification network in the driving mode prediction model to perform driving mode prediction to obtain the driving mode prediction result, wherein the classification network includes a final fully connected layer and a target activation function layer connected in sequence.
[0134] In some embodiments, the training module 330 is specifically used to obtain a target loss according to the gap between the driving mode prediction result and the corresponding driving mode label;
[0135] Back propagation is performed according to the target loss until convergence to obtain the trained driving mode prediction model.
[0136] Please refer to Figure 4 This embodiment also provides a driving mode recommendation method, including:
[0137] S410: Acquire the data to be processed uploaded by the vehicle side, where the data to be processed includes vehicle state characteristics of multiple consecutive time steps.
[0138] S420: Perform driving mode prediction based on the data to be processed and the driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained using any of the driving mode prediction model training methods described above.
[0139] It should be noted that before the data to be processed is input into the driving mode prediction model, it is also necessary to perform operations such as standardization and sliding window processing on the data to be processed.
[0140] S430: Recommend a driving mode according to the driving mode prediction result. The driving mode recommendation method in this embodiment can better consider the front-to-back dependency of each feature in the time series, thereby effectively improving the accuracy of driving mode recommendation and enhancing driving experience.
[0141] It should be noted that the driving mode prediction result can be fed back to the vehicle control system to implement driving mode recommendation.
[0142] It should be mentioned that the driving mode recommendation method can be in the cloud (cloud platform), etc., and driving mode recommendation can be achieved by deploying a trained driving mode prediction model in the cloud.
[0143] Please refer to Figure 5 This embodiment also provides a driving mode recommendation system, including:
[0144] The to-be-processed data acquisition module 510 is used to acquire the to-be-processed data uploaded by the vehicle end, wherein the to-be-processed data includes original vehicle state characteristics of multiple consecutive time steps;
[0145] A processing module 520 is used to perform driving mode prediction according to the data to be processed and a driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained using any of the driving mode prediction model training methods described above;
[0146] The driving mode recommendation module 530 is used to make a driving mode recommendation based on the driving mode prediction result. The driving mode recommendation system in this embodiment can achieve any technical effect achieved by the above-mentioned driving mode recommendation method, which will not be described in detail here.
[0147] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure is shown in FIG. Figure 6 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.
[0148] In some embodiments, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining a training set, the training set including: multiple feature sets, and driving mode labels corresponding to the feature sets, the feature sets including multiple time step data, the time step data including target vehicle state features; inputting the training set into a preset driving mode prediction model, performing driving mode prediction, and obtaining a driving mode prediction result, the driving mode prediction model including a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data; training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label. Alternatively, the following steps are implemented: obtaining the data to be processed uploaded by the vehicle end, the data to be processed including vehicle state features of multiple consecutive time steps; performing driving mode prediction according to the data to be processed and the driving mode prediction model, and obtaining a driving mode prediction result, the driving mode prediction model being trained using any of the above driving mode prediction model training methods; and recommending a driving mode according to the driving mode prediction result.
[0149] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining a training set, the training set includes: multiple feature sets, and driving mode labels corresponding to the feature sets one by one, the feature sets include multiple time step data, and the time step data include target vehicle state features; inputting the training set into a preset driving mode prediction model, performing driving mode prediction, and obtaining a driving mode prediction result, the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data; training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label. Alternatively, the following steps are implemented: obtaining the data to be processed uploaded by the vehicle end, the data to be processed includes vehicle state features of multiple consecutive time steps; performing driving mode prediction according to the data to be processed and the driving mode prediction model, and obtaining a driving mode prediction result, the driving mode prediction model is trained using any of the above-mentioned driving mode prediction model training methods; and recommending a driving mode according to the driving mode prediction result.
[0150] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0151] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0152] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A driving mode prediction model training method, characterized in that: include: Acquire a training set, the training set comprising: a plurality of feature sets and driving mode labels corresponding to the feature sets one by one, the feature sets comprising a plurality of time step data, the time step data comprising a target vehicle state feature; Inputting the training set into a preset driving mode prediction model to perform driving mode prediction to obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data; The driving mode prediction model is trained according to the driving mode prediction result and the corresponding driving mode label.
2. The driving mode prediction model training method according to claim 1, characterized in that: The steps to obtain the training set include: Acquire time series data, wherein the time series data includes a plurality of the time step data and the driving mode labels corresponding one to one to the time step data; According to the preset window length and sliding step length, the window is slid starting from the starting position of the time series data to obtain a plurality of feature sets of fixed lengths, wherein the driving mode labels corresponding to the time step data in the feature sets are the same.
3. The driving mode prediction model training method according to claim 2, characterized in that: The steps of obtaining the time series data include: Acquire an original data set, the original data set comprising a plurality of original time step data and the driving mode labels corresponding one-to-one to the original time step data, the original time step data comprising original vehicle state features; Obtaining the mean and standard deviation of the original vehicle state characteristics; According to the mean and the standard deviation, the original vehicle state feature is standardized to obtain the target vehicle state feature; When the state characteristics of the target vehicle are obtained, the time step data is obtained to complete the acquisition of the time series data.
4. The driving mode prediction model training method according to claim 1, characterized in that: The step of inputting the training set into a preset driving mode prediction model to perform driving mode prediction and obtain a driving mode prediction result comprises: According to a preset batch size, a plurality of target feature sets are obtained from the training set, the number of the target feature sets being the batch size, and the driving mode labels corresponding to the plurality of target feature sets being the same; splicing the obtained multiple target feature sets to obtain spliced data; Inputting the spliced data into the bidirectional long short-term memory network layer to perform bidirectional hidden state extraction to obtain the bidirectional hidden state of each time step data; According to the bidirectional hidden state of the time step data, a driving mode prediction is performed to obtain the driving mode prediction result.
5. The driving mode prediction model training method according to claim 4, characterized in that: The step of performing driving mode prediction according to the bidirectional hidden state of the time step data and obtaining the driving mode prediction result comprises: Inputting the bidirectional hidden state of the time step data into an attention mechanism layer in the driving mode prediction model to obtain a weight score of the time step data; By performing soft maximization processing on the weight score, a normalized attention weight of the time step data is obtained; According to the attention weight, weighted averaging is performed on the bidirectional hidden state of the time step data to obtain target feature information; The driving mode prediction is performed according to the target feature information to obtain the driving mode prediction result.
6. The driving mode prediction model training method according to claim 5, characterized in that: The step of performing driving mode prediction according to the target feature information to obtain the driving mode prediction result includes: Inputting the target feature information into a fully connected unit in the driving mode prediction model, performing linear transformation and activation, and obtaining final feature information of a preset dimension, wherein the fully connected unit includes at least one fully connected subunit, and the fully connected subunit includes an intermediate fully connected layer and a nonlinear activation function layer connected in sequence; The final feature information is input into a classification network in the driving mode prediction model to perform driving mode prediction to obtain the driving mode prediction result, wherein the classification network includes a final fully connected layer and a target activation function layer connected in sequence.
7. The driving mode prediction model training method according to claim 1, characterized in that: The step of training the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label includes: Obtaining a target loss according to a gap between the driving mode prediction result and the corresponding driving mode label; Back propagation is performed according to the target loss until convergence to obtain the trained driving mode prediction model.
8. A driving mode prediction model training system, characterized in that: include: A training set acquisition module, used to acquire a training set, the training set comprising: a plurality of feature sets, and driving mode labels corresponding to the feature sets one by one, the feature sets comprising a plurality of time step data, the time step data comprising a target vehicle state feature; A prediction module, used for inputting the training set into a preset driving mode prediction model to perform driving mode prediction and obtain a driving mode prediction result, wherein the driving mode prediction model includes a bidirectional long short-term memory network layer for extracting a bidirectional hidden state of the time step data; A training module is used to train the driving mode prediction model according to the driving mode prediction result and the corresponding driving mode label.
9. A driving mode recommendation method, characterized in that: include: Acquire the data to be processed uploaded by the vehicle end, wherein the data to be processed includes vehicle state characteristics of multiple consecutive time steps; Perform driving mode prediction according to the data to be processed and the driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained using the driving mode prediction model training method according to any one of claims 1 to 7; A driving mode recommendation is made according to the driving mode prediction result.
10. A driving mode recommendation system, characterized in that: include: A module for acquiring data to be processed, used to acquire the data to be processed uploaded by the vehicle end, wherein the data to be processed includes original vehicle state characteristics of multiple consecutive time steps; a processing module, configured to perform driving mode prediction according to the data to be processed and a driving mode prediction model to obtain a driving mode prediction result, wherein the driving mode prediction model is trained using the driving mode prediction model training method according to any one of claims 1 to 7; The driving mode recommendation module is used to make a driving mode recommendation based on the driving mode prediction result.