Vehicle energy consumption prediction method, device, equipment and medium

By dynamically updating the weight of the characteristic index and determining the target unit mileage energy consumption value based on the recent energy consumption data, the problem of low data sensitivity and fixed weight of vehicle range prediction in the prior art is solved, and the prediction accuracy is improved.

CN120196931APending Publication Date: 2025-06-24CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510350564.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In the prior art, the prediction of the remaining range of the vehicle has problems of low data sensitivity and fixed weight, resulting in a large deviation from the actual per-mile energy consumption value.

Method used

By obtaining the most recent first sample from the samples of multiple historical moments, including the actual unit mileage energy consumption value of the vehicle in the first historical period and the data of multiple characteristic indicators, dynamically update the weights of the multiple characteristic indicators, and determine the target unit mileage energy consumption value of the future period.

Benefits of technology

The accuracy of the target weight is improved, thereby improving the accuracy of the target unit mileage energy consumption value and enhancing the prediction accuracy of the vehicle's remaining range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120196931A_ABST
    Figure CN120196931A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle energy consumption prediction method and device, equipment and a medium, and the method comprises the steps: obtaining a first sample closest to a current moment from samples of a plurality of historical moments, the first sample comprising an actual unit mileage energy consumption value of a vehicle in a first historical time period and data of a plurality of feature indexes at the first historical moment, the first historical time period is a time period after the first historical moment; determining target weights corresponding to the plurality of feature indexes according to the data of the plurality of feature indexes at the first historical moment, the first weights corresponding to the plurality of feature indexes and the actual energy consumption value per unit mileage in the first historical time period; and based on the data of the plurality of feature indexes at the current moment and the target weights corresponding to the plurality of feature indexes, determining a target unit mileage energy consumption value in the future time period. According to the method, the target weights of the plurality of characteristic indexes are dynamically changed, so that the accuracy of the target unit mileage energy consumption value is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of energy consumption prediction, and particularly relates to a vehicle energy consumption prediction method, device, equipment and medium. Background Art

[0002] Predicting the remaining driving range of a vehicle can optimize travel plans and enhance the user experience. In related technologies, the estimated value of the remaining driving range of a vehicle can be obtained by dividing the remaining battery charge (State of Charge, SOC) by the comprehensive energy consumption per unit mileage. Among them, the comprehensive energy consumption per unit mileage value is mainly obtained by weighting based on data such as the energy consumption per unit mileage value in the past 100 kilometers and the energy consumption per unit mileage value in the past 500 kilometers, as well as the corresponding weights. However, the sensitivity of the above data to changes in driving conditions is low, and the corresponding weights are fixed values, resulting in the comprehensive energy consumption per unit mileage value being almost a constant, and further resulting in a large deviation between the comprehensive energy consumption per unit mileage value and the actual energy consumption per unit mileage value. Summary of the Invention

[0003] In view of the above-mentioned disadvantages of the prior art, the purpose of the present invention is to provide a vehicle energy consumption prediction method, device, equipment and medium to solve the above problems.

[0004] The vehicle energy consumption prediction method provided by the present invention includes:

[0005] Obtain a first sample closest to the current moment from samples at multiple historical moments, where the first sample includes the actual energy consumption per unit mileage of the vehicle in a first historical period and data of multiple characteristic indicators at a first historical moment, the first historical period is the period after the first historical moment, and the multiple characteristic indicators are the energy consumption per unit mileage of the vehicle under different test conditions;

[0006] Determine the target weights corresponding to the multiple characteristic indicators according to the data of the multiple characteristic indicators at the first historical moment, the first weights corresponding to the multiple characteristic indicators, and the actual energy consumption per unit mileage of the first historical period;

[0007] Obtain the data of the multiple characteristic indicators at the current moment;

[0008] Determine the target energy consumption per unit mileage value in a future period based on the data of the multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators.

[0009] Optionally, the determining the target weights corresponding to the multiple characteristic indicators according to the data of the multiple characteristic indicators at the first historical moment, the first weights corresponding to the multiple characteristic indicators, and the actual energy consumption per unit mileage of the first historical period includes:

[0010] Based on the objective function, determine the second weights corresponding to the multiple characteristic indicators, where the objective function aims to minimize the sum of squared residuals between the actual energy consumption per unit mileage in the first historical period and the predicted energy consumption per unit mileage in the first historical period, and the predicted energy consumption per unit mileage in the first historical period is obtained by weighting based on the data of the multiple characteristic indicators at the first historical moment and the first weights corresponding to the multiple characteristic indicators;

[0011] Based on the first weights corresponding to the multiple characteristic indicators and the second weights corresponding to the multiple characteristic indicators, determine the target weights corresponding to the multiple characteristic indicators.

[0012] Optionally, the first historical period is the period between the first historical moment and the current moment, and the duration of the future period is equal to the duration of the first historical period.

[0013] Optionally, the method further includes:

[0014] Obtain the samples at the multiple historical moments, where each sample at a historical moment in the samples at the multiple historical moments includes the actual energy consumption per unit mileage of the vehicle in the corresponding historical period and the data of the multiple characteristic indicators at the corresponding historical moment, and the samples at the multiple historical moments include a training sample set;

