Energy consumption prediction method and device, electronic equipment, storage medium and program product

By using a large language model to combine vehicle operation data and text indicators, the vehicle's cruising range during long-distance travel is predicted, and the problem of inaccurate range prediction in the existing technology is solved, achieving higher prediction accuracy and simplicity of data acquisition.

CN119975388APending Publication Date: 2025-05-13ZEBRED NETWORK TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411960030.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the range of a car during long-distance travel, especially when the density and radiation of charging stations or gas stations are insufficient.

Method used

By obtaining vehicle operation data of the vehicle during the trip and text indicators indicating energy consumption, a large language model is used to predict the energy consumption of the vehicle during the remaining trip. This method includes data preprocessing, vector mapping, attention mechanism building association relationships, and inputting large language models for prediction.

Benefits of technology

It improves the accuracy of the vehicle's energy consumption prediction during the remaining trip, simplifies the data acquisition process, and does not need to obtain data from the vehicle's stationary or charging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119975388A_ABST
    Figure CN119975388A_ABST
Patent Text Reader

Abstract

The invention provides an energy consumption prediction method and apparatus, an electronic device, a storage medium and a program product. The method comprises the steps of obtaining vehicle operation data associated with energy consumption in a travel of a vehicle; wherein the vehicle operation data is time sequence data of the vehicle in a driving journey; obtaining a text indication word for indicating the energy consumption of the vehicle in the driving journey; and on the basis of the vehicle operation data and the text indication word, utilizing a large language model to predict the energy consumption of the vehicle in the remaining journey. Through the method, the accuracy of energy consumption prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of energy consumption prediction, and in particular to an energy consumption prediction method, device, electronic device, storage medium and program product. Background Art

[0002] Cars are mostly used in their permanent cities, and they are more likely to have "range anxiety" when they need to travel long distances away from their permanent cities. Because the density and radiation of current charging stations or gas stations may not meet the demand, it is very necessary to predict the range, which requires predicting the range by predicting energy consumption. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an energy consumption prediction method, device, electronic device, storage medium and program product.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an energy consumption prediction method, the method comprising:

[0005] Acquire vehicle operation data associated with energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip;

[0006] Obtaining a text indicator indicating energy consumption of the vehicle during a traveled trip;

[0007] Based on the vehicle operation data and the text indicator, a large language model is used to predict the energy consumption of the vehicle in the remaining journey.

[0008] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using a large language model based on the vehicle operation data and the text indicator includes:

[0009] Dividing the vehicle operation data into data of a plurality of time segments;

[0010] The data of the multiple time segments are preprocessed, and based on the preprocessed data and the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

[0011] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using the large language model based on the preprocessed data and the text indicator includes:

[0012] Dividing the preprocessed data into blocks to obtain multiple data blocks;

[0013] Perform vector mapping on each data block to obtain the first eigenvector of each data block;

[0014] Performing vector mapping based on the text indicator to obtain a second feature vector of the text indicator;

[0015] Based on the first feature vector of each data block and the second feature vector of the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

[0016] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using the large language model based on the first feature vector of each data block and the second feature vector of the text indicator word includes:

[0017] Based on the first feature vector of each data block, the association relationship between the data blocks is constructed using the attention mechanism to obtain the processed third feature vector;

[0018] The third feature vector and the second feature vector are input into the large language model, and the energy consumption of the vehicle in the remaining journey is predicted based on the large language model.

[0019] In some embodiments, inputting the third feature vector and the second feature vector into the large language model, and predicting the energy consumption of the vehicle in the remaining journey based on the large language model, comprises:

[0020] Using the large language model to construct an association relationship between the third feature vector and the second feature vector based on an attention mechanism to obtain a processed fourth feature vector;

[0021] The large language model is used to predict energy consumption of the vehicle in the remaining journey based on the fourth eigenvector.

[0022] In some embodiments, the preprocessing of the data of the multiple time segments includes:

[0023] The data of the multiple time segments are cleaned, and the cleaned data are normalized.

[0024] In some embodiments, the vehicle operation data includes: vehicle energy consumption data, and the vehicle energy consumption data includes at least one of the following: travel energy consumption, driving energy consumption, air conditioning energy consumption, and electrical appliance energy consumption.

[0025] In some embodiments, the vehicle operation data also includes: operation status data that affects vehicle energy consumption, and the operation status data includes at least one of the following: battery operation status data, operation status data of each function supported by the vehicle, data associated with the vehicle's driving status, weather status data, and road condition status data.

[0026] According to a second aspect of an embodiment of the present disclosure, there is provided an energy consumption prediction device, the device comprising:

[0027] A first acquisition module is configured to acquire vehicle operation data associated with energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip;

[0028] A second acquisition module is configured to acquire a text indicator indicating the energy consumption of the vehicle during the traveled journey;

[0029] The prediction module is configured to predict the energy consumption of the vehicle in the remaining journey by using a large language model based on the vehicle operation data and the text indicator.

