Battery management method and device, storage medium and terminal
By combining historical energy consumption information and real-time driving data in the battery management system, the error distribution of the battery prediction model is dynamically updated, which solves the problems of insufficient power prediction accuracy and inaccurate energy management, and improves the driving range of electric vehicles.
Patent Information
- Application Number
- CN202510464430.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Existing battery management systems suffer from insufficient accuracy in power prediction and inaccurate energy management strategies, which limits the driving range of electric vehicles.
Feature data is obtained based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the current sub-path. Energy consumption is predicted using a pre-trained battery prediction model, and the prediction error probability distribution is updated by actual energy consumption to dynamically correct the energy consumption prediction results.
It improves the accuracy of battery energy consumption prediction and can dynamically adjust energy distribution and management strategies under different driving conditions, thereby extending the driving range of electric vehicles.
Smart Images

Figure CN120327342B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of new energy vehicle technology, and in particular to a battery management method, device, storage medium and terminal. Background Technology
[0002] With the rapid development of the market, the Battery Management System (BMS), as a core component ensuring the safe and reliable operation of electric vehicles, is becoming increasingly important. The BMS monitors and manages various battery state parameters in real time, such as voltage, current, and temperature, to achieve precise control over battery charging and discharging, preventing adverse conditions such as overcharging and over-discharging, thereby optimizing battery life and ensuring the driving safety of electric vehicles. However, existing BMS systems still face problems in practical applications, such as insufficient accuracy in power prediction and inaccurate energy management strategies. Summary of the Invention
[0003] This application provides a battery management method, device, storage medium, and terminal to solve the technical problems of insufficient power prediction accuracy and inaccurate energy management strategies in the aforementioned battery management systems.
[0004] In a first aspect, embodiments of this application provide a battery management method, the method comprising:
[0005] Based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path, the characteristic data of the vehicle in the current sub-path is obtained.
[0006] Input the feature data into the battery prediction model to obtain the initial predicted energy consumption of the vehicle in the current sub-path.
[0007] Obtain the actual energy consumption of the vehicle in the current sub-path;
[0008] Based on feature data, initial predicted energy consumption, and actual energy consumption, the prediction error probability distribution of the battery prediction model is updated. The initial predicted energy consumption is then corrected based on the updated prediction error probability distribution to obtain the energy consumption correction information for the vehicle in the current sub-path.
[0009] Secondly, embodiments of this application provide a battery management device, the device comprising:
[0010] The feature data acquisition module is used to acquire the feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path.
[0011] The model prediction module is used to input feature data into the battery prediction model and obtain the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model.
[0012] The actual energy consumption acquisition module is used to acquire the actual energy consumption of the vehicle in the current sub-path;
[0013] The error correction module is used to update the prediction error probability distribution of the battery prediction model based on feature data, initial predicted energy consumption, and actual energy consumption. It then corrects the initial predicted energy consumption based on the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path.
[0014] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.
[0015] Fourthly, embodiments of this application provide a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is adapted to be loaded by the processor and to execute the steps of the above-described method.
[0016] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following:
[0017] This application provides a battery management method, which obtains feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path; inputs the feature data into a battery prediction model to obtain the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model; obtains the actual energy consumption of the vehicle in the current sub-path; updates the prediction error probability distribution of the battery prediction model based on the feature data, the initial predicted energy consumption, and the actual energy consumption; and corrects the initial predicted energy consumption according to the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path. First, by comprehensively considering the energy consumption correction information of the vehicle in the previous sub-path and the real-time driving information of the current sub-path, feature data of the current sub-path is obtained. This feature data can more accurately reflect the impact of historical energy consumption data and actual driving conditions on energy consumption prediction, thus providing more accurate data input for the energy consumption prediction of the current sub-path. Then, the generated feature data is processed using a pre-trained battery prediction model to output the initial predicted energy consumption of the vehicle in the current sub-path. This provides the initial energy consumption prediction result based on the existing battery prediction model as the basis for subsequent error correction. Next, the actual energy consumption data of the vehicle in the current sub-path is measured and recorded. Based on the feature data, the initial predicted energy consumption, and the actual energy consumption, the prediction error probability distribution of the battery prediction model is updated, realizing dynamic correction of the model's prediction error and helping to continuously optimize the model's prediction performance. Finally, the updated error distribution is used to correct the initial predicted energy consumption of the current sub-path, thereby obtaining more accurate energy consumption correction information and improving the accuracy of energy consumption prediction for subsequent sub-paths. The method described in this application allows the model to be corrected using actual energy consumption data after the vehicle has passed through a sub-path. The corrected model is then used to predict the energy consumption of the next sub-path, thereby improving the accuracy of the model's prediction of battery energy consumption. This enables the battery management system to more accurately manage the vehicle's battery energy and dynamically adjust the vehicle's energy distribution and management strategies under different driving conditions, thus extending the vehicle's driving range. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 An exemplary system architecture diagram of a battery management method provided in this application embodiment;
[0020] Figure 2A schematic flowchart illustrating a battery management method provided in an embodiment of this application;
[0021] Figure 3 A schematic flowchart illustrating a battery management method provided in an embodiment of this application;
[0022] Figure 4 This is a schematic diagram illustrating the overall process of implementing a battery management method according to an embodiment of this application.
[0023] Figure 5 A schematic flowchart illustrating a battery management method provided in an embodiment of this application;
[0024] Figure 6 A schematic flowchart illustrating a model training method for a battery prediction model provided in an embodiment of this application;
[0025] Figure 7 A flowchart illustrating a hyperparameter adjustment method for a battery prediction model provided in an embodiment of this application;
[0026] Figure 8 A structural block diagram of a battery management device provided in an embodiment of this application;
[0027] Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Detailed Implementation
[0028] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0030] With the rapid development of the electric vehicle market, battery management systems (BMS) monitor and manage battery status, enabling charge and discharge control and optimizing battery lifespan and performance. Battery power prediction methods within BMS provide drivers with estimates of remaining battery power and driving range based on current battery status and driving habits, helping them better understand the vehicle's range and charge promptly when needed, avoiding breakdowns due to depleted battery. Simultaneously, energy management strategies monitor and analyze the electric vehicle's powertrain status in real time, including battery power, motor efficiency, and vehicle speed, and optimize energy distribution through intelligent algorithms. This ensures efficient operation under various conditions, reducing energy waste and improving the vehicle's range.
[0031] However, in practical applications, battery management systems still face some technical challenges that limit further performance improvements and the widespread adoption of electric vehicles. First, battery status can be affected by real-time traffic information such as road speed limits and lane information. Traditional battery power prediction methods primarily rely on historical data and simple physical models, lacking effective utilization of real-time traffic information. This makes power prediction difficult to adapt to complex traffic environments and changing driving conditions, resulting in insufficient prediction accuracy. Simultaneously, in urban traffic, factors such as traffic congestion and waiting at traffic lights can cause significant discrepancies between actual energy consumption and predicted values. Existing energy management strategies are mostly designed based on standard operating conditions or fixed rules, lacking dynamic adaptability to actual driving conditions. This prevents current energy management strategies from dynamically adjusting to traffic conditions, thus affecting the driving range of electric vehicles.
[0032] Therefore, this application provides a battery management method to improve the accuracy of battery power prediction and adjust the energy management strategy in conjunction with real-time traffic information, thereby improving the driving range of electric vehicles.
[0033] Please see Figure 1 , Figure 1 This is an exemplary system architecture diagram of a battery management method provided in an embodiment of this application.
[0034] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 serves as the medium for providing a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired or wireless communication links, such as wired communication links including fiber optic cables, twisted-pair cables, or coaxial cables, and wireless communication links including Bluetooth communication links, Wireless-Fidelity (Wi-Fi) communication links, or microwave communication links, etc.
[0035] Terminal 101 can interact with server 103 via network 102 to receive or send messages to server 103. Alternatively, terminal 101 can interact with server 103 via network 102 to receive messages or data sent to server 103 by other users. For example, terminal 101 can generate feature data for the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the current sub-path, and send this feature data to server 103 via network 102. When server 103 receives the feature data sent by terminal 101, it will input it into a pre-trained battery prediction model to calculate the initial predicted energy consumption of the vehicle in the current sub-path. Then, server 103 will return the initial predicted energy consumption to terminal 101 via network 102.
[0036] Terminal 101 can be either hardware or software. When terminal 101 is hardware, it can be various electronic devices, including but not limited to in-vehicle computers, smart dashboards, battery management system hardware, etc. When terminal 101 is software, it can be installed in the electronic devices listed above, and it can be implemented as multiple software or software modules (e.g., to provide distributed services), or it can be implemented as a single software or software module, without specific limitations.
[0037] In this embodiment, terminal 101 first obtains feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path. Then, terminal 101 inputs the feature data into the battery prediction model to obtain the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model. Next, terminal 101 obtains the actual energy consumption of the vehicle in the current sub-path. Finally, based on the feature data, the initial predicted energy consumption, and the actual energy consumption, terminal 101 updates the prediction error probability distribution of the battery prediction model, corrects the initial predicted energy consumption according to the updated prediction error probability distribution, and obtains the energy consumption correction information of the vehicle in the current sub-path.
[0038] Server 103 can be a business server providing various services. It should be noted that server 103 can be either hardware or software. When server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When server 103 is software, it can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module; no specific limitations are made here.
[0039] Alternatively, the system architecture may not include server 103. In other words, server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification can be applied to a system structure that only includes terminal 101. The embodiments of this application do not limit this.
[0040] It should be understood that Figure 1 The number of terminals, networks, and servers shown is only illustrative; the number can be any number of terminals, networks, and servers depending on the implementation requirements.
[0041] Please see Figure 2 , Figure 2 This is a flowchart illustrating a battery management method provided in an embodiment of this application. The execution entity in this embodiment can be a terminal performing battery management, a processor within the terminal performing the battery management method, or a battery management service within the terminal performing the battery management method. For ease of description, the following example uses a processor within the terminal as the execution entity to illustrate the specific execution process of the battery management method.
[0042] like Figure 2 As shown, a battery management method may include at least:
[0043] S202. Based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path, obtain the feature data of the vehicle in the current sub-path.
[0044] Optionally, since different stages of the global driving path may have different traffic conditions and road conditions (such as speed limits and curvature), these factors will affect the actual energy consumption of the vehicle battery. Therefore, during the actual driving process, the initial predicted energy consumption reflecting changes in the vehicle battery state may be biased. The method in this application divides the global driving path of the vehicle into multiple sub-paths and performs a more detailed energy consumption analysis on the specific conditions of each sub-path. Then, it makes corrections based on the actual energy consumption after each sub-path segment, thereby reducing accumulated errors and making the energy consumption prediction of subsequent sub-paths closer to the actual situation.
[0045] Specifically, the actual driving information of the current sub-path, such as road conditions, traffic flow, and battery status, directly affects the energy consumption of the vehicle's battery. For example, frequent start-stop operations in congested areas lead to higher energy consumption, while driving at a constant speed on highways is relatively energy-efficient. Therefore, collecting and analyzing the actual driving information of the current sub-path in real time, and combining this information with feature extraction, can make energy consumption predictions more closely reflect actual driving conditions.
[0046] Optionally, the energy consumption of a vehicle battery is not only affected by current driving information but also closely related to its previous operating state. By continuously updating and learning the energy consumption correction information from the previous path (i.e., the previous sub-path), it is possible to better capture the changing trends of battery performance and correct errors in real time. For example, if the actual energy consumption of the battery is found to be higher than the predicted value in the previous sub-path due to battery aging, changes in ambient temperature, etc., incorporating this information from the previous sub-path into the feature data of the current sub-path helps to more accurately adjust the energy consumption prediction of the current sub-path. If the energy consumption correction information from the previous sub-path is ignored, the battery prediction model will not be able to self-adjust based on previous experience, which may lead to long-term accumulated prediction bias.
[0047] Optionally, when predicting the energy consumption of the vehicle on the current sub-path, the energy consumption correction information of the vehicle during the previous sub-path is first obtained. Furthermore, the vehicle's driving information on the current sub-path is collected and recorded in real time through its built-in sensors or Global Positioning System (GPS). This includes, but is not limited to, battery status data such as the vehicle's battery state of charge and charging / discharging power, as well as road speed limits, lane information, and curvature of the current sub-path obtained through map navigation software. Then, the energy consumption correction information and driving information are fused together and pre-processed using preset data processing algorithms (such as normalization and filtering) to remove noise and highlight key features, thereby constructing a high-dimensional feature data vector. This feature data provides more accurate and comprehensive input information for the subsequent battery prediction model.
[0048] It should be noted that the energy consumption correction information before the current sub-path can be the energy consumption correction information of the previous sub-path, or it can be the energy consumption correction information of some segments or all sub-paths before the current sub-path. The specific energy consumption correction information of which stages are selected can be flexibly adjusted according to the actual situation or prediction accuracy. This application embodiment does not limit this.
[0049] S204. Input the feature data into the battery prediction model and obtain the initial predicted energy consumption of the vehicle on the current sub-path output by the battery prediction model.
[0050] Optionally, considering that the battery prediction model may produce errors, in order to correct these errors in real time, the initial predicted energy consumption of the current sub-path predicted by the model and its corresponding actual energy consumption can be collected and recorded respectively. Then, by comparing the actual energy consumption with the initial predicted energy consumption, the prediction error of the battery prediction model can be reflected, and the model can be corrected by using this error information to reduce subsequent prediction errors.
[0051] Specifically, after acquiring the vehicle's feature data in the current sub-path, this feature data is used as an input variable and fed into a pre-trained battery prediction model. Upon receiving the data, the battery prediction model calculates and outputs the initial predicted energy consumption of the vehicle on the current sub-path based on the rules or patterns it has learned internally, according to the input feature data. This predicted value reflects the expected energy consumption of the vehicle's battery under given conditions, providing a basic reference value for subsequent correction of energy consumption prediction errors.
[0052] S206. Obtain the actual energy consumption of the vehicle in the current sub-path.
[0053] Optionally, onboard sensors (such as current sensors and voltage sensors) can be used to monitor the vehicle's energy consumption on the current sub-path in real time, including battery charging and discharging status, motor efficiency, and other relevant energy consumption parameters. After the vehicle has completed the entire current sub-path, the actual energy consumption of the vehicle throughout the entire current sub-path is calculated based on the real-time monitored data. This actual energy consumption value is used to verify the accuracy of the initial predicted energy consumption, thereby evaluating the performance of the battery prediction model.
[0054] S208. Based on feature data, initial predicted energy consumption, and actual energy consumption, update the prediction error probability distribution of the battery prediction model, and correct the initial predicted energy consumption according to the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path.
[0055] Optionally, since it is necessary to correct the energy consumption prediction error of the model, the method in this embodiment constructs a probability distribution of the prediction error based on the prediction error records in historical data to describe the uncertainty of the prediction error. After the actual energy consumption data of the current sub-path is collected, this probability distribution can be updated according to the current prediction error using Bayesian update and other probabilistic statistical methods, so that the distribution of the prediction error is closer to the actual situation of the current sub-path, reflecting the prediction probability of the battery prediction model under the current feature data conditions.
[0056] Furthermore, based on the updated prediction error probability distribution, the initial predicted energy consumption value for the current sub-path is adjusted to obtain energy consumption correction information for the vehicle in the current sub-path. This can be achieved by calculating the expected value of the prediction error or generating a more reliable prediction interval based on the prediction error probability distribution. For example, if the updated prediction error probability distribution indicates that the initial predicted energy consumption output by the model is generally higher than the actual energy consumption, the initial predicted energy consumption can be appropriately lowered to compensate for this deviation. Simultaneously, the corrected energy consumption data corresponding to the current sub-path can also serve as reference information for predicting the next sub-path, feeding back to the battery prediction model and forming a closed-loop optimization mechanism.
[0057] In this application embodiment, a battery management method is provided, which obtains feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path; inputs the feature data into a battery prediction model to obtain the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model; obtains the actual energy consumption of the vehicle in the current sub-path; updates the prediction error probability distribution of the battery prediction model based on the feature data, the initial predicted energy consumption, and the actual energy consumption; and corrects the initial predicted energy consumption according to the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path. First, by comprehensively considering the energy consumption correction information of the vehicle in the previous sub-path and the real-time driving information of the current sub-path, feature data of the current sub-path is obtained. This feature data can more accurately reflect the impact of historical energy consumption data and actual driving conditions on energy consumption prediction, thus providing more accurate data input for the energy consumption prediction of the current sub-path. Then, the generated feature data is processed using a pre-trained battery prediction model to output the initial predicted energy consumption of the vehicle in the current sub-path. This provides the initial energy consumption prediction result based on the existing battery prediction model as the basis for subsequent error correction. Next, the actual energy consumption data of the vehicle in the current sub-path is measured and recorded. Based on the feature data, the initial predicted energy consumption, and the actual energy consumption, the prediction error probability distribution of the battery prediction model is updated, realizing dynamic correction of the model's prediction error and helping to continuously optimize the model's prediction performance. Finally, the updated error distribution is used to correct the initial predicted energy consumption of the current sub-path, thereby obtaining more accurate energy consumption correction information and improving the accuracy of energy consumption prediction for subsequent sub-paths. The method described in this application allows the model to be corrected using actual energy consumption data after the vehicle has passed through a sub-path. The corrected model is then used to predict the energy consumption of the next sub-path, thereby improving the accuracy of the model's prediction of battery energy consumption. This enables the battery management system to more accurately manage the vehicle's battery energy and dynamically adjust the vehicle's energy distribution and management strategies under different driving conditions, thus extending the vehicle's driving range.
[0058] Please see Figure 3 , Figure 3 This is a flowchart illustrating a battery management method provided in an embodiment of this application.
[0059] like Figure 3 As shown, a battery management method may include at least:
[0060] S302. Obtain the complete route of the vehicle through map navigation software, and divide the complete route into multiple sub-routes according to traffic nodes or preset length.
[0061] Optionally, Figure 4This is a schematic diagram of the overall process of implementing a battery management method according to an embodiment of this application, wherein S404-S406 is the process of training a neural network model based on human driving history data, and S408-S412 is the process of predicting energy consumption based on the pre-trained model during actual vehicle operation. Figure 4 As shown in S408, the method in this embodiment of the application calls mainstream map navigation software (such as Gaode Map, Baidu Map, etc.) to obtain the complete path information of the vehicle from the starting position to the destination according to the preset data collection time (e.g., 10 seconds), which includes at least the following variables: distance Dis, estimated travel time Time, road speed limit Speed, lane information L_info (e.g., number of lanes and layout information), traffic rules Tra (e.g., no left turn, no right turn, etc.), curvature Cur, real-time traffic flow density Tra_flow, and real-time traffic light status Tra_t (e.g., red light, green light, etc.).
[0062] Furthermore, to improve the accuracy of energy consumption estimation, the complete path is divided into multiple sub-path segments based on traffic nodes (such as traffic lights and intersections) or a preset length (such as per kilometer). For example, for urban roads or structured roads, the division is based on key nodes such as traffic lights and intersections; while for general roads, each kilometer is divided into a sub-path. Each sub-path contains detailed feature information, the specific content of which is the same as the variables included in the aforementioned complete path information.
[0063] S304. Obtain the traffic characteristics of the current sub-path and the battery characteristics of the vehicle in the current sub-path. Determine the characteristic data of the vehicle in the current sub-path based on the energy consumption correction information, traffic characteristics and battery characteristics of the vehicle in the previous sub-path.
[0064] Optionally, in addition to real-time collection of feature information (traffic features) for each sub-path, the method of this application embodiment can also collect vehicle battery status data (battery features) in real time via onboard sensors (e.g., data collection intervals of 10 seconds). This includes at least information such as voltage V, current I, temperature T, state of charge (SOC), and charge / discharge power (Pb). Based on this, when predicting the energy consumption of the current sub-path, the traffic features of the current sub-path and the vehicle's battery features on the current sub-path are first obtained, and then effective features that can be used for subsequent analysis are extracted through data preprocessing steps.
[0065] Specifically, data preprocessing steps may include mean filtering and outlier removal. Assuming we use unknown variables x to represent the traffic and battery characteristics of the current sub-path, we will use a mean filter to process this data. The mean filter smooths the data by calculating the average of N consecutive data points, as shown in the following formula: Where N is the mean filter window size, x t-1 To x t-N This involves data from time t-1 to tN. This step effectively removes some noise from the data, making it more reflective of the vehicle's actual operating state. Simultaneously, since the decay of the State of Charge (SOC) during actual vehicle operation is slow, data is retained when |Δ| < 0.05% (0.05% is the threshold for SOC change during the data acquisition period); otherwise, the data is removed. Furthermore, for all collected parameter data, outliers are identified and removed based on the relationship between the data and the mean and standard deviation. For example, for the data to be processed, if it satisfies... Where x mean x is the mean of the data. std If the standard deviation of the data is less than the standard deviation, it is considered an outlier and removed to ensure data reliability.
[0066] Optionally, after obtaining the traffic features and battery features corresponding to the current sub-path, the feature data set of the current sub-path can be determined by combining the energy consumption correction information of the vehicle in the previous sub-path. For example, all the above features are fused to form a high-dimensional feature vector x (feature data): Where V is the current battery voltage; I is the current battery current; T is the current battery temperature; SOC is the current state of charge; Pb is the current charging / discharging power; Dis is the distance of the sub-path; Time is the estimated travel time of the sub-path; Speed is the speed limit of the current road segment; L_info is the vector representation of the number and layout information of the current road segment; Tra is the vector representation of the traffic rules of the current road segment, such as prohibition of left turns and right turns; Cur is the curvature information of the current road segment; Tra_flow is the real-time traffic flow density of the current road segment; Tra_t is the real-time traffic light status time of the current road segment. The energy consumption estimate result of the previous sub-path (corrected predicted energy consumption) reflects the current energy consumption status; α is the error correction coefficient, which is dynamically updated based on Bayesian estimation to adjust the accuracy of energy consumption estimation.
[0067] S306. Input the feature data into the battery prediction model, obtain the initial predicted energy consumption of the vehicle on the current sub-path output by the battery prediction model, and obtain the actual energy consumption of the vehicle on the current sub-path.
[0068] Optionally, after obtaining the vehicle's feature data in the current sub-path, this feature data is used as an input variable and fed into a pre-trained battery prediction model. Upon receiving the data, the battery prediction model calculates and outputs the initial predicted energy consumption of the vehicle on the current sub-path based on the rules or patterns it has learned internally, according to the input feature data. Further, such as... Figure 4 As shown in S410, after the vehicle has traveled the entire current sub-path, the actual energy consumption data of the vehicle in the entire current sub-path is collected to verify the accuracy of the initial predicted energy consumption, thereby evaluating the performance of the battery prediction model.
[0069] For example, suppose the vehicle starts from point A, and the global path is divided into n sub-paths, denoted as S1, S2, ..., Sn. n Assume the current sub-path is the i-th sub-path S. i The initial predicted energy consumption output by the battery prediction model is The calculation formula is as follows: in, This is the battery prediction model's prediction of vehicle energy consumption on the current sub-path (initial predicted energy consumption), x i This refers to the feature data of the current sub-path, specifically including parameters as described in S304, where θ is the model hyperparameter obtained after the heuristic algorithm search. Further, after the vehicle passes through the current sub-path, the actual energy consumption of the vehicle throughout the entire current sub-path is collected: y i, .
[0070] S308. Calculate the prediction error between the actual energy consumption and the initial predicted energy consumption; based on the prediction error and feature data, update the prior prediction error probability distribution of the battery prediction model to the posterior prediction error probability distribution according to Bayes' theorem.
[0071] Alternatively, it can be assumed that in the previous sub-path, the probability distribution of the prediction error of the battery prediction model follows a certain prior distribution (e.g., a Gaussian distribution). This prior distribution reflects the uncertainty estimate of the prediction error before observation data for the current subpath is available. To continuously improve the accuracy of battery prediction models, such as... Figure 4 As shown in S410, the method shown in this embodiment of the application uses Bayes' theorem and combines actual energy consumption and real-time information to update the probability distribution of prediction error.
[0072] Taking the example shown in S306, after obtaining the actual energy consumption of the current sub-path, the prediction error e between the initial predicted energy consumption output by the battery prediction model and the actual energy consumption is further calculated. i The calculation formula is as follows: Then, a Bayesian network is used to handle the prediction error, continuously updating the probability distribution of the prediction error based on historical data during driving. Assume P(e i |x i ) is for given feature data x i Below, the prediction error e i The probability distribution of the current subpath. According to Bayes' theorem, the updated probability distribution P(e) of the current subpath. i |xi It can be calculated in the following ways: Wherein, P(x i |e i ) is a given prediction error e i Lower feature data x i The conditional probability, P(e i ) is the prediction error e i The prior probability, P(x) i ) is the feature data x i The marginal probability. Under the assumption of a Gaussian distribution, the posterior distribution P(e i |x i It also follows a Gaussian distribution. satisfy: Here e i,j These are the n newly acquired prediction error data points for the current sub-path. This corresponds to the variance of the prediction error. The formula above reflects the update of the mean and variance based on new observation data of the current subpath. As new data is added, the mean and variance will be continuously adjusted to more accurately reflect the changes in the probability distribution of the prediction error.
[0073] It should be noted that, since the error correction stage focuses more on the dynamic parameters that change during vehicle movement, the feature data used in Bayesian estimation can be as follows: voltage V, current I, state of charge SOC, estimated travel time of sub-path Time, real-time traffic flow density Tra_flow, and real-time traffic light status Tra_t.
[0074] S310. Determine the error correction coefficient based on the expected value of the prediction error in the posterior prediction error probability distribution, and correct the initial prediction energy consumption based on the error correction coefficient to obtain the corrected prediction energy consumption; use the corrected prediction energy consumption and the error correction coefficient as the energy consumption correction information of the vehicle in the current sub-path.
[0075] Optionally, after obtaining the updated prediction error probability distribution, the initial predicted energy consumption of the battery prediction model can be corrected based on this probability distribution, thereby obtaining a more accurate corrected predicted energy consumption. Specifically, the expected value of the prediction error (i.e., the mean of the posterior prediction error probability distribution) is extracted from the updated posterior prediction error probability distribution. This expected value represents the model's best estimate of the prediction error for the current sub-path and can also be used as the error correction coefficient for the current sub-path. Then, the initial predicted energy consumption of the current sub-path is adjusted according to this error correction coefficient to compensate for the prediction error of the battery prediction model.
[0076] Taking the example shown in S306, after obtaining the prediction error probability distribution after the current sub-path is updated... Then, the error correction coefficient for the current sub-path can be determined as μ.i At this point, the initial predicted energy consumption for the current sub-path The predicted values are adjusted based on the updated prediction error probability distribution. The calculation formula is as follows: in To correct the predicted energy consumption.
[0077] Optionally, the corrected predicted energy consumption and error correction coefficient of the current sub-path are used as the energy consumption correction information for the vehicle in the current sub-path. This information not only provides a more accurate energy consumption estimate in the current sub-path but also provides a reference for energy consumption prediction in subsequent sub-paths. By continuously repeating the above online update process, the method in this embodiment can continuously optimize its prediction performance based on real-time driving data and environmental information, thereby more accurately estimating the vehicle's energy consumption on different road segments and providing a more reliable basis for battery prediction of electric vehicles.
[0078] S312. Obtain the predicted state of charge output by the battery prediction model, and adjust the power of the battery on the corresponding sub-path based on the predicted state of charge and the traffic characteristics on the corresponding sub-path.
[0079] Optionally, such as Figure 4 As shown in S412, in addition to obtaining the initial predicted energy consumption, the battery prediction model also outputs the predicted state of charge of the vehicle in the current sub-path. This predicted value reflects the expected remaining percentage of battery charge under current conditions. Based on this, the charging and discharging power of the battery can be dynamically adjusted according to the predicted state of charge and the traffic characteristics corresponding to the current sub-path to optimize energy use efficiency and increase the vehicle's driving range. For example, the method in this application embodiment uses four scenarios—traffic light intersections, roads with high curvature, congested road sections, and long downhill roads—to illustrate how to adjust the battery's output power in conjunction with the traffic characteristics corresponding to the current sub-path.
[0080] Optionally, under traffic congestion conditions, vehicles frequently start and stop. Based on real-time traffic characteristics provided by the map, the battery needs to maintain a low to medium power output to prevent the vehicle from starting too abruptly. The real-time traffic density Tra_flow of the current road segment is obtained from the map navigation software, and a traffic density threshold is set. When the real-time traffic density approaches the maximum traffic density threshold, the battery output power gradually decreases to prevent the vehicle from starting too abruptly. The calculation formula is as follows: Among them, P b It is the current battery output power, P max This is the battery's maximum output power, Tra_flow max It is the preset maximum traffic density threshold.
[0081] Optionally, on roads with high curvature, where the vehicle is about to make a turn without visibility, the battery output power should be appropriately reduced before entering the curve to decrease the vehicle's power supply. As the vehicle gets closer to the curve, the battery output power gradually decreases, eventually dropping to a lower limit determined by the curvature as the vehicle approaches the curve. This advance power limitation avoids the driver having to brake suddenly at the curve. The calculation formula is as follows: Among them, P b It is the current battery output power, P max It is the battery's maximum output power, Cur max It is the preset maximum curvature threshold, and Dis is the distance between the vehicle and the curve, which has a set lower limit.
[0082] Optionally, at traffic light intersections, when the light is red and the waiting time is too long, battery power can be limited before the vehicle reaches the intersection to reduce unnecessary energy loss. Therefore, the power limiting strategy in this scenario primarily considers the remaining waiting time at the traffic light. The calculation formula is as follows: Among them, P b It is the current battery output power, P max It is the battery's maximum output power, tra_t max tra_t represents the maximum waiting time at the red light, and tra_t represents the remaining waiting time at the current intersection.
[0083] Optionally, on long downhill sections, a more aggressive regenerative braking strategy can be adopted, which charges the regenerative brakes while limiting the vehicle's speed. During normal driving, a fixed regenerative braking coefficient K is used. normal To maximize energy recovery, the regenerative braking coefficient for long downhill sections is determined by both the gradient and the length of the downhill section. The calculation formula is as follows: Where α and β are weighting coefficients used to balance the effects of slope and downhill section length, Slope max Dis is the preset maximum slope threshold, Dis is the downhill section length in the current sub-segment calculated based on path splitting, and Len represents the total length of the sub-segment.
[0084] This application provides a battery management method that obtains the vehicle's complete path through map navigation software and divides the path into multiple sub-paths based on traffic nodes or preset lengths. This allows for more accurate capture of the specific conditions of different road segments, providing more accurate data support for subsequent energy management. Simultaneously, by combining the traffic characteristics and battery characteristics of the current sub-path, it can better reflect the energy consumption characteristics under actual driving conditions. This enables the battery prediction model to dynamically respond to external changes, adapt to various complex road conditions and environmental conditions, and improve the accuracy of energy consumption prediction. Furthermore, by calculating the prediction error between the actual energy consumption and the initial predicted energy consumption and applying Bayes' theorem to update the probability distribution of the prediction error, the model can be dynamically adjusted based on actual conditions, making the prediction results closer to reality. Finally, by combining the predicted state of charge and traffic characteristics, the charging and discharging power of the battery is dynamically adjusted. This precise energy management and power adjustment can optimize energy usage efficiency and help extend the vehicle's driving range.
[0085] Please see Figure 5 , Figure 5 This is a schematic flowchart of a battery management method provided in an embodiment of this application.
[0086] like Figure 5 As shown, a battery management method may include at least:
[0087] S502. An initial battery prediction model is constructed based on a long short-term memory network and a bidirectional gated cyclic unit.
[0088] Optionally, the method in this embodiment employs a neural network model combining Long Short-Term Memory (LSTM) and Bidirectional Gated Recurrent Unit (BiGRU) as a battery prediction model to predict changes in the battery's state of charge. Based on this, we first construct a neural network model that combines LSTM and BiGRU, where the LSTM layer is responsible for capturing the long-term dependencies of time series data, and the BiGRU layer is responsible for combining historical and future information to improve the accuracy of time series modeling. Figure 6 This is a flowchart illustrating a model training method for a battery prediction model provided in an embodiment of this application, wherein S610 is a structural example of the initial battery prediction model.
[0089] Specifically, traditional Recurrent Neural Networks (RNNs) possess internal states or memory. At each time step, RNNs consider not only the current input but also information from previous time steps, enabling them to handle time-dependent input sequences, such as natural language and time-series data. While RNNs can process sequential data, they suffer from the vanishing gradient problem when dealing with long sequences, preventing them from effectively capturing long-term dependencies. LSTM, a special type of recurrent neural network, effectively addresses the vanishing gradient problem by introducing memory units and gating mechanisms to capture long-term dependencies in time-series data. During vehicle operation, the state of charge of the battery changes... This is a typical time series problem, which is affected by a variety of factors such as historical driving data, driving habits, and traffic conditions. LSTM can effectively handle this long-term dependency by introducing memory units and gating mechanisms.
[0090] Optionally, LSTM mainly consists of four parts: forget gate, input gate, memory cell update, and output gate. The forget gate determines which information is discarded from the memory cell, and the calculation formula is as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ), where f t It is the output of the Forgotten Gate, W f and b f These are the weight matrix and the bias term, h. t-1 It is the hidden state from the previous moment, x t This is the input at the current moment. The input gate determines which new information will be stored in the memory unit, and the calculation formula is as follows: i t =σ(W i ·[h t-1 ,x t ]+b i ), Among them, i t It is the output of the input gate. It is the value of the candidate memory unit, W i b i W c b c These are the weight matrix and the bias term, respectively. Memory cell update is used to update the state of the memory cells, and the calculation formula is as follows: Among them, c t This is the memory unit at the current time step, and ⊙ represents element-wise multiplication. The output gate calculates the output for the current time step based on the state of the memory unit, using the following formula: o t=σ(W o ·[h t-1 ,x t ]+b o ), h t =o t ⊙tanh(c t ), where o t It is the output of the output gate, h t It is the hidden state at the current moment, W o and b o These are the weight matrix and the bias term, respectively.
[0091] Optionally, BiGRU is an improved RNN that, by introducing a gating mechanism, can capture information from time-series data in both the forward and backward directions, thus solving the gradient vanishing problem and improving model performance through bidirectional information transfer. The reset gate determines how much past information is ignored, calculated as follows: r t =σ(W r ·[h t-1 ,x t ]+b r ), where r t It is the output of the reset door, W r and b r These are the weight matrix and the bias term, respectively. The update gate determines how much of the past hidden state is retained, calculated using the following formula: z t =σ(W z ·[h t-1 ,x t ]+b z ), where z t It updates the output of the gate, W. z and b z These are the weight matrix and the bias term, respectively. The candidate hidden state determines what the new hidden state should be after ignoring some past information; the calculation formula is as follows: in, It is a candidate hidden state, W h and b h These are the weight matrix and the bias term, respectively. The hidden state update determines how much past information to retain and how many new candidate hidden states to combine to form the final hidden state at the current time step. The calculation formula is as follows: Among them, h t This represents the hidden state at the current time step. The BiGRU layer contains GRU units in two directions, processing the time series data from the forward and backward directions respectively. The output of the forward GRU unit is denoted as... The output of the backward GRU unit is denoted as The final hidden state h t It is a concatenation of the forward and backward hidden states:
[0092] S504. Obtain multiple sample feature data and input each sample feature data into the initial battery prediction model to train the initial battery prediction model.
[0093] Optionally, Figure 6 This is a flowchart illustrating a model training method for a battery prediction model provided in an embodiment of this application, as shown below. Figure 6 As shown in S602, before training the constructed initial battery prediction model, the method in this embodiment first needs to collect a large amount of human driving data and fuse this data into sample feature data. Then, this sample feature data is input into the initial battery prediction model for training. Specifically, for details on how to collect data and fuse it into sample feature data, please refer to the detailed descriptions in steps S302 and S304, which will not be repeated here.
[0094] S506. During the training process of the initial battery prediction model, the initial battery prediction model is controlled to output the corresponding predicted state of charge based on the feature data of each sample. The hyperparameters of the initial battery prediction model are adjusted according to the predicted state of charge and the actual state of charge of each sample feature data until the initial battery prediction model converges, thus obtaining the trained battery prediction model.
[0095] Optionally, such as Figure 6 As shown in S604-S614, during the training process, the sample feature data is used as the input to the initial battery prediction model, and the model outputs the predicted state of charge of the battery. Then, by comparing the predicted state of charge (SOC) with its corresponding actual SOC, the hyperparameters of the initial battery prediction model are continuously adjusted to obtain the trained battery prediction model. To ensure the training effect of the model, historical data and operating condition prediction data are divided into training and test sets. The initial battery prediction model is trained using the training set data, and the model's performance is verified using the test set data.
[0096] Optionally, during the training of the battery prediction model, the model error can be evaluated by defining a loss function. Specifically, for each sample feature data, the data is input into the initial battery prediction model to obtain the corresponding predicted state of charge (SOC). Then, the training loss value is calculated by comparing the predicted SOC with the actual SOC. The loss function used can be the Mean Squared Error (MSE), calculated as follows: Where N is the number of samples, and SOC i It is the true state of charge. It is the predicted state of charge output by the model.
[0097] Optionally, Figure 7This is a flowchart illustrating a hyperparameter adjustment method for a battery prediction model provided in an embodiment of this application, as shown below. Figure 7 As shown in S702-S712, if the training loss value reflects a large error in the model's prediction, a metaheuristic algorithm can be used to adjust the hyperparameters of the initial battery prediction model to ensure the model's prediction accuracy and stability under complex operating conditions. Specifically, the initial battery prediction model is trained using training set data, and the model's hyperparameters are updated through backpropagation to minimize the loss function. Furthermore, the performance of the initial battery prediction model is verified using test set data to evaluate the model's prediction accuracy and robustness. Iterative training stops when the prediction error is less than a set threshold.
[0098] For example, such as Figure 7 As shown in S706, to ensure the prediction accuracy and stability of the battery prediction model under complex operating conditions, the method in this embodiment uses an improved Moth-Flame Optimization Algorithm (MFO) as a metaheuristic algorithm to adjust the hyperparameters of the initial battery prediction model. MFO is a swarm intelligence optimization algorithm that simulates the phototactic behavior of moths. Each moth represents a potential solution, and the flame represents the current optimal solution. The moths can update their positions based on the position of the flame, gradually approaching the global optimum. In the MFO algorithm, the prediction accuracy and stability of the initial battery prediction model are improved through swarm intelligence optimization of the hyperparameter combination.
[0099] Specifically, for the established initial battery prediction model, a set of initial moth locations (X) is first randomly generated. i (i = 1, 2, ..., n), where n is the number of moths. Each moth represents a potential combination of hyperparameters, which may include, for example, the learning rate η, batch size B, number of hidden layer neurons H, etc. Then, for each combination of hyperparameters, an initial battery prediction model is trained using these hyperparameters, and the training loss MSE of the model is calculated on the validation set as the fitness value f(X). i Since fitness values are related to the model's performance in the prediction task, a lower fitness value indicates a better predictive performance under that hyperparameter combination. Therefore, the moths are ranked according to their fitness values, and the top n / 2 moths are selected as the flames (F). j (j=1,2,…,n / 2), this flame represents the current optimal solution. Next, for each moth, its position is updated according to the position of the flame, gradually approaching the global optimal solution. The calculation formula is as follows: D ij =|F j -X i |,X i =F j -D ij ·e -bt·cos(2πt), where b is a constant, t is the current iteration number, and D ij It is a moth X i With Flame F j The distance between them is calculated. Further, the fitness value of the updated moth is calculated, and the position of the flame is updated, selecting the current optimal moth as the new flame. The above steps are repeated until the maximum number of iterations is reached or other termination conditions are met (such as the prediction error being less than a preset threshold). After multiple iterations, the position of the moth with the lowest fitness value is selected as the optimal hyperparameter combination. At this point, the model is considered to have converged, and the final trained battery prediction model is obtained.
[0100] Optionally, such as Figure 6 As shown in S616-S622, after obtaining the trained battery prediction model, further error analysis can be used to evaluate the model's prediction error to determine whether further model adjustments or additional training are needed. Based on the results of the error analysis, the model's hyperparameters are adjusted to improve prediction performance and optimize the model to better adapt to data and task requirements. The dataset is then divided into training, validation, and test sets to evaluate the model's generalization ability, ensuring good performance even on unseen data, preventing overfitting, and improving the model's robustness and reliability. Next, the model is retrained using the adjusted hyperparameters, inputting sample feature data into the model for a new round of training to update the model to reflect the new hyperparameter settings and improve prediction accuracy.
[0101] Optionally, such as Figure 7 As shown in S714-S716, after the trained battery prediction model is determined, the energy consumption of the battery during the actual driving process of the vehicle can be predicted based on the model, and the prediction error of the model can be evaluated based on the prediction results to determine whether further adjustment of the model or additional training is needed.
[0102] In this application embodiment, a battery management method is provided, which combines LSTM and BiGRU to construct an initial battery prediction model. LSTM can capture the long-term trends and patterns in battery state changes, while BiGRU can capture information from time series data in both forward and backward directions, thereby improving the prediction accuracy of battery state of charge and energy consumption. Metaheuristic algorithms such as the improved moth flame optimization algorithm are used to efficiently search the hyperparameter space, thereby optimizing the hyperparameters of the battery prediction model and improving the training efficiency and prediction accuracy of the model.
[0103] Please see Figure 8 , Figure 8 This is a structural block diagram of a battery management device provided in an embodiment of this application.
[0104] like Figure 8As shown, the battery management device 800 includes:
[0105] The feature data acquisition module 810 is used to acquire the feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path.
[0106] The model prediction module 820 is used to input feature data into the battery prediction model and obtain the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model.
[0107] The actual energy consumption acquisition module 830 is used to acquire the actual energy consumption of the vehicle in the current sub-path.
[0108] The error correction module 840 is used to update the prediction error probability distribution of the battery prediction model based on feature data, initial predicted energy consumption and actual energy consumption, and correct the initial predicted energy consumption according to the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path.
[0109] In some possible embodiments, the battery management device 800 further includes: a path division module, used to obtain the complete path of the vehicle through map navigation software, and divide the complete path into multiple sub-paths according to traffic nodes or a preset length; and a feature data acquisition module 810, used to obtain the traffic features of the current sub-path and the battery features of the vehicle in the current sub-path, and determine the feature data of the vehicle in the current sub-path based on the energy consumption correction information, traffic features and battery features of the vehicle in the previous sub-path.
[0110] In some possible embodiments, the error correction module 840 is also used to calculate the prediction error between the actual energy consumption and the initial predicted energy consumption; based on the prediction error and feature data, the prior prediction error probability distribution of the battery prediction model is updated to the posterior prediction error probability distribution according to Bayes' theorem.
[0111] In some possible embodiments, the error correction module 840 is further configured to determine the error correction coefficient based on the expected value of the prediction error in the posterior prediction error probability distribution, and to correct the initial prediction energy consumption based on the error correction coefficient to obtain the corrected prediction energy consumption; and to use the corrected prediction energy consumption and the error correction coefficient as energy consumption correction information for the vehicle in the current sub-path.
[0112] In some possible embodiments, the battery management device 800 further includes: a model training module for constructing an initial battery prediction model based on a long short-term memory network and a bidirectional gated recurrent unit; acquiring multiple sample feature data and inputting each sample feature data into the initial battery prediction model to train the initial battery prediction model; during the training process of the initial battery prediction model, controlling the initial battery prediction model to output the corresponding predicted state of charge based on each sample feature data, and adjusting the hyperparameters of the initial battery prediction model according to each predicted state of charge and the actual state of charge of each sample feature data until the initial battery prediction model converges to obtain the trained battery prediction model.
[0113] In some possible embodiments, the model training module is also used to calculate the training loss value based on each predicted state of charge and the actual state of charge of each sample feature data, and adjust the hyperparameters of the initial battery prediction model based on the training loss value through a metaheuristic algorithm until the initial battery prediction model converges.
[0114] In some possible embodiments, the battery management device 800 further includes: a power adjustment module for acquiring the predicted state of charge output by the battery prediction model, and adjusting the power of the battery on the corresponding sub-path based on the predicted state of charge and traffic characteristics on the corresponding sub-path.
[0115] In this embodiment of the application, a battery management device is provided, wherein: a feature data acquisition module is used to acquire feature data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path; a model prediction module is used to input the feature data into a battery prediction model to acquire the initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model; an actual energy consumption acquisition module is used to acquire the actual energy consumption of the vehicle in the current sub-path; and an error correction module is used to update the prediction error probability distribution of the battery prediction model based on the feature data, the initial predicted energy consumption, and the actual energy consumption, and correct the initial predicted energy consumption according to the updated prediction error probability distribution to obtain the energy consumption correction information of the vehicle in the current sub-path. First, the feature data acquisition module comprehensively considers the energy consumption correction information of the vehicle in the previous sub-path and the real-time driving information of the current sub-path to obtain the feature data of the current sub-path. This feature data can more accurately reflect the impact of historical energy consumption data and actual driving conditions on energy consumption prediction, thus providing more accurate data input for the energy consumption prediction of the current sub-path. Then, the model prediction module processes the generated feature data using a pre-trained battery prediction model and outputs the initial predicted energy consumption of the vehicle in the current sub-path. This provides the initial energy consumption prediction result based on the existing battery prediction model as the basis for subsequent error correction. Next, the actual energy consumption acquisition module actually measures and records the actual energy consumption data of the vehicle in the current sub-path, and the error correction module updates the prediction error probability distribution of the battery prediction model based on the feature data, the initial predicted energy consumption, and the actual energy consumption, realizing dynamic correction of the model prediction error and helping to continuously optimize the model's prediction performance. Furthermore, the updated error distribution is used to correct the initial predicted energy consumption of the current sub-path, thereby obtaining more accurate energy consumption correction information and improving the accuracy of energy consumption prediction for subsequent sub-paths. The method described in this application allows the model to be corrected using actual energy consumption data after the vehicle has passed through a sub-path. The corrected model is then used to predict the energy consumption of the next sub-path, thereby improving the accuracy of the model's prediction of battery energy consumption. This enables the battery management system to more accurately manage the vehicle's battery energy and dynamically adjust the vehicle's energy distribution and management strategies under different driving conditions, thus extending the vehicle's driving range.
[0116] This application also provides a computer storage medium that can store multiple instructions adapted for loading by a processor and executing the steps of any of the methods described in the above embodiments.
[0117] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application. Figure 9As shown, terminal 900 may include: at least one terminal processor 901, at least one network interface 904, user interface 903, memory 905, and at least one communication bus 902.
[0118] The communication bus 902 is used to enable communication between these components.
[0119] The user interface 903 may include a display screen and a camera. Optionally, the user interface 903 may also include a standard wired interface and a wireless interface.
[0120] The network interface 904 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0121] The terminal processor 901 may include one or more processing cores. The terminal processor 901 connects to various parts within the terminal 900 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 905, and by calling data stored in the memory 905. Optionally, the terminal processor 901 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The terminal processor 901 may integrate one or more of the following: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), and a modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the terminal processor 901.
[0122] The memory 905 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 905 may include a non-transitory computer-readable storage medium. The memory 905 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 905 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), instructions for implementing the various method embodiments described above, etc.; the data storage area may store data involved in the various method embodiments described above, etc. Optionally, the memory 905 may also be at least one storage device located remotely from the aforementioned terminal processor 901. Figure 9 As shown, the memory 905, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a battery management program.
[0123] exist Figure 9 In the terminal 900 shown, the user interface 903 is mainly used to provide an input interface for the user and to obtain the user's input data; while the terminal processor 901 can be used to call the battery management program stored in the memory 905 and specifically perform the following operations:
[0124] Based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path, the characteristic data of the vehicle in the current sub-path is obtained.
[0125] Input the feature data into the battery prediction model to obtain the initial predicted energy consumption of the vehicle in the current sub-path.
[0126] Obtain the actual energy consumption of the vehicle in the current sub-path;
[0127] Based on feature data, initial predicted energy consumption, and actual energy consumption, the prediction error probability distribution of the battery prediction model is updated. The initial predicted energy consumption is then corrected based on the updated prediction error probability distribution to obtain the energy consumption correction information for the vehicle in the current sub-path.
[0128] In some possible embodiments, the terminal processor 901 further performs the following steps: obtaining the complete path of the vehicle through map navigation software, and dividing the complete path into multiple sub-paths according to traffic nodes or a preset length; obtaining the characteristic data of the vehicle in the current sub-path based on the energy consumption correction information of the vehicle in the previous sub-path and the driving information of the vehicle in the current sub-path, including: obtaining the traffic characteristics of the current sub-path and the battery characteristics of the vehicle in the current sub-path, and determining the characteristic data of the vehicle in the current sub-path based on the energy consumption correction information, traffic characteristics and battery characteristics of the vehicle in the previous sub-path.
[0129] In some possible embodiments, when the terminal processor 901 updates the prediction error probability distribution of the battery prediction model based on feature data, initial predicted energy consumption, and actual energy consumption, it specifically performs the following steps: calculating the prediction error between the actual energy consumption and the initial predicted energy consumption; and updating the prior prediction error probability distribution of the battery prediction model to the posterior prediction error probability distribution based on the prediction error and feature data, according to Bayes' theorem.
[0130] In some possible embodiments, when the terminal processor 901 performs the following steps to correct the initial predicted energy consumption based on the updated prediction error probability distribution and obtain the energy consumption correction information of the vehicle in the current sub-path: determine the error correction coefficient based on the expectation of the prediction error in the posterior prediction error probability distribution, and correct the initial predicted energy consumption based on the error correction coefficient to obtain the corrected predicted energy consumption; use the corrected predicted energy consumption and the error correction coefficient as the energy consumption correction information of the vehicle in the current sub-path.
[0131] In some possible embodiments, the terminal processor 901 further performs the following steps: constructing an initial battery prediction model based on a long short-term memory network and a bidirectional gated recurrent unit; acquiring multiple sample feature data and inputting each sample feature data into the initial battery prediction model to train the initial battery prediction model; during the training process of the initial battery prediction model, controlling the initial battery prediction model to output the corresponding predicted state of charge based on each sample feature data, and adjusting the hyperparameters of the initial battery prediction model according to each predicted state of charge and the actual state of charge of each sample feature data until the initial battery prediction model converges to obtain the trained battery prediction model.
[0132] In some possible embodiments, when the terminal processor 901 performs the following steps to adjust the hyperparameters of the initial battery prediction model according to the actual state of charge of each predicted state of charge and each sample feature data until the initial battery prediction model converges: calculate the training loss value according to the actual state of charge of each predicted state of charge and each sample feature data, and adjust the hyperparameters of the initial battery prediction model according to the training loss value through a metaheuristic algorithm until the initial battery prediction model converges.
[0133] In some possible embodiments, the terminal processor 901 further performs the following steps: obtaining the predicted state of charge output by the battery prediction model, and adjusting the power of the battery on the corresponding sub-path based on the predicted state of charge and traffic characteristics on the corresponding sub-path.
[0134] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0135] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0136] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this specification are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The aforementioned available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., Digital Versatile Discs (DVDs)), or semiconductor media (e.g., Solid State Disks (SSDs)).
[0137] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0139] The above is a description of a battery management method, device, storage medium, and terminal provided in this application. For those skilled in the art, based on the ideas of the embodiments of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A battery management method, characterized by, The method comprises: obtaining feature data of the vehicle on the current sub-path based on the energy consumption correction information of the vehicle on the previous sub-path and driving information of the vehicle on the current sub-path; inputting the feature data into a battery prediction model to obtain initial predicted energy consumption of the vehicle on the current sub-path output by the battery prediction model, wherein the battery prediction model is obtained by training in the following manner: constructing an initial battery prediction model based on a long short-term memory network and a bidirectional gated recurrent unit; obtaining a plurality of sample feature data and inputting each sample feature data into the initial battery prediction model to train the initial battery prediction model; in the training process of the initial battery prediction model, controlling the initial battery prediction model to output a corresponding predicted state of charge based on each sample feature data, and adjusting hyperparameters of the initial battery prediction model according to each predicted state of charge and a real state of charge of each sample feature data until the initial battery prediction model converges to obtain a trained battery prediction model; obtaining actual energy consumption of the vehicle on the current sub-path; calculating a prediction error between the actual energy consumption and the initial predicted energy consumption; updating a prior prediction error probability distribution of the battery prediction model to a posterior prediction error probability distribution according to the prediction error and the feature data based on Bayes' theorem; determining an error correction coefficient according to an expectation of the prediction error in the posterior prediction error probability distribution, and correcting the initial predicted energy consumption based on the error correction coefficient to obtain a corrected predicted energy consumption, and taking the corrected predicted energy consumption and the error correction coefficient as the energy consumption correction information of the vehicle on the current sub-path.
2. The method of claim 1, wherein, The method further comprises: obtaining a complete path of the vehicle through map navigation software, and dividing the complete path into a plurality of sub-paths according to traffic nodes or a preset length; the obtaining of the feature data of the vehicle on the current sub-path based on the energy consumption correction information of the vehicle on the previous sub-path and the driving information of the vehicle on the current sub-path comprises: obtaining traffic features of the current sub-path and battery features of the vehicle on the current sub-path, and determining the feature data of the vehicle on the current sub-path according to the energy consumption correction information of the vehicle on the previous sub-path, the traffic features, and the battery features.
3. The method of claim 1, wherein, the adjusting of the hyperparameters of the initial battery prediction model according to the predicted state of charge of each sample feature data and the real state of charge of each sample feature data until the initial battery prediction model converges comprises: calculating a training loss value according to the predicted state of charge of each sample feature data and the real state of charge of each sample feature data, and adjusting the hyperparameters of the initial battery prediction model based on the training loss value through a meta-heuristic algorithm until the initial battery prediction model converges.
4. The method of claim 1, wherein, The method further comprises: obtaining a predicted state of charge output by the battery prediction model, and adjusting power of a battery on a corresponding sub-path based on the predicted state of charge and traffic features on the corresponding sub-path.
5. A battery management device, characterized by, The device comprises: characteristic data acquisition module, configured to acquire characteristic data of the vehicle in the current sub-path based on energy consumption correction information of the vehicle in a previous sub-path and driving information of the vehicle in the current sub-path; a model prediction module, configured to input the characteristic data into a battery prediction model to acquire initial predicted energy consumption of the vehicle in the current sub-path output by the battery prediction model, wherein the battery prediction model is obtained by training in the following manner: an initial battery prediction model is constructed based on a long short-term memory network and a bidirectional gated recurrent unit; a plurality of sample characteristic data are acquired, and each sample characteristic data is input into the initial battery prediction model to train the initial battery prediction model; during the training of the initial battery prediction model, the initial battery prediction model is controlled to output a corresponding predicted state of charge based on each sample characteristic data, and hyperparameters of the initial battery prediction model are adjusted according to each predicted state of charge and a real state of charge of each sample characteristic data until the initial battery prediction model converges to obtain a trained battery prediction model; an actual energy consumption acquisition module, configured to acquire actual energy consumption of the vehicle in the current sub-path; an error correction module, configured to calculate a prediction error between the actual energy consumption and the initial predicted energy consumption; and update a prior prediction error probability distribution of the battery prediction model to a posterior prediction error probability distribution according to Bayes' theorem based on the prediction error and the characteristic data; determine an error correction coefficient according to an expectation of the prediction error in the posterior prediction error probability distribution, and correct the initial predicted energy consumption based on the error correction coefficient to obtain a corrected predicted energy consumption; and take the corrected predicted energy consumption and the error correction coefficient as energy consumption correction information of the vehicle in the current sub-path.
6. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by the processor to implement the steps of the method according to any one of claims 1-4.
7. A terminal, characterized by comprising: The computer program is stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of claims 1-4 when executing the program.
Citation Information
Patent Citations
Vehicle energy consumption prediction method, system and equipment
CN116278771A
Vehicle control method and device and vehicle
CN117429315A