Model training method, battery residual charging time prediction method and device

By using a tree-based prediction model and logarithmic space transformation, combined with data cleaning techniques, the instability problem in predicting remaining battery charging time was solved, resulting in more accurate predictions and improved user experience and device efficiency.

CN122332831APending Publication Date: 2026-07-03WEICHAI POWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WEICHAI POWER CO LTD
Filing Date
2026-06-02
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing battery remaining charging time prediction methods rely on instantaneous snapshot data, resulting in drastic fluctuations in prediction results and a lack of stability and accuracy, thus failing to provide a reliable reference.

Method used

A tree-based prediction model is adopted. By acquiring battery state information from the training sample set, prediction is performed in logarithmic space. Logarithmic and exponential transformations are used to train a stable prediction model. Pearson correlation coefficient is used for data cleaning to remove outliers.

Benefits of technology

It achieves more stable and accurate prediction of remaining battery charging time, improves user experience and device scheduling efficiency, and enhances the reliability and stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122332831A_ABST
    Figure CN122332831A_ABST
Patent Text Reader

Abstract

This disclosure presents a model training method, a battery remaining charging time prediction method, and an apparatus, relating to the field of electronic digital data processing. The method includes: acquiring a training sample set; the training sample set includes multiple training samples, including the state information of a first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, wherein the first remaining charging time is obtained by logarithmically processing the expected second remaining charging time of the first battery in exponential space at the first historical moment; obtaining a third remaining charging time predicted by a first prediction model based on the first battery state information at the first historical moment in logarithmic space; and training the first prediction model based on the first and third remaining charging times to obtain a second prediction model, thereby addressing the technical problems of inconsistent remaining charging time display and end-of-charge errors in existing technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of electronic digital data processing, and in particular to a model training method, a battery remaining charging time prediction method and apparatus. Background Technology

[0002] With the booming development of new energy vehicles and intelligent energy storage equipment, the performance optimization of the Battery Management System (BMS), as the core module ensuring the safe and efficient operation of batteries, has become a focus of the industry. Among them, the remaining charging time prediction function directly affects user experience and equipment scheduling efficiency, and is one of the key indicators for measuring the intelligence level of the BMS.

[0003] In related technologies, the prediction of the remaining charging time of a battery often adopts a linear regression method, which predicts the remaining charging time by simply mapping the battery's state of charge to the remaining charging time. However, since the BMS thermal management strategy will dynamically adjust the charging current in a step-like manner during the charging process, the prediction result will change drastically when the current changes suddenly, which makes the displayed value of the remaining charging time unstable and subject to end-of-line error, and cannot provide a reliable reference for users. Summary of the Invention

[0004] This invention provides a model training method, a battery remaining charging time prediction method and device to achieve more stable and accurate remaining charging time prediction, thereby improving user experience and device scheduling efficiency.

[0005] According to one aspect of the present invention, a model training method is provided, the method comprising: Obtain a training sample set; the training sample set includes multiple training samples, the training samples include the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, the first remaining charging time is obtained by logarithmic processing of the expected second remaining charging time of the first battery in exponential space at the first historical moment. Using a tree-based first prediction model, based on the first battery state information, the third remaining charging time of the first battery in the logarithmic space at the first historical moment is obtained; Based on the first remaining charging time and the third remaining charging time, the first prediction model is trained to obtain a trained second prediction model.

[0006] According to another aspect of the present invention, a method for predicting the remaining charging time of a battery is provided, the method comprising: In response to a prediction request regarding the remaining charging time of the second battery at the current moment, the state information of the third battery at the current moment is obtained; the second battery is in a charging state. Using a pre-trained third prediction model, the fourth remaining charging time of the second battery in logarithmic space is predicted based on the third battery state information; wherein, the third prediction model is a model trained according to any of the model training methods described in the embodiments of this disclosure. The fourth remaining charging time is subjected to exponential restoration to obtain the fifth remaining charging time in exponential space. Based on the fifth remaining charging time, the sixth remaining charging time of the second battery at the current moment is determined.

[0007] According to another aspect of the present invention, a model training apparatus is provided, the apparatus comprising: The first module is used to obtain a training sample set; the training sample set includes multiple training samples, the training samples include the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, the first remaining charging time is obtained by logarithmic processing of the expected second remaining charging time of the first battery in exponential space at the first historical moment. The second module is used to obtain the third remaining charging time of the first battery in the logarithmic space at the first historical moment based on the first battery state information using a tree-based first prediction model. The third module is used to train the first prediction model based on the first remaining charging time and the third remaining charging time to obtain a trained second prediction model.

[0008] According to another aspect of the present invention, a battery remaining charging time prediction device is provided, the device comprising: The fourth module is used to respond to a prediction request for the remaining charging time of the second battery at the current moment, and to obtain the status information of the third battery at the current moment; the second battery is in a charging state; The fifth module is used to obtain the fourth remaining charging time of the second battery in logarithmic space based on the third battery state information using a pre-trained third prediction model; wherein the third prediction model is a model trained according to any of the model training methods described in the embodiments of this disclosure. The sixth module is used to perform exponential restoration processing on the fourth remaining charging time to obtain the fifth remaining charging time in exponential space, and to determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time.