[0030] In some embodiments, the prediction module is further configured to divide the vehicle operation data into data of multiple time segments; preprocess the data of the multiple time segments, and based on the preprocessed data and the text indicators, use the large language model to predict the energy consumption of the vehicle in the remaining journey.

[0031] In some embodiments, the prediction module is further configured to divide the preprocessed data into blocks to obtain multiple data blocks; perform vector mapping on each data block to obtain a first feature vector of each data block; perform vector mapping based on the text indicator to obtain a second feature vector of the text indicator; and use the large language model to predict the energy consumption of the vehicle in the remaining journey based on the first feature vector of each data block and the second feature vector of the text indicator.

[0032] In some embodiments, the prediction module is further configured to build a correlation relationship between the data blocks based on a first feature vector of each data block using an attention mechanism to obtain a processed third feature vector; the third feature vector and the second feature vector are input into the large language model, and the energy consumption of the vehicle in the remaining journey is predicted based on the large language model.

[0033] In some embodiments, the prediction module is further configured to use the large language model to construct an association relationship between the third feature vector and the second feature vector based on an attention mechanism to obtain a processed fourth feature vector; and use the large language model to predict the energy consumption of the vehicle in the remaining journey based on the fourth feature vector.

[0034] In some embodiments, the prediction module is further configured to perform data cleaning on the data of the multiple time segments and normalize the cleaned data.

[0035] In some embodiments, the vehicle operation data includes: vehicle energy consumption data, and the vehicle energy consumption data includes at least one of the following: travel energy consumption, driving energy consumption, air conditioning energy consumption, and electrical appliance energy consumption.

[0036] In some embodiments, the vehicle operation data also includes: operation status data that affects vehicle energy consumption, and the operation status data includes at least one of the following: battery operation status data, operation status data of each function supported by the vehicle, data associated with the vehicle's driving status, weather status data, and road condition status data.

[0037] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0038] processor;

[0039] Memory for storing computer programs or instructions;

[0040] The processor executes the computer program or instructions to implement the steps of the energy consumption prediction method described in the first aspect above.

[0041] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided, wherein the storage medium stores a computer program or instructions. When the computer program or instructions in the storage medium are executed by a processor, the steps of the energy consumption prediction method described in the first aspect above are implemented.

[0042] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implements the steps of the energy consumption prediction method described in the first aspect above.

[0043] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0044] In the disclosed embodiment, a large language model is used in combination with text indicators to process the vehicle operation data related to the vehicle energy consumption in the traveled journey and in a time series to perform energy consumption prediction, and the large language model's reasoning ability for time series data is fully utilized to improve the accuracy of the vehicle's energy consumption prediction in the remaining journey. In addition, in the disclosed embodiment, there is no need to obtain data on the vehicle's stationary or charging stages, which is relatively simpler.

[0045] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0047] Figure 1 It is a flowchart of an energy consumption prediction method provided by an embodiment of the present disclosure;

[0048] Figure 2 The present invention shows a trend diagram of the change of the sowing speed and the energy consumption at different times in the embodiment of the present invention;

[0049] Figure 3 This is an example timing diagram of energy consumption prediction in an embodiment of the present disclosure.

[0050] Figure 4 Schematic diagram of energy consumption prediction based on a large language model in the embodiment of the present disclosure

[0051] Figure 5 This is a method based on the embodiment of the present disclosure. Figure 4 An example diagram of the process of energy consumption prediction using a large language model framework.

[0052] Figure 6 It is a block diagram of an energy consumption prediction device provided in an embodiment of the present disclosure.

[0053] Figure 7 It is a structural block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.

[0055] Taking new energy vehicles as an example, during the driving process of new energy vehicles, the main energy consumption includes driving energy consumption, air conditioning energy consumption, electrical energy consumption and kinetic energy recovery energy. Driving energy consumption is the most important energy consumption part of the vehicle and is closely related to factors such as vehicle weight, air resistance, road conditions, and vehicle speed. In hot or cold environmental conditions, the air conditioner needs to be turned on, and energy consumption will also increase significantly, affecting the cruising range. Other electrical appliances such as lighting, heating, and entertainment will also consume a certain amount of energy. When braking, the kinetic energy recovery system converts part of the kinetic energy into electrical energy and stores it in the battery, which can reduce energy consumption. Therefore, the actual energy consumption of the vehicle is very complicated. The actual cruising range of the vehicle is affected by many factors. Especially when traveling long distances, the official cruising range of the vehicle is of little reference value. Predicting energy consumption based on actual driving conditions and calculating the cruising range are conducive to the vehicle's advance planning of charging and energy replenishment.

[0056] In the related art, there is a method for predicting vehicle energy consumption based on the XGBoost algorithm combined with data from the vehicle's stationary, driving, charging and other stages, but it requires collecting data from many aspects, which is relatively cumbersome. In this regard, an embodiment of the present disclosure provides an energy consumption prediction method.

