Vehicle speed prediction model training method, vehicle speed prediction method, device and controller
By using convolution kernels of different sizes in the vehicle speed prediction model to extract features and construct dynamic convolution kernels based on reconstruction errors for feature fusion, the accuracy of the vehicle speed prediction model in a dynamic traffic environment is solved, and the accuracy and adaptability of vehicle speed prediction are improved.
Patent Information
- Application Number
- CN202510714143.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-08-29
AI Technical Summary
The existing vehicle speed prediction model is difficult to effectively adapt to the dynamic changes in the traffic environment, resulting in low accuracy of vehicle speed prediction.
By obtaining sample vehicle speeds in different working conditions, the first and second convolution kernels are used to extract vehicle speed characteristics respectively, and the third convolution kernel is constructed based on the reconstruction error, the fusion offset coefficient is obtained for feature fusion, and the vehicle speed prediction model is trained.
The vehicle speed prediction model has improved the processing capability of variability and nonlinear data, and improved the accuracy and generalization ability of vehicle speed prediction.
Smart Images

Figure CN120561593A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a vehicle speed prediction model training method, a vehicle speed prediction method, a device, and a controller. Background Art
[0002] With the development of autonomous driving technology, a technology for predicting a vehicle's own speed has emerged. Accurate speed prediction is crucial to the safety and efficiency of autonomous driving systems. Through effective speed prediction, autonomous vehicles can obtain and analyze the vehicle's current speed in real time, effectively planning driving strategies, avoiding potential collisions, and optimizing driving paths, thereby improving driving safety and traffic efficiency.
[0003] In related technologies, speed prediction methods are primarily based on historical data and statistical models. However, these methods often fail to adapt well to dynamic changes in the traffic environment. While speed prediction using artificial intelligence and machine learning models can improve the accuracy and generalization of speed prediction by learning dynamic patterns from historical speed data, the complexity of speed data distribution under different operating conditions makes it difficult for traditional deep learning models to effectively capture this variability, limiting their ability to model speed data. Consequently, existing speed prediction model training methods yield low speed prediction accuracy. Summary of the Invention
[0004] Based on this, it is necessary to provide a vehicle speed prediction model training method, vehicle speed prediction method, device, vehicle controller, storage medium and computer program product that can improve the accuracy of predicted vehicle speed in response to the above technical problems.
[0005] In a first aspect, the present application provides a vehicle speed prediction model training method, comprising:
[0006] Obtaining sample vehicle speeds corresponding to different operating conditions, inputting the sample vehicle speeds into a speed prediction model to be trained, and obtaining a first speed feature and a second speed feature of the sample vehicle speeds using a first convolution kernel and a second convolution kernel of the speed prediction model, respectively; wherein the first convolution kernel and the second convolution kernel have different sizes;
[0007] Obtaining a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and constructing a third convolution kernel using the first reconstruction error and the second reconstruction error;
[0008] Obtaining a third vehicle speed feature of the sample vehicle speed through the third convolution kernel, and obtaining a third reconstruction error of the third vehicle speed feature;
[0009] Based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, obtaining fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel, respectively, and fusing the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature using the fusion offset coefficients to obtain a fusion feature;
[0010] The fusion feature is used to obtain a predicted vehicle speed, and the vehicle speed prediction model is trained using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
[0011] In one embodiment, obtaining the first reconstruction error of the first vehicle speed feature and the second reconstruction error of the second vehicle speed feature includes: inputting the first vehicle speed feature and the second vehicle speed feature into the variational autoencoder of the vehicle speed prediction model, and obtaining the first hidden feature corresponding to the first vehicle speed feature and the second hidden feature corresponding to the second vehicle speed feature through the variational autoencoder; inputting the first hidden feature and the second hidden feature into the decoder of the vehicle speed prediction model, and obtaining the first reconstructed vehicle speed corresponding to the first hidden feature and the second reconstructed vehicle speed corresponding to the second hidden feature through the decoder; obtaining the first reconstruction error based on the difference between the first reconstructed vehicle speed and the sample vehicle speed, and obtaining the second reconstruction error based on the difference between the second reconstructed vehicle speed and the sample vehicle speed.
[0012] In one embodiment, the sample vehicle speed includes multiple sub-sample vehicle speeds, each of which corresponds to a different sampling time; obtaining the first reconstruction error based on the difference between the first reconstructed vehicle speed and the sample vehicle speed, and obtaining the second reconstruction error based on the difference between the second reconstructed vehicle speed and the sample vehicle speed, include: obtaining the sub-first reconstructed vehicle speed of each sampling time from the first reconstructed vehicle speed, and obtaining the sub-second reconstructed vehicle speed of each sampling time from the second reconstructed vehicle speed; summing the differences between each sub-sample vehicle speed and each sub-first reconstructed vehicle speed to obtain the first reconstruction error, and summing the differences between each sub-sample vehicle speed and each sub-second reconstructed vehicle speed to obtain the second reconstruction error.
[0013] In one embodiment, the constructing of the third convolution kernel using the first reconstruction error and the second reconstruction error includes: normalizing the first reconstruction error and the second reconstruction error to obtain a first reconstruction offset coefficient corresponding to the first reconstruction error and a second reconstruction offset coefficient corresponding to the second reconstruction error; and adjusting the first convolution kernel or the second convolution kernel based on the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient to obtain the third convolution kernel.
[0014] In one embodiment, the first convolution kernel is smaller than the second convolution kernel; and adjusting the first convolution kernel or the second convolution kernel based on the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient to obtain the third convolution kernel includes: when the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient, increasing the first convolution kernel by using the first reconstruction offset coefficient to obtain the third convolution kernel; when the first reconstruction offset coefficient is greater than or equal to the second reconstruction offset coefficient, reducing the second convolution kernel by using the second reconstruction offset coefficient to obtain the third convolution kernel.
[0015] In one embodiment, the obtaining of the fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel and the third convolution kernel respectively based on the first reconstruction error, the second reconstruction error and the third reconstruction error includes: normalizing the first reconstruction error, the second reconstruction error and the third reconstruction error respectively to obtain the first fusion offset coefficient corresponding to the first reconstruction error, the second fusion offset coefficient corresponding to the second reconstruction error, and the third fusion offset coefficient corresponding to the third reconstruction error respectively; using the first fusion offset coefficient as the fusion offset coefficient of the first convolution kernel, the second fusion offset coefficient as the fusion offset coefficient of the second convolution kernel, and using the third fusion offset coefficient as the fusion offset coefficient of the third convolution kernel.
[0016] In one embodiment, the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature are fused through the fusion offset coefficient to obtain the fusion feature, including: using each of the fusion offset coefficients as the fusion weight of the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature, and using the fusion weight to perform weighted processing on the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature to obtain the fusion feature.
[0017] In a second aspect, the present application also provides a vehicle speed prediction method, comprising:
[0018] Get the historical speed of the target vehicle;
[0019] The historical vehicle speed is input into a trained vehicle speed prediction model, and the predicted vehicle speed of the target vehicle is output through the vehicle speed prediction model; wherein, the vehicle speed prediction model is trained by the vehicle speed prediction model training method as described in any embodiment of the first aspect.
[0020] In a third aspect, the present application further provides a vehicle speed prediction model training device, comprising:
[0021] an initial feature extraction module, configured to obtain sample vehicle speeds corresponding to different operating conditions, input the sample vehicle speeds into a speed prediction model to be trained, and obtain a first speed feature and a second speed feature of the sample vehicle speeds using a first convolution kernel and a second convolution kernel of the speed prediction model, respectively; wherein the first convolution kernel and the second convolution kernel have different sizes;
[0022] a convolution kernel construction module, configured to obtain a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and construct a third convolution kernel using the first reconstruction error and the second reconstruction error;
[0023] a dynamic feature extraction module, configured to obtain a third vehicle speed feature of the sample vehicle speed through the third convolution kernel, and acquire a third reconstruction error of the third vehicle speed feature;
[0024] a fusion feature acquisition module, configured to obtain, based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel, respectively, and fuse the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature using the fusion offset coefficients to obtain a fusion feature;
[0025] The predicted vehicle speed acquisition module is used to obtain the predicted vehicle speed using the fusion feature, and train the vehicle speed prediction model using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
[0026] In a fourth aspect, the present application further provides a vehicle speed prediction model training device, comprising:
[0027] A historical speed acquisition module is used to obtain the historical speed of the target vehicle;
[0028] A predicted vehicle speed acquisition module is used to input the historical vehicle speed into a trained vehicle speed prediction model, and output the predicted vehicle speed of the target vehicle through the vehicle speed prediction model; wherein, the vehicle speed prediction model is trained by the vehicle speed prediction model training method as described in any embodiment of the first aspect.
[0029] In a fifth aspect, the present application also provides a vehicle controller comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the embodiments of the first aspect or the second aspect are implemented.
[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect or the second aspect.
[0031] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect or the second aspect.
[0032] The above-mentioned vehicle speed prediction model training method, vehicle speed prediction method, device, vehicle controller, storage medium and computer program product obtain sample vehicle speeds corresponding to different working conditions and input the sample vehicle speeds into the vehicle speed prediction model to be trained, and obtain a first vehicle speed feature and a second vehicle speed feature of the sample vehicle speed respectively through the first convolution kernel and the second convolution kernel of the vehicle speed prediction model; wherein the sizes of the first convolution kernel and the second convolution kernel are different; obtain a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and construct a third convolution kernel using the first reconstruction error and the second reconstruction error; obtain a third vehicle speed feature of the sample vehicle speed through the third convolution kernel, and obtain a third reconstruction error of the third vehicle speed feature; based on the first reconstruction error, the second reconstruction error and the third reconstruction error, obtain the fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel and the third convolution kernel respectively, and fuse the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature through the fusion offset coefficient to obtain a fusion feature; use the fusion feature to obtain a predicted vehicle speed, and train the vehicle speed prediction model through the predicted vehicle speed to obtain a trained vehicle speed prediction model. The present application can input the collected sample vehicle speeds of different working conditions into the vehicle speed prediction model that needs to be trained. The vehicle speed prediction model can extract the first vehicle speed feature and the second vehicle speed feature of the sample vehicle speed through convolution kernels of different sizes, and then obtain the reconstruction error of the above-mentioned first vehicle speed feature and the second vehicle speed feature, so as to adaptively adjust the convolution kernel based on the reconstruction error to construct a third convolution kernel, and use the third convolution kernel to obtain the third vehicle speed feature, and at the same time obtain the reconstruction error of the third vehicle speed feature, and finally use each reconstruction error to obtain the fusion offset coefficient of the convolution kernel of different sizes, so as to use the fusion offset coefficient to fuse each vehicle speed feature to output the predicted vehicle speed to complete the model training. In this way, the reconstruction error can be used to construct a dynamic convolution kernel, and the trained vehicle speed prediction model can improve the processing capability of complex associations of variability and nonlinear data, thereby improving the accuracy of vehicle speed prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 1 is a flow chart of a vehicle speed prediction model training method according to an embodiment;
[0035] Figure 2 Schematic diagram of a process for obtaining a first reconstruction error and a second reconstruction error in one embodiment;
[0036] Figure 3 Schematic diagram of a process for constructing a third convolution kernel in one embodiment;
[0037] Figure 4 1 is a flow chart of a vehicle speed prediction method according to an embodiment;
[0038] Figure 5 Schematic diagram of the structure of an element-level dynamic convolution module in one embodiment;
[0039] Figure 6 is a structural block diagram of a vehicle speed prediction model training device in one embodiment;
[0040] Figure 7 is a structural block diagram of a vehicle speed prediction device in one embodiment;
[0041] Figure 8 FIG. 4 is a diagram showing the internal structure of a vehicle controller in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0043] In one embodiment, Figure 1 As shown, a vehicle speed prediction model training method is provided. This embodiment uses the method applied to a vehicle controller as an example. In this embodiment, the method includes the following steps:
[0044] In step S101, sample vehicle speeds corresponding to different operating conditions are obtained, and the sample vehicle speeds are input into a vehicle speed prediction model to be trained. A first vehicle speed feature and a second vehicle speed feature of the sample vehicle speed are obtained respectively through a first convolution kernel and a second convolution kernel of the vehicle speed prediction model; wherein the first convolution kernel and the second convolution kernel have different sizes.
[0045] The sample speed may refer to historical speed data used to train the speed prediction model. This historical speed data may correspond to historical speed data under various operating conditions. The speed prediction model to be trained refers to a neural network model to be trained for predicting vehicle speed. This model may include two convolution kernels of different sizes, namely a first convolution kernel and a second convolution kernel. The first speed feature refers to the speed feature extracted by the first convolution kernel, and the second speed feature refers to the speed feature extracted by the second convolution kernel.
[0046] For example, the first convolution kernel can be a small 3×1 kernel, which is better suited for capturing local patterns and subtle features in the data and can better identify local pattern changes in the data. The second convolution kernel can be a large 23×1 kernel, which can cover a wider range of data, help capture overall patterns and long-range dependencies in the data, and is more effective in grasping global trends. The vehicle speed prediction model can input the sample speed into the first and second convolution kernels respectively, so that the first convolution kernel extracts the first vehicle speed feature, and the second convolution kernel extracts the second vehicle speed feature.
[0047] Step S102 : obtaining a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and constructing a third convolution kernel using the first reconstruction error and the second reconstruction error.
[0048] The first reconstruction error refers to the error between the vehicle speed reconstructed by the first vehicle speed feature and the sample vehicle speed. The second reconstruction error refers to the error between the vehicle speed reconstructed by the second vehicle speed feature and the sample vehicle speed. The third convolution kernel is a dynamic convolution kernel constructed based on the first reconstruction error and the second reconstruction error. The size of the convolution kernel can be determined based on the first reconstruction error and the second reconstruction error.
[0049] Specifically, after obtaining the first vehicle speed feature and the second vehicle speed feature, the first vehicle speed feature and the second vehicle speed feature can be used to reconstruct the vehicle speed, and the deviation between the reconstructed vehicle speed and the sample vehicle speed can be calculated respectively as the first reconstruction error and the second reconstruction error. The first reconstruction error and the second reconstruction error can then be further used to construct a dynamic convolution kernel as the third convolution kernel.
[0050] Step S103 : obtaining a third vehicle speed feature of the sample vehicle speed through a third convolution kernel, and acquiring a third reconstruction error of the third vehicle speed feature.
[0051] The third vehicle speed feature refers to the vehicle speed feature extracted by the third convolution kernel, and the third reconstruction error refers to the error between the vehicle speed reconstructed by the third vehicle speed feature and the sample vehicle speed. After completing the construction of the third convolution kernel, the sample vehicle speed can also be input into the third convolution kernel, and the third convolution kernel outputs the third vehicle speed feature of the sample vehicle speed. The third vehicle speed feature is further used to reconstruct the vehicle speed, and the deviation between the reconstructed vehicle speed and the sample vehicle speed is calculated as the third reconstruction error.
[0052] In step S104, based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, the fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel are obtained, and the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature are fused through the fusion offset coefficients to obtain a fusion feature.
[0053] The fusion offset coefficient refers to the weight coefficient used for feature fusion. This fusion offset coefficient can be generated based on the reconstruction error corresponding to each convolution kernel. The fusion feature refers to the feature used to finally output the predicted vehicle speed. This feature can be obtained by fusing the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature. Specifically, after the vehicle speed prediction model completes the acquisition of the third reconstruction error, it can also combine the first reconstruction error, the second reconstruction error, and the third reconstruction error to determine the fusion offset coefficient corresponding to each convolution kernel. The fusion offset coefficient is then used to fuse the vehicle speed features output by each convolution kernel, namely the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature, to obtain a fused feature.
[0054] In step S105 , the fusion features are used to obtain a predicted vehicle speed, and a vehicle speed prediction model is trained using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
[0055] The predicted vehicle speed is the vehicle speed predicted by the vehicle speed prediction model. For example, the fusion feature can be input into the fully connected layer to output the predicted vehicle speed. The difference between the predicted vehicle speed and the actual vehicle speed can then be used to train the vehicle speed prediction model to obtain a trained vehicle speed prediction model.
[0056] In the above-mentioned vehicle speed prediction model training method, by obtaining sample vehicle speeds corresponding to different working conditions and inputting the sample vehicle speeds into the vehicle speed prediction model to be trained, the first vehicle speed feature and the second vehicle speed feature of the sample vehicle speed are respectively obtained through the first convolution kernel and the second convolution kernel of the vehicle speed prediction model; wherein, the sizes of the first convolution kernel and the second convolution kernel are different; the first reconstruction error of the first vehicle speed feature and the second reconstruction error of the second vehicle speed feature are obtained, and the first reconstruction error and the second reconstruction error are used to construct the third convolution kernel; the third vehicle speed feature of the sample vehicle speed is obtained through the third convolution kernel, and the third reconstruction error of the third vehicle speed feature is obtained; based on the first reconstruction error, the second reconstruction error and the third reconstruction error, the corresponding fusion offset coefficients of the first convolution kernel, the second convolution kernel and the third convolution kernel are obtained, and the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature are fused through the fusion offset coefficient to obtain a fusion feature; the predicted vehicle speed is obtained using the fusion feature, and the vehicle speed prediction model is trained through the predicted vehicle speed to obtain a trained vehicle speed prediction model. The present application can input the collected sample vehicle speeds of different working conditions into the vehicle speed prediction model that needs to be trained. The vehicle speed prediction model can extract the first vehicle speed feature and the second vehicle speed feature of the sample vehicle speed through convolution kernels of different sizes, and then obtain the reconstruction error of the above-mentioned first vehicle speed feature and the second vehicle speed feature, so as to adaptively adjust the convolution kernel based on the reconstruction error to construct a third convolution kernel, and use the third convolution kernel to obtain the third vehicle speed feature, and at the same time obtain the reconstruction error of the third vehicle speed feature, and finally use each reconstruction error to obtain the fusion offset coefficient of the convolution kernel of different sizes, so as to use the fusion offset coefficient to fuse each vehicle speed feature to output the predicted vehicle speed to complete the model training. In this way, the reconstruction error can be used to construct a dynamic convolution kernel, and the trained vehicle speed prediction model can improve the processing capability of complex associations of variability and nonlinear data, thereby improving the accuracy of vehicle speed prediction.
[0057] In one embodiment, Figure 2 As shown, step S102 may further include:
[0058] In step S201 , the first vehicle speed feature and the second vehicle speed feature are input into a variational autoencoder of a vehicle speed prediction model, and a first latent feature corresponding to the first vehicle speed feature and a second latent feature corresponding to the second vehicle speed feature are obtained through the variational autoencoder.
[0059] In this embodiment, the vehicle speed reconstruction process can be achieved through a variational autoencoder. The variational autoencoder is based on an autoencoder and integrates variational inference and Bayesian theory. It aims to learn a model that can generate samples similar to the training data. The variational autoencoder assumes that the latent variable follows a certain prior distribution (such as a standard normal distribution), and maps the input data to the posterior distribution of the latent variable through the encoder, and then restores the latent variable to the generated sample through the decoder. The first hidden feature refers to the posterior distribution of the latent variable obtained from the first vehicle speed feature, that is, the hidden vector obtained from the first vehicle speed feature, and the second hidden feature refers to the posterior distribution of the latent variable obtained from the second vehicle speed feature, that is, the hidden vector obtained from the second vehicle speed feature.
[0060] Specifically, a variational autoencoder may be provided in the vehicle speed prediction model, and the first vehicle speed feature and the second vehicle speed feature may be respectively input into the variational autoencoder in the vehicle speed prediction model, and the variational autoencoder may output the first hidden feature and the second hidden feature.
[0061] In step S202 , the first hidden feature and the second hidden feature are input into a decoder of a vehicle speed prediction model, and a first reconstructed vehicle speed corresponding to the first hidden feature and a second reconstructed vehicle speed corresponding to the second hidden feature are obtained through the decoder.
[0062] The first reconstructed vehicle speed refers to the vehicle speed data obtained after reconstructing the vehicle speed using the first hidden feature. Similarly, the second reconstructed vehicle speed refers to the vehicle speed data obtained after reconstructing the vehicle speed using the second hidden feature. After obtaining the hidden feature, the vehicle speed can also be reconstructed using a decoder, that is, the first hidden feature and the second hidden feature are respectively input into the decoder in the vehicle speed prediction model, and the first hidden feature and the second hidden feature are restored through the decoder, that is, the latent variable is restored to the generated sample, thereby obtaining the first reconstructed vehicle speed and the second reconstructed vehicle speed.
[0063] Step S203 : obtaining a first reconstruction error according to the difference between the first reconstructed vehicle speed and the sample vehicle speed, and obtaining a second reconstruction error according to the difference between the second reconstructed vehicle speed and the sample vehicle speed.
[0064] Finally, the difference between the first reconstructed vehicle speed and the sample vehicle speed can be used to obtain a first reconstruction error corresponding to the first vehicle speed feature, and the difference between the second reconstructed vehicle speed and the sample vehicle speed can be used to obtain a second reconstruction error corresponding to the second vehicle speed feature.
[0065] Similarly, the third reconstruction error corresponding to the third vehicle speed feature can also be obtained through the above process, by inputting the third vehicle speed feature into the variational autoencoder, and the variational autoencoder outputting the third hidden feature. The third hidden feature is then input into the decoder of the vehicle speed prediction model to obtain the third reconstructed vehicle speed, and the difference between the third reconstructed vehicle speed and the sample vehicle speed can be calculated to obtain the third reconstruction error.
[0066] In this embodiment, the variational autoencoder and decoder of the vehicle speed prediction model can also be used to reconstruct the vehicle speed based on the vehicle speed characteristics, so as to use the difference between the reconstructed vehicle speed and the sample vehicle speed to obtain the reconstruction error of the corresponding vehicle speed characteristics. In this way, the accuracy of the reconstruction error can be improved.
[0067] Furthermore, the sample vehicle speed includes multiple sub-sample vehicle speeds, each sub-sample vehicle speed corresponds to a different sampling time; step S203 may further include: obtaining a sub-first reconstructed vehicle speed for each sampling time from the first reconstructed vehicle speed, and obtaining a sub-second reconstructed vehicle speed for each sampling time from the second reconstructed vehicle speed; summing the differences between each sub-sample vehicle speed and each sub-first reconstructed vehicle speed to obtain a first reconstruction error, and summing the differences between each sub-sample vehicle speed and each sub-second reconstructed vehicle speed to obtain a second reconstruction error.
[0068] In this embodiment, the sample vehicle speed may include sub-sample vehicle speeds corresponding to multiple sampling times. For example, the sample vehicle speed may include sub-sample vehicle speed 1 corresponding to time 1, sub-sample vehicle speed 2 corresponding to time 2, ..., sub-sample vehicle speed K corresponding to time K. Therefore, the first reconstructed vehicle speed and the second reconstructed vehicle speed obtained after reconstructing the vehicle speed features extracted from the above sample vehicle speeds may also be composed of multiple sub-reconstructed vehicle speeds. For example, the first reconstructed vehicle speed may include sub-first reconstructed vehicle speed 1 corresponding to time 1, sub-first reconstructed vehicle speed 2 corresponding to time 2, ..., sub-first reconstructed vehicle speed K corresponding to time K. Similarly, the second reconstructed vehicle speed may include sub-second reconstructed vehicle speed 1 corresponding to time 1, sub-second reconstructed vehicle speed 2 corresponding to time 2, ..., sub-second reconstructed vehicle speed K corresponding to time K.
[0069] Therefore, the reconstruction error provided in this embodiment can also be obtained by summing the speed errors corresponding to each sampling time. That is, the differences between the sub-first reconstructed speed 1 and the sub-sample speed 1, the differences between the sub-first reconstructed speed 2 and the sub-sample speed 2, ..., and the differences between the sub-first reconstructed speed K and the sub-sample speed K can be calculated and summed to obtain the first reconstruction error. Similarly, the second reconstruction error can also be obtained by calculating the differences between the sub-second reconstructed speed 1 and the sub-sample speed 1, the differences between the sub-second reconstructed speed 2 and the sub-sample speed 2, ..., and the differences between the sub-second reconstructed speed K and the sub-sample speed K and summing them.
[0070] For example, the first reconstruction error It can be represented by the following formula:
[0071]
[0072] in, represents the first reconstructed vehicle speed, which is composed of K sub-first reconstructed vehicle speeds, and Represents the sample vehicle speed, which is composed of K sub-sample vehicle speeds.
[0073] Similarly, the second reconstruction error It can be represented by the following formula:
[0074]
[0075] in, represents the second reconstructed vehicle speed, which is composed of K sub-second reconstructed vehicle speeds, and Represents the sample vehicle speed, which is composed of K sub-sample vehicle speeds.
[0076] In addition, the third reconstruction error corresponding to the third vehicle speed feature can also be obtained through the above process, that is, the difference between the sub-third reconstructed vehicle speed 1 and the sub-sample vehicle speed 1, the difference between the sub-third reconstructed vehicle speed 2 and the sub-sample vehicle speed 2,..., the difference between the sub-third reconstructed vehicle speed K and the sub-sample vehicle speed K are calculated respectively, and the sum is obtained.
[0077] For example, the third reconstruction error It can be represented by the following formula:
[0078]
[0079] in, represents the third reconstructed vehicle speed, which is composed of K sub-third reconstructed vehicle speeds, and Represents the sample vehicle speed, which is composed of K sub-sample vehicle speeds.
[0080] In this embodiment, the sample vehicle speed may be composed of a plurality of sub-sample vehicle speeds corresponding to different sampling times, and the reconstruction error may be calculated by summing the errors between the sub-sample vehicle speeds at each sampling time and the sub-reconstructed vehicle speeds. Therefore, this method may improve the accuracy of the reconstruction error calculation.
[0081] In one embodiment, Figure 3 As shown, step S102 may further include:
[0082] Step S301 : normalize the first reconstruction error and the second reconstruction error to obtain a first reconstruction offset coefficient corresponding to the first reconstruction error and a second reconstruction offset coefficient corresponding to the second reconstruction error.
[0083] The first reconstruction offset coefficient refers to the offset coefficient obtained by normalizing the first reconstruction error, and the offset coefficient can characterize the performance effect of the first convolution kernel, while the second reconstruction offset coefficient refers to the offset coefficient obtained by normalizing the second reconstruction error, and the offset coefficient can characterize the performance effect of the second convolution kernel. The normalization method can be to sum the first reconstruction error and the second reconstruction error to obtain the overall reconstruction error, and then calculate the ratio of the first reconstruction error to the overall reconstruction error, and the ratio of the second reconstruction error to the overall reconstruction error respectively.
[0084] For example, the first reconstruction offset coefficient It can be calculated by the following formula:
[0085]
[0086] in, represents the first reconstruction error, and represents the second reconstruction error.
[0087] Similarly, the second reconstruction offset coefficient It is calculated by the following formula:
[0088]
[0089] in, represents the first reconstruction error, and represents the second reconstruction error.
[0090] Step S302: Based on the magnitude relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient, adjust the first convolution kernel or the second convolution kernel to obtain a third convolution kernel.
[0091] Afterwards, the first convolution kernel or the second convolution kernel can be adjusted accordingly according to the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient to obtain the third convolution kernel. Since the size relationship can characterize the performance effect of the first convolution kernel or the second convolution kernel, one of the first convolution kernel or the second convolution kernel can be adjusted according to the above size relationship to obtain the third convolution kernel.
[0092] In this embodiment, the first reconstruction error and the second reconstruction error can also be normalized first to obtain the first reconstruction offset coefficient and the second reconstruction offset coefficient used to characterize the performance effects of the first convolution kernel and the second convolution kernel, so as to realize the adjustment of the convolution kernel by utilizing the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient. In this way, the accuracy of the third convolution kernel construction can be improved.
[0093] Furthermore, the first convolution kernel is smaller than the second convolution kernel; step S302 may further include: when the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient, increasing the first convolution kernel by using the first reconstruction offset coefficient to obtain a third convolution kernel; when the first reconstruction offset coefficient is greater than or equal to the second reconstruction offset coefficient, reducing the second convolution kernel by using the second reconstruction offset coefficient to obtain a third convolution kernel.
[0094] In this embodiment, the first convolution kernel may refer to a relatively small convolution kernel, for example, a convolution kernel with a convolution kernel size of 3×1, and the second convolution kernel may refer to a relatively large convolution kernel, for example, a convolution kernel with a convolution kernel size of 23×1. Since the first reconstruction offset coefficient is calculated based on the first reconstruction error and is directly proportional to the first reconstruction error, the smaller the first reconstruction offset coefficient is, the smaller the first reconstruction error is, that is, the better the effect of the first convolution kernel is. Similarly, the second reconstruction offset coefficient is calculated based on the second reconstruction error and is directly proportional to the second reconstruction error. Therefore, the smaller the second reconstruction offset coefficient is, the smaller the second reconstruction error is, that is, the better the effect of the second convolution kernel is.
[0095] Therefore, if the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient, it means that the smaller first convolution kernel is more effective than the larger second convolution kernel. Therefore, the third convolution kernel can be obtained by increasing the size of the first convolution kernel. Similarly, if the first reconstruction offset coefficient is larger than the second reconstruction offset coefficient, it means that the larger second convolution kernel is more effective than the smaller first convolution kernel. Therefore, the third convolution kernel can be obtained by reducing the size of the second convolution kernel. If the first reconstruction offset coefficient is equal to the second reconstruction offset coefficient, it means that the first convolution kernel and the second convolution kernel are equally effective. Therefore, the third convolution kernel can be obtained by either increasing the first convolution kernel or reducing the second convolution kernel.
[0096] Furthermore, increasing the first convolution kernel can be achieved based on the first reconstruction offset coefficient, while reducing the second convolution kernel can be achieved based on the second reconstruction offset coefficient. Taking the first convolution kernel as a 3×1 convolution kernel and the second convolution kernel as a 23×1 convolution kernel as an example, the adjustment of the third convolution kernel can be achieved as follows:
[0097]
[0098] in, represents the convolution kernel size of the third convolution kernel, represents the first reconstruction offset coefficient, and Represents the second reconstruction offset coefficient. It can be seen that in the first reconstruction offset coefficient Less than the second reconstruction offset coefficient When the first convolution kernel size can be increased based on the first reconstruction offset coefficient, the third convolution kernel can be obtained. Greater than or equal to the second reconstruction offset coefficient When , the size of the second convolution kernel can be reduced based on the second reconstruction offset coefficient to obtain the third convolution kernel.
[0099] In this embodiment, when the first convolution kernel is smaller than the second convolution kernel, if the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient, the first convolution kernel can be increased according to the first reconstruction offset coefficient to obtain a third convolution kernel. If the first reconstruction offset coefficient is greater than or equal to the second reconstruction offset coefficient, the second convolution kernel is reduced according to the second reconstruction offset coefficient to obtain the third convolution kernel. In this way, the efficiency of convolution kernel adjustment can be improved.
[0100] In one embodiment, step S104 may further include: normalizing the first reconstruction error, the second reconstruction error, and the third reconstruction error, respectively, to obtain a first fusion offset coefficient corresponding to the first reconstruction error, a second fusion offset coefficient corresponding to the second reconstruction error, and a third fusion offset coefficient corresponding to the third reconstruction error; using the first fusion offset coefficient as the fusion offset coefficient of the first convolution kernel, the second fusion offset coefficient as the fusion offset coefficient of the second convolution kernel, and the third fusion offset coefficient as the fusion offset coefficient of the third convolution kernel.
[0101] The first fusion offset coefficient refers to the fusion offset coefficient of the first convolution kernel, the second fusion offset coefficient refers to the fusion offset coefficient of the second convolution kernel, and the third fusion offset coefficient is the fusion offset coefficient of the third convolution kernel. The fusion offset coefficient of each convolution kernel can be obtained by normalizing the reconstruction error of each convolution kernel. Similar to the calculation method of the reconstruction offset coefficient, the fusion offset coefficient can be achieved by first summing the reconstruction errors and then calculating the ratio of each reconstruction error to the total reconstruction error.
[0102] For example, the fusion offset coefficients of each convolution kernel can be calculated by the following formula:
[0103]
[0104]
[0105]
[0106] in, represents the first reconstruction error, represents the second reconstruction error, represents the third reconstruction error, and represents the first fusion offset coefficient, represents the second fusion offset coefficient, It represents the third fusion offset coefficient.
[0107] In this embodiment, the first reconstruction error, the second reconstruction error and the third reconstruction error can be normalized respectively to obtain the fusion offset coefficient of each convolution kernel. By obtaining the fusion offset coefficient through normalization, the contribution of different convolution kernels can be more effectively weighed.
[0108] Furthermore, step S104 may further include: using each fusion offset coefficient as the fusion weight of the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature, and using the fusion weight to weight the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature to obtain a fusion feature.
[0109] Feature fusion can be achieved by weighting each vehicle speed feature through fusion weights. The fusion weights can be represented by the fusion offset coefficients of each convolution kernel, that is, the first fusion offset coefficient is used as the fusion weight of the first vehicle speed feature, the second fusion offset coefficient is used as the fusion weight of the second vehicle speed feature, and the third fusion offset coefficient is used as the fusion weight of the third vehicle speed feature. The first, second and third vehicle speed features are weighted by the above fusion weights to obtain the final fusion feature.
[0110] In this embodiment, the fusion feature can be obtained based on the fusion offset coefficient of each convolution kernel. Since the fusion offset coefficient can effectively weigh the contribution of different convolution kernels, the fusion feature obtained in this way and the use of the fusion feature to predict the vehicle speed can improve the processing ability of complex associations of variable and nonlinear data, and improve the accuracy and generalization of vehicle speed prediction.
[0111] In one embodiment, Figure 4 As shown, a vehicle speed prediction method is provided. This embodiment uses the method applied to a vehicle controller as an example. In this embodiment, the method includes the following steps:
[0112] Step S401: Obtain the historical speed of the target vehicle.
[0113] Among them, the target vehicle refers to the vehicle that needs to be speed predicted, and the historical speed refers to the historical operating speed of the target vehicle, which can refer to the historical operating data of each operating time period before the current moment during the operation of the target vehicle. In this embodiment, the vehicle controller can collect the historical speed of the target vehicle when predicting the speed of the target vehicle.
[0114] In step S402, the historical vehicle speed is input into the trained vehicle speed prediction model, and the vehicle speed prediction model outputs the predicted vehicle speed of the target vehicle; wherein the vehicle speed prediction model is trained by the vehicle speed prediction model training method of any of the above embodiments.
[0115] The trained vehicle speed prediction model refers to the vehicle speed prediction model trained by the above-mentioned training method. After obtaining the historical speed of the target vehicle, the controller can input the historical speed into the trained vehicle speed prediction model, and the model outputs the predicted speed of the target vehicle.
[0116] The method for obtaining the predicted vehicle speed by the vehicle speed prediction model may be to first input the historical vehicle speed into the first convolution kernel and the second convolution kernel of different sizes corresponding to the vehicle speed prediction model, obtain the first historical vehicle speed feature and the second historical vehicle speed feature corresponding to the historical vehicle speed through the first convolution kernel and the second convolution kernel respectively, and then calculate the reconstruction error corresponding to the first historical vehicle speed feature and the second historical vehicle speed feature respectively. For example, the reconstructed vehicle speed of the above historical vehicle speed feature may be obtained through the variational autoencoder and decoder in the vehicle speed prediction model, and then calculate the error between the reconstructed vehicle speed and the historical vehicle speed as the reconstruction error. Afterwards, the reconstruction error of the first convolution kernel and the second convolution kernel is further used to construct a third convolution kernel. For example, the reconstruction error of the above convolution kernel may be normalized to obtain a reconstruction offset coefficient, and then the first convolution kernel and the second convolution kernel are adjusted according to the reconstruction offset coefficient to realize the construction of the third convolution kernel. After completing the construction of the third convolution kernel, the historical vehicle speed can be input into the third convolution kernel to extract the third historical vehicle speed feature and calculate the reconstruction error corresponding to the third convolution kernel, so as to obtain the fusion offset coefficient of each convolution kernel based on the reconstruction error of each convolution kernel, so as to realize the fusion of the historical vehicle speed features extracted by each convolution kernel, and perform vehicle speed prediction after obtaining the fusion feature.
[0117] In the above-mentioned vehicle speed prediction method, the historical speed of the target vehicle is obtained; the historical speed is input into a trained vehicle speed prediction model, and the vehicle speed prediction model outputs the predicted speed of the target vehicle; wherein the vehicle speed prediction model is trained using the vehicle speed prediction model training method described in any of the above embodiments. Because the reconstruction error can be used to construct a dynamic convolution kernel during the training process of the vehicle speed prediction model in this application, the trained vehicle speed prediction model can improve the processing ability of complex associations of variable and nonlinear data, and thus the vehicle speed predicted by this model can improve the accuracy of vehicle speed prediction.
[0118] In one embodiment, a multi-operating-condition vehicle speed prediction method based on element-wise dynamic convolution is also provided. This method uses a variational autoencoder to perform offset estimation on different convolution kernels. Based on the offset error, an element-wise dynamic convolution module is designed. The shape of the convolution kernel is adaptively adjusted according to the input multi-operating-condition signal to improve the ability to handle complex associations of highly variable and nonlinear data, thereby enhancing the accuracy and generalization of vehicle speed prediction. This method can be implemented through the following process:
[0119] First, collect historical vehicle speed data X under multiple working conditions i , where i = 1, 2, 3, …, n, representing historical vehicle speed data under n operating conditions. A small convolution kernel of size 3×1 is then designed. Small convolution kernels are more suitable for capturing local patterns and subtle features in the data and can better identify local pattern changes in the data. The 3×1 small convolution kernel is first used to extract features from the input historical vehicle speed data Xi. The extraction process is as follows:
[0120]
[0121] Where K1 represents the size of the small convolution kernel, 1dConv represents 1-dimensional convolution, and H1 represents the features of the small convolution kernel output.
[0122] Next, we designed a large convolution kernel (23×1). This large kernel can cover a wider range of data, helping to capture overall patterns and long-range dependencies in the data, and more effectively grasping global trends. We extract features using the 23×1 convolution kernel. The extraction process is as follows:
[0123]
[0124] Where K2 represents the size of the large convolution kernel, 1dConv represents 1-dimensional convolution, and H2 represents the features output by the large convolution kernel.
[0125] The two features H1 and H2 extracted by convolution kernels of different sizes are then input into the variational autoencoder for offset estimation. Each variational autoencoder contains a multi-layer perceptron (MLP) that can generate a latent space, compress the real sample into some feature points, and then sample these low-dimensional feature points to generate reconstructed samples that are similar to the real sample. The encoder network receives the input of the real sample and generates a hidden vector z according to its distribution pdata, that is, the original data distribution of the real sample. Therefore, it can be expressed as the posterior distribution of the hidden vector z ,in is the parameter of the encoder. The decoder maps the distribution of the hidden vector z to the approximate probability distribution of the real sample and generates the reconstructed sample , so the decoder can be expressed as , usually choose the prior distribution is the standard normal distribution N(0, 1), where is the parameter of the decoder. Since it is impossible to determine the true posterior distribution of the hidden vector z , so the inference process of the encoder is used The variational autoencoder uses the KL scatter of two distributions as the objective function of model learning, and updates the parameters and Minimize it.
[0126]
[0127] Since the Kullback-Leibler divergence, that is, the KL divergence, is non-negative and the given latent vector z follows a Gaussian distribution, minimizing the Kullback-Leibler divergence is equivalent to maximizing , the loss function of the variational autoencoder is:
[0128]
[0129] The hidden vector z can be expressed as , is a random number that follows a standard normal distribution. and is the output of the encoder.
[0130] The decoder also uses a multi-layer perceptron (MLP) as the decoder architecture. By introducing randomly sampled data into the MLP, a reconstruction approximation of the original data is generated. In order to estimate the offset of the two convolution kernel features, a reconstruction error function is constructed:
[0131]
[0132] Among them, t=1, 2 represent two convolution kernels respectively. and Represent the vehicle speed data reconstructed under 3×1 convolution kernel and 23×1 convolution kernel respectively, Represents the input vehicle speed data. and Represent the reconstruction errors generated by extracting features with small convolution kernels and large convolution kernels, respectively.
[0133] Then the element-level dynamic convolution module is designed, with the following structure: Figure 5 As shown. The reconstruction errors are added to get the overall reconstruction error under the two convolution kernels, where , , k represents the length of the input vehicle speed data, and then the overall error is normalized to obtain the offset coefficient. The calculation process is as follows:
[0134]
[0135]
[0136] Then, a smaller 3×1 convolution kernel and a larger 23×1 convolution kernel are selected to determine the upper and lower limits of the convolution kernel size to prevent the risk of overfitting caused by selecting larger and smaller convolution kernels. The size of the convolution kernel is adaptively adjusted by the offset coefficient. and The size of the convolution kernel is selected based on the smaller offset coefficient, and the size of the convolution kernel is adaptively increased or decreased based on the offset coefficient. It means that the small convolution kernel performs better than the large convolution kernel, and then the deviation coefficient Increase the size of the small convolution kernel; if It means that the large convolution kernel performs better than the small convolution kernel, and then the deviation coefficient It is reduced based on the large convolution kernel. The specific calculation process is as follows:
[0137]
[0138] in is the convolution kernel size obtained after adaptive adjustment, because , It is a number between (0, 1), and the convolution kernel size is generally set to an odd number, so the above operation is performed to achieve adaptive adjustment of the convolution kernel. Then, based on the adaptively adjusted convolution kernel, the feature extraction of the initial historical vehicle speed signal is performed. The feature extraction process is as follows:
[0139]
[0140] in Represents the adaptively adjusted convolution kernel size, and 1dConv represents 1-dimensional convolution.
[0141] Then, a feature fusion module based on the offset coefficient is designed to convert the adaptively adjusted convolution kernel into the generated features. Input it into the variational autoencoder again for signal reconstruction to obtain the reconstruction error :
[0142]
[0143] Then the reconstruction errors are added to obtain the overall reconstruction error under the adaptively adjusted convolution kernel, where The overall error of the three convolution kernels is normalized to obtain the fusion offset coefficient. The fusion coefficient generated based on the deviation can be dynamically adjusted according to the characteristics of the specific data, making the feature fusion process more adaptive. The calculation process is as follows:
[0144]
[0145]
[0146]
[0147] in The corresponding fusion offset coefficient of the feature extracted by the 3×1 convolution kernel is The corresponding fusion offset coefficient of the feature extracted by the 23×1 convolution kernel is In order to adaptively adjust the corresponding fusion offset coefficient of the features extracted by the convolution kernel, the fusion offset coefficient obtained by normalization can effectively weigh the contribution of different convolution kernels. Then, based on the fusion offset coefficient, the features under the three convolution kernels are 、 and Adaptive fusion is performed. This method makes the model more flexible and adaptable during feature extraction and reconstruction, thereby improving the generalization ability of the deep learning model and its adaptability to complex data. The fusion process is as follows:
[0148]
[0149] Finally, the fused features The input is sent to the fully connected layer, and the predicted vehicle speed for the next time period is output. Through this efficient adaptive convolution kernel feature extraction and fusion module, efficient modeling and prediction of vehicle speed data features under multiple working conditions are achieved.
[0150] This embodiment addresses the complexity of vehicle speed data distribution under different operating conditions. Traditional deep models have difficulty effectively capturing this variability, which limits their ability to model vehicle speed data. A multi-operating-condition vehicle speed prediction method based on element-by-element dynamic convolution is proposed. The main method includes: first, collecting historical vehicle speed data under multiple operating conditions. Then, two one-dimensional convolution kernels are designed: a small convolution kernel of size 3×1. Small convolution kernels are more suitable for capturing local patterns and subtle features in the data, and can better identify local pattern changes in the data; and a large convolution kernel of size 23×1. Large convolution kernels can cover a wider range of data, help capture overall patterns and long-range dependencies in the data, and are more effective in grasping global trends. Feature extraction is then performed using these two convolution kernels. The two extracted features are then input into a variational autoencoder for offset estimation. The historical vehicle speed signal is first reconstructed to obtain the reconstruction error corresponding to the two convolution kernel features. Then, an element-level dynamic convolution module was designed to calculate the overall reconstruction error corresponding to each convolution kernel, normalize the overall error to obtain the offset coefficient, and then adaptively adjust the size of the convolution kernel based on the offset coefficient. Feature extraction was achieved based on the adaptive convolution kernel, and the deviation coefficient was fused to extract the features under the three convolution kernels, thereby achieving more effective capture and modeling of vehicle speed data features.
[0151] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0152] Based on the same inventive concept, the embodiments of the present application further provide a vehicle speed prediction model training device for implementing the vehicle speed prediction model training method involved above, and a vehicle speed prediction device for implementing the vehicle speed prediction method involved above. The implementation solution provided by the device is similar to the implementation solution described in the above method, so the specific limitations of the one or more vehicle speed prediction model training devices and vehicle speed prediction device embodiments provided below can be found in the above-mentioned limitations of the vehicle speed prediction model training method and vehicle speed prediction method, and will not be repeated here.
[0153] In one embodiment, Figure 6As shown, a vehicle speed prediction model training device is provided, comprising: an initial feature extraction module 601, a convolution kernel construction module 602, a dynamic feature extraction module 603, a fusion feature acquisition module 604 and a predicted vehicle speed acquisition module 605, wherein:
[0154] Initial feature extraction module 601 is used to obtain sample vehicle speeds corresponding to different operating conditions, input the sample vehicle speeds into the speed prediction model to be trained, and obtain first and second vehicle speed features of the sample vehicle speeds using a first convolution kernel and a second convolution kernel of the speed prediction model, respectively; wherein the first and second convolution kernels have different sizes;
[0155] A convolution kernel construction module 602 is configured to obtain a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and construct a third convolution kernel using the first reconstruction error and the second reconstruction error;
[0156] A dynamic feature extraction module 603 is configured to obtain a third vehicle speed feature of the sample vehicle speed through a third convolution kernel, and acquire a third reconstruction error of the third vehicle speed feature;
[0157] A fusion feature acquisition module 604 is configured to obtain fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, and to fuse the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature using the fusion offset coefficients to obtain a fusion feature.
[0158] The predicted vehicle speed acquisition module 605 is used to obtain the predicted vehicle speed using the fusion features, and train the vehicle speed prediction model using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
[0159] In one embodiment, the convolution kernel construction module 602 is further used to input the first vehicle speed feature and the second vehicle speed feature into the variational autoencoder of the vehicle speed prediction model, and obtain the first hidden feature corresponding to the first vehicle speed feature and the second hidden feature corresponding to the second vehicle speed feature through the variational autoencoder; input the first hidden feature and the second hidden feature into the decoder of the vehicle speed prediction model, and obtain the first reconstructed vehicle speed corresponding to the first hidden feature and the second reconstructed vehicle speed corresponding to the second hidden feature through the decoder; obtain a first reconstruction error based on the difference between the first reconstructed vehicle speed and the sample vehicle speed, and obtain a second reconstruction error based on the difference between the second reconstructed vehicle speed and the sample vehicle speed.
[0160] In one embodiment, the sample vehicle speed includes multiple sub-sample vehicle speeds, each sub-sample vehicle speed corresponds to a different sampling time; the convolution kernel construction module 602 is further used to obtain a sub-first reconstructed vehicle speed for each sampling time from the first reconstructed vehicle speed, and to obtain a sub-second reconstructed vehicle speed for each sampling time from the second reconstructed vehicle speed; summing the differences between each sub-sample vehicle speed and each sub-first reconstructed vehicle speed to obtain a first reconstruction error, and summing the differences between each sub-sample vehicle speed and each sub-second reconstructed vehicle speed to obtain a second reconstruction error.
[0161] In one embodiment, the convolution kernel construction module 602 is further used to normalize the first reconstruction error and the second reconstruction error to obtain a first reconstruction offset coefficient corresponding to the first reconstruction error and a second reconstruction offset coefficient corresponding to the second reconstruction error; based on the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient, the first convolution kernel or the second convolution kernel is adjusted to obtain a third convolution kernel.
[0162] In one embodiment, the first convolution kernel is smaller than the second convolution kernel; the convolution kernel construction module 602 is further used to increase the first convolution kernel by using the first reconstruction offset coefficient to obtain a third convolution kernel when the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient; and to reduce the second convolution kernel by using the second reconstruction offset coefficient to obtain a third convolution kernel when the first reconstruction offset coefficient is greater than or equal to the second reconstruction offset coefficient.
[0163] In one embodiment, the fusion feature acquisition module 604 is further used to normalize the first reconstruction error, the second reconstruction error and the third reconstruction error, respectively, to obtain a first fusion offset coefficient corresponding to the first reconstruction error, a second fusion offset coefficient corresponding to the second reconstruction error, and a third fusion offset coefficient corresponding to the third reconstruction error; the first fusion offset coefficient is used as the fusion offset coefficient of the first convolution kernel, the second fusion offset coefficient is used as the fusion offset coefficient of the second convolution kernel, and the third fusion offset coefficient is used as the fusion offset coefficient of the third convolution kernel.
[0164] In one embodiment, the fusion feature acquisition module 604 is further used to use each fusion offset coefficient as the fusion weight of the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature, and use the fusion weight to weight the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature to obtain the fusion feature.
[0165] In one embodiment, Figure 7 As shown, a vehicle speed prediction device is provided, including: a historical vehicle speed acquisition module 701 and a predicted vehicle speed acquisition module 702, wherein:
[0166] The historical speed acquisition module 701 is used to acquire the historical speed of the target vehicle;
[0167] The predicted speed acquisition module 702 is used to input the historical speed into the trained speed prediction model and output the predicted speed of the target vehicle through the speed prediction model; wherein the speed prediction model is trained by the speed prediction model training method of any of the above embodiments.
[0168] The vehicle speed prediction model training device and the various modules within the vehicle speed prediction device may be implemented in whole or in part via software, hardware, or a combination thereof. Each of these modules may be embedded in or independent of a processor within a vehicle controller as hardware, or may be stored in a memory within the vehicle controller as software, allowing the processor to call and execute the corresponding operations of each module.
[0169] In one embodiment, a vehicle controller is provided. The vehicle controller may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The vehicle controller includes a processor, a memory, an input / output interface and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the bus via the input / output interface. The processor of the vehicle controller is used to provide computing and control capabilities. The memory of the vehicle controller includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores a computer program. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. The input / output interface of the vehicle controller is used to exchange information between the processor and an external device. The communication interface of the vehicle controller is used to communicate with an external terminal in a wired or wireless manner. When the computer program is executed by the processor, a vehicle speed prediction model training method and a vehicle speed prediction method are implemented.
[0170] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the vehicle controller to which the solution of the present application is applied. The specific vehicle controller may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0171] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0172] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), data processing logic devices based on quantum computing, and the like.
[0173] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0174] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A vehicle speed prediction model training method, characterized in that: The method comprises: Obtaining sample vehicle speeds corresponding to different operating conditions, inputting the sample vehicle speeds into a speed prediction model to be trained, and obtaining a first speed feature and a second speed feature of the sample vehicle speeds using a first convolution kernel and a second convolution kernel of the speed prediction model, respectively; wherein the first convolution kernel and the second convolution kernel have different sizes; Obtaining a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and constructing a third convolution kernel using the first reconstruction error and the second reconstruction error; Obtaining a third vehicle speed feature of the sample vehicle speed through the third convolution kernel, and obtaining a third reconstruction error of the third vehicle speed feature; Based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, obtaining fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel, respectively, and fusing the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature using the fusion offset coefficients to obtain a fusion feature; The fusion feature is used to obtain a predicted vehicle speed, and the vehicle speed prediction model is trained using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
2. The method according to claim 1, characterized in that The obtaining of a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature includes: Inputting the first vehicle speed feature and the second vehicle speed feature into a variational autoencoder of the vehicle speed prediction model, and obtaining a first hidden feature corresponding to the first vehicle speed feature and a second hidden feature corresponding to the second vehicle speed feature through the variational autoencoder; Inputting the first hidden feature and the second hidden feature into a decoder of the vehicle speed prediction model, and obtaining a first reconstructed vehicle speed corresponding to the first hidden feature and a second reconstructed vehicle speed corresponding to the second hidden feature through the decoder; The first reconstruction error is obtained according to the difference between the first reconstructed vehicle speed and the sample vehicle speed, and the second reconstruction error is obtained according to the difference between the second reconstructed vehicle speed and the sample vehicle speed.
3. The method according to claim 2, characterized in that The sample vehicle speed includes a plurality of sub-sample vehicle speeds, each of the sub-sample vehicle speeds corresponding to a different sampling time; obtaining the first reconstruction error based on a difference between the first reconstructed vehicle speed and the sample vehicle speed, and obtaining the second reconstruction error based on a difference between the second reconstructed vehicle speed and the sample vehicle speed, including: Obtaining a sub-first reconstructed vehicle speed at each sampling time from the first reconstructed vehicle speed, and obtaining a sub-second reconstructed vehicle speed at each sampling time from the second reconstructed vehicle speed; The differences between each sub-sample vehicle speed and each sub-first reconstructed vehicle speed are summed to obtain the first reconstruction error, and the differences between each sub-sample vehicle speed and each sub-second reconstructed vehicle speed are summed to obtain the second reconstruction error.
4. The method according to claim 1, wherein The constructing a third convolution kernel by using the first reconstruction error and the second reconstruction error includes: Normalizing the first reconstruction error and the second reconstruction error to obtain a first reconstruction offset coefficient corresponding to the first reconstruction error and a second reconstruction offset coefficient corresponding to the second reconstruction error; Based on the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient, the first convolution kernel or the second convolution kernel is adjusted to obtain the third convolution kernel.
5. The method according to claim 4, characterized in that The first convolution kernel is smaller than the second convolution kernel; and adjusting the first convolution kernel or the second convolution kernel based on the size relationship between the first reconstruction offset coefficient and the second reconstruction offset coefficient to obtain the third convolution kernel includes: When the first reconstruction offset coefficient is smaller than the second reconstruction offset coefficient, increasing the first convolution kernel by using the first reconstruction offset coefficient to obtain the third convolution kernel; When the first reconstruction offset coefficient is greater than or equal to the second reconstruction offset coefficient, the second convolution kernel is reduced by using the second reconstruction offset coefficient to obtain the third convolution kernel.
6. The method according to claim 1, characterized in that The obtaining, based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, the fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel, respectively, includes: Normalizing the first reconstruction error, the second reconstruction error, and the third reconstruction error, respectively, to obtain a first fusion offset coefficient corresponding to the first reconstruction error, a second fusion offset coefficient corresponding to the second reconstruction error, and a third fusion offset coefficient corresponding to the third reconstruction error; The first fusion offset coefficient is used as the fusion offset coefficient of the first convolution kernel, the second fusion offset coefficient is used as the fusion offset coefficient of the second convolution kernel, and the third fusion offset coefficient is used as the fusion offset coefficient of the third convolution kernel.
7. The method according to claim 6, characterized in that The fusing the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature by using the fusion offset coefficient to obtain a fusion feature includes: Each of the fusion offset coefficients is used as the fusion weight of the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature, and the first vehicle speed feature, the second vehicle speed feature and the third vehicle speed feature are weighted by using the fusion weight to obtain the fusion feature.
8. A vehicle speed prediction method, characterized in that: The method comprises: Get the historical speed of the target vehicle; The historical vehicle speed is input into a trained vehicle speed prediction model, and the predicted vehicle speed of the target vehicle is output through the vehicle speed prediction model; wherein, the vehicle speed prediction model is trained by the vehicle speed prediction model training method according to any one of claims 1 to 7.
9. A vehicle speed prediction model training device, characterized in that: The device comprises: an initial feature extraction module, configured to obtain sample vehicle speeds corresponding to different operating conditions, input the sample vehicle speeds into a speed prediction model to be trained, and obtain a first speed feature and a second speed feature of the sample vehicle speeds using a first convolution kernel and a second convolution kernel of the speed prediction model, respectively; wherein the first convolution kernel and the second convolution kernel have different sizes; a convolution kernel construction module, configured to obtain a first reconstruction error of the first vehicle speed feature and a second reconstruction error of the second vehicle speed feature, and construct a third convolution kernel using the first reconstruction error and the second reconstruction error; a dynamic feature extraction module, configured to obtain a third vehicle speed feature of the sample vehicle speed through the third convolution kernel, and acquire a third reconstruction error of the third vehicle speed feature; a fusion feature acquisition module, configured to obtain, based on the first reconstruction error, the second reconstruction error, and the third reconstruction error, fusion offset coefficients corresponding to the first convolution kernel, the second convolution kernel, and the third convolution kernel, respectively, and fuse the first vehicle speed feature, the second vehicle speed feature, and the third vehicle speed feature using the fusion offset coefficients to obtain a fusion feature; The predicted vehicle speed acquisition module is used to obtain the predicted vehicle speed using the fusion feature, and train the vehicle speed prediction model using the predicted vehicle speed to obtain a trained vehicle speed prediction model.
10. A vehicle speed prediction device, characterized in that: The method comprises: A historical speed acquisition module is used to obtain the historical speed of the target vehicle; A predicted vehicle speed acquisition module is used to input the historical vehicle speed into a trained vehicle speed prediction model and output the predicted vehicle speed of the target vehicle through the vehicle speed prediction model; wherein, the vehicle speed prediction model is trained by the vehicle speed prediction model training method according to any one of claims 1 to 7.
11. A vehicle controller comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.