Battery performance prediction method, system, and storage medium
By optimizing the training process of the student model through causal transfer entropy and dynamic weight feedback mechanism, the adaptability problem of the battery performance prediction model when the data distribution changes is solved, and efficient and accurate battery performance prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FUJIAN XINGYUN SOFTWARE TECH CO LTD
- Filing Date
- 2026-06-29
- Publication Date
- 2026-07-31
AI Technical Summary
Existing battery performance prediction models suffer from low performance, low accuracy, and high power consumption. Furthermore, traditional knowledge distillation methods are poorly adaptable to changes in data distribution, cannot accurately quantify causal orientation metrics, and ignore the dynamic evolution trajectory of knowledge transfer, leading to a decrease in model accuracy in new scenarios.
By introducing causal transfer entropy to calculate the directional information-driven relationship between the teacher model and the student model, a dynamic weight feedback mechanism is constructed. Combined with a sliding window buffer and nonlinear mapping relationship, an adaptive balance coefficient is established to optimize the training process of the student model and achieve dynamic feature adaptive distillation learning.
It improves the generalization ability and robustness of the battery performance prediction model under complex and variable battery operating conditions, reduces the waste of computing resources, and enhances the accuracy of battery performance prediction and the adaptability of the model.
Smart Images

Figure CN122491406A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery energy management technology, and in particular to a battery performance prediction method, system and storage medium. Background Technology
[0002] With the booming development of smart manufacturing, renewable energy, and electric vehicles, the performance prediction of batteries, as core energy storage and supply components, is becoming increasingly important. Accurate prediction of indicators such as battery state of health (SOH), remaining useful life (RUL), and capacitance change trends plays a crucial role in ensuring system reliability and extending battery life. In recent years, numerous studies have utilized data-driven deep learning models to model and analyze multidimensional time-series battery data. Typical models include Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), One-Dimensional Convolutional Neural Network (1D-CNN), Transformer, and Temporal Convolutional Network (TCN). While these models demonstrate strong capabilities in time-series modeling and feature representation, they also face numerous challenges as model complexity increases. For example, the large number of parameters leads to high computational costs, making efficient deployment on resource-constrained embedded devices or edge computing platforms difficult, increasing hardware costs and potentially affecting the system's real-time response performance. To reduce model complexity, shorten inference time, and lower deployment costs, researchers have introduced model compression techniques, with knowledge distillation (KD) becoming an important means of compressing battery performance prediction models.
[0003] Knowledge distillation aims to compress and accelerate models while maintaining relatively stable performance by transferring knowledge from large, complex teacher networks to small, lightweight student networks. Existing knowledge distillation methods in the battery field are mainly divided into response-based, relation-based, and feature-based methods; however, each method has its limitations. Existing technologies have the following shortcomings in teacher knowledge distillation tasks: (1) Poor adaptability to changes in data distribution: Data distribution changes constantly in real-world scenarios, while traditional static feature mapping lacks adaptability. Taking image classification tasks as an example, during the training phase, the data learned by the model may mainly come from images under specific lighting and angles. However, in actual applications, the lighting conditions and shooting angles of test images may be very different from those of the training data. Traditional methods cannot adjust feature mapping to these changes, making it difficult for student models to acquire key knowledge applicable to new data distributions from teacher models. This results in low knowledge transfer efficiency and a significant drop in the accuracy of the model in new scenarios.
[0004] The lack of causal orientation metrics makes it impossible to eliminate "spurious correlation" interference: Traditional methods are based on instantaneous distribution alignment, which only reflects statistical correlation and cannot distinguish whether the improvement in student performance is due to teacher guidance or their own gradient optimization. It is easy to waste computational resources on "spurious correlation" channels.
[0005] Ignoring the dynamic evolution trajectory of knowledge transfer: Students' absorption of knowledge involves a "cognitive conflict period" and a "saturation period." Traditional preset weighting strategies cannot be finely adjusted according to students' real-time learning progress (such as absorption rate and stability), which limits the level of intelligence of distillation.
[0006] Therefore, there is an urgent need for a new method, system, and storage medium for predicting battery performance to solve the above-mentioned technical problems. Summary of the Invention
[0007] This invention provides a battery performance prediction method, system, and storage medium, aiming to solve the problems of low performance, low accuracy, and high power consumption in existing battery performance prediction models.
[0008] In a first aspect, the present invention provides a battery performance prediction method, the battery performance prediction method comprising the following steps: S1. Obtain battery timing data and preprocess the battery timing data to obtain preprocessed data; S2. Establish a teacher model and a student model, and use the preprocessed data as input to the teacher model and the student model respectively to predict the battery state, so as to obtain the teacher intermediate layer features, teacher prediction results, student intermediate layer features and student prediction results; S3. Establish a sliding window buffer, and store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order to construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; calculate the dynamic weight corresponding to each feature channel according to the temporal difference evolution rate and the fluctuation stability parameter through a preset nonlinear mapping relationship. S4. Calculate the distillation loss by combining the teacher's prediction results and the student's prediction results based on a first preset rule; obtain the true labels, calculate the classification loss by combining the probability distribution of the true labels and the student's prediction results based on a second preset rule; calculate the dynamic feature mapping loss by combining the dynamic weights, the student intermediate layer features, and the teacher intermediate layer features based on a third preset rule. S5. Calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and calculate the adaptive balance coefficient using the inverse variance weighting method; construct the total loss function based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, and iteratively train the student model with the total loss function as the optimization objective to obtain the battery performance prediction model; S6. Obtain the battery time-series data to be predicted, and use the battery time-series data to be predicted as the input of the battery performance prediction model to obtain the prediction result.
[0009] Preferably, the first preset rule is to ensure that the distillation loss meets the following conditions: ; in, This refers to the distillation loss, i.e., the KL divergence loss, where K represents the number of categories. The teacher's prediction result indicates that the result is in the first... i The probability values of each category, This indicates that the student's prediction result is in the first... i The probability values of each category.
[0010] Preferably, the second preset rule is to ensure that the classification loss satisfies the following conditions: ; in, This represents the classification loss. Indicates the number of categories. The first term representing the student's prediction result i The real label of each channel The first term representing the student's prediction result i The probability distribution of each channel.
[0011] Preferably, the third preset rule is: to make the dynamic feature mapping loss satisfy the following conditions: ; in, This represents the dynamic feature mapping loss. This represents the dynamic weight of the c-th channel. This represents the characteristics of the teacher intermediate layer. The student intermediate layer features are represented by C, where C represents the number of channels in the feature map. Indicates the length of the characteristic time series.
[0012] Preferably, in step S1, the preprocessing of the battery timing data includes the following steps: The battery timing data is denoised to obtain the first timing data; The first time series data is normalized to obtain the second time series data; The second time-series data is subjected to time-series alignment processing to obtain the preprocessed data.
[0013] Preferably, in step S5, when the student model is iteratively trained, the parameters of the student model are updated based on the backpropagation algorithm, and the learning rate of the student model is adaptively adjusted by the stochastic gradient descent algorithm.
[0014] Preferably, the battery timing data includes at least one of battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data.
[0015] Secondly, the present invention also provides a battery performance prediction system, the battery performance prediction system comprising: The preprocessing module is used to acquire battery timing data and preprocess the battery timing data to obtain preprocessed data. The model prediction module is used to build a teacher model and a student model. The preprocessed data is used as the input of the teacher model and the student model, respectively, to predict the battery state and obtain the teacher intermediate layer features, the teacher prediction result, the student intermediate layer features, and the student prediction result. The causal evolution analysis module is used to establish a sliding window buffer, store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order, and construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; and calculate the dynamic weight corresponding to each feature channel according to the temporal difference evolution rate and the fluctuation stability parameter through a preset nonlinear mapping relationship. The loss calculation module is used to calculate the distillation loss by combining the teacher prediction results and the student prediction results based on a first preset rule; to obtain the real labels and calculate the classification loss by combining the probability distribution of the real labels and the student prediction results based on a second preset rule; and to calculate the dynamic feature mapping loss by combining the dynamic weights, the teacher intermediate layer features, and the student intermediate layer features based on a third preset rule. The training module is used to calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and to calculate the adaptive balance coefficient using an inverse variance weighting method; based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, a total loss function is constructed, and the student model is iteratively trained with the total loss function as the optimization objective to obtain the battery performance prediction model; The prediction module is used to acquire the time-series data of the battery to be predicted, and use the time-series data of the battery to be predicted as the input of the battery performance prediction model to obtain the prediction result.
[0016] Thirdly, the present invention also provides a computer device, comprising: a memory, a processor, and a battery performance prediction program stored in the memory and executable on the processor, wherein the processor, when executing the battery performance prediction program, implements the steps of the battery performance prediction method as described in any of the above embodiments.
[0017] Fourthly, the present invention also provides a computer-readable storage medium storing a battery performance prediction program, which, when executed by a processor, implements the steps of the battery performance prediction method as described in any of the above embodiments.
[0018] Compared with existing technologies, this invention introduces causal transfer entropy, which can accurately quantify the directional information-driven relationship between intermediate features of the teacher model and the student model, effectively eliminate spurious correlation interference between features, and realize the skewed allocation of computing resources to key feature channels, ensuring the pertinence and effectiveness of the knowledge distillation process. Secondly, by constructing a dynamic weight feedback mechanism through the temporal evolution trajectory of causal transfer entropy, it can accurately identify the feature fitting bottleneck stage and fitting saturation stage in the student model training process, realize adaptive distillation learning of model features under dynamic closed-loop control, and solve the technical pain point that static distillation weights cannot adapt to the dynamic process of model training. Finally, by introducing an adaptive loss balancing mechanism based on variance inverse weighting, the generalization ability and robustness of the battery performance prediction model in the face of complex and variable battery operating condition data are greatly enhanced, and the accuracy of battery performance prediction is improved. Attached Figure Description
[0019] The present invention will now be described in detail with reference to the accompanying drawings. The above and other aspects of the present invention will become clearer and more readily understood through the detailed description following the accompanying drawings. In the drawings: Figure 1 This is a flowchart of the battery performance prediction method provided in the embodiments of the present invention; Figure 2 This is a schematic diagram of the battery performance prediction system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the computer device provided in an embodiment of the present invention; Figure 4 This is a comparison chart of the battery performance prediction model provided in this embodiment of the invention and the battery health status prediction results of related technologies; Figure 5 This is a comparison chart of the training loss convergence curves of the battery performance prediction model provided in this embodiment of the invention and related technologies. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0021] Example 1 Please refer to Figure 1 This invention provides a battery performance prediction method, which includes the following steps: S1. Obtain battery timing data and preprocess the battery timing data to obtain preprocessed data; In this embodiment of the invention, battery timing data during battery operation is acquired through a battery sensor. The battery timing data includes at least one of battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data.
[0022] Preprocessing the battery timing data includes the following steps: The battery time-series data is denoised to obtain the first time-series data. Specifically, high-frequency noise in the battery time-series data is filtered out by methods such as moving average and wavelet transform to ensure the stability of key signals such as voltage and current.
[0023] The first time series data is normalized to obtain the second time series data. Specifically, the first time series data is normalized / standardized to scale it to the range of [-1, 1] or [0, 1], thereby avoiding the impact of feature scale differences on model training performance.
[0024] The second time-series data is time-aligned to obtain the preprocessed data. Specifically, asynchronous data in the second time-series data is timestamped to generate preprocessed data with a unified time series.
[0025] S2. Establish a teacher model and a student model, and use the preprocessed data as input to the teacher model and the student model respectively to predict the battery state, thereby obtaining teacher intermediate layer features, teacher prediction results, student intermediate layer features and student prediction results.
[0026] In this embodiment of the invention, the teacher model and student model are built based on neural network models such as LSTM and Transformer. The intermediate layer features contain the model's understanding and representation of data at different levels, and are crucial information for knowledge distillation. The prediction results are used to calculate the classification loss and evaluate the model's current performance. The teacher's intermediate layer features and the student's intermediate layer features are multi-dimensional feature tensor structures. The teacher model's intermediate layer features... For example, its dimension is represented as ,in Represents the number of channels. It is the length of the feature sequence (corresponding to the time step), and the intermediate layer features of the student model. The dimensions are the same.
[0027] S3. Establish a sliding window buffer, and store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order to construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; calculate the dynamic weight corresponding to each feature channel according to the temporal difference evolution rate and the fluctuation stability parameter through a preset nonlinear mapping relationship.
[0028] The directional information transfer amount for each channel is calculated based on the causal migration entropy formula. The joint probability distribution is calculated using kernel density estimation; for the c-th channel, its migration entropy is... The calculation is as follows: ; in For students in The state at any given moment, For teachers in The state at any given moment. This indicator quantifies the reduction in uncertainty in predicting students' future outcomes after incorporating teachers' historical data, eliminating the interference of "spurious correlations".
[0029] Further calculate the evolution rate of migration entropy and the variance of fluctuation within the sliding window Dynamic evolution weights are generated using a nonlinear mapping function. : ; in, and As a regulating factor, To prevent the use of tiny constants with a denominator of zero, the weight is increased when the channel has high causal driving force and a stable trend, and automatically decayed if it is in a conflict period or saturation period, thus achieving dynamic evaluation.
[0030] S4. Calculate the distillation loss by combining the teacher's prediction results and the student's prediction results based on a first preset rule; obtain the true labels, calculate the classification loss by combining the probability distribution of the true labels and the student's prediction results based on a second preset rule; calculate the dynamic feature mapping loss by combining the dynamic weights, the student intermediate layer features, and the teacher intermediate layer features based on a third preset rule. In this embodiment of the invention, the Kullback-Leibler divergence is used to measure the difference between the teacher's predicted probability distribution and the student's predicted probability distribution. The first preset rule is to ensure that the distillation loss satisfies the following condition: ; in, This refers to the distillation loss, i.e., the KL divergence loss, where K represents the number of categories. The teacher's prediction result indicates that the result is in the first... i The probability values of each category, This indicates that the student's prediction result is in the first... i The probability values of each category.
[0031] In this embodiment of the invention, cross-entropy loss is used to measure the difference between the student's predicted result and the true label. The second preset rule is to ensure that the classification loss satisfies the following condition: ; in, This represents the classification loss. Indicates the number of categories. The first term representing the student's prediction result i The real label of each channel The first term representing the student's prediction result i The probability distribution of each channel. The classification loss is used to ensure the classification accuracy of the student model, prompting the student model's predictions to be as close as possible to the true labels.
[0032] ; in, This represents the dynamic feature mapping loss. This represents the dynamic weight of the c-th channel. This represents the characteristics of the teacher intermediate layer. The student intermediate layer features are represented by C, where C represents the number of channels in the feature map. Indicates the length of the characteristic time series.
[0033] S5. Calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and calculate the adaptive balance coefficient using the inverse variance weighting method; construct the total loss function based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, and iteratively train the student model with the total loss function as the optimization objective to obtain the battery performance prediction model; In this embodiment of the invention, the dynamic feature mapping loss is calculated. and distillation loss Variance within the current time window and An adaptive balancing mechanism based on inverse variance weighting is introduced, and the balancing coefficient is defined as follows: ; The total loss function L is obtained as follows: ; in The coefficients are constants. The system dynamically adjusts the coefficients based on the volatility of each loss term to ensure smooth convergence of the model under complex dynamic environments. The student model parameters are updated using the backpropagation algorithm based on the total loss function L.
[0034] During iterative training, the student model's parameters are updated using the backpropagation algorithm. The backpropagation algorithm calculates the gradient of the total loss function with respect to the student model's parameters and adjusts the parameters in the opposite direction of this gradient, gradually decreasing the value of the loss function and thus improving the student model's performance. The student model's parameters refer to the learnable variables that constitute the model. These parameters are optimized through the backpropagation algorithm to enable the model to better fit the training data.
[0035] Simultaneously, the learning rate of the student model is adaptively adjusted using the Stochastic Gradient Descent (SGD) algorithm to accelerate its convergence. This process of forward propagation, loss calculation, and parameter updates is repeated until training converges. At the end of the training process, the student model fully learns the knowledge from the teacher model during the knowledge distillation process of dynamic teacher-student feature mapping, achieving performance optimization and improvement.
[0036] S6. Obtain the battery time-series data to be predicted, and use the battery time-series data to be predicted as the input of the battery performance prediction model to obtain the prediction result.
[0037] In this embodiment of the invention, the battery time-series data to be predicted includes battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data. The battery performance prediction model predicts the battery's remaining useful life (RUL), state of health (SOH), and other states, thereby enabling battery management based on the prediction results, ensuring battery reliability, and extending battery life.
[0038] To better understand and verify the effectiveness and advancement of the battery performance prediction method proposed in this invention, the embodiments of this invention provide a set of specific experimental test results, as follows: Experimental Dataset and Environment Setup: This experiment uses the publicly available University of Maryland (CALCE) battery aging dataset and NASA battery random charge / discharge dataset. The datasets are divided into training, validation, and test sets in a 7:1:2 ratio. Preprocessing stages include denoising, normalization, and alignment.
[0039] In terms of model architecture, the teacher model uses a two-layer Transformer model with a large number of parameters, while the student model uses a single-layer LSTM network with a small number of parameters.
[0040] The comparison schemes include: (1) Baseline: A student model trained independently using only real labels without knowledge distillation; (2) Standard KD (Conventional Knowledge Distillation): A student model that uses traditional static weights, fixed KL divergence, and MSE feature loss for distillation; (3) Proposed Method: The distillation model proposed in this invention includes dynamic weights of causal migration entropy and an adaptive balance mechanism of inverse variance weighting.
[0041] To quantitatively evaluate prediction accuracy and operational efficiency, root mean square error (RMSE), mean absolute error (MAE), and model inference time were selected as evaluation metrics. The experimental results are shown in Table 1 below.
[0042] Table 1: Performance Comparison of Different Models on Battery State of Health (SOH) Prediction Task
[0043] As shown in Table 1, the student model of this invention, while maintaining extremely low inference time (5.2 ms) and parameter count (1.1M), achieves a prediction error (RMSE=1.35%) that significantly approaches that of the complex teacher model (RMSE=1.12%), and is significantly superior to conventional knowledge distillation methods. This indicates that the causal transfer entropy mechanism of this invention effectively eliminates "spurious correlation" interference and improves knowledge transfer efficiency.
[0044] To more intuitively demonstrate the prediction results and model convergence process, please refer to [link / reference]. Figure 4 , Figure 4 This is a comparison chart of the battery performance prediction model provided in this invention and the battery health state prediction results of related technologies. The chart shows the fitting of the aging trajectory of the True State of Health (SOH), Standard Knowledge Distillation (Standard KD), and the Proposed Method as the number of battery cycles increases. It can be clearly observed that in the later stage of battery aging (after 100 cycles), the conventional method shows a large deviation in the prediction curve due to interference from spurious correlation features; while the Proposed Method, with its targeted extraction of dynamic feature mapping, shows a high degree of overlap between its prediction curve and the true aging curve, demonstrating extremely strong robustness.
[0045] Please refer to Figure 5 , Figure 5 This is a comparison of the training loss convergence curves of the battery performance prediction model provided in this invention and related technologies. The figure depicts the changing trends of the Standard KD Loss and the Proposed Total Loss as a function of the number of training epochs. This invention, by introducing dynamic weights based on causal evolution trajectories and an inverse variance weighted adaptive balancing mechanism, quickly overcomes feature distribution differences during the "cognitive conflict period" (the first 15 epochs), resulting in a rapid decrease in the loss value; and maintains extremely high stability during the "saturation period," completely avoiding the local oscillation phenomenon that easily occurs in the later stages of conventional static distillation, significantly accelerating model convergence and improving the final generalization performance.
[0046] Compared with existing technologies, this invention introduces causal transfer entropy, which can accurately quantify the directional information-driven relationship between intermediate features of the teacher model and the student model, effectively eliminate spurious correlation interference between features, and realize the skewed allocation of computing resources to key feature channels, ensuring the pertinence and effectiveness of the knowledge distillation process. Secondly, by constructing a dynamic weight feedback mechanism through the temporal evolution trajectory of causal transfer entropy, it can accurately identify the feature fitting bottleneck stage and fitting saturation stage in the student model training process, realize adaptive distillation learning of model features under dynamic closed-loop control, and solve the technical pain point that static distillation weights cannot adapt to the dynamic process of model training. Finally, by introducing an adaptive loss balancing mechanism based on variance inverse weighting, the generalization ability and robustness of the battery performance prediction model in the face of complex and variable battery operating condition data are greatly enhanced, and the accuracy of battery performance prediction is improved.
[0047] Example 2 This invention also provides a battery performance prediction system, please refer to... Figure 2 , Figure 2 This is a schematic diagram of the battery performance prediction system 200 provided in an embodiment of the present invention, which includes: The preprocessing module 201 is used to acquire battery timing data and preprocess the battery timing data to obtain preprocessed data. The model prediction module 202 is used to establish a teacher model and a student model, and to use the preprocessed data as input to the teacher model and the student model respectively to predict the battery state, thereby obtaining teacher intermediate layer features, teacher prediction results, student intermediate layer features and student prediction results. The causal evolution analysis module 203 is used to establish a sliding window buffer, store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order, and construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; and calculate the dynamic weight corresponding to each feature channel through a preset nonlinear mapping relationship based on the temporal difference evolution rate and the fluctuation stability parameter. The loss calculation module 204 is used to calculate the distillation loss by combining the teacher prediction results and the student prediction results based on a first preset rule; to obtain the real labels and calculate the classification loss by combining the probability distribution of the real labels and the student prediction results based on a second preset rule; and to calculate the dynamic feature mapping loss by combining the dynamic weights, the teacher intermediate layer features, and the student intermediate layer features based on a third preset rule. Training module 205 is used to calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and to calculate the adaptive balance coefficient using an inverse variance weighting method; based on the adaptive balance coefficient, the distillation loss, the classification loss and the dynamic feature mapping loss, a total loss function is constructed, and the student model is iteratively trained with the total loss function as the optimization objective to obtain the battery performance prediction model; The prediction module 206 is used to acquire the battery time-series data to be predicted, and use the battery time-series data to be predicted as input to the battery performance prediction model to obtain the prediction result.
[0048] The battery performance prediction system 200 can implement the steps in the battery performance prediction method in the above embodiments and achieve the same technical effect, as described in the above embodiments, and will not be repeated here.
[0049] Example 3 This invention also provides a computer device, please refer to... Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. The computer device 300 includes: a memory 302, a processor 301, and a battery performance prediction program stored in the memory 302 and capable of running on the processor 301.
[0050] The processor 301 calls the battery performance prediction program stored in the memory 302 and executes the steps in the battery performance prediction method provided in this embodiment of the invention. Please refer to... Figure 1 Specifically, it includes the following steps: S1. Obtain battery timing data and preprocess the battery timing data to obtain preprocessed data; In this embodiment of the invention, battery timing data during battery operation is acquired through a battery sensor. The battery timing data includes at least one of battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data.
[0051] Preprocessing the battery timing data includes the following steps: The battery time-series data is denoised to obtain the first time-series data. Specifically, high-frequency noise in the battery time-series data is filtered out by methods such as moving average and wavelet transform to ensure the stability of key signals such as voltage and current.
[0052] The first time series data is normalized to obtain the second time series data. Specifically, the first time series data is normalized / standardized to scale it to the range of [-1, 1] or [0, 1], thereby avoiding the impact of feature scale differences on model training performance.
[0053] The second time-series data is time-aligned to obtain the preprocessed data. Specifically, asynchronous data in the second time-series data is timestamped to generate preprocessed data with a unified time series.
[0054] S2. Establish a teacher model and a student model, and use the preprocessed data as input to the teacher model and the student model respectively to predict the battery state, thereby obtaining teacher intermediate layer features, teacher prediction results, student intermediate layer features and student prediction results.
[0055] In this embodiment of the invention, the teacher model and student model are built based on neural network models such as LSTM and Transformer. The intermediate layer features contain the model's understanding and representation of data at different levels, and are crucial information for knowledge distillation. The prediction results are used to calculate the classification loss and evaluate the model's current performance. The teacher's intermediate layer features and the student's intermediate layer features are multi-dimensional feature tensor structures. The teacher model's intermediate layer features... For example, its dimension is represented as ,in Represents the number of channels. It is the length of the feature sequence (corresponding to the time step), and the intermediate layer features of the student model. The dimensions are the same.
[0056] S3. Establish a sliding window buffer, and store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order to construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; calculate the dynamic weight corresponding to each feature channel according to the temporal difference evolution rate and the fluctuation stability parameter through a preset nonlinear mapping relationship.
[0057] In this embodiment of the invention, a sliding window buffer of length M is maintained, and the teacher feature pooling vectors in consecutive iteration steps are used. Student feature pooling vector Push the data into the buffer to construct time series pairs.
[0058] The directional information transfer amount for each channel is calculated based on the causal migration entropy formula. The joint probability distribution is calculated using kernel density estimation; for the c-th channel, its migration entropy is... The calculation is as follows: ; in For students in The state at any given moment, For teachers in The state at any given moment. This indicator quantifies the reduction in uncertainty in predicting students' future outcomes after incorporating teachers' historical data, eliminating the interference of "spurious correlations".
[0059] Further calculate the evolution rate of migration entropy and the variance of fluctuation within the sliding window Dynamic evolution weights are generated using a nonlinear mapping function. : ; in, and As a regulating factor, To prevent the use of tiny constants with a denominator of zero, the weight is increased when the channel has high causal driving force and a stable trend, and automatically decayed if it is in a conflict period or saturation period, thus achieving dynamic evaluation.
[0060] S4. Calculate the distillation loss by combining the teacher's prediction results and the student's prediction results based on a first preset rule; obtain the true labels, calculate the classification loss by combining the probability distribution of the true labels and the student's prediction results based on a second preset rule; calculate the dynamic feature mapping loss by combining the dynamic weights, the student intermediate layer features, and the teacher intermediate layer features based on a third preset rule. In this embodiment of the invention, the Kullback-Leibler divergence is used to measure the difference between the teacher's predicted probability distribution and the student's predicted probability distribution. The first preset rule is to ensure that the distillation loss satisfies the following condition: ; in, This refers to the distillation loss, i.e., the KL divergence loss, where K represents the number of categories. The teacher's prediction result indicates that the result is in the first... i The probability values of each category, This indicates that the student's prediction result is in the first... i The probability values of each category.
[0061] In this embodiment of the invention, cross-entropy loss is used to measure the difference between the student's predicted result and the true label. The second preset rule is to ensure that the classification loss satisfies the following condition: ; in, This represents the classification loss. Indicates the number of categories. The first term representing the student's prediction result i The real label of each channel The first term representing the student's prediction result i The probability distribution of each channel. The classification loss is used to ensure the classification accuracy of the student model, prompting the student model's predictions to be as close as possible to the true labels.
[0062] In this embodiment of the invention, the third preset rule is: to make the dynamic feature mapping loss satisfy the following conditions: ; in, This represents the dynamic feature mapping loss. This represents the dynamic weight of the c-th channel. This represents the characteristics of the teacher intermediate layer. The student intermediate layer features are represented by C, where C represents the number of channels in the feature map. Indicates the length of the characteristic time series.
[0063] S5. Calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and calculate the adaptive balance coefficient using the inverse variance weighting method; construct the total loss function based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, and iteratively train the student model with the total loss function as the optimization objective to obtain the battery performance prediction model.
[0064] In this embodiment of the invention, the dynamic feature mapping loss is calculated. and distillation loss Variance within the current time window and An adaptive balancing mechanism based on inverse variance weighting is introduced, and the balancing coefficient is defined as follows: ; The total loss function L is obtained as follows: ; in The coefficients are constants. The system dynamically adjusts the coefficients based on the volatility of each loss term to ensure smooth convergence of the model under complex dynamic environments. The student model parameters are updated using the backpropagation algorithm based on the total loss L.
[0065] During iterative training, the student model's parameters are updated using the backpropagation algorithm. The backpropagation algorithm calculates the gradient of the total loss function with respect to the student model's parameters and adjusts the parameters in the opposite direction of this gradient, gradually decreasing the value of the loss function and thus improving the student model's performance. The student model's parameters refer to the learnable variables that constitute the model. These parameters are optimized through the backpropagation algorithm to enable the model to better fit the training data.
[0066] Simultaneously, the learning rate of the student model is adaptively adjusted using the Stochastic Gradient Descent (SGD) algorithm to accelerate its convergence. This process of forward propagation, loss calculation, and parameter updates is repeated until training converges. At the end of the training process, the student model fully learns the knowledge from the teacher model during the knowledge distillation process of dynamic teacher-student feature mapping, achieving performance optimization and improvement.
[0067] S6. Obtain the battery time-series data to be predicted, and use the battery time-series data to be predicted as the input of the battery performance prediction model to obtain the prediction result.
[0068] In this embodiment of the invention, the battery time-series data to be predicted includes battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data. The battery performance prediction model predicts the battery's remaining useful life (RUL), state of health (SOH), and other states, thereby enabling battery management based on the prediction results, ensuring battery reliability, and extending battery life.
[0069] The computer device 300 provided in this embodiment of the invention can implement the steps in the battery performance prediction method as described in the above embodiments, and can achieve the same technical effect. Please refer to the description in the above embodiments, which will not be repeated here.
[0070] Example 4 This invention also provides a computer-readable storage medium storing a battery performance prediction program. When executed by a processor, the battery performance prediction program implements the various processes and steps in the battery performance prediction method provided in this invention and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0071] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0072] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0074] The embodiments of the present invention have been described above with reference to the accompanying drawings. The disclosed embodiments are merely preferred embodiments of the present invention. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many equivalent changes in form under the guidance of the present invention without departing from the spirit and scope of the claims. All such changes are within the protection scope of the present invention.
Claims
1. A battery performance prediction method characterized by, The battery performance prediction method includes the following steps: S1. Obtain battery timing data and preprocess the battery timing data to obtain preprocessed data; S2. Establish a teacher model and a student model, and use the preprocessed data as input to the teacher model and the student model respectively to predict the battery state, so as to obtain the teacher intermediate layer features, teacher prediction results, student intermediate layer features and student prediction results; S3. Establish a sliding window buffer, and store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order to construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; calculate the dynamic weight corresponding to each feature channel according to the temporal difference evolution rate and the fluctuation stability parameter through a preset nonlinear mapping relationship. S4. Calculate the distillation loss by combining the teacher's prediction results and the student's prediction results based on a first preset rule; obtain the true labels, calculate the classification loss by combining the probability distribution of the true labels and the student's prediction results based on a second preset rule; calculate the dynamic feature mapping loss by combining the dynamic weights, the student intermediate layer features, and the teacher intermediate layer features based on a third preset rule. S5. Calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and calculate the adaptive balance coefficient using the inverse variance weighting method; construct the total loss function based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, and iteratively train the student model with the total loss function as the optimization objective to obtain the battery performance prediction model; S6. Obtain the battery time-series data to be predicted, and use the battery time-series data to be predicted as the input of the battery performance prediction model to obtain the prediction result.
2. The battery performance prediction method according to claim 1, wherein The first preset rule is to ensure that the distillation loss meets the following conditions: ; in, This refers to the distillation loss, i.e., the KL divergence loss, where K represents the number of categories. The teacher's prediction result indicates that the result is in the first... i The probability values of each category, This indicates that the student's prediction result is in the first... i The probability values of each category.
3. The battery performance prediction method as described in claim 1, characterized in that, The second preset rule is: to make the classification loss satisfy the following conditions: ; in, This represents the classification loss. Indicates the number of categories. The first term representing the student's prediction result i The real label of each channel The first term representing the student's prediction result i The probability distribution of each channel.
4. The battery performance prediction method as described in claim 1, characterized in that, The third preset rule is to ensure that the dynamic feature mapping loss satisfies the following condition: ; in, This represents the dynamic feature mapping loss. This represents the dynamic weight of the c-th channel. This represents the characteristics of the teacher intermediate layer. The student intermediate layer features are represented by C, where C represents the number of channels in the feature map. Indicates the length of the characteristic time series.
5. The battery performance prediction method as described in claim 1, characterized in that, Step S1, the preprocessing of the battery timing data includes the following steps: The battery timing data is denoised to obtain the first timing data; The first time series data is normalized to obtain the second time series data; The second time-series data is subjected to time-series alignment processing to obtain the preprocessed data.
6. The battery performance prediction method as described in claim 1, characterized in that, In step S5, when the student model is iteratively trained, the parameters of the student model are updated based on the backpropagation algorithm, and the learning rate of the student model is adaptively adjusted through the stochastic gradient descent algorithm.
7. The battery performance prediction method as described in claim 1, characterized in that, The battery timing data includes at least one of the following: battery voltage data, battery current data, battery voltage curve, charge / discharge current data, battery cycle count data, ambient temperature data, and battery temperature data.
8. A battery performance prediction system, characterized in that, The battery performance prediction system includes: The preprocessing module is used to acquire battery timing data and preprocess the battery timing data to obtain preprocessed data. The model prediction module is used to build a teacher model and a student model. The preprocessed data is used as the input of the teacher model and the student model, respectively, to predict the battery state and obtain the teacher intermediate layer features, the teacher prediction result, the student intermediate layer features, and the student prediction result. The causal evolution analysis module is used to establish a sliding window buffer, store the teacher intermediate layer features and student intermediate layer features acquired at each time point into the sliding window buffer in chronological order, and construct the temporal feature sequence of the corresponding feature channel; calculate the causal migration entropy of the temporal feature sequence corresponding to each feature channel, calculate the temporal difference evolution rate based on the difference between the causal migration entropy at different times, and calculate the fluctuation stability parameter based on the variance of the causal migration entropy at multiple historical times in the sliding window buffer; and calculate the dynamic weight corresponding to each feature channel through a preset nonlinear mapping relationship based on the temporal difference evolution rate and the fluctuation stability parameter. The loss calculation module is used to calculate the distillation loss by combining the teacher prediction results and the student prediction results based on a first preset rule; to obtain the real labels and calculate the classification loss by combining the probability distribution of the real labels and the student prediction results based on a second preset rule; and to calculate the dynamic feature mapping loss by combining the dynamic weights, the teacher intermediate layer features, and the student intermediate layer features based on a third preset rule. The training module is used to calculate the variance of the dynamic feature mapping loss and the distillation loss within the current sliding window, and to calculate the adaptive balance coefficient using an inverse variance weighting method; based on the adaptive balance coefficient, the distillation loss, the classification loss, and the dynamic feature mapping loss, a total loss function is constructed, and the student model is iteratively trained with the total loss function as the optimization objective to obtain the battery performance prediction model; The prediction module is used to acquire the time-series data of the battery to be predicted, and use the time-series data of the battery to be predicted as the input of the battery performance prediction model to obtain the prediction result.
9. A computer device, characterized in that, include: The method includes a memory, a processor, and a battery performance prediction program stored in the memory and executable on the processor, wherein the processor, when executing the battery performance prediction program, implements the steps of the battery performance prediction method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a battery performance prediction program, which, when executed by a processor, implements the steps of the battery performance prediction method as described in any one of claims 1-7.