[0057] Figure 1 is a flow chart of an energy consumption prediction method shown in an embodiment of the present disclosure, comprising Figure 1 It can be seen that the following steps are included:

[0058] S11, obtaining vehicle operation data related to energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip;

[0059] S12, obtaining a text indicator indicating the energy consumption of the vehicle during the traveled journey;

[0060] S13: Based on the vehicle operation data and the text indicator, use a large language model to predict the energy consumption of the vehicle in the remaining journey.

[0061] In the embodiments of the present disclosure, the energy consumption prediction method is applied to an electronic device, which may be the vehicle itself or other electronic devices that have established a communication connection with the vehicle, such as a vehicle server, etc., which are not limited in the embodiments of the present disclosure. The vehicle may be a new energy electric vehicle, a gasoline vehicle, or a gasoline-electric hybrid vehicle, etc.

[0062] In step S11, the electronic device obtains vehicle operation data related to energy consumption during the trip. In the disclosed embodiment, a trip may refer to a process in which the vehicle starts from a starting point, travels a series of times, and finally returns to the starting point or reaches a certain destination. During this process, the vehicle may experience different road conditions, travel speeds, travel times, etc.

[0063] The vehicle operation data may include energy consumption data that changes over time during a journey. For example, in some embodiments, the vehicle operation data includes: vehicle energy consumption data, and the vehicle energy consumption data includes at least one of the following: journey energy consumption, driving energy consumption, air conditioning energy consumption, and electrical appliance energy consumption.

[0064] In the disclosed embodiment, the electronic device can obtain the above energy consumption based on the electronic control unit (ECU) in the vehicle. The electronic control unit can, for example, receive data from various sensors, such as vehicle speed, engine speed, throttle opening, battery status, etc., and use built-in algorithms and models to calculate and monitor the energy consumption of the vehicle in real time. For example, the electronic control unit can determine the energy consumption of the trip based on the battery pack voltage, battery pack current, etc.; determine the energy consumption of the air conditioner based on the low-voltage power consumption of the air conditioner, the power consumption of the semiconductor heating ceramic of the air conditioner, and the power consumption of the air conditioner compressor, etc. In the disclosed embodiment, the method of calculating each energy consumption is not limited. The electronic device can predict the energy consumption in the remaining trip based on the energy consumption consumed in the trip.

[0065] In the disclosed embodiments, the vehicle operation data may also include data that may cause energy consumption fluctuations over time during the journey. In some embodiments, the vehicle operation data also includes: operating status data that affects the vehicle's energy consumption, and the operating status data includes at least one of the following: battery operating status data, operating status data of various functions supported by the vehicle, data related to the vehicle's driving status, weather status data, and road condition status data.

[0066] Among them, the battery operating status data includes but is not limited to: battery dimension data such as power, current, voltage, state of charge (SOC), state of health (SOH), tire pressure, etc.; the operating status data of various functions supported by the vehicle include but are not limited to: operating data of vehicle control dimensions such as windows, air conditioning, lights, wipers, heating, etc.; data related to the vehicle's driving status include but are not limited to: driving dimension data such as speed, tire pressure, and throttle; weather status data include but are not limited to: weather, temperature, wind direction, wind force level, humidity, etc.; road condition status data include but are not limited to: road condition dimension data such as urban roads, national highways, expressways, tunnels, and hillsides.

[0067] Take the speed in the data related to the vehicle's driving status as an example. Figure 2 The following is a graph showing the changing trend of the seeding speed and energy consumption at different times according to the embodiment of the present disclosure. Figure 2 As shown, L21 indicates the energy consumption data that changes with time, and L22 indicates the vehicle speed that changes with time. It can be seen from the figure that basically the greater the speed, the greater the energy consumption, and energy consumption is related to speed.

[0068] In the disclosed embodiment, energy consumption data such as trip energy consumption, driving energy consumption, air conditioning energy consumption, and electrical energy consumption are all key data of vehicle energy consumption, so based on the above energy consumption data, it is helpful to accurately predict subsequent energy consumption. In addition, since the above operating status data affecting vehicle energy consumption is related to the driving scene of the vehicle, the energy consumption in different driving scenes is different, so the electronic device combined with the above operating status data can help improve the accuracy of subsequent energy consumption prediction.

[0069] In step S12, the electronic device obtains text indicators indicating the energy consumption of the vehicle during the traveled journey, for example, the text indicators are one or more of: the current maximum energy consumption, the current average energy consumption, the energy consumption value changing over time, or the change in energy consumption over time.

[0070] In the disclosed embodiment, the vehicle operation data related to the energy consumption of the vehicle during the journey and the text indicators indicating the energy consumption during the journey are all historical data, and the electronic device predicts the energy consumption of the remaining journey in the future based on the historical data.

[0071] Figure 3 is a time sequence example diagram of an energy consumption prediction in an embodiment of the present disclosure, such as Figure 3 As shown, the electronic device predicts the energy consumption after time t during the journey based on the vehicle operation data before time t and the text indicator.