[0009] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: One or more processors; Storage device for storing one or more programs. When one or more programs are executed by one or more processors, the one or more processors implement any of the model training methods or battery remaining charging time prediction methods as described in the embodiments of this disclosure.

[0010] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement any of the model training methods or battery remaining charging time prediction methods of the present invention.

[0011] According to another aspect of the present disclosure, a computer program product is provided, which, when executed by a processor, implements any of the model training methods or battery remaining charging time prediction methods in the embodiments of the present disclosure.

[0012] The technical solution of this disclosure provides a comprehensive and adaptable data foundation for model training by acquiring a training sample set including multiple training samples. These training samples include battery state information of the first battery at specific historical moments during the charging process and the expected remaining charging time after logarithmic processing. This data format helps the model learn the relationship between battery state and remaining charging time more accurately. A tree-based first prediction model obtains the predicted remaining charging time in logarithmic space based on the first battery state information. The tree structure better handles complex relationships and feature interactions in the data, improving the accuracy and adaptability of the prediction. A second prediction model is obtained by training the model based on the actual expected remaining charging time and the predicted value. By continuously adjusting the model parameters, the prediction results are made closer to the true value, enhancing the reliability and stability of the model. This technical solution solves the technical problems in related technologies where relying solely on "instantaneous snapshot" data leads to drastic fluctuations in remaining charging time prediction results, lack of stability in displayed values, and terminal errors. It achieves more stable and accurate remaining charging time prediction, improving user experience and device scheduling efficiency.

[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 A schematic flowchart of a model training method provided in an embodiment of this disclosure; Figure 2 A flowchart illustrating a method for predicting remaining battery charging time provided in an embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a model training device provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of a battery remaining charging time prediction device provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0018] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0019] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0020] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0021] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] Figure 1 This is a flowchart illustrating a model training method provided in an embodiment of this disclosure. This embodiment is applicable to obtaining a model for predicting the remaining charging time of a battery. The method can be executed by a model training device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers or servers. Figure 1 As shown, the method in this embodiment includes: S110. Obtain a training sample set; the training sample set includes multiple training samples, the training samples include the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, the first remaining charging time is obtained by logarithmic processing of the expected second remaining charging time of the first battery in exponential space at the first historical moment.

[0024] The training sample set can be understood as the dataset used to train the prediction model. The training sample set includes multiple training samples. By learning from a large number of training samples, the model can learn the mapping relationship between battery state information and remaining battery charging time. In this embodiment, the training samples include the first battery state information at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space at that first historical moment. The first battery can be understood as the battery sample object whose remaining charging time needs to be predicted. Optionally, the first battery can be a battery of a new energy vehicle. In this embodiment, relevant data of the first battery during the charging process is used to construct training samples to train a prediction model for predicting the remaining battery charging time.

[0025] In this embodiment of the disclosure, the first historical moment can be understood as multiple time points selected during the charging process of the first battery, used to record the battery's state information and corresponding remaining charging time information at each moment. The first battery state information can be understood as a set of parameters reflecting various states of the first battery at the first historical moment. These parameters can comprehensively describe the battery's charging state, health state, etc., at that moment, such as battery voltage, current, temperature, and charged amount. Optionally, the first battery state information includes one or more of the following: remaining battery charge percentage, battery health, battery cell temperature, battery charging time, total battery voltage, total battery current, charging power, current statistical characteristics, charge change rate, and cell temperature difference.

[0026] In this embodiment, logarithmic space, a mathematical space, corresponds to exponential space. Processing data in logarithmic space can alter the data's distribution characteristics, making data that originally exhibited nonlinear relationships in exponential space closer to linear relationships in logarithmic space, facilitating model learning and prediction. In exponential space, data may exhibit nonlinear characteristics such as exponential growth or decay. The expected first remaining charging time, i.e., in logarithmic space, is the expected value of how long the first battery will need to be fully charged after the first historical moment. It is obtained by logarithmically processing the expected second remaining charging time of the first battery in exponential space. The second remaining charging time, i.e., in exponential space, is the expected value of how long the first battery will need to be fully charged after the first historical moment.

[0027] The method for obtaining the first remaining charging time may include: first adding the second remaining charging time to 1 to obtain the addition result; then taking the logarithm of the addition result with base 10 to obtain the first remaining charging time.

[0028] Alternatively, the first remaining charging time can be obtained based on the second remaining charging time using the following formula: ; Where x can be represented as the second remaining charging time, and y can be represented as the first remaining charging time.

[0029] In this embodiment of the disclosure, the logarithmic space is used to model the long-tailed distribution characteristics of the remaining charging time, which can improve the model's sensitivity to small time changes at the end of charging (CV stage) and solve the problem that the traditional model has a large prediction error when it is almost fully charged.