[0015] Train a random forest algorithm model based on the training sample set to obtain a trained random forest algorithm model;

[0016] Based on the trained random forest algorithm model, determine the importance of the multiple characteristic indicators;

[0017] Based on the importance of the multiple characteristic indicators, determine the first weights corresponding to the multiple characteristic indicators, where the first weights are positively correlated with the importance.

[0018] Optionally, the samples at the multiple historical moments further include a first test sample set, and determining the importance of the multiple characteristic indicators based on the trained random forest algorithm model includes:

[0019] Input the first test sample set into the trained random forest algorithm model to determine the first prediction errors corresponding to each decision tree;

[0020] Randomly shuffle the data of the multiple characteristic indicators in the first test sample set to obtain a second test sample set;

[0021] Input the second test sample set into the trained random forest algorithm model to determine the second prediction errors corresponding to each decision tree;

[0022] Determine the importance of each feature index based on the first prediction error corresponding to each decision tree and the second prediction error corresponding to each decision tree.

[0023] Optionally, the method further includes:

[0024] Perform data preprocessing on the first historical driving data of the vehicle to obtain second historical driving data, where the data preprocessing includes interpolation filling for data missing values, smoothing and denoising for the data, and downsampling for the data;

[0025] Perform feature extraction on the second historical driving data to obtain initial samples at multiple historical moments;

[0026] Perform normalization and standardization on the data in the initial samples at multiple historical moments to obtain the samples at multiple historical moments.

[0027] Optionally, the multiple feature indexes include the energy consumption per unit mileage of the vehicle since the last charge.

[0028] The vehicle energy consumption prediction device provided by the present invention includes:

[0029] A first acquisition module, which acquires a first sample closest to the current moment from the samples at multiple historical moments, where the first sample includes the actual energy consumption value per unit mileage of the vehicle in a first historical period and the data of multiple feature indexes at a first historical moment, the first historical period is the period after the first historical moment, and the multiple feature indexes are the energy consumption per unit mileage of the vehicle under different test conditions;

[0030] A first determination module, configured to determine the target weights corresponding to the multiple feature indexes according to the data of the multiple feature indexes at the first historical moment, the first weights corresponding to the multiple feature indexes, and the actual energy consumption value per unit mileage of the first historical period;

[0031] A second acquisition module, configured to acquire the data of the multiple feature indexes at the current moment;

[0032] A second determination module, configured to determine the target energy consumption value per unit mileage of a future period based on the data of the multiple feature indexes at the current moment and the target weights corresponding to the multiple feature indexes

[0033] Optionally, the first determination module is specifically configured to:

[0034] Based on the objective function, determine the second weights corresponding to the multiple characteristic indicators, where the objective function aims to minimize the sum of squared residuals between the actual energy consumption per unit mileage in the first historical period and the predicted energy consumption per unit mileage in the first historical period, and the predicted energy consumption per unit mileage in the first historical period is obtained by weighted summation based on the data of the multiple characteristic indicators at the first historical moment and the first weights corresponding to the multiple characteristic indicators;

[0035] Based on the first weights corresponding to the multiple characteristic indicators and the second weights corresponding to the multiple characteristic indicators, determine the target weights corresponding to the multiple characteristic indicators.

[0036] Optionally, the first historical period is the period between the first historical moment and the current moment, and the duration of the future period is equal to the duration of the first historical period.

[0037] Optionally, the device further includes:

[0038] A third acquisition module, configured to acquire samples at the multiple historical moments, where each sample at each historical moment in the samples at the multiple historical moments includes the actual energy consumption per unit mileage of the vehicle in the corresponding historical period and the data of the multiple characteristic indicators at the corresponding historical moment, and the samples at the multiple historical moments include a training sample set;

[0039] A third determination module, configured to train a random forest algorithm model based on the training sample set to obtain a trained random forest algorithm model;

[0040] A fourth determination module, configured to determine the importance of the multiple characteristic indicators based on the trained random forest algorithm model;

[0041] A fifth determination module, configured to determine the first weights of the multiple characteristic indicators based on the importance of the multiple characteristic indicators, where the first weights are positively correlated with the importance.

[0042] Optionally, the fourth determination module is specifically configured to:

[0043] Input a first test sample set into the trained random forest algorithm model to determine the first prediction errors corresponding to each decision tree;

[0044] Randomly shuffle the data of the multiple characteristic indicators in the first test sample set to obtain a second test sample set;

[0045] Input the second test sample set into the trained random forest algorithm model to determine the second prediction errors corresponding to each decision tree;

[0046] Determine the importance of each feature index based on the first prediction error corresponding to each decision tree and the second prediction error corresponding to each decision tree.

[0047] Optionally, the device further includes:

[0048] A first data processing module, configured to perform data preprocessing on the first historical driving data of the vehicle to obtain second historical driving data, where the data preprocessing includes performing interpolation filling processing on data missing values, performing smoothing and denoising processing on the data, and performing downsampling processing on the data;

[0049] A feature extraction module, configured to perform feature extraction processing on the second historical driving data to obtain initial samples at multiple historical moments;