[0072] In step S13, the electronic device uses a large language model (LLM) to predict the energy consumption of the vehicle in the remaining journey. Exemplarily, the predicted energy consumption in the remaining journey may be an indication of how much energy will be consumed per kilometer in the future (e.g., how many kilowatt-hours of electricity), etc., and the value may be the average energy consumption per kilometer in the future. In addition, since the energy consumption prediction in the disclosed embodiment is based on the associated energy consumption and is a time series of vehicle operation data, the trend of future energy consumption changes over time can also be predicted based on the changes in energy consumption over time in the traveled journey. In the disclosed embodiment, the electronic device can predict the cruising range based on the predicted energy consumption in the remaining journey, combined with the available energy consumption of the vehicle.

[0073] It should be noted that in the embodiments of the present disclosure, the large language model is a pre-trained model. For example, the vehicle operation data of multiple vehicles or a single vehicle in the historical completed trips can be collected as sample data, and then the model can be trained in combination with text indicators. Exemplarily, when collecting vehicle operation data in historical completed trips, the vehicle operation data before the trip completion time (for example, time t) can be collected as training samples, and the energy consumption values ​​after time t (including average energy consumption, or energy consumption that changes with time after time t) can be collected as training labels to train the large language model using supervised training. Of course, the embodiments of the present disclosure are not limited to this supervised training method.

[0074] In the embodiments of the present disclosure, when the electronic device uses a large language model to predict energy consumption based on vehicle operation data and text indicators, in some embodiments, the electronic device may directly use the vehicle operation data and text indicators as inputs to the large language model to predict the energy consumption of the vehicle in the remaining journey; in other embodiments, the electronic device may also process the vehicle operation data, and use the processed data and text indicators together as inputs to the large language model to predict energy consumption; wherein the processing of the vehicle operation data includes but is not limited to data length division, data cleaning, normalization, etc.

[0075] In the disclosed embodiments, since the large language model can effectively capture complex patterns and long-term dependencies in text sequence data, it exhibits excellent performance in the text processing direction. Vehicle operation data such as energy consumption data are sequence data that change in real time over time, and operation status data are also sequence data that change in real time over time. Therefore, the large language model can be expanded to the field of time series tasks to process numerical sequence data that spans text modalities, thereby exerting the reasoning and prediction capabilities of the large language model in time series.

[0076] In addition, in the embodiment of the present disclosure, text indicators indicating the energy consumption of the vehicle in the traveled journey are added. By adding additional task instructions based on the time series-based vehicle operation data to enrich the input time series, it is helpful to enhance the reasoning ability of the large language model for time series data. Based on the above, the embodiment of the present disclosure can improve the accuracy of the prediction of the vehicle's energy consumption in the remaining journey; and in the embodiment of the present disclosure, there is no need to obtain data on the vehicle's stationary or charging stages, which is relatively simpler.

[0077] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using a large language model based on the vehicle operation data and the text indicator includes:

[0078] Dividing the vehicle operation data into data of a plurality of time segments;

[0079] The data of the multiple time segments are preprocessed, and based on the preprocessed data and the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

[0080] In the disclosed embodiment, the electronic device divides the vehicle operation data into data of multiple time segments, for example, every 10 seconds (s) is regarded as a time segment, and a time segment may include the vehicle energy consumption data within 10s, and may also include the operation status data affecting the vehicle energy consumption within 10s. Subsequently, the electronic device preprocesses the data of multiple time segments, including preprocessing of the data for each time segment, and also includes preprocessing of the data based on multiple time segments. Taking the preprocessing of the data of each time segment as an example, in some embodiments, the energy consumption data or operation status data at multiple moments in each time segment are processed to obtain a statistical value corresponding to the time segment, such as the aforementioned travel energy consumption, driving energy consumption, air conditioning energy consumption, electrical appliance energy consumption, etc., and the total energy consumption of a trip, the total driving energy consumption, the total air conditioning energy consumption or the total electrical appliance energy consumption within 10s can be calculated respectively; similarly, for the operation status data, a state statistical value corresponding to the time segment can also be obtained, such as the average value, the maximum value or the minimum value; in some embodiments, the energy consumption data or operation status data at multiple moments in each time segment can also be cleaned, and the abnormal data of the buried points can be cleaned to ensure the rationality of the data. Exemplarily, abnormal data include, but are not limited to: abnormal temperature values ​​inside and outside the vehicle (e.g., 70 degrees), abnormal tire pressure values ​​(e.g., greater than 5 bars), and excessive speed (over 270 kilometers per hour). In some embodiments, multiple data within each time segment can also be normalized.