[0030] In this embodiment, the method further includes: obtaining the state information of the first battery at each second historical moment within a preset historical time period; performing differential calculation on adjacent second battery state information to determine the charging sub-period of the first battery within the preset historical time period; calculating the Pearson correlation coefficient between the battery remaining power percentage sequence of the first battery and the corresponding time series within the charging sub-period; if the Pearson correlation coefficient exceeds a preset correlation coefficient threshold and the direction of change of the state of charge of the first battery satisfies the charging increment condition, then the battery state information of the first battery at each sampling moment within the charging sub-period is used as each of the training samples. In this embodiment, using the Pearson correlation coefficient of the remaining power percentage-time series as the benchmark for data cleaning can automatically identify and remove dirty data caused by sensor failure, poor contact, etc., and obtain high-purity training samples without manual annotation, thereby improving the robustness of the model.

[0031] The preset historical time period can be set according to actual needs and is not specifically limited here. Obtaining the preset historical time period can include: obtaining a configured preset historical time period in response to a configuration operation for the historical time period. Optionally, obtaining a configured preset historical time period in response to a configuration operation for the historical time period can include: obtaining a configured start time in response to a configuration operation for the start time of the historical time period; and obtaining a configured end time in response to a configuration operation for the end time of the historical time period. The configured preset historical time period is obtained based on the configured start time and end time. It can be understood that the start time is earlier than the end time; in other words, the end time is later than the start time. The end time can default to the current time or can be a time before the current time set according to needs. The second historical time can be understood as multiple specific time points selected within the preset historical time period, used to record the battery's state information at these times. These times can be evenly distributed or non-uniformly selected according to actual needs. It should be noted that the sampling time can be understood as the time when the battery state information of the first battery is sampled within the charging sub-period according to a preset period (such as 0.1 seconds or 1 second).

[0032] The second battery state information can be understood as a set of parameters reflecting the various states of the first battery at a second historical moment. Similar to the first battery state information, it includes data describing the battery state such as voltage, current, temperature, and charge level. Differential calculation involves subtracting certain key parameters from two adjacent sets of second battery state information, and analyzing the changes in battery state at different times by calculating the difference. For example, calculating the difference in battery voltage between adjacent moments helps understand the voltage trend. A charging sub-period can be understood as a sub-period within a preset historical period, determined by the differential calculation results, during which the first battery is in a stable charging state. Within this sub-period, the battery charging process is relatively regular, without significant abnormal fluctuations.

[0033] In this embodiment, the battery remaining power percentage sequence can be understood as a sequence of the first battery remaining power percentage recorded in chronological order within a charging sub-period. For example, within a certain charging sub-period, the battery remaining power percentage is recorded at regular intervals to form a sequence. The time series can be understood as a set of time points corresponding to the battery remaining power percentage sequence, recording the specific time corresponding to each remaining power percentage. The Pearson correlation coefficient can be understood as a statistic used to measure the degree of linear correlation between two variables, with a value ranging from -1 to 1. In this embodiment, the Pearson correlation coefficient can be used to measure the degree of linear correlation between the battery remaining power percentage sequence and the corresponding time series. The closer the absolute value of the Pearson correlation coefficient is to 1, the stronger the linear correlation between the two sequences; the closer the absolute value of the Pearson correlation coefficient is to 0, the weaker the linear correlation between the two sequences.

[0034] In this embodiment, the preset correlation coefficient threshold can be understood as a value pre-set according to actual needs, which can be used to determine whether the linear correlation between the battery remaining percentage sequence and the corresponding time series meets the requirements. In this embodiment, the purpose of setting the correlation coefficient threshold is to eliminate extreme data segments where the battery remaining amount is less than 30% or greater than 98%. Specifically, the Pearson correlation coefficient between the remaining charging time (State of Charge, SOC) sequence and the time series within the effective charging sub-period is calculated. When the Pearson correlation coefficient is greater than 0.95, and the initial SOC value is greater than 30% and the final SOC value is less than 98%, the charging sub-period is retained. It can be understood that when the Pearson correlation coefficient exceeds the preset correlation coefficient threshold, it can be determined that the charging process of the first battery within the charging sub-period has good linear characteristics, and its state information can be used as training samples. In other words, the training samples are the battery state information of the first battery at each historical moment within the charging sub-period. After calculating the Pearson correlation coefficient between the remaining battery capacity percentage sequence of the first battery and the corresponding time sequence during the charging sub-period, if the Pearson correlation coefficient exceeds the preset correlation coefficient threshold, it indicates that the remaining battery capacity percentage of the first battery has a good linear correlation with time during this charging sub-period, and the charging process of the first battery is relatively stable.