[0050] A second data processing module, configured to perform normalization processing and standardization processing on the data in the initial samples at the multiple historical moments to obtain the samples at the multiple historical moments.

[0051] Optionally, the multiple feature indexes include the energy consumption per unit mileage of the vehicle since the last charge.

[0052] The electronic device provided by the present invention, the electronic device includes:

[0053] One or more processors;

[0054] A storage device, configured to store one or more programs, when the one or more programs are executed by the one or more processors, enable the electronic device to implement the vehicle energy consumption prediction method described above.

[0055] The computer-readable storage medium provided by the present invention, on which a computer program is stored, when the computer program is executed by a processor of a computer, enable the computer to execute the vehicle energy consumption prediction method described above.

[0056] Beneficial effects of this technical solution: According to the present invention, the weights of multiple feature indexes are updated based on the first sample closest to the current moment, which can enable the target weights of multiple feature indexes to change dynamically with the latest energy consumption data (i.e., the first sample), facilitating the improvement of the accuracy of the target weights, and thus facilitating the improvement of the accuracy of the target energy consumption value per unit mileage.

[0057] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. Description of the Drawings

[0058] The accompanying drawings here are incorporated into and form a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. In the drawings:

[0059] Figure 1 is a flowchart of a vehicle energy consumption prediction method shown in an exemplary embodiment of the present invention;

[0060] Figure 2 is a block diagram of a vehicle energy consumption prediction device shown in an exemplary embodiment of the present invention;

[0061] Figure 3 shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present invention. Detailed Embodiments

[0062] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, rather than for limiting the protection scope of the present invention.

[0063] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape, and size of the components in actual implementation. The type, quantity, and ratio of each component in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0064] In the following description, a large number of details are explored to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention 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 invention difficult to understand.

[0065] Please refer to Figure 1 , Figure 1 is a flowchart of a vehicle energy consumption prediction method shown in an exemplary embodiment of the present invention. As Figure 1 shown, in an exemplary embodiment, the vehicle energy consumption prediction method includes steps S110 to S140, which are introduced in detail as follows:

[0066] Step S110: Obtain a first sample that is the closest to the current moment from samples at multiple historical moments. The first sample includes the actual energy consumption per unit mileage of the vehicle during a first historical period and data of multiple characteristic indicators at a first historical moment. The first historical period is the period after the first historical moment, and the multiple characteristic indicators are the energy consumption per unit mileage of the vehicle under different test conditions.

[0067] Step S120: Determine the target weights corresponding to the multiple characteristic indicators according to the data of the multiple characteristic indicators at the first historical moment, the first weights corresponding to the multiple characteristic indicators, and the actual energy consumption per unit mileage during the first historical period.

[0068] Step S130: Obtain the data of the multiple characteristic indicators at the current moment.

[0069] Step S140: Determine the target energy consumption per unit mileage for a future period based on the data of the multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators.

[0070] In the above step S110, the multiple characteristic indicators are the energy consumption per unit mileage of the vehicle under different test conditions. For example, the energy consumption per unit mileage in the past 100 kilometers, the energy consumption per unit mileage in the past 500 kilometers, and the energy consumption per unit mileage under the working conditions of the Worldwide Harmonized Light-duty Test Cycle (WLTC), etc. Among them, the energy consumption per unit mileage under the working conditions of WLTC includes the energy consumption per unit mileage under four working conditions: low speed, medium speed, high speed, and ultra-high speed. The energy consumption per unit mileage value under the working conditions of WLTC in the first sample can be determined according to the vehicle speed working conditions at the first historical moment.

[0071] In some embodiments, the above multiple characteristic indicators further include the energy consumption per unit mileage of the vehicle since the last charge.

[0072] The above energy consumption per unit mileage can all be the average energy consumption per 100 kilometers or the average energy consumption per kilometer, etc.

[0073] In this implementation manner, by adding that the multiple characteristic indicators further include the energy consumption per unit mileage of the vehicle since the last charge, the characteristic indicators in different dimensions can be enriched, which is beneficial to improving the reliability of the target energy consumption per unit mileage value.

[0074] In step S120, the first weights corresponding to multiple characteristic indicators can be custom initial weights or initial weights determined by relevant algorithms. The first weights corresponding to multiple characteristic indicators and the data of multiple characteristic indicators at the first historical moment are used to determine the predicted energy consumption value per unit mileage in the first historical period. The following is an explanation with specific formulas.

[0075] AX1 + BX2 + CX3 + DX4 = X (1)

[0076] A + B + C + D = 1 (2)

[0077] In the above formulas (1) and (2), A, B, C, and D are the first weights corresponding to four characteristic indicators (W = {w1, w2, w3, w4}) respectively, satisfying the constraint conditions in formula (2); X1, X2, X3, and X4 are the data of the four characteristic indicators (W = {w1, w2, w3, w4}) at the first historical moment; X represents the predicted energy consumption value per unit mileage in the first historical period.