[0081] Taking the preprocessing of data of multiple time segments as an example, considering that data omissions during the trip may affect the accuracy of data statistics, the disclosed embodiment can determine whether the data of the time segment is valid based on the number of divided time segments and the preset statistical duration. For example, there are 300 time segments. In theory, within the statistical duration of 100 seconds, there should be data of 10 time segments when each time segment is 10 seconds. However, if there are less than 10 time segments in the first 100 seconds, it means that there are data omissions. At this time, the data of all time segments within the 100 seconds can be discarded. This preprocessing process can also be called a data cleaning process.

[0082] In the disclosed embodiment, the electronic device divides the vehicle operation data into multiple time segments for preprocessing, which can improve the accuracy of the preprocessing and thus help improve the accuracy of energy consumption prediction.

[0083] In the embodiments of the present disclosure, the electronic device may perform one or more of the above preprocessing methods. In some embodiments, the preprocessing of the data of the multiple time segments includes:

[0084] The data of the multiple time segments are cleaned, and the cleaned data are normalized.

[0085] In the disclosed embodiment, data cleaning of data of multiple time segments may include data cleaning within a time segment as mentioned above, and may also include data cleaning based on multiple time segments. After the electronic device performs data cleaning on the data of multiple time segments, it may normalize the cleaned data. The normalization may be, for example, a normalization method based on the maximum-minimum value, or may be based on the RevIN (Reversible Instance Normalization) normalization method. RevIN is a reversible instance normalization method that can not only normalize the data, but also denormalize the normalized data to restore it to the original distribution. The RevIN method can dynamically adjust the normalization parameters of the data to cope with changes in data distribution, improve the feature representation of time series data, and help improve the accuracy of time series prediction.

[0086] It can be understood that in the embodiments of the present disclosure, the electronic device removes noise data and unifies the scale through data cleaning and normalization, which helps to improve the speed and accuracy of large language model prediction.

[0087] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using the large language model based on the preprocessed data and the text indicator includes:

[0088] Dividing the preprocessed data into blocks to obtain multiple data blocks;

[0089] Perform vector mapping on each data block to obtain the first eigenvector of each data block;

[0090] Performing vector mapping based on the text indicator to obtain a second feature vector of the text indicator;

[0091] Based on the first feature vector of each data block and the second feature vector of the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

[0092] In the disclosed embodiment, the electronic device further divides the preprocessed data into blocks. Since the vehicle operation data before preprocessing is time series data, the data after preprocessing divided into time segments also has time attributes. On this basis, the multiple data blocks divided by the disclosed embodiment can also form time series data blocks. In some embodiments, when the preprocessed data is divided into N blocks, the data of adjacent times can be divided into one block. The data length of each block can be the same (for example, the length is P) or different, and there can also be data with the same time or completely different time in adjacent data blocks. This is not limited by the disclosed embodiment. It can be understood that through the above division, the data in the data block is time series data, and there is also a time sequence attribute between the data blocks.

[0093] In the disclosed embodiment, the electronic device performs vector mapping on each data block, for example, using a one-dimensional convolution layer Conv1d to convert each data block into a vector form (embedding), or other embedder methods, such as principal component analysis method, are used to obtain the first feature vector corresponding to the data block so that the computer can recognize it. In addition, the electronic device also performs vector mapping on the text indicator, for example, segmenting and embedding the prompt word, etc., to obtain the second feature vector of the text indicator. It should be noted that when obtaining the second feature vector of the text indicator, more attention is paid to its semantic features.

[0094] In the embodiment of the present disclosure, after obtaining the first feature vector of each data block and the second feature vector of the text indicator word, the electronic device can directly use them as the input of the large language model to obtain the predicted energy consumption; in addition, the second feature vector and each first feature vector can be weightedly fused using preset weights to obtain multiple third feature vectors that are input into the large language model to predict energy consumption, and the embodiment of the present disclosure does not limit this.

[0095] It can be understood that in the embodiment of the present disclosure, the preprocessed data is divided into blocks, and each data block is vectorized to obtain the first feature vector of each data block, and the processing is more fine-grained. On this basis, the second feature vector of the text indicator is combined with the input into the large language model, which can improve the accuracy of energy consumption prediction.

[0096] In some embodiments, the predicting the energy consumption of the vehicle in the remaining journey using the large language model based on the first feature vector of each data block and the second feature vector of the text indicator word includes:

[0097] Based on the first feature vector of each data block, the association relationship between the data blocks is constructed using the attention mechanism to obtain the processed third feature vector;

[0098] The third feature vector and the second feature vector are input into the large language model, and the energy consumption of the vehicle in the remaining journey is predicted based on the large language model.

[0099] In the embodiment of the present disclosure, the electronic device uses an attention mechanism to construct the association relationship between the data blocks based on the first feature vector of each data block. The attention mechanism can be a multi-head attention mechanism (Multi-HeadAttention). The multi-head attention mechanism is an improvement on the traditional attention mechanism. It processes the input features (usually queries, keys, and values) through multiple independent, parallel-running attention modules (or "heads"), each of which independently calculates the attention score and generates an attention-weighted output. These outputs are then merged (usually by splicing or averaging) to form a final, more complex representation, such as the third feature vector of the embodiment of the present disclosure. The following formula (1) is a function of the multi-head attention mechanism:

[0100]

[0101] Among them, Q, K, V represent query, key, and value vectors respectively, and d is associated with the vector dimension.

[0102] In the disclosed embodiment, the attention weights between the first feature vectors of each input data block are calculated through the attention mechanism to obtain a processed third feature vector, and the third feature vector and the second feature vector of the text indicator are input into the large language model together, so that the subsequent large language model can learn the correlation and importance between different data blocks. For example, the change of vehicle energy consumption over time can be captured through the time series attributes of the data blocks. In this way, the accuracy of energy consumption prediction can be improved.

[0103] In some embodiments, inputting the third feature vector and the second feature vector into the large language model, and predicting the energy consumption of the vehicle in the remaining journey based on the large language model, comprises:

[0104] Using the large language model to construct an association relationship between the third feature vector and the second feature vector based on an attention mechanism to obtain a processed fourth feature vector;

[0105] The large language model is used to predict energy consumption of the vehicle in the remaining journey based on the fourth eigenvector.

[0106] In the embodiment of the present disclosure, the electronic device uses a large language model to construct the association relationship between the third feature vector and the second feature vector based on the attention mechanism, which essentially constructs the association relationship between the text prompt words and the vehicle operation data, wherein the attention mechanism can also adopt the aforementioned multi-head attention mechanism, which is not limited to the embodiment of the present disclosure.

[0107] It can be understood that in the embodiment of the present disclosure, since the text prompt words and the vehicle operation data are data of different dimensions, the attention mechanism can better capture the complex relationships and features in the data of different dimensions, thereby improving the accuracy of energy consumption prediction.

[0108] Figure 4 Schematic diagram of energy consumption prediction based on a large language model in an embodiment of the present disclosure, such as Figure 4 As shown, the input to the data processing module L41 is the time series vehicle operation data. During the data processing, the electronic device divides the vehicle operation data into multiple time segments, and then performs operations such as data cleaning and normalization on the multiple time segments. After the data processing module L41 completes the data processing, the data is divided into blocks by the block module L42 to obtain multiple data blocks. The multiple data blocks obtained here may have time series attributes, and then the multiple data blocks are feature encoded by the data block encoding module L43. Figure 4 In the part associated with the data block encoding module L43, the electronic device first performs vector mapping on the data blocks of the time series to obtain the first feature vector corresponding to each data block, and then builds the association relationship between the data blocks based on the first feature vector of each data block based on the multi-head attention mechanism, and performs linear processing of the feature vector output based on the multi-head attention mechanism through the linear layer to obtain the encoded feature vector, that is, the third feature vector of the embodiment of the present disclosure. In addition, Figure 4 The prompt word input into the prompt word encoding module L44 is the text indicator word of the embodiment of the present disclosure. When encoding the input prompt word, the prompt word encoding module L44 first segments the input text indicator word, for example, divides it into single words, and then performs vector mapping on each segmented word, so as to obtain the encoded feature vector corresponding to the text indicator word.

[0109] like Figure 4In the embodiment, after obtaining the second feature vector of the text indicator and the third feature vector associated with the vehicle operation data, the electronic device concatenates the feature vectors corresponding to the above two types of data and inputs them into the pre-trained large language model module L45. The large language model module L45 constructs the association relationship between the two types of data based on the multi-head attention mechanism for the input vector, that is, constructs the association relationship between the vehicle operation data and the text indicator. Subsequently, the electronic device adds the feature vector output based on the multi-head attention mechanism to the input vector based on the large language model (i.e., residual connection) and normalizes them. The normalized feature vector enters the feed forward layer for further processing and transformation, thereby extracting higher-level feature information to obtain the output vector, i.e., the fourth feature vector of the embodiment of the present disclosure. Finally, the electronic device uses the prediction module of the large language model module L45 for the output vector, i.e. Figure 4 The output projection module L46 performs prediction. When performing the prediction process, the module converts the output vector into one dimension through the linear transformation layer and performs a linear transformation, and then performs a denormalization based on RevIN, for example, to finally obtain the prediction result of the energy consumption.

[0110] Figure 5 This is a method based on the embodiment of the present disclosure. Figure 4 The example diagram of the process of energy consumption prediction using the large language model framework is as follows: Figure 5 As shown, the following steps are included:

[0111] S51. Obtain the vehicle-side operation dynamic data.

[0112] In the disclosed embodiment, the vehicle-side operation dynamic data here refers to the sample data used to train the large language model, which is the vehicle operation data in the aforementioned historical completed trips, and it also belongs to time series data.

[0113] S52: Process the running dynamic data.

[0114] In the embodiment of the present disclosure, the processing of the running dynamic data can be seen in Figure 4 Processing of modules such as data processing module L41, block module L42 and data block encoding module L43.