[0035] Specifically, a preset historical time period is determined, and the battery state information of the first battery at each second historical moment within the preset historical time period is obtained, i.e., the second battery state information. For two adjacent second battery state information sets, a difference calculation is performed on the two adjacent second battery state information sets, and based on the difference calculation result, the charging sub-time period of the first battery within the preset time period is determined. Then, the battery remaining charge percentage sequence and corresponding time sequence of the first battery within the charging sub-time period can be determined. The Pearson correlation coefficient between the battery remaining charge percentage sequence of the first battery within the charging sub-time period and the corresponding time sequence is calculated. If the Pearson correlation coefficient exceeds a preset correlation coefficient threshold and the direction of change of the state of charge of the first battery satisfies the charging increment condition, then the battery state information of the first battery at each sampling moment within the charging sub-time period can be used as each of the training samples.

[0036] S120. Using a tree-based first prediction model, based on the first battery state information, obtain the third remaining charging time of the first battery in the logarithmic space at the first historical moment.

[0037] The third remaining charging time can be understood as the remaining charging time of the first battery in the logarithmic space at the first historical moment, predicted by the tree-based first prediction model based on the first battery state information. In this embodiment, the tree-based first prediction model, i.e., a prediction model constructed using a tree structure, is used to predict the remaining charging time of the first battery in the logarithmic space at the first historical moment based on the input first battery state information. Optionally, the tree-based prediction model includes at least one of the following: a tree-based first prediction model, a gradient boosting tree model, an extreme gradient boosting model, a lightweight gradient boosting model, and a random forest model.

[0038] In this embodiment of the disclosure, the preset constraints of the tree-based first prediction model may include one of the following: the remaining battery capacity percentage of the first battery at the first historical time is negatively correlated with the actual remaining charging time, and the charged time of the battery at the first historical time is negatively correlated with the actual remaining charging time. Specifically, the negative correlation between the charged time of the first battery at the first historical time and the actual remaining charging time means that as the remaining battery capacity percentage increases, the predicted remaining charging time decreases monotonically; and as the charged time increases, the predicted remaining charging time decreases monotonically.

[0039] In this embodiment, the preset reservation conditions for the tree-based first prediction model enable more directional training of the tree-based prediction model. Utilizing the negative correlation between the remaining battery percentage, charged time, and actual remaining charging time reduces the model's exploration range, accelerates convergence, improves prediction accuracy, and makes the model more closely reflect battery charging patterns. In other words, compared to traditional black-box models, the gradient boosting tree algorithm incorporates a monotonic hard constraint on the relationship between remaining battery power and time, ensuring that the model's output conforms to electrochemical physical laws under any extreme conditions. This eliminates common logical fallacies in neural network models and significantly improves the algorithm's interpretability and security.

[0040] Specifically, the first battery state information is provided to the tree-based first prediction model, thereby obtaining the predicted remaining charging time of the first battery in logarithmic space at the first historical time, i.e., the third remaining charging time. In other words, the first battery state information is input into the tree-based first prediction model, thereby obtaining the predicted remaining charging time of the first battery in logarithmic space at the first historical time.

[0041] S130. Based on the first remaining charging time and the third remaining charging time, train the first prediction model to obtain a trained second prediction model.

[0042] In this embodiment of the disclosure, the second prediction model can be understood as a model that can more accurately predict the remaining charging time of the battery after training based on the first remaining charging time and the third remaining charging time, based on the first prediction model.

[0043] Specifically, based on the first remaining charging time and the third remaining charging time, the loss value of the loss function of the first prediction model is determined. The parameters in the first prediction model are adjusted according to the loss value. The convergence of the loss function is taken as the training objective, and the first prediction model is trained to obtain the second prediction model.

[0044] The loss function is pre-set and used to measure the accuracy of the output of the first prediction model during training. Specifically, the training error of the loss function is used as a condition to detect whether the loss function has reached convergence. For example, whether the training error is less than a preset error, whether the error trend is stable, or whether the current number of iterations is equal to a preset number. If the convergence condition is met, such as the training error of the loss function being less than the preset error or the error trend being stable, it indicates that the first prediction model has completed training, and iterative training can be stopped. If the convergence condition is not met, training samples from the training sample set can be further obtained to train the first prediction model until the training error of the loss function is within a preset range. When the training error of the loss function converges, the trained first prediction model can be used as the second prediction model. The remaining charging time of the battery can be predicted based on the trained second prediction model.

[0045] The technical solution of this disclosure provides a comprehensive and adaptable data foundation for model training by acquiring a training sample set including multiple training samples. These training samples include battery state information of the first battery at specific historical moments during the charging process and the expected remaining charging time after logarithmic processing. This data format helps the model learn the relationship between battery state and remaining charging time more accurately. A tree-based first prediction model obtains the predicted remaining charging time in logarithmic space based on the first battery state information. The tree structure better handles complex relationships and feature interactions in the data, improving the accuracy and adaptability of the prediction. A second prediction model is obtained by training the model based on the actual expected remaining charging time and the predicted value. By continuously adjusting the model parameters, the prediction results are made closer to the true value, enhancing the reliability and stability of the model. This technical solution solves the technical problems in related technologies where relying solely on "instantaneous snapshot" data leads to drastic fluctuations in remaining charging time prediction results, lack of stability in displayed values, and terminal errors. It achieves more stable and accurate remaining charging time prediction, improving user experience and device scheduling efficiency.