[0078] It should be noted that the above formula (1) is an example formula with four characteristic indicators. In practical applications, the present invention is not limited to the number of characteristic indicators being four, and the specific characteristic indicators can be determined according to actual situations. As an example, the above w1, w2, w3, w4 can be the energy consumption per unit mileage in the past 100 kilometers, the energy consumption per unit mileage in the past 500 kilometers, the energy consumption per unit mileage under the WLTC working conditions, and the energy consumption per unit mileage since the vehicle's last charge respectively.

[0079] Based on the predicted energy consumption value per unit mileage determined by the above formula (1) and the actual energy consumption value per unit mileage in the first historical period, the first weights (A, B, C, and D) corresponding to the above multiple characteristic indicators can be updated, and then the target weights corresponding to the multiple characteristic indicators can be determined.

[0080] In step S140, the data of multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators are weighted to determine the target energy consumption value per unit mileage in the future period. The target energy consumption value per unit mileage can be used to estimate the remaining driving range in the future period, that is, the remaining battery power divided by the target energy consumption value per unit mileage. Among them, the duration of the future period can be set based on requirements, such as ten minutes or twenty minutes, etc. After the above ten minutes or twenty minutes end, the sample closest to the current moment is retrieved again for weight update and target energy consumption value per unit mileage update.

[0081] The present invention updates the weights of multiple characteristic indicators according to the first sample closest to the current moment, and can realize that the target weights of multiple characteristic indicators change dynamically with the closest energy consumption data (i.e., the first sample). By improving the fixed weight value of the existing target energy consumption per unit mileage to a dynamic weight, it makes up for the problems such as the ambiguity and individual differences in the determination of subjective weights, and has the characteristics of strong practicability and high accuracy; through the above-mentioned target energy consumption per unit mileage and the SOC of the vehicle, the remaining cruising range can be estimated. Different from the methods of traditional machine learning and deep learning, the estimation of the remaining cruising range in this embodiment does not require huge computing resources and is more applicable to the vehicle end.

[0082] Optionally, determining the target weights corresponding to the multiple characteristic indicators according to the data of the multiple characteristic indicators at the first historical moment, the first weights corresponding to the multiple characteristic indicators, and the actual energy consumption per unit mileage in the first historical period includes:

[0083] Based on the objective function, determine the second weights corresponding to the multiple characteristic indicators. The objective function aims to minimize the sum of the squares of the residuals between the actual energy consumption per unit mileage in the first historical period and the predicted energy consumption per unit mileage in the first historical period. The predicted energy consumption per unit mileage in the first historical period is obtained by weighting based on the data of the multiple characteristic indicators at the first historical moment and the first weights corresponding to the multiple characteristic indicators;

[0084] Based on the first weights corresponding to the multiple characteristic indicators and the second weights corresponding to the multiple characteristic indicators, determine the target weights corresponding to the multiple characteristic indicators.

[0085] In this embodiment, the residual formula between the actual energy consumption per unit mileage in the first historical period and the predicted energy consumption per unit mileage in the first historical period is as follows:

[0086] r = X ′ -X (3)

[0087] where X ′ represents the actual energy consumption per unit mileage in the first historical period; X represents the predicted energy consumption per unit mileage in the first historical period, and X is determined according to the above formula 1; r is the above-mentioned residual.

[0088] The solution direction of the non-linear variance is to minimize the sum of the squares of the residuals, that is, the objective function is as follows:

[0089] f = min (r 2 ) (4)

[0090] By solving the objective function, the second weights corresponding to the multiple characteristic indicators can be obtained, where the second weights corresponding to the multiple characteristic indicators satisfy the conditions of the above formula 2.

[0091] To more clearly understand the technical solution of this embodiment, taking the four characteristic indicators in the above formulas 1 and 2 as an example, the determination formula 3 of the residual and the solution of the objective function are described.

[0092] Replace the equalities in formulas 1 and 2, eliminate an unknown D, and substitute the equality of X into formula 3 to obtain the specific residual formula:

[0093] r = X ′ -X4 - (A(X1 - X4) + B(X2 - X4) + C(X3 - X4)) (5)

[0094] The objective function is used to solve three unknowns A, B, and C. The least squares method can be used to find the optimal fitting solution under the condition of limiting the initial solution. An example of the objective function is as follows:

[0095] f(A, B, C) = min (r 2 ) (6)

[0096] Taking the defined objective loss function f and the initial solution (i.e., the first weights corresponding to multiple characteristic indicators) as input variables, applying the optimization function in the scipy.optimize module in Python can solve the second weights that meet the conditions.

[0097] After determining the second weights corresponding to the above multiple characteristic indicators, based on the second weights corresponding to the multiple characteristic indicators and the first weights corresponding to the multiple characteristic indicators, the target weights corresponding to the multiple characteristic indicators can be determined. Among them, as an example, the average value of the first weights and the second weights corresponding to each characteristic indicator can be taken to obtain the target weights corresponding to each characteristic indicator.

[0098] In the embodiment of the present invention, determining the second weights corresponding to each characteristic indicator based on the objective function takes into account the strong coupling relationship between the actual energy consumption value per unit mileage and the predicted energy consumption value per unit mileage in the sample; combining the first weights and the second weights corresponding to the multiple characteristic indicators to determine the final target weights, and by simultaneously considering the influence of the first weights and the second weights on the target weights, it is beneficial to further improve the accuracy of the target weights.