[0115] S53, inputting the processed data into a large language model for training.

[0116] In the disclosed embodiment, when the processed data is input into the large language model for training, the feature vector corresponding to the text prompt word can be added to the large language model, and then the model is trained using the aforementioned supervised training method.

[0117] S54, after passing through the output projection layer in the large language model framework, undergoes linear transformation and then denormalization, the final output result is obtained.

[0118] In the embodiment of the present disclosure, during the training process of the model, please refer to Figure 4 The output projection module L46 performs a linear transformation on the output vector and then performs a reverse normalization to obtain the output energy consumption prediction value. The energy consumption prediction value output by the model is compared with the aforementioned training label to adjust the parameters of the model until a trained large language model is obtained.

[0119] S55. After sufficient data training, the historical related energy consumption sequence data is input, and the model can give a predicted value for future energy consumption.

[0120] In the embodiment of the present disclosure, during the application stage of the model, for the current trip of the vehicle, based on the vehicle operation data in the trip that has been traveled (i.e., the sequence data of historical associated energy consumption) and text indicators, the trained large language model is input to predict the energy consumption of the vehicle in the remaining trip.

[0121] It is understandable that in the disclosed embodiment, the large language model is used in combination with text indicators to process the time series vehicle operation data related to vehicle energy consumption in the traveled journey to predict energy consumption, making full use of the large language model's reasoning ability for time series data, which can improve the accuracy of the vehicle's energy consumption prediction in the remaining journey. In addition, the training process and the application process do not need to obtain data on the vehicle's stationary or charging links, which is relatively simpler.

[0122] Figure 6 600 is a block diagram of an energy consumption prediction device provided by an embodiment of the present disclosure. Figure 6 As shown, the device mainly includes:

[0123] The first acquisition module 601 is configured to acquire vehicle operation data associated with energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip;

[0124] A second acquisition module 602 is configured to acquire a text indicator indicating the energy consumption of the vehicle during the traveled journey;

[0125] The prediction module 603 is configured to predict the energy consumption of the vehicle in the remaining journey by using a large language model based on the vehicle operation data and the text indicator.

[0126] In some embodiments, the prediction module is further configured to divide the vehicle operation data into data of multiple time segments; preprocess the data of the multiple time segments, and based on the preprocessed data and the text indicators, use the large language model to predict the energy consumption of the vehicle in the remaining journey.

[0127] In some embodiments, the prediction module 603 is further configured to divide the preprocessed data into blocks to obtain multiple data blocks; perform vector mapping on each data block to obtain a first feature vector of each data block; perform vector mapping based on the text indicator to obtain a second feature vector of the text indicator; and use the large language model to predict the energy consumption of the vehicle in the remaining journey based on the first feature vector of each data block and the second feature vector of the text indicator.

[0128] In some embodiments, the prediction module 603 is further configured to build a correlation relationship between the data blocks based on the first feature vector of each data block using an attention mechanism to obtain a processed third feature vector; the third feature vector and the second feature vector are input into the large language model, and the energy consumption of the vehicle in the remaining journey is predicted based on the large language model.

[0129] In some embodiments, the prediction module 603 is further configured to use the large language model to construct an association relationship between the third feature vector and the second feature vector based on an attention mechanism to obtain a processed fourth feature vector; and use the large language model to predict the energy consumption of the vehicle in the remaining journey based on the fourth feature vector.

[0130] In some embodiments, the prediction module 603 is further configured to perform data cleaning on the data of the multiple time segments and normalize the cleaned data.

[0131] In some embodiments, the vehicle operation data includes: vehicle energy consumption data, and the vehicle energy consumption data includes at least one of the following: travel energy consumption, driving energy consumption, air conditioning energy consumption, and electrical appliance energy consumption.

[0132] In some embodiments, the vehicle operation data also includes: operation status data that affects vehicle energy consumption, and the operation status data includes at least one of the following: battery operation status data, operation status data of each function supported by the vehicle, data associated with the vehicle's driving status, weather status data, and road condition status data.

[0133] Figure 7700 is a structural block diagram of an electronic device 700 provided in an embodiment of the present disclosure. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a tablet device, a personal digital assistant, an electronic device in a vehicle, such as an in-vehicle communication system, a vehicle information management system, a vehicle driving assistance system, and the like.

[0134] Reference Figure 7 , the electronic device 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0135] The processing component 702 generally controls the overall operation of the electronic device 700, such as operations associated with at least one of display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0136] The memory 704 is configured to store various types of data to support operations on the electronic device 700. Examples of such data include at least one of the following: instructions for any application or method operating on the electronic device 700, contact data, phone book data, messages, pictures, and videos. The memory 704 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.

[0137] The power supply component 706 provides power to various components of the electronic device 700. The power supply component 706 may include at least one of the following: a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 700.