[0046] Figure 2 This is a flowchart illustrating a model training method provided in an embodiment of this disclosure. This embodiment is applicable to situations where the remaining charging time of a battery needs to be predicted. This method can be executed by a battery remaining charging time prediction device, which can be implemented in hardware and / or software and can be configured in electronic devices such as computers or servers. Figure 2 As shown, the method in this embodiment includes: S210, In response to a prediction request for the remaining charging time of the second battery at the current moment, obtain the state information of the third battery of the second battery at the current moment; the second battery is in a charging state.

[0047] The second battery can be understood as a battery that is currently charging and whose remaining charging time needs to be predicted. For example, the second battery can be a battery from a new energy vehicle. The prediction request can be understood as a request to obtain the third battery state information of the second battery at the current moment and determine its remaining charging time in exponential space. The prediction request may include the battery identifier of the second battery. It is understood that the battery identifier can be used to distinguish different batteries. Optionally, the battery identifier may include image data and / or text data. In this embodiment of the disclosure, the third battery state information can be understood as the battery state information of the second battery at the current moment. The battery state information includes one or more of the following: remaining battery charge percentage, battery health, battery cell temperature, battery charging time, battery total voltage, battery total current, charging power, current statistical characteristics, charge change rate, and cell temperature difference. It is understood that the battery state information included in the first battery state information, the second battery state information, and the third battery state information is the same.

[0048] In this embodiment, there are multiple ways to obtain the prediction request, and no specific limitation is made herein. As an optional implementation in this embodiment, obtaining the prediction request may include: displaying a first interface, wherein the first interface includes a battery identifier; in response to a selection operation for the battery identifier, determining the selected battery identifier; and generating a prediction request based on the selected battery identifier to predict the remaining charging time of the battery corresponding to the selected battery identifier. As another optional implementation in this embodiment, displaying a second interface, the second interface including an input box for inputting a battery identifier; and obtaining a prediction request based on the battery identifier obtained from the input box to predict the remaining charging time of the battery corresponding to this battery identifier.

[0049] S220. Using a pre-trained third prediction model, based on the third battery state information, obtain the fourth remaining charging time of the second battery in the logarithmic space; the third prediction model is a model trained according to the model training method in any of the foregoing embodiments.

[0050] In this embodiment, the third prediction model can be understood as a model trained according to the model training method described in any of the foregoing embodiments. The fourth remaining charging time can be understood as the remaining charging time of the second battery predicted in logarithmic space by the pre-trained third prediction model based on the third battery state information. Specifically, the third battery state information is provided to the pre-trained third prediction model, thereby obtaining the output of the third prediction model, namely, the fourth remaining charging time of the second battery predicted in logarithmic space.

[0051] S230. Perform exponential restoration on the fourth remaining charging time to obtain the fifth remaining charging time in exponential space, and determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time.

[0052] The fifth remaining charging time can be understood as the remaining charging time in exponential space obtained by exponentially restoring the fourth remaining charging time. The sixth remaining charging time can be understood as the remaining charging time obtained based on the fifth remaining charging time. The sixth remaining charging time is the remaining charging time in exponential space.

[0053] Specifically, after obtaining the fourth remaining charging time, an exponential reduction process can be performed on the fourth remaining charging time to obtain the remaining charging time in exponential space, i.e., the fifth remaining charging time. Then, based on the fifth remaining charging time, the sixth remaining charging time of the second battery at the current moment is determined.

[0054] In this embodiment of the disclosure, determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time may include: obtaining the seventh remaining charging time of the second battery at the moment preceding the current moment; and determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time. The seventh remaining charging time can be understood as the remaining charging time of the second battery at the moment preceding the current moment. It is understood that the seventh remaining charging time is the remaining charging time in exponential space. In this embodiment of the disclosure, there are multiple ways to determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time. It should be noted that the time interval between the current moment and the moment preceding the current moment can be set according to actual needs and is not specifically limited here, for example, 1 second, 5 seconds, or 1 minute, etc. Typically, the time interval between the two is 1 second.

[0055] As an optional implementation of this disclosure, determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time may include: weightedly fusing the fifth remaining charging time and the seventh remaining charging time to obtain the sixth remaining charging time of the second battery at the current moment. Specifically, weightedly fusing the fifth remaining charging time and the seventh remaining charging time yields a weighted fusion result, i.e., the sixth remaining charging time of the second battery at the current moment.

[0056] Optionally, the sixth remaining charging time of the second battery at the current moment can be obtained by weighted fusion of the fifth remaining charging time and the seventh remaining charging time using the following formula: ; in, This can represent the fifth remaining charging time, i.e., the model output. The predicted value at any given time. This can be represented as the seventh remaining charging time, i.e., the model output. Predicted value at time -1. It can be a weight value. It can be expressed as the sixth remaining charging time of the second battery at the current moment.

[0057] As another optional implementation in this disclosure, determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time may include: obtaining an eighth remaining charging time based on a preset change in the remaining charging time per unit time based on the seventh remaining charging time and the remaining charging time per unit time; and taking the minimum value between the fifth remaining charging time and the eighth remaining charging time as the sixth remaining charging time of the second battery at the current moment.

[0058] In this embodiment, the preset change in remaining charging time per unit time can be an empirical value obtained from a large number of experiments, or it can be predicted based on a pre-trained artificial intelligence model. The eighth remaining charging time can be understood as the remaining charging time obtained based on the seventh remaining charging time and the preset change in remaining charging time per unit time. It should be noted that the preset change and the eighth remaining charging time are the remaining charging times in exponential space.

[0059] Specifically, a preset change in the remaining charging time per unit time is determined. It should be noted that this preset change is a negative number. Then, the preset change and the seventh remaining charging time are summed; the result is the eighth remaining charging time. After obtaining the eighth remaining charging time, the fifth and eighth remaining charging times are compared to determine the minimum of the two. This minimum value is then used as the sixth remaining charging time of the second battery at the current moment.

[0060] Optionally, the eighth remaining charging time is obtained by expressing a preset change in the remaining charging time per unit time based on the seventh remaining charging time and the remaining charging time per unit time using the following formula; the minimum value between the fifth remaining charging time and the eighth remaining charging time is taken as the sixth remaining charging time of the second battery at the current moment: ; in, This can be represented as the fifth remaining charging time. This can be represented as the seventh remaining charging time; It can be expressed as a preset change in the remaining charging time per unit of time.

[0061] It should be noted that the technical solution of this disclosure adopts damped monotonically decreasing logic, and the output value is forced unless a step drop in charging power is detected (such as triggering thermal protection). The output value should not exceed the value from the previous moment. This ensures the continuity and unidirectionality of the countdown on the user end. Based on the above embodiment, when input data loss or significant deviation from the normal range is detected, the system can automatically switch to a linear estimation mode based on historical average power as a safety redundancy.

[0062] In this embodiment of the disclosure, in order to ensure that the feature distribution during inference is consistent with that during training, a fixed-length double-ended queue is maintained at the inference end to cache the data collected by the vehicle's sensors in real time, so as to calculate the rolling mean and differential features online.

[0063] The technical solution of this disclosure embodiment, in response to a prediction request for the remaining charging time of a second battery at the current moment, obtains the state information of a third battery of the second battery at the current moment; the second battery is in a charging state; based on the third battery state information, a fourth remaining charging time of the second battery in logarithmic space is obtained using a pre-trained third prediction model; wherein, the third prediction model is a model trained by the model training method described in any of the foregoing embodiments; the fourth remaining charging time is subjected to exponential restoration processing to obtain a fifth remaining charging time in exponential space, and a sixth remaining charging time of the second battery at the current moment is determined based on the fifth remaining charging time. The technical solution of this disclosure embodiment can achieve more stable and accurate remaining charging time prediction, improving user experience and device scheduling efficiency.

[0064] Figure 3 This is a schematic diagram of a model training device provided in an embodiment of the present disclosure. Figure 3 As shown, the model training device includes: a first module 310, a second module 320, and a third module 330. The first module 310 is used to acquire a training sample set; the training sample set includes multiple training samples, including the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space. The first remaining charging time is obtained by logarithmically processing the expected second remaining charging time of the first battery in exponential space at the first historical moment. The second module 320 is used to obtain the predicted third remaining charging time of the first battery in logarithmic space at the first historical moment using a tree-based first prediction model, based on the first battery state information. The third module 330 is used to train the first prediction model based on the first remaining charging time and the third remaining charging time to obtain a trained second prediction model.

[0065] The technical solution of this disclosure provides a comprehensive and adaptable data foundation for model training by acquiring a training sample set including multiple training samples. These training samples include battery state information of the first battery at specific historical moments during the charging process and the expected remaining charging time after logarithmic processing. This data format helps the model learn the relationship between battery state and remaining charging time more accurately. A tree-based first prediction model obtains the predicted remaining charging time in logarithmic space based on the first battery state information. The tree structure better handles complex relationships and feature interactions in the data, improving the accuracy and adaptability of the prediction. A second prediction model is obtained by training the model based on the actual expected remaining charging time and the predicted value. By continuously adjusting the model parameters, the prediction results are made closer to the true value, enhancing the reliability and stability of the model. This technical solution solves the technical problems in related technologies where relying solely on "instantaneous snapshot" data leads to drastic fluctuations in remaining charging time prediction results, lack of stability in displayed values, and terminal errors. It achieves more stable and accurate remaining charging time prediction, improving user experience and device scheduling efficiency.

[0066] In some embodiments of this disclosure, optionally, the preset constraints of the tree-based first prediction model include one of the following: the percentage of remaining battery charge of the first battery at the first historical time is negatively correlated with the actual remaining charging time, and the charged time and actual remaining charging time of the first battery at the first historical time are negatively correlated.

[0067] In some embodiments of this disclosure, optionally, the first battery status information includes one or more of the following: remaining battery charge percentage, battery health, battery cell temperature, battery charging time, total battery voltage, total battery current, charging power, current statistical characteristics, charge change rate, and cell temperature difference.

[0068] In some embodiments of this disclosure, optionally, the model training device further includes a seventh module; wherein the seventh module is configured to obtain the second battery state information of the first battery at each second historical moment within a preset historical time period; perform differential calculation on adjacent second battery state information to determine the charging sub-period of the first battery within the preset historical time period; calculate the Pearson correlation coefficient between the battery remaining power percentage sequence of the first battery and the corresponding time sequence within the charging sub-period; if the Pearson correlation coefficient exceeds a preset correlation coefficient threshold and the change direction of the state of charge of the first battery satisfies the charging increment condition, then the battery state information of the first battery at each sampling moment within the charging sub-period is used as each of the training samples.

[0069] The model training apparatus provided in this disclosure can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0070] It is worth noting that the various units and modules included in the above-mentioned model training device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0071] Figure 4 This is a schematic diagram of a battery remaining charging time prediction device provided in an embodiment of this disclosure. Figure 4 As shown, the battery remaining charging time prediction device includes a fourth module 410, a fifth module 420, and a sixth module 430. The fourth module 410 is used to obtain the third battery state information of the second battery at the current moment in response to a prediction request for the remaining charging time of the second battery at the current moment; the second battery is in a charging state. The fifth module 420 is used to obtain the predicted fourth remaining charging time of the second battery in logarithmic space based on the third battery state information using a pre-trained third prediction model; wherein the third prediction model is a model trained according to the model training method described in any of the foregoing embodiments. The sixth module 430 is used to perform exponential restoration processing on the fourth remaining charging time to obtain the fifth remaining charging time in exponential space, and determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time.

[0072] The technical solution of this disclosure embodiment, in response to a prediction request for the remaining charging time of a second battery at the current moment, obtains the state information of a third battery of the second battery at the current moment; the second battery is in a charging state; based on the third battery state information, a fourth remaining charging time of the second battery in logarithmic space is obtained using a pre-trained third prediction model; wherein, the third prediction model is a model trained by the model training method described in any of the foregoing embodiments; the fourth remaining charging time is subjected to exponential restoration processing to obtain a fifth remaining charging time in exponential space, and a sixth remaining charging time of the second battery at the current moment is determined based on the fifth remaining charging time. The technical solution of this disclosure embodiment can achieve more stable and accurate remaining charging time prediction, improving user experience and device scheduling efficiency.

[0073] In some embodiments of this disclosure, optionally, the sixth module 430 is used to obtain the seventh remaining charging time of the second battery at the previous moment at the current moment; and to determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time.

[0074] In some embodiments of this disclosure, optionally, the sixth module 430 is used to weightedly fuse the fifth remaining charging time and the seventh remaining charging time to obtain the sixth remaining charging time of the second battery at the current moment.

[0075] In some embodiments of this disclosure, optionally, the sixth module 430 is used to obtain an eighth remaining charging time based on the seventh remaining charging time and a preset change in the remaining charging time per unit time; and to take the minimum value between the fifth remaining charging time and the eighth remaining charging time as the sixth remaining charging time of the second battery at the current moment.

[0076] The model training apparatus provided in this disclosure can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.

[0077] It is worth noting that the various units and modules included in the above-mentioned battery remaining charging time prediction device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0078] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0079] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0080] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0081] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as model training methods or battery remaining charging time prediction methods.

[0082] In some embodiments, the model training method or the battery remaining charging time prediction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via read-only memory (ROM) 12 and / or communication unit 19. When the computer program is loaded into random access memory (RAM) 13 and executed by processor 11, one or more steps of the model training method or battery remaining charging time prediction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the model training method or battery remaining charging time prediction method by any other suitable means (e.g., by means of firmware).

[0083] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0084] Computer programs used to implement the model training method or battery remaining charging time prediction method of this disclosure can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0085] This disclosure provides a computer-readable storage medium storing computer instructions for causing a processor to execute a model training method, comprising: acquiring a training sample set; the training sample set including multiple training samples, the training samples including first battery state information at a first historical moment during the charging process of a first battery and a first expected remaining charging time in logarithmic space, the first remaining charging time being obtained by logarithmically processing a second expected remaining charging time of the first battery in exponential space at the first historical moment; obtaining a third predicted remaining charging time of the first battery in logarithmic space at the first historical moment using a tree-based first prediction model based on the first battery state information; and training the first prediction model based on the first remaining charging time and the third remaining charging time to obtain a trained second prediction model. Alternatively, computer instructions may be used to cause a processor to execute a battery remaining charging time prediction method, comprising: in response to a prediction request for the remaining charging time of a second battery at the current moment, obtaining third battery state information of the second battery at the current moment; the second battery being in a charging state; obtaining a fourth remaining charging time of the second battery in logarithmic space based on the third battery state information using a pre-trained third prediction model; wherein the third prediction model is a model trained according to the model training method described in any of the foregoing embodiments; performing exponential restoration processing on the fourth remaining charging time to obtain a fifth remaining charging time in exponential space, and determining a sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time.

[0086] In the context of this disclosure, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0087] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0088] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0089] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0090] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of embodiments of this disclosure.

[0091] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a model training method or a battery remaining charging time prediction method according to any embodiment of this disclosure.

[0092] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0093] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this disclosure can be achieved, and this is not limited herein.

[0094] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A model training method, characterized in that, The method includes: Obtain a training sample set; the training sample set includes multiple training samples, the training samples include the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, the first remaining charging time is obtained by logarithmic processing of the expected second remaining charging time of the first battery in exponential space at the first historical moment. Using a tree-based first prediction model, based on the first battery state information, the third remaining charging time of the first battery in the logarithmic space at the first historical moment is obtained; Based on the first remaining charging time and the third remaining charging time, the first prediction model is trained to obtain a trained second prediction model.

2. The model training method according to claim 1, characterized in that, The preset constraints of the tree-based first prediction model include one of the following: the percentage of remaining battery charge of the first battery at the first historical time is negatively correlated with the actual remaining charging time, and the charged time and actual remaining charging time of the first battery at the first historical time are negatively correlated.

3. The model training method according to claim 1, characterized in that, The first battery status information includes one or more of the following: remaining battery charge percentage, battery health, battery cell temperature, battery charging time, total battery voltage, total battery current, charging power, current statistical characteristics, charge change rate, and cell temperature difference.

4. The model training method according to claim 1, characterized in that, The method further includes: Obtain the state information of the second battery at each second historical moment within a preset historical time period; Differential calculations are performed on the adjacent second battery state information to determine the charging sub-period of the first battery within the preset historical time period; Calculate the Pearson correlation coefficient between the battery remaining power percentage sequence of the first battery and the corresponding time sequence during the charging sub-period; If the Pearson correlation coefficient exceeds a preset correlation coefficient threshold and the direction of change of the state of charge of the first battery satisfies the charging increment condition, then the battery state information of the first battery at each sampling time during the charging sub-period is used as each of the training samples.

5. A method for predicting the remaining charging time of a battery, characterized in that, The method includes: In response to a prediction request regarding the remaining charging time of the second battery at the current moment, the state information of the third battery at the current moment is obtained; the second battery is in a charging state. Using a pre-trained third prediction model, the fourth remaining charging time of the second battery in logarithmic space is predicted based on the third battery state information; wherein, the third prediction model is a model trained by the model training method according to any one of claims 1-4; The fourth remaining charging time is subjected to exponential restoration to obtain the fifth remaining charging time in exponential space. Based on the fifth remaining charging time, the sixth remaining charging time of the second battery at the current moment is determined.

6. The battery remaining charging time prediction method according to claim 5, characterized in that, Determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time includes: Obtain the seventh remaining charging time of the second battery in the previous time step before the current time step; Based on the fifth remaining charging time and the seventh remaining charging time, the sixth remaining charging time of the second battery at the current moment is determined.

7. The method according to claim 6, characterized in that, Determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time includes: The fifth remaining charging time and the seventh remaining charging time are weighted and fused to obtain the sixth remaining charging time of the second battery at the current moment.

8. The method according to claim 6, characterized in that, Determining the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time and the seventh remaining charging time includes: Based on the seventh remaining charging time and the preset change in the remaining charging time per unit time, the eighth remaining charging time is obtained. The minimum of the fifth remaining charging time and the eighth remaining charging time is taken as the sixth remaining charging time of the second battery at the current moment.

9. A model training device, characterized in that, The device includes: The first module is used to obtain a training sample set; the training sample set includes multiple training samples, the training samples include the state information of the first battery at a first historical moment during the charging process and the expected first remaining charging time in logarithmic space, the first remaining charging time is obtained by logarithmic processing of the expected second remaining charging time of the first battery in exponential space at the first historical moment. The second module is used to obtain the third remaining charging time of the first battery in the logarithmic space at the first historical moment based on the first battery state information using a tree-based first prediction model. The third module is used to train the first prediction model based on the first remaining charging time and the third remaining charging time to obtain a trained second prediction model.

10. A battery remaining charging time prediction device, characterized in that, The device includes: The fourth module is used to obtain the state information of the third battery at the current moment in response to a prediction request for the remaining charging time of the second battery at the current moment; the second battery is in a charging state; The fifth module is used to obtain the fourth remaining charging time of the second battery in logarithmic space based on the third battery state information using a pre-trained third prediction model; wherein the third prediction model is a model trained by the model training method according to any one of claims 1-4. The sixth module is used to perform exponential restoration processing on the fourth remaining charging time to obtain the fifth remaining charging time in exponential space, and to determine the sixth remaining charging time of the second battery at the current moment based on the fifth remaining charging time.