[0099] Optionally, the first historical period is the period between the first historical moment and the current moment, and the duration of the future period is equal to the duration of the first historical period.

[0100] In this embodiment, the first historical period is the period between the first historical moment and the current moment, that is, the data cut-off time point of the first sample is consistent with the current time point, which can improve the timeliness of the data in the first sample; the duration of the future period is equal to the duration of the first historical period, that is, the future period and the first historical period have the same time span. In this way, determining the target energy consumption per unit mileage of the future period based on the actual energy consumption per unit mileage value and the predicted energy consumption per unit mileage value of the first historical period is beneficial to further improve the accuracy of the target energy consumption per unit mileage value.

[0101] Optionally, the method further includes:

[0102] Obtain samples at the multiple historical moments, where each sample at a historical moment in the samples at the multiple historical moments includes the actual energy consumption per unit mileage of the vehicle in the corresponding historical period and the data of multiple characteristic indicators at the corresponding historical moment, and the samples at the multiple historical moments include a training sample set;

[0103] Train a random forest algorithm model based on the training sample set to obtain a trained random forest algorithm model;

[0104] Determine the importance of the multiple characteristic indicators based on the trained random forest algorithm model;

[0105] Determine the first weights of the multiple characteristic indicators based on the importance of the multiple characteristic indicators, and the first weights are positively correlated with the importance.

[0106] The random forest algorithm model obtains the final prediction result by constructing multiple decision trees and combining their prediction results. The samples at the multiple historical moments above include a training sample set {D1(X), D2(X), D3(X), …, D i (X)}, where the characteristic indicators are W p = {w1, w2, w3, …, w n}}. Each training sample in the training sample set includes the data of W p at the corresponding historical moment, and the data of in the corresponding historical period, representing the actual energy consumption per unit mileage value. The trained random forest algorithm model can determine the corresponding predicted energy consumption per unit mileage value based on the data of the multiple characteristic indicators above.

[0107] Based on the trained random forest algorithm model, the importance θ of the multiple characteristic indicators can also be determined p = {θ1, θ2, θ3, …, θ n}。In the random forest algorithm model, the importance of feature indicators measures the contribution degree of each feature indicator to the model's prediction ability. The higher the importance of a feature indicator, the greater the impact of the feature indicator on the model's prediction result. After the embodiments of the present invention perform normalization processing on the importance of multiple feature indicators, eliminate the influence of positive and negative correlated feature indicators, and the influence of dimensions, the first weights of multiple feature indicators can be obtained, and the first weights are positively correlated with the importance.

[0108] The embodiments of the present invention use the trained random forest algorithm model to determine the importance of multiple feature indicators, and then based on the importance of multiple feature indicators, determine the first weights of multiple feature indicators, which can assign higher weights to the feature indicators that have a great impact on the predicted energy consumption value per unit mileage. Compared with artificially defining the first weights, it is beneficial to improve the accuracy of the first weights.

[0109] Optionally, the samples at the multiple historical moments further include a first test sample set, which is used to test the trained random forest algorithm model to verify the effectiveness of the model. Among them, the ratio of the training sample set and the first test sample set can be set (for example, 70:30), and then the samples at the above-mentioned multiple historical moments are randomly sampled according to the proportion of the training sample set to obtain the training sample set, and the remaining unsampled samples are the first test sample set. Input the first test sample set into the trained random forest algorithm model, and through the m decision trees of the model, m results {C1(X), C2(X), C3(X), …, C m (X)} of each test sample can be obtained, and the average value of the m results can be taken to obtain the predicted energy consumption value per unit mileage of each test sample.

[0110] The above-mentioned first test sample set can also be used to determine the importance of multiple feature indicators, and the following is a specific description thereof.

[0111] Optionally, the determining the importance of multiple feature indicators based on the trained random forest algorithm model includes:

[0112] Input the first test sample set into the trained random forest algorithm model to determine the first prediction error corresponding to each decision tree;

[0113] Randomly shuffle the data of the multiple feature indicators in the first test sample set to obtain a second test sample set;

[0114] Input the second test sample set into the trained random forest algorithm model to determine the second prediction error corresponding to each decision tree;

[0115] Determine the importance of each feature index based on the first prediction error corresponding to each decision tree and the second prediction error corresponding to each decision tree.

[0116] The above first prediction error and second prediction error can be the mean square error between the predicted value (i.e., the predicted energy consumption value per unit mileage) and the true value (i.e., the actual energy consumption value per unit mileage). Each decision tree in the random forest algorithm model may focus on different feature indices during decision-making. Based on the first prediction error and second prediction error of each decision tree, the influence of the feature indices selected by each decision tree on the prediction result can be determined, and then the importance of each feature index can be determined. The following is an exemplary description of how to determine the importance of each feature index in combination with specific formulas.

[0117] a. Input the first test sample set into each decision tree, and the prediction results corresponding to each test sample in the first test sample set are Y i , then the mean square error between the predicted value Y i corresponding to each test sample and the corresponding true value Y is the first mean square error ε i :

[0118] ε i = mean(Y i - Y) 2 (7)

[0119] b. Ensure that the true values in the first test data set remain unchanged, randomly shuffle the eigenvalue sequence of W p , and then use each decision tree to predict the shuffled samples. The mean square error between the predicted value and the true value Y is:

[0120]

[0121] c. Calculate the influence of each feature index W p on the prediction accuracy of the decision tree D i

[0122]

[0123] d. Repeat steps a to c to traverse the entire trained random forest algorithm model, so that the influence of the feature evaluation index W p on the mean square error of all decision trees can be obtained. Then, the importance θ p of multiple feature indices W p is

[0124]

[0125] To more clearly understand the technical solution of the embodiments of the present invention, taking the characteristic indicators including the energy consumption per unit mileage in the past 100 kilometers, the energy consumption per unit mileage in the past 500 kilometers, the energy consumption per unit mileage under WLTC working conditions, and the energy consumption per unit mileage since the vehicle's last charge as examples, through the above importance determination method, it can be finally determined that the importance ranking from high to low is the energy consumption per unit mileage in the past 500 kilometers, the energy consumption per unit mileage in the past 100 kilometers, etc., the energy consumption per unit mileage under WLTC working conditions, and the energy consumption per unit mileage since the vehicle's last charge.

[0126] Through the above steps, the embodiments of the present invention can quickly and accurately determine the importance of each characteristic indicator.

[0127] Optionally, the method further includes:

[0128] Performing data preprocessing on the first historical driving data of the vehicle to obtain second historical driving data, where the data preprocessing includes interpolation filling processing for data missing values, smoothing and denoising processing for data, and downsampling processing for data;

[0129] Performing feature extraction processing on the second historical driving data to obtain initial samples at multiple historical moments;

[0130] Performing normalization processing and standardization processing on the data in the initial samples at multiple historical moments to obtain the samples at multiple historical moments.

[0131] The first historical driving data includes the vehicle driving data in the past period T, and the first driving data has been sorted in ascending order. The first historical driving data includes data related to energy consumption at multiple historical moments, such as remaining power and position, etc.

[0132] Performing data preprocessing on the first historical driving data to obtain second historical driving data, and the data preprocessing is specifically as follows:

[0133] a. Interpolation filling processing for data missing values. Initially verifying the collected original data, including checking data formats, data ranges, and abnormal values, etc. For the missing values in the data, it can be comprehensively considered whether to fill them based on factors such as the reason for the data missing values, the number of missing values, the position, and the degree of influence on the model prediction result. As an example, data records with missing values where the missing rate is greater than 60% can be deleted, data with a missing rate between 30% and 60% can be filled with the mean value, and data with a missing rate less than 30% can be filled with linear interpolation. It is also possible to use methods such as forward filling or backward filling to complete the missing values by utilizing the characteristics of time series data.

[0134] b. Data smoothing and denoising processing. Smoothing and denoising processing is used to eliminate fluctuations and noises in time-series data, avoid sudden changes in the results, and make it more applicable in modeling and prediction. Common methods include translation, weighted translation, wavelet transform, etc. In this embodiment, moving average is adopted, that is, the data is smoothed by calculating the average value of adjacent data points. The specific formula is as follows:

[0135]

[0136] In the formula: MA t represents the moving average value at the t-th moment, x i represents the original driving data at the i-th moment, and n is the window size.

[0137] c. Construct an aggregated dataset, downsample the processed data. Assume that the sampling time interval of the original sample data is Δt, and samples approximately every ten minutes (customizable, or five minutes or fifteen minutes, etc.) are aggregated into one sample. The amount of sample data within ten minutes can be expressed as:

[0138]

[0139] In the formula, δ represents the amount of sample data of the original sample data within ten minutes before downsampling. After downsampling, the amount of aggregated sample data is

[0140] After data preprocessing through the above steps, the second historical driving data is obtained. Feature extraction processing is performed on the second historical driving data to obtain initial samples at multiple historical moments. Among them, feature extraction processing is used to extract the data of each feature index and the actual energy consumption per unit mileage.

[0141] Eliminate the dimensional difference characteristics between different feature indexes in the initial samples at multiple historical moments, make the data have the same scale and distribution, so as to obtain the samples at the above-mentioned multiple historical moments. It includes normalizing the data, that is, scaling it to the range of [0, 1] or [-1, 1]; and then performing standardization processing to convert the data into a normal distribution with a mean of 0 and a standard deviation of 1.

[0142] By determining the second historical driving data through the above method, the quality of the second historical data can be improved; by determining the samples at multiple historical moments through the above method and training and validating the random forest algorithm model based on this sample, the model can be made more stable and reliable.

[0143] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0144] Figure 2 It is a block diagram of a vehicle energy consumption prediction device shown in an exemplary embodiment of the present invention. As Figure 2 shown, the exemplary vehicle energy consumption prediction device includes:

[0145] A first acquisition module 210, which acquires a first sample closest to the current moment from samples at multiple historical moments. The first sample includes the actual energy consumption per unit mileage of the vehicle during a first historical period and data of multiple characteristic indicators at a first historical moment. The first historical period is the period after the first historical moment, and the multiple characteristic indicators are the energy consumption per unit mileage of the vehicle under different test conditions;

[0146] A first determination module 220, which is used to determine the target weights corresponding to the multiple characteristic indicators according to the data of the multiple characteristic indicators at the first historical moment, the first weights corresponding to the multiple characteristic indicators, and the actual energy consumption per unit mileage value of the first historical period;

[0147] A second acquisition module 230, which is used to acquire the data of the multiple characteristic indicators at the current moment;

[0148] A second determination module 240, which is used to determine the target energy consumption per unit mileage value for a future period based on the data of the multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators

[0149] Optionally, the first determination module 220 is specifically used for:

[0150] Based on an objective function, determine the second weights corresponding to the multiple characteristic indicators. The objective function aims to minimize the sum of squared residuals between the actual energy consumption per unit mileage value of the first historical period and the predicted energy consumption per unit mileage value of the first historical period. The predicted energy consumption per unit mileage value of the first historical period is obtained by weighting based on the data of the multiple characteristic indicators at the first historical moment and the first weights corresponding to the multiple characteristic indicators;

[0151] Based on the first weights corresponding to the multiple characteristic indicators and the second weights corresponding to the multiple characteristic indicators, determine the target weights corresponding to the multiple characteristic indicators.

[0152] Optionally, the first historical period is the period between the first historical moment and the current moment, and the duration of the future period is equal to the duration of the first historical period.

[0153] Optionally, the device further includes:

[0154] A third acquisition module, configured to acquire samples at the multiple historical moments, where each sample at a historical moment in the samples at the multiple historical moments includes an actual energy consumption value per unit mileage of the vehicle during the corresponding historical period and data of multiple feature indicators at the corresponding historical moment, and a training sample set is included in the samples at the multiple historical moments;

[0155] A third determination module, configured to train a random forest algorithm model based on the training sample set to obtain a trained random forest algorithm model;

[0156] A fourth determination module, configured to determine the importance of the multiple feature indicators based on the trained random forest algorithm model;

[0157] A fifth determination module, configured to determine a first weight of the multiple feature indicators based on the importance of the multiple feature indicators, where the first weight is positively correlated with the importance.

[0158] Optionally, the fourth determination module is specifically configured to:

[0159] Input a first test sample set into the trained random forest algorithm model to determine a first prediction error corresponding to each decision tree;

[0160] Randomly shuffle the data of the multiple feature indicators in the first test sample set to obtain a second test sample set;

[0161] Input the second test sample set into the trained random forest algorithm model to determine a second prediction error corresponding to each decision tree;

[0162] Based on the first prediction error corresponding to each decision tree and the second prediction error corresponding to each decision tree, determine the importance of each feature indicator.

[0163] Optionally, the apparatus further includes:

[0164] A first data processing module, configured to perform data preprocessing on first historical driving data of the vehicle to obtain second historical driving data, where the data preprocessing includes interpolation filling processing for data missing values, smoothing and denoising processing for data, and downsampling processing for data;

[0165] A feature extraction module, configured to perform feature extraction processing on the second historical driving data to obtain initial samples at multiple historical moments;

[0166] A second data processing module, configured to perform normalization processing and standardization processing on the data in the initial samples at the multiple historical moments to obtain the samples at the multiple historical moments.

[0167] Optionally, the multiple characteristic indicators include the energy consumption per unit mileage of the vehicle since the last charge.

[0168] It should be noted that the vehicle energy consumption prediction device provided in the above embodiments and the vehicle energy consumption prediction method provided in the above embodiments belong to the same concept. The specific manners in which each module and unit perform operations have been described in detail in the method embodiments and will not be elaborated herein. In practical applications, the vehicle energy consumption prediction device provided in the above embodiments can, as needed, allocate the above functions to different functional modules, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above. This is not limited herein either.

[0169] An embodiment of the present invention also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the vehicle energy consumption prediction method provided in each of the above embodiments.

[0170] Figure 3 FIG. shows a schematic structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present invention. It should be noted that Figure 3 The computer system 300 of the electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present invention.

[0171] As Figure 3 shown, the computer system 300 includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage section 308 into the random access memory (RAM) 303, such as executing the method described in the above embodiments. In the RAM 303, various programs and data required for system operation are also stored. The CPU 301, ROM 302, and RAM 303 are connected to each other through a bus 304. The input / output (I / O) interface 305 is also connected to the bus 304.

[0172] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as required. A removable medium 311 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 310 as required so that a computer program read therefrom is installed into the storage section 308 as required.

[0173] Specifically, according to an embodiment of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a computer-readable medium, the computer program including a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 309 and / or installed from the removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the system of the present invention are executed.

[0174] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted by any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0176] The units involved in the embodiments of the present invention can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation to the units themselves in some cases.

[0177] Another aspect of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer is made to execute the vehicle energy consumption prediction method as described above. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist separately without being assembled into the electronic device.

[0178] Another aspect of the present invention also provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the vehicle energy consumption prediction method provided in the above various embodiments.

[0179] The above embodiments are only used to exemplarily illustrate the principles and effects of the present invention, rather than to limit the present invention. Any person familiar with this technology can modify or change the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed by the present invention should still be covered by the claims of the present invention.

Claims

1. A vehicle energy consumption prediction method, characterized in that: include: Acquire a first sample closest to the current moment from samples at multiple historical moments, wherein the first sample includes an actual unit mileage energy consumption value of the vehicle in a first historical period and data of multiple characteristic indicators at the first historical moment, wherein the first historical period is a period after the first historical moment, and the multiple characteristic indicators are unit mileage energy consumption of the vehicle under different test conditions; Determine target weights corresponding to the multiple characteristic indicators according to data of the multiple characteristic indicators at the first historical moment, first weights corresponding to the multiple characteristic indicators, and actual unit mileage energy consumption values ​​during the first historical period; Acquire data of the plurality of characteristic indicators at the current moment; Based on the data of the multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators, a target unit mileage energy consumption value for a future time period is determined.

2. The vehicle energy consumption prediction method according to claim 1, characterized in that: The determining, according to the data of the plurality of characteristic indicators at the first historical moment, the first weights corresponding to the plurality of characteristic indicators, and the actual unit mileage energy consumption value of the first historical period, the target weights corresponding to the plurality of characteristic indicators include: Determining second weights corresponding to the multiple characteristic indicators based on an objective function, wherein the objective function takes the minimum residual square of the actual unit mileage energy consumption value of the first historical period and the predicted unit mileage energy consumption value of the first historical period as a target, and the predicted unit mileage energy consumption value of the first historical period is obtained by weighting based on the data of the multiple characteristic indicators at the first historical moment and the first weights corresponding to the multiple characteristic indicators; Based on the first weights corresponding to the plurality of feature indicators and the second weights corresponding to the plurality of feature indicators, target weights corresponding to the plurality of feature indicators are determined.

3. The vehicle energy consumption prediction method according to claim 1, characterized in that: The first historical period is a period from the first historical moment to the current moment, and the duration of the future period is equal to the duration of the first historical period.

4. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Acquire samples of the plurality of historical moments, wherein each sample of the plurality of historical moments includes an actual unit mileage energy consumption value of the vehicle in a corresponding historical period and data of a plurality of characteristic indicators at a corresponding historical moment, and the samples of the plurality of historical moments include a training sample set; Training the random forest algorithm model based on the training sample set to obtain a trained random forest algorithm model; Determining the importance of the multiple feature indicators based on the trained random forest algorithm model; Based on the importance of the multiple feature indicators, first weights of the multiple feature indicators are determined, where the first weights are positively correlated with the importance.

5. The method according to claim 4, characterized in that The samples of the multiple historical moments also include a first test sample set, and the determining the importance of the multiple feature indicators based on the trained random forest algorithm model includes: Inputting the first test sample set into the trained random forest algorithm model to determine a first prediction error corresponding to each decision tree; Randomly arranging the data of the plurality of characteristic indicators in the first test sample set in a disordered order to obtain a second test sample set; Inputting the second test sample set into the trained random forest algorithm model to determine the second prediction error corresponding to each decision tree; Based on the first prediction errors corresponding to the decision trees and the second prediction errors corresponding to the decision trees, the importance of the feature indicators is determined.

6. The method according to claim 4, characterized in that The method further comprises: Performing data preprocessing on the first historical driving data of the vehicle to obtain second historical driving data, wherein the data preprocessing includes interpolating and filling missing data values, smoothing and denoising the data, and downsampling the data; Performing feature extraction processing on the second historical driving data to obtain initial samples of multiple historical moments; The data in the initial samples of the multiple historical moments are normalized and standardized to obtain samples of the multiple historical moments.

7. The method according to claim 1, characterized in that The plurality of characteristic indicators include the energy consumption per unit mileage of the vehicle since the last charging.

8. A vehicle energy consumption prediction device, characterized in that: include: A first acquisition module is used to acquire a first sample closest to the current moment from samples of multiple historical moments, wherein the first sample includes an actual unit mileage energy consumption value of the vehicle in a first historical period and data of multiple characteristic indicators at the first historical moment, wherein the first historical period is a period after the first historical moment, and the multiple characteristic indicators are the unit mileage energy consumption of the vehicle under different test conditions; A first determination module, configured to determine target weights corresponding to the plurality of characteristic indicators according to data of the plurality of characteristic indicators at a first historical moment, first weights corresponding to the plurality of characteristic indicators, and actual unit mileage energy consumption values ​​during the first historical period; A second acquisition module is used to acquire data of the multiple characteristic indicators at the current moment; The second determination module is used to determine the target unit mileage energy consumption value for a future time period based on the data of the multiple characteristic indicators at the current moment and the target weights corresponding to the multiple characteristic indicators.

9. A device, characterized in that: include: one or more processors and memory, A computer program is stored in the memory, and when the one or more processors execute the computer program, the device executes the vehicle energy consumption prediction method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when executed by one or more processors, the device executes the vehicle energy consumption prediction method as described in any one of claims 1-7.