[0138] The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0139] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the electronic device 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0140] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0141] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 can detect the open / closed state of the electronic device 700, the relative positioning of the components, such as the display and keypad of the electronic device 700, and the sensor assembly 714 can also detect the position change of the electronic device 700 or a component in the electronic device 700, the presence or absence of contact between the user and the electronic device 700, the orientation or acceleration / deceleration of the electronic device 700, and the temperature change of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or a charge coupled device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include, but is not limited to, at least one of the following: an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, and a temperature sensor.

[0142] The communication component 716 is configured to facilitate communication between the electronic device 700 and other devices in a wired or wireless manner. The electronic device 700 can access a wireless network based on a communication standard, such as Wi-Fi, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (Ultra Wide Band, UWB) technology, Bluetooth (BT) technology and other technologies.

[0143] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components.

[0144] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including executable instructions or a computer program, which can be executed by a processor 720 of an electronic device 700 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0145] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute any one of the above-mentioned energy consumption prediction methods of the embodiments of the present disclosure.

[0146] The embodiment of the present disclosure provides a computer program product, which includes: a computer program or executable instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer program or executable instructions from the computer-readable storage medium, and the processor executes the computer program or executable instructions, so that the computer device executes any one of the energy consumption prediction methods described above in the embodiment of the present disclosure.

[0147] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0148] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for predicting energy consumption, characterized in that: The method comprises: Acquire vehicle operation data associated with energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip; Obtaining a text indicator indicating energy consumption of the vehicle during a traveled trip; Based on the vehicle operation data and the text indicator, a large language model is used to predict the energy consumption of the vehicle in the remaining range.

2. The method according to claim 1, characterized in that The method of predicting the energy consumption of the vehicle in the remaining journey by using a large language model based on the vehicle operation data and the text indicator includes: Dividing the vehicle operation data into data of a plurality of time segments; The data of the multiple time segments are preprocessed, and based on the preprocessed data and the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

3. The method according to claim 2, characterized in that The method of predicting the energy consumption of the vehicle in the remaining journey by using the large language model based on the preprocessed data and the text indicator includes: Dividing the preprocessed data into blocks to obtain multiple data blocks; Perform vector mapping on each data block to obtain the first eigenvector of each data block; Performing vector mapping based on the text indicator to obtain a second feature vector of the text indicator; Based on the first feature vector of each data block and the second feature vector of the text indicator, the energy consumption of the vehicle in the remaining journey is predicted using the large language model.

4. The method according to claim 3, characterized in that The method of predicting the energy consumption of the vehicle in the remaining journey by using the large language model based on the first feature vector of each data block and the second feature vector of the text indicator word comprises: Based on the first feature vector of each data block, the association relationship between the data blocks is constructed using the attention mechanism to obtain the processed third feature vector; The third feature vector and the second feature vector are input into the large language model, and the energy consumption of the vehicle in the remaining journey is predicted based on the large language model.

5. The method according to claim 4, characterized in that The step of inputting the third feature vector and the second feature vector into the large language model and predicting the energy consumption of the vehicle in the remaining journey based on the large language model includes: Using the large language model to construct an association relationship between the third feature vector and the second feature vector based on an attention mechanism to obtain a processed fourth feature vector; The large language model is used to predict energy consumption of the vehicle in the remaining journey based on the fourth eigenvector.

6. The method according to claim 2, characterized in that The preprocessing of the data of the multiple time segments includes: The data of the multiple time segments are cleaned, and the cleaned data are normalized.

7. The method according to any one of claims 1 to 6, characterized in that The vehicle operation data includes: vehicle energy consumption data, and the vehicle energy consumption data includes at least one of the following: travel energy consumption, driving energy consumption, air conditioning energy consumption, and electrical appliance energy consumption.

8. The method according to claim 7, characterized in that The vehicle operation data also includes: operation status data that affects vehicle energy consumption, and the operation status data includes at least one of the following: battery operation status data, operation status data of various functions supported by the vehicle, data associated with the vehicle's driving status, weather status data, and road condition status data.

9. An energy consumption prediction device, characterized in that: The device comprises: A first acquisition module is configured to acquire vehicle operation data associated with energy consumption of the vehicle during a trip; wherein the vehicle operation data is time series data of the vehicle during the trip; A second acquisition module is configured to acquire a text indicator indicating the energy consumption of the vehicle during the traveled journey; The prediction module is configured to predict the energy consumption of the vehicle in the remaining journey by using a large language model based on the vehicle operation data and the text indicator.

10. An electronic device, characterized in that: include: processor; Memory for storing computer programs or instructions; The processor executes the computer program or instructions to implement the steps of the energy consumption prediction method according to any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium storing a computer program or instruction, characterized in that: When the computer program or instructions in the storage medium are executed by a processor, the steps of the energy consumption prediction method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program or instructions, characterized in that: When the computer program or instruction is executed by a processor, the steps of the energy consumption prediction method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Building energy consumption prediction method based on large language model

    CN120296530A

  • Building energy consumption prediction method based on large language model

    CN120296530B