Vehicle energy consumption prediction method, electronic equipment and computer storage medium

By processing the historical timing data of the vehicle, extracting features and predicting historical energy consumption data, and then combining the current driving and environmental data, a full connection process is carried out to predict the current energy consumption data, which solves the problem of inaccurate energy consumption prediction in the existing technology and achieves higher prediction accuracy.

CN119723708APending Publication Date: 2025-03-28ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510017223.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

Vehicle energy consumption prediction in the prior art is not accurate enough, mainly because only the current driving data and environmental data are considered, and historical driving data and load data are not fully utilized.

Method used

By obtaining the historical timing data of the vehicle, determining the periodic law of the data, extracting characteristic data, predicting historical energy consumption data, and combining the current driving data, environmental data and target road data, a full connection process is carried out to predict the current energy consumption data.

Benefits of technology

The accuracy of vehicle energy consumption prediction is improved and the problem of inaccurate energy consumption prediction in the prior art is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723708A_ABST
    Figure CN119723708A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle energy consumption prediction method, electronic equipment and a computer storage medium. The method comprises the following steps: acquiring time sequence data of a vehicle in a historical driving process; based on the time sequence data, the number of cycles is determined, the number of cycles is larger than 1, and the number of cycles represents the number of cycles in which the time sequence data presents a cycle rule; feature extraction is carried out on the time series data in each period to obtain feature data, and the feature data represents the change rule of each data in the time series data among multiple periods and the change rule in each period; obtaining first energy consumption data of the vehicle based on the feature data; acquiring current driving data and current environment data of the vehicle in the current driving process; and predicting second energy consumption data of the vehicle based on the first energy consumption data, the current driving data and the current environment data. According to the invention, the energy consumption data of the vehicle can be accurately predicted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicle energy consumption prediction, and in particular to a vehicle energy consumption prediction method, electronic equipment and computer storage medium. Background Art

[0002] With the continuous development of vehicle intelligence and electrification, the prediction of vehicle energy consumption has emerged, that is, the prediction of vehicle range. Range refers to the total distance that vehicles, ships and other means of transportation can travel continuously with the maximum fuel reserve. For vehicles, this usually refers to the maximum distance the vehicle can travel when the tank is full or the battery is fully charged. The prediction of vehicle energy consumption can be based on different conditions and standards. For example, the maximum range is usually tested under a single operating condition, such as low-speed and uniform driving, while the comprehensive range is evaluated using more complex test standards such as NEDC (New European Driving Cycle).

[0003] At present, traditional vehicle energy consumption predictions are mostly based on historical driving data. Such predictions have a certain reference value. However, if the vehicle driving conditions change, the predicted vehicle energy consumption will have a large error and the prediction results will not be accurate enough. Summary of the invention

[0004] In view of this, the present application provides a vehicle energy consumption prediction method, electronic device and computer storage medium, which can accurately predict the energy consumption data of the vehicle.

[0005] An embodiment of the present application provides a vehicle energy consumption prediction method, the method comprising: obtaining time series data of a vehicle during historical driving, the time series data being used to characterize data collected in chronological order reflecting the driving condition of the vehicle, the environment in which it is located, and the load condition of the vehicle; determining the number of cycles based on the time series data, the number of cycles being greater than 1, and the number of cycles characterizing the number of cycles in which the time series data presents a periodic regularity; performing feature extraction on the time series data within each of the cycles to obtain feature data, the feature data characterizing the change pattern of each data in the time series data between multiple cycles and the change pattern within each of the cycles; obtaining first energy consumption data of the vehicle based on the feature data; obtaining current driving data and current environmental data of the vehicle during current driving; and predicting second energy consumption data of the vehicle based on the first energy consumption data, the current driving data, and the current environmental data.

[0006] Compared with the related art, the embodiments of the present application have at least the following advantages: Since the driving conditions, environment, and vehicle load of the vehicle in the historical driving process will affect the energy consumption of the vehicle, the time series data is first processed to obtain the periodic variation law of the data and determine the number of data cycles. Then, based on the number of cycles, the characteristic data in the time series data is extracted to reduce the amount of subsequent data to be processed and improve the data processing efficiency. Based on the characteristic data, the first energy consumption data in the historical driving process can be predicted. Finally, the first energy consumption data, the current driving data, and the current environmental data are used to predict the second energy consumption data, which solves the problem of inaccurate energy consumption prediction in the prior art that only the current driving data and the current environmental data of the vehicle are considered to affect the energy consumption of the vehicle, but the historical driving data, historical load data, and other data in the historical driving process are not considered to affect the energy consumption of the vehicle.

[0007] In some possible implementations, determining the number of cycles based on the time series data includes: performing frequency domain analysis on the time series data using Fourier transform to obtain frequency domain data, wherein the frequency domain data characterizes the characteristic distribution of the time series data in the frequency domain; converting the frequency domain data into frequency component data, wherein the frequency component data characterizes the intensity of each frequency component in the frequency domain data; and determining the number of cycles based on the frequency component data.

[0008] In some possible implementations, determining the number of cycles based on the frequency component data includes: selecting the first k data in the frequency component data sorted in descending order as frequency intensity data, where k is an integer greater than 1; and taking the data in the frequency domain data that matches the frequency intensity data as the number of cycles.

[0009] In some possible implementations, the feature extraction of the time series data within each of the cycles to obtain feature data includes: based on the number of cycles, performing data dimensionality upgrading processing on the time series data to obtain two-dimensional first data, one dimension of the first data represents the change pattern of each data in the time series data between multiple cycles, and the other dimension represents the change pattern of each data in each of the cycles; feature extraction of the first data to obtain the feature data.

[0010] In some possible implementations, the first energy consumption data of the vehicle is obtained based on the feature data, including: performing data dimensionality reduction processing on the feature data to obtain second data, the dimension of the second data is the same as the dimension of the time series data; based on the frequency component data, performing weighted fusion on the second data to obtain weighted data; performing full connection processing on the weighted data to predict the first energy consumption data.

[0011] In some possible implementations, the current driving data includes at least a current position and a target position; predicting the second energy consumption data of the vehicle based on the first energy consumption data, the current driving data and the current environmental data includes: determining the target road data for the vehicle to travel from the current position to the target position; processing the first energy consumption data, the current driving data, the current environmental data and the target road data to obtain an association vector, wherein the association vector is used to characterize the data association between the first energy consumption data, the current driving data, the current environmental data and the target road data; performing full connection processing on the association vector to predict the second energy consumption data.

[0012] In some possible implementations, the processing of the first energy consumption data, the current driving data, the current environmental data and the target road data to obtain an association vector includes: converting the first energy consumption data, the current driving data, the current environmental data and the target road data into a number of initial vectors; calculating attention weights between the several initial vectors; and obtaining the association vector based on the attention weights and the several initial vectors.

[0013] In some possible implementations, the obtaining of the association vector based on the attention weight and the several initial vectors includes: performing a mask operation on the several initial vectors to obtain an initial mask vector; training the initial mask vector based on the attention weight to obtain a mask prediction vector; performing next sentence prediction processing on the several initial vectors to obtain an initial prediction vector; training the initial prediction vector based on the attention weight to obtain a next sentence prediction vector; and performing association analysis on the mask prediction vector and the next sentence prediction vector to obtain the association vector.

[0014] The second aspect of the present application discloses an electronic device, which includes a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the vehicle energy consumption prediction method as described above.

[0015] The third aspect of the present application discloses a computer storage medium, including computer instructions. When the computer instructions are executed on the electronic device, the electronic device executes the above-mentioned vehicle energy consumption prediction method.

[0016] It can be understood that the electronic device of the second aspect and the computer storage medium of the third aspect provided above both correspond to the method of the first aspect. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flow chart of a vehicle energy consumption prediction method according to an embodiment of the present application.

[0018] Figure 2 It is a schematic diagram of the sub-step flow of a vehicle energy consumption prediction method according to an embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0020] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that the implementation methods of the present application and the features in the implementation methods can be combined with each other without conflict.

[0021] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The described implementations are only part of the implementations of the present application, rather than all the implementations.

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0023] It should be further noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0024] In this application, "at least one" means one or more, and "more" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0025] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0026] Please refer to Figure 1 , which is a flow chart of a vehicle energy consumption prediction method provided in an embodiment of the present application. The vehicle energy consumption prediction method is applied to a vehicle, wherein the vehicle can be a fuel vehicle or a new energy vehicle, and the present application does not limit the specific type of the vehicle.

[0027] The vehicle energy consumption prediction method includes the following steps: Step 101: Obtain time series data of the vehicle during its historical driving process.

[0028] In some embodiments, time series data is used to characterize data collected in chronological order that reflects the driving conditions, environment, and load conditions of the vehicle. In this embodiment, the time series data includes historical driving data, historical environment data, historical load data, and historical operation data of the vehicle collected in chronological order. Specifically, the historical driving data of the vehicle includes the driving speed, total mileage, and driver driving behavior data of the vehicle during the historical driving process. The historical environment data includes weather data and road data of the location of the vehicle during the historical driving process. Weather data may include data such as weather temperature and visibility. Road data includes data such as road grade and number of traffic lights. Historical load data includes at least the weight of the vehicle itself and the weight of the vehicle load. Historical operation data includes vehicle operating parameters such as the driving mode, air conditioning status, energy recovery mode, and tire pressure data of the vehicle.

[0029] Step 102: Determine the number of cycles based on the time series data, where the number of cycles is greater than 1.

[0030] In some embodiments, the number of cycles represents the number of cycles in which the time series data presents a periodic regularity. In this embodiment, the TimesNet model is used to process historical driving data, historical environmental data, historical load data, and historical operation data to obtain the number of cycles. The historical driving data, historical environmental data, historical load data, and historical operation data are all one-dimensional data.

[0031] Specifically, the TimesNet model first uses Fourier transform to perform frequency domain analysis on historical driving data, historical environmental data, historical load data, and historical operation data to obtain frequency domain data, which represents the characteristic distribution of time series data in the frequency domain. Then, the TimesNet model converts the frequency domain data into frequency component data, which represents the intensity of each frequency component in the frequency domain data. Finally, the TimesNet model determines the number of cycles based on the frequency component data.

[0032] Furthermore, the TimesNet model is based on frequency component data, and the processing steps for determining the number of cycles include: selecting the first k data in the frequency component data after being sorted in descending order as frequency intensity data, where k is an integer greater than 1. The data in the frequency domain data that matches the frequency intensity data is used as the number of cycles. In other embodiments, the first k data in the frequency component data after being sorted in ascending order can also be selected as frequency intensity data. Alternatively, the average value of the data in the frequency component data is calculated, and the data greater than the average value is used as frequency intensity data or the data less than the average value is used as frequency intensity data. This application is not limited to this.

[0033] In this embodiment, the TimesNet model uses fast Fourier transform to perform frequency domain analysis on historical driving data, historical environmental data, historical load data, and historical operation data to obtain frequency domain data. The frequency domain data includes multiple frequencies. Then, based on the frequency domain data, the amplitude of each frequency is calculated, and the amplitude of each frequency is used as the frequency component data. The data in the frequency component data are sorted from large to small, and the first k data in the frequency component data after sorting in descending order are selected, and the k data are used as frequency intensity data. The data that matches the k data in the frequency domain data is used as the number of cycles. For example, if a certain data among the k data is f, and the total length of the cycle of the one-dimensional time series data is T, then the cycle length corresponding to f is T / f.

[0034] Step 103: extract features from the time series data in each cycle to obtain feature data.

[0035] In some embodiments, the characteristic data characterizes the changing rules of each data in the time series data between multiple cycles and the changing rules within each cycle.

[0036] Specifically, based on the number of cycles, the historical driving data, historical environmental data, historical load data, and historical operation data are processed by dimensionality upgrading to obtain two-dimensional first data, one dimension of which represents the change law of each data in the time series data between multiple cycles, and the other dimension represents the change law of each data in each cycle. Feature extraction is performed on the first data to obtain feature data.

[0037] In this embodiment, the TimesNet model includes the Inception model. The TimesNet model folds the historical driving data, historical environmental data, historical load data, and historical operation data based on the number of cycles. The processing process can be expressed as: in, is one-dimensional data, is the number of cycles, is the frequency intensity data, For two-dimensional data, To increase the dimension of data. ) is to add 0 at the end of the one-dimensional data so that the length of the one-dimensional data after adding 0 can be Divisible.

[0038] After this operation, the one-dimensional time series data can be converted into the two-dimensional first data. And the two-dimensional first data corresponds to the two-dimensional time series changes dominated by the number of cycles. That is, each column and each row in the first data corresponds to adjacent moments and adjacent cycles, respectively, and adjacent moments and cycles often contain similar time series changes. Therefore, the two-dimensional first data will show two-dimensional locality, so that relevant information can be captured more easily through two-dimensional convolution. Finally, the Inception model uses a two-dimensional convolution layer to process the first data to obtain feature data.

[0039] Step 104: Obtain first energy consumption data of the vehicle based on the characteristic data.

[0040] In some embodiments, the first energy consumption data is the predicted energy consumption per 100 kilometers of the vehicle during historical driving. When the vehicle is a fuel vehicle, the first energy consumption data is the predicted fuel consumption per 100 kilometers of the vehicle during historical driving. When the vehicle is an electric-powered new energy vehicle, the first energy consumption data is the predicted electricity consumption per 100 kilometers of the vehicle during historical driving.

[0041] Specifically, based on the feature data, the process of obtaining the first energy consumption data of the vehicle includes: performing data dimensionality reduction processing on the feature data to obtain second data, the dimension of the second data is the same as the dimension of the time series data. Based on the frequency component data, the second data is weighted and fused to obtain weighted data. The weighted data is fully connected to obtain the first energy consumption data.

[0042] In this embodiment, for the extracted two-dimensional feature data, the feature data is subjected to data dimensionality reduction processing to obtain one-dimensional second data. The one-dimensional second data can facilitate information aggregation, thereby reducing the data processing process and improving calculation efficiency. The frequency component data and the second data are then weighted and fused to obtain weighted data.

[0043] The frequency component data is input into the softmax activation function so that each data in the frequency component data is within the range of (0, 1). Then, the processed frequency component data is weighted and fused with the second data to obtain weighted data. Finally, the weighted data is input into the fully connected layer to obtain the first energy consumption data.

[0044] Since there is a correlation between data at different time points, the TimesNet model is used to process the time series data to obtain the time series correlation between the data, so as to predict more accurate first energy consumption data.

[0045] It should be noted that when the vehicle is in the current driving process, the TimesNet model can process the current time series data and the historical time series data of the vehicle in the current driving process, and input the current time series data and the historical time series data into the TimesNet model to update the first energy consumption data.

[0046] Step 105: Acquire current driving data and current environment data of the vehicle during the current driving process.

[0047] The current driving data includes the vehicle's current driving speed, total mileage, and driver's driving behavior data. The current environment data includes the weather data and road data of the vehicle's current location.

[0048] Step 106: predict second energy consumption data of the vehicle based on the first energy consumption data, current driving data and current environment data.

[0049] In some embodiments, the current driving data includes at least a current position and a target position. The current position is the current position of the vehicle. The target position is the destination that the vehicle needs to reach. Based on the first energy consumption data, the current driving data and the current environmental data, the step of predicting the second energy consumption data of the vehicle includes: determining the target road data for the vehicle to travel from the current position to the target position. Processing the first energy consumption data, the current driving data, the current environmental data and the target road data, obtaining an association vector, wherein the association vector is used to characterize the data association between the first energy consumption data, the current driving data, the current environmental data and the target road data. Performing full connection processing on the association vector, predicting the second energy consumption data.

[0050] In this embodiment, one or more driving paths can be planned based on the current position and the target position. When multiple driving paths are planned, it is necessary to confirm the target driving path from the multiple driving paths, and use the road information of the target driving path as the target road data. Further, the Bert model is used to process the first energy consumption data, the current driving data, the current environment data and the target road data to obtain the association vector and perform full connection processing on the association vector to obtain the second energy consumption data. The specific processing steps of the Bert model are described in detail below, and will not be repeated here to avoid repetition.

[0051] As the mileage of vehicles continues to increase, the aging degree of various parts of the vehicle is also increasing. At the same time, the different loads of vehicles in historical periods also have different effects on the aging degree of various parts of the vehicle. Therefore, the TimesNet model is first used to process the time series data of the vehicle during historical driving to obtain the first energy consumption data during historical driving. The first energy consumption data reflects the energy consumption of the vehicle in the historical period. Then, based on the first energy consumption data, current driving data, current environmental data and target road data, accurate second energy consumption data can be predicted.

[0052] Compared with the related art, the embodiments of the present application have at least the following advantages: Since the historical driving speed, historical environmental data, historical load data, etc. of the vehicle in the historical driving process will affect the energy consumption prediction of the vehicle, therefore, the historical driving data, historical environmental data, historical load data and historical operation data are first processed to obtain the periodic variation law of these data and determine the number of cycles of the data. Then, based on the number of cycles, the characteristic data in the historical driving data, historical environmental data, historical load data and historical operation data in each cycle are extracted to reduce the processing amount of subsequent data and improve the processing efficiency of the data. Based on the characteristic data, the first energy consumption data of the vehicle in the historical driving process can be obtained. Finally, the first energy consumption data, historical driving data and historical environmental data are used to predict the second energy consumption data of the vehicle in the current driving process, which solves the problem of inaccurate energy consumption prediction in the prior art that only the driving data and / or environmental data of the vehicle in the current driving process are considered to affect the energy consumption of the vehicle, but the relevant data of the vehicle in the historical driving process are not considered to affect the energy consumption of the vehicle.

[0053] Please refer to Figure 2 , is a sub-step flow chart of the vehicle energy consumption prediction method provided in the embodiment of the present application. The specific contents of the vehicle energy consumption prediction method are as follows: Step 201: Determine target road data for a vehicle to travel from a current position to a target position.

[0054] For this step, please refer to the relevant content in step 105, which will not be repeated here.

[0055] Step 202: Convert the first energy consumption data, the current driving data, the current environment data and the target road data into a number of initial vectors.

[0056] In some embodiments, before converting the first energy consumption data, the current driving data, the current environment data and the target road data into a plurality of initial vectors, it is also necessary to perform data preprocessing operations on the first energy consumption data, the current driving data, the current environment data and the target road data, and convert the first energy consumption data, the current driving data, the current environment data and the target road data after data preprocessing to obtain a plurality of initial vectors. Similarly, before step 102, data preprocessing can also be performed on the time series data, and the number of cycles can be determined based on the time series data after data preprocessing.

[0057] Among them, data preprocessing includes at least data cleaning, data normalization, data conversion and data mapping. Data cleaning refers to the removal of useless or redundant data. Data normalization refers to mapping the data within a preset range, which can be set according to actual processing requirements. Data mapping refers to converting continuous data into discrete values ​​based on bucketing rules.

[0058] Assume that the current driving data includes: road data (planned route (section 1, section 2, section 3), road condition data (section 1 (unblocked), section 2 (congested), section 3 (under construction)), road attribute data (section 1 (highway), section 2 (urban road), section 3 (rural road))). Estimated travel speed (section 1 (100 km / h), section 2 (30 km / h), section 3 (50 km / h)). Current environmental data includes: (weather (sunny), temperature (25°C)).

[0059] The current driving data is converted into numerical format to obtain the following data: road data (planned route: 1, 2, 3); road condition data: 1 (smooth), 2 (congested), 3 (construction); road attribute data: 1 (highway), 2 (urban road), 3 (rural road); estimated travel speed: (100, 30, 50).

[0060] The current environmental data is converted into a numerical format, and the resulting data is: current environmental data (weather (1: sunny), temperature (25)).

[0061] For the continuous values ​​in the first energy consumption data, current driving data, current environment data and target road data, a continuous value bucketing operation is performed to convert the continuous values ​​into discrete values. For example, temperature, instantaneous speed, remaining power, tire pressure, vehicle weight and interior temperature are all continuous values. These continuous values ​​can be divided into several intervals, each of which corresponds to a discrete value.

[0062] For example, for some continuous values, the bucketing rule is: temperature: 0-10°C is mapped to 1, 11-20°C is mapped to 2, 21-30°C is mapped to 3, 31-40°C is mapped to 4; instantaneous speed: 0-20 km / h is mapped to 1, 21-40 km / h is mapped to 2, 41-60 km / h is mapped to 3, 61-80 km / h is mapped to 4, 81-100 km / h is mapped to 5; if the data also includes the following partial continuous values, the bucketing rule is: remaining power: 0-20% is mapped to 1, 21-40% is mapped to 2, 41-60% is mapped to 3, 61-80% is mapped to 4, 81-100% is mapped to 5; tire pressure: 0-1.5 bar is mapped to 1, 1.6-2.0 bar is mapped to 2, 2.1-2.5bar is mapped to 3, 2.6-3.0 bar is mapped to 4; vehicle weight: 0-1000 kg is mapped to 1, 1001-2000 kg is mapped to 2, 2001-3000 kg is mapped to 3; vehicle interior temperature: 0-10°C is mapped to 1, 11-20°C is mapped to 2, 21-30°C is mapped to 3, and 31-40°C is mapped to 4. For other continuous values, set the corresponding bucketing rules according to the above actual design situation.

[0063] According to the above bucketing rule, the continuous values ​​are converted into discrete values, and the following are obtained: temperature: 25°C is converted to 3; instantaneous speed: 60 km / h is converted to 3; remaining power: 80% is converted to 4; tire pressure: 2.5 bar is converted to 3; vehicle weight: 1500kg is converted to 2; and interior temperature: 22°C is converted to 3.

[0064] In this embodiment, the Bert model is used to process the first energy consumption data, current driving data, current environment data and target road data after data preprocessing, and the first energy consumption data, current driving data, current environment data and target road data after data preprocessing are converted into a number of initial vectors. Among them, the Bert model includes a word embedding layer, a text embedding layer and a position embedding layer. The word embedding layer is to segment a sequence and convert the sequence into a string of words and their corresponding word vectors. That is, the word embedding layer is used to convert each data into a vector of fixed dimension; the text embedding layer will tell which sentence each word belongs to; the position embedding layer indicates the position of the word in the sentence.

[0065] The step of converting the first energy consumption data, the current driving data, the current environment data and the target road data into a number of initial vectors includes: based on a preset vector library, using a word embedding layer to convert the first energy consumption data, the current driving data, the current environment data and the target road data into a number of word vectors. Using a text embedding layer to convert the first energy consumption data, the current driving data, the current environment data and the target road data into a number of text vectors. Using a position embedding layer to convert the first energy consumption data, the current driving data, the current environment data and the target road data into a number of position vectors. The vectors obtained by adding a number of word vectors, a number of text vectors and a number of position vectors are used as a number of initial vectors.

[0066] Step 203: Calculate the attention weights between several initial vectors.

[0067] In some embodiments, the key part of the Bert model is the Transform encoder based on the self-attention mechanism. It mainly adjusts the weight coefficient matrix by the degree of association between words in the sentence to obtain the representation vector of the word.

[0068] The Transform encoder based on the self-attention mechanism can be expressed as: V Among them, Q, K, V are word vector matrices, Q is the query matrix, K is the key matrix, which are obtained by different linear transformations of the input vector. is the vector dimension. Through the Transform encoder of the self-attention mechanism, the attention weights between several initial vectors can be calculated.

[0069] Step 204: Obtain a correlation vector based on the attention weights and a number of initial vectors.

[0070] In some embodiments, the Bert model also includes a masked language model and a next sentence prediction model. The masked language model is used to perform mask operations on several initial vectors to obtain initial masked vectors. The initial masked vectors are trained based on the attention weight to obtain a masked prediction vector. The next sentence prediction model is used to perform next sentence prediction processing on several initial vectors to obtain an initial prediction vector. The initial prediction vector is trained based on the attention weight to obtain a next sentence prediction vector. The masked prediction vector and the next sentence prediction vector are used as association vectors.

[0071] In this embodiment, the Bert model pre-trains the content output by the word embedding layer, the text embedding layer, and the position embedding layer to learn the association between the data. The pre-training tasks include a masked language model task (implemented by a masked language model) and a next sentence prediction task (implemented by a next sentence prediction model). When performing a masked language model task, the BerT model masks the words with a preset masking ratio (also called Masked Token). The task reads sentences from both directions and trains the network to predict the words to be Tokenized; that is, the task takes a more straightforward approach, randomly covers part of the words of the input Token, and then lets the encoder predict the original word of the covered Token. Among them, 80% of the probability is to use the MaskedToken tag to replace; 10% of the probability is to use a randomly sampled word to replace; 10% of the probability is not to replace. Then perform the next sentence prediction task, take the two sentences as a training data, the task will input the above data into the feedforward network and the softmax network, and predict whether the two sentences are adjacent sentences; that is, a binary model is pre-trained to learn the relationship between sentences.

[0072] The BerT model is jointly trained through the masked language model task and the next sentence prediction task, so that the vector representation of each word / term output by the model can characterize the overall information of the input text as comprehensively and accurately as possible, providing better initial values ​​of model parameters for subsequent steps. In other embodiments, the preset masking ratio can be 20% or 10%, which can be set according to the actual pre-training requirements, and the application does not limit the specific data of the preset masking ratio.

[0073] By obtaining the mask prediction vector through the masked language model task and the next sentence prediction vector through the next sentence prediction task, the Bert model can accurately learn the correlation and interactivity between data. In other embodiments, the Bert model can also be replaced with a DeBERTa model.

[0074] Step 205: Perform full connection processing on the correlation vector to obtain second energy consumption data.

[0075] In this embodiment, the mask prediction vector and the next sentence prediction vector are input into the fully connected layer to perform association analysis on the mask prediction vector and the next sentence prediction vector to obtain the second energy consumption data.

[0076] For example, from the current location to the target location, the predicted second energy consumption data is 23 kWh, and the confidence level is 0.95. Since the confidence level is close to 1, it indicates that the prediction is very accurate.

[0077] It should be noted that if the confidence level is not too close to 1, it proves that the second energy consumption data at this time is not very accurate. In order to improve the accuracy of the prediction, the Bert model can be fine-tuned and optimized. Specifically, the Bert model includes a fine-tuning model. Obtain the first energy consumption data, historical driving data, historical environmental data and historical target road data. The first energy consumption data, historical driving data, historical environmental data and historical target road data are input into the Bert model for training to obtain an associated historical vector. Among them, the associated historical vector is used to characterize the data association between the historical first energy consumption data, historical driving data, historical environmental data and historical target road data. The associated historical vector is fully connected to obtain the first energy consumption data. The first energy consumption data and the energy consumption data are input into the fine-tuning model to update the model parameters of the Bert model until the algorithm model training is completed. Among them, the first energy consumption data, historical driving data, historical environmental data and historical target road data are input into the Bert model for training, and the specific steps of obtaining the associated historical vector can refer to the relevant contents in steps 202 to 204.

[0078] In other embodiments, the first energy consumption data, current driving data, current environment data and target road data can also be divided into a training set and a test set according to a preset ratio. In this embodiment, the preset ratio is 8:2, and in other embodiments, the preset ratio can also be 7:3 or 6:4. This application does not limit the specific value of the preset ratio. The data of the training set is input into the Bert model for model training to optimize the parameters of the Bert model. Then, the data of the test set is input into the Bert model to verify whether the energy consumption data is accurate.

[0079] Compared with the related art, this embodiment has at least the following advantages: the first energy consumption data, current driving data, current environment data and target road data are input into the Bert model, so that the Bert model can predict accurate energy consumption data. This solves the problem of inaccurate energy consumption prediction in the prior art, which only considers the impact of the environment, road, and driver's driving behavior on energy consumption, but does not consider the impact of vehicle load and vehicle weight in historical periods on energy consumption.

[0080] Please refer to Figure 3 , is a schematic diagram of the hardware structure of the electronic device 1000 provided in the embodiment of the present application. Figure 3 As shown, the electronic device 1000 may include a processor 1001 and a memory 1002. The memory 1002 is used to store one or more computer programs 1003. The one or more computer programs 1003 are configured to be executed by the processor 1001. The one or more computer programs 1003 include instructions, and the above instructions can be used to implement the above method in the electronic device 1000.

[0081] It is understandable that the structure shown in this embodiment does not constitute a specific limitation on the electronic device 1000. In other embodiments, the electronic device 1000 may include more or fewer components than shown, or combine or separate some components, or arrange the components differently.

[0082] The processor 1001 may include one or more processing units, for example, the processor 1001 may include an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0083] The processor 1001 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 1001 is a cache memory. The memory may store instructions or data that the processor 1001 has just used or circulated. If the processor 1001 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 1001, and thus improves the efficiency of the system.

[0084] In some embodiments, the processor 1001 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a USB interface, etc.

[0085] In some embodiments, processor 1001 is used to execute acceleration schemes such as single instruction multiple data (SIMD) and very long instruction word (VLIW).

[0086] In some embodiments, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0087] This embodiment also provides a computer-readable storage medium, in which computer instructions are stored. When the instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the vehicle energy consumption prediction method in the above-mentioned embodiment.

[0088] Among them, the electronic device and computer-readable storage medium provided in this embodiment are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0089] In practical applications, the above functions can be distributed to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0090] In several embodiments provided in the present application, the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are schematic. For example, the division of the modules or units is a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0091] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0092] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0093] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the above embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A vehicle energy consumption prediction method, characterized in that: The method comprises: Acquire time series data of the vehicle during its historical driving process, wherein the time series data is used to represent data collected in chronological order reflecting the driving conditions, the environment in which the vehicle is located, and the load conditions of the vehicle; Based on the time series data, determine the number of cycles, the number of cycles being greater than 1, and the number of cycles representing the number of cycles in which the time series data presents a periodic regularity; Extracting features from the time series data in each of the cycles to obtain feature data, wherein the feature data characterizes the variation rules of each data in the time series data between multiple cycles and the variation rules in each of the cycles; Based on the characteristic data, obtaining first energy consumption data of the vehicle; Acquiring current driving data and current environment data of the vehicle during the current driving process; Based on the first energy consumption data, the current driving data and the current environment data, second energy consumption data of the vehicle is predicted.

2. The vehicle energy consumption prediction method according to claim 1, characterized in that: Determining the number of cycles based on the time series data includes: Performing frequency domain analysis on the time series data using Fourier transform to obtain frequency domain data, wherein the frequency domain data represents characteristic distribution of the time series data in the frequency domain; Converting the frequency domain data into frequency component data, wherein the frequency component data represents the intensity of each frequency component in the frequency domain data; Based on the frequency component data, the number of cycles is determined.

3. The vehicle energy consumption prediction method according to claim 2, characterized in that: The determining the number of cycles based on the frequency component data comprises: Selecting first k data of the frequency component data sorted in descending order as frequency intensity data, where k is an integer greater than 1; The data in the frequency domain data that matches the frequency intensity data is used as the number of cycles.

4. The vehicle energy consumption prediction method according to claim 1, characterized in that: The extracting features of the time series data in each cycle to obtain feature data includes: Based on the number of cycles, the time series data is subjected to data dimensionality upgrading processing to obtain two-dimensional first data, wherein one dimension of the first data represents a change rule of each data in the time series data between multiple cycles, and another dimension represents a change rule of each data in each cycle; Feature extraction is performed on the first data to obtain the feature data.

5. The vehicle energy consumption prediction method according to claim 2, characterized in that: The obtaining, based on the characteristic data, first energy consumption data of the vehicle comprises: Performing data dimensionality reduction processing on the feature data to obtain second data, where the dimension of the second data is the same as the dimension of the time series data; Based on the frequency component data, performing weighted fusion on the second data to obtain weighted data; Fully connect the weighted data to predict the first energy consumption data.

6. The vehicle energy consumption prediction method according to claim 1, characterized in that: The current driving data at least includes a current position and a target position; the predicting the second energy consumption data of the vehicle based on the first energy consumption data, the current driving data and the current environment data includes: Determine target road data for the vehicle to travel from the current position to the target position; Processing the first energy consumption data, the current driving data, the current environment data, and the target road data to obtain a correlation vector, wherein the correlation vector is used to characterize the data correlation between the first energy consumption data, the current driving data, the current environment data, and the target road data; Fully connect the association vector to predict the second energy consumption data.

7. The vehicle energy consumption prediction method according to claim 6, characterized in that: The processing of the first energy consumption data, the current driving data, the current environment data and the target road data to obtain a correlation vector includes: Converting the first energy consumption data, the current driving data, the current environment data and the target road data into a plurality of initial vectors; Calculating attention weights between the initial vectors; The association vector is obtained based on the attention weight and the plurality of initial vectors.

8. The vehicle energy consumption prediction method according to claim 7, characterized in that: The obtaining the association vector based on the attention weight and the plurality of initial vectors comprises: Performing a mask operation on a number of the initial vectors to obtain an initial mask vector; Training the initial mask vector based on the attention weight to obtain a mask prediction vector; Perform next sentence prediction processing on the initial vectors to obtain initial prediction vectors; Training the initial prediction vector based on the attention weight to obtain a next sentence prediction vector; An association analysis is performed on the mask prediction vector and the next sentence prediction vector to obtain the association vector.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, the memory is used to store instructions, and the processor is used to call the instructions in the memory, so that the electronic device executes the vehicle energy consumption prediction method according to any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the vehicle energy consumption prediction method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Method and device for predicting endurance mileage of vehicle

    CN122336873A