A method for predicting the health of an electric vehicle battery based on federated transfer learning

By employing federated transfer learning and a dual-branch network model, the problems of data heterogeneity and domain offset in the prediction of state of health (SOH) of electric vehicle batteries are addressed, achieving improved prediction accuracy and robustness in battery health state prediction while protecting privacy.

CN122218549BActive Publication Date: 2026-07-24SUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-05-21
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing battery SOH prediction methods suffer from data heterogeneity, privacy risks, data silos, and domain offset issues under real-world conditions, resulting in insufficient prediction accuracy and robustness.

Method used

A battery health prediction method for electric vehicles based on federated transfer learning is adopted. The method uses a dual-branch network model to extract microscopic local spatiotemporal coupling features and macroscopic long-range degradation dependencies. Combined with VMD and LOWESS signal processing, the model is trained by domain adaptive federated transfer learning and Bayesian prediction head to achieve cross-domain collaborative training and uncertainty quantification.

Benefits of technology

It improves the accuracy, robustness, and transferability of battery health state prediction, overcomes data heterogeneity and domain offset, and provides accurate battery aging characterization and uncertainty assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122218549B_ABST
    Figure CN122218549B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electric vehicle power battery health management and intelligent prediction, and discloses a kind of electric vehicle battery health prediction method based on federal migration learning, constructs double branch prediction model, wherein the first branch is inputted with multidimensional feature sequence tensor to carry out multivariate feature coding, the second branch is inputted with original noise SOH sequence based on history, and long-term degradation dependence is extracted based on Mamba and causal attention mechanism;After fusion, the future SOH prediction value and uncertainty are outputted by the Bayesian neural network prediction head;In the training stage, the privacy protection collaborative modeling is carried out between multiple source domain clients using the federal learning framework, and dynamic aggregation is carried out based on the validation loss;For target domain vehicle, unsupervised domain self-adaptive updating is carried out using CORAL feature alignment strategy.In the meantime of protecting data privacy, the accuracy, robustness and migratability of SOH prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electric vehicle power battery health management and intelligent prediction technology, and in particular to an electric vehicle battery health prediction method based on federated transfer learning. Background Technology

[0002] With the large-scale application of electric vehicles, the degradation of power battery performance has a direct impact on the vehicle's driving range, operational reliability, and safety. Battery State of Health (SOH) is typically used to characterize the degree of degradation of the battery's current usable capacity relative to its rated capacity, and is an important basis for battery management systems to conduct lifespan assessments, maintenance decisions, and safety warnings.

[0003] Existing battery state of charge (SOH) prediction methods mainly include mechanistic model-based methods and data-driven methods. While mechanistic model-based methods have certain physical significance, they typically suffer from strong model assumptions, complex parameter identification, and high dependence on battery type and operating conditions. Data-driven methods can directly utilize operating data such as voltage, current, state of charge, and temperature to build prediction models, but most existing methods are mainly based on controlled experimental data or single data domains, lacking adaptability to real-world electric vehicle scenarios.

[0004] Compared to laboratory environments, vehicle-mounted operational data typically exhibits characteristics such as incomplete charging records, asynchronous sampling, significant sensor noise, substantial fluctuations in environmental conditions, and significant differences in operating conditions between vehicles. Consequently, the resulting SOH (Solar Oxygen Response Time) sequences are prone to local fluctuations and non-stationarity, making it difficult to directly reflect the true degradation trend of the battery, thus affecting model training stability and prediction accuracy.

[0005] Furthermore, existing technologies suffer from the following shortcomings: First, real-world electric vehicle (EV) onboard data exhibits extremely high heterogeneity, often accompanied by incomplete charging events, asynchronous sampling, sensor noise, and distribution shifts caused by operating conditions. These factors significantly reduce the reliability of deterministic point prediction models, making uncertainty quantification indispensable for risk perception. Second, EV operational data is naturally dispersed among different vehicles, owners, or fleet operators. Due to stringent data security and privacy protection requirements, it becomes difficult to centralize massive amounts of raw onboard data to the cloud for unified training, resulting in a severe "data silo" phenomenon. Finally, real-world fleets inevitably suffer from domain shift due to differences in vehicle models, thermal management systems, and user driving habits. Existing research on cross-domain, heterogeneous fleet multi-vehicle collaborative training and target vehicle generalization remains extremely insufficient.

[0006] Therefore, there is an urgent need to provide a battery health status prediction technology solution applicable to real-world electric vehicle scenarios, in order to effectively address issues such as SOH label fluctuations, data heterogeneity between vehicles, missing target domain labels, and domain offsets while protecting data privacy, thereby improving the accuracy, robustness, transferability, and reliability of battery health status prediction. Summary of the Invention

[0007] Therefore, the technical problem to be solved by the present invention is to overcome the problems of privacy leakage risk, heterogeneity interference of multi-vehicle data, difficulty in quantifying and predicting uncertainty, and weak cross-domain migration capability in the prior art.

[0008] To address the aforementioned technical problems, this invention provides a method for predicting the health of electric vehicle batteries based on federated transfer learning, comprising: Acquire multiple charging cycle data of electric vehicle batteries in each charging cycle to form a multidimensional feature sequence for each charging cycle; Based on the multidimensional feature sequence of the previous H consecutive historical charging cycles and the original noise SOH sequence, a multidimensional feature sequence tensor and a historical aging trajectory vector are constructed and input into a trained dual-branch network model to obtain the predicted SOH sequence for the next P consecutive charging cycles. The two-branch network model includes: The multidimensional feature sequence tensor is input into the first branch, and then passed through a series of multi-layer two-dimensional CNN convolution, adaptive average pooling, flattening, linear mapping, nonlinear activation, gated recurrent unit (GRU), layer normalization and adaptive average pooling layers in sequence along the forward propagation direction to obtain the first latent representation. The historical aging trajectory vector is input into the second branch, and then passed through a linear projection layer, a Mamba module, a causal multi-head attention layer, and a layer normalization and adaptive average pooling layer connected in sequence along the forward propagation direction to obtain the second latent representation. After concatenating and splicing the first latent representation and the second latent representation, the fused features are obtained through linear mapping, nonlinear activation, and layer normalization. The fused features are input into the Bayesian prediction head, which outputs the predicted mean and variance sequences of SOH for the next P consecutive charging cycles.

[0009] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: The electric vehicle battery health prediction method based on federated transfer learning described in this invention introduces a dual-branch network model. Based on the dual-branch architecture mechanism, this invention uses CNN-GRU to extract microscopic local spatiotemporal coupling features and uses Mamba network and causal attention to capture macroscopic long-range degradation dependencies. This dual-dimensional complementary modeling effectively overcomes the shortcomings of insufficient information capture by a single model, making the battery aging characterization more comprehensive and accurate, thereby improving the accuracy of battery health prediction.

[0010] When acquiring a smooth SOH sequence, this invention combines VMD to isolate high-frequency noise under variational constraints, and then assists LOWESS to smooth residual oscillations. This two-stage signal processing method filters out interference while perfectly preserving the structural inflection points and true degradation trends during battery aging, greatly enhancing the target stability of deep supervised learning.

[0011] This invention trains models based on a domain-adaptive federated transfer learning strategy. On the one hand, the federated learning framework enables multiple electric vehicles to achieve collaborative training at the model parameter level without sharing sensitive underlying charging data, alleviating the "data silos" problem under privacy constraints. On the other hand, to address the distribution offset between newly deployed vehicles and historical vehicles, this invention introduces CORAL second-order covariance alignment technology at the feature level, enabling unsupervised adaptive fine-tuning without the need for historical SOH labels of new vehicles, significantly improving the model's transferability among heterogeneous vehicles and the efficiency of target domain fine-tuning.

[0012] Meanwhile, the dynamic weighted aggregation algorithm based on validation set loss in the federated aggregation stage of this invention assigns higher aggregation weights to clients with smaller local generalization errors. This can automatically identify and mitigate the negative impact of clients with severe data heterogeneity or poor data quality, thereby significantly improving the robustness and prediction consistency of the global model in the highly non-independent and identically distributed (Non-IID) vehicle data environment. Attached Figure Description

[0013] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein: Figure 1 This is a flowchart of the steps of the electric vehicle battery health prediction method based on federated transfer learning of the present invention; Figure 2 This is a schematic diagram of the structure of a two-branch network model; Figure 3 This is a flowchart of the training process for the dual-branch network model on the client's local machine. Figure 4 This is a training flowchart based on domain-adaptive federated transfer learning; Figure 5 This is a graph showing the predicted mean curves and coverage areas of SOH for sample vehicles from three datasets; Figure 5 (a) is a graph showing the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 1. Figure 5 (b) shows the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 2. Figure 5 (c) is a graph showing the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 3. Figure 6 This is a comparison chart of the performance metrics of different prediction methods on three datasets; Figure 6 (a) is a comparison of the performance metrics of different prediction methods on dataset 1. Figure 6 (b) is a comparison of the performance metrics of different prediction methods on dataset 2. Figure 6 (c) is a comparison of the performance metrics of different prediction methods on dataset 3; Figure 7 This is a bar chart showing the prediction performance gain of source domain clients of different sizes participating in federated collaborative training. Detailed Implementation

[0014] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0015] Reference Figure 1 The flowchart shown illustrates the steps of the electric vehicle battery health prediction method based on federated transfer learning of the present invention. The specific steps include: S101: Obtain multiple charging cycle data of electric vehicle batteries in each charging cycle to form a multi-dimensional feature sequence for each charging cycle. S102: Based on the multidimensional feature sequence of the previous H consecutive historical charging cycles and the original noise SOH sequence, construct the multidimensional feature sequence tensor and the historical aging trajectory vector, input them into the trained dual-branch network model, and obtain the predicted SOH sequence for the next P consecutive charging cycles. The two-branch network model includes: The multidimensional feature sequence tensor is input into the first branch, and then passed through a series of multi-layer two-dimensional CNN convolution, adaptive average pooling, flattening, linear mapping, nonlinear activation, gated recurrent unit (GRU), layer normalization and adaptive average pooling layers in sequence along the forward propagation direction to obtain the first latent representation. The historical aging trajectory vector is input into the second branch, and then passed through a linear projection layer, a Mamba module, a causal multi-head attention layer, and a layer normalization and adaptive average pooling layer connected in sequence along the forward propagation direction to obtain the second latent representation. After concatenating and splicing the first latent representation and the second latent representation, the fused features are obtained through linear mapping, nonlinear activation, and layer normalization. The fused features are input into the Bayesian prediction head, which outputs the predicted mean and variance sequences of SOH for the next P consecutive charging cycles.

[0016] Reference Figure 2 The diagram shows the structure of the dual-branch network model. Since battery aging is reflected by the multivariate electrothermal response (such as the coupled changes of voltage, current, and temperature) during the charging cycle and the long-term historical SOH health evolution, this invention uses CNN-GRU to extract microscopic local spatiotemporal coupling features and uses Mamba network and causal attention to capture macroscopic long-range degradation dependencies. This dual-branch architecture mechanism effectively overcomes the shortcomings of insufficient information capture by a single model, making the battery aging characterization more comprehensive and accurate.

[0017] In this embodiment, various charging cycle data of the electric vehicle battery in each charging cycle are obtained, including: total battery pack voltage, charging current, state of charge, maximum voltage of individual cells in the battery pack, minimum voltage of individual cells in the battery pack, maximum temperature and minimum temperature. In this embodiment, linear interpolation is used to resample each charging cycle into a fixed-length time series to obtain a multi-dimensional feature sequence with a unified dimension.

[0018] Specifically, in practical applications, multiple source domain clients deployed in a distributed manner acquire historical long-cycle charging data during their daily operation through onboard sensor networks; the reliability of this underlying physical data directly determines the baseline quality of the prediction model. For each complete or truncated charging cycle, the system continuously extracts seven core feature variables: total battery pack voltage (… ), charging current ( ), state of charge ( ), the maximum voltage of a single cell in the battery pack ( ), minimum voltage of a single cell ( ), maximum temperature ( ) and minimum temperature ( These variables together constitute a high-dimensional space that can comprehensively reflect the degree of battery charging polarization, internal resistance heating effect, and electrochemical activity.

[0019] Specifically, in actual operating conditions, drivers' charging behavior is highly random, with numerous instances of shallow charging and discharging. Coupled with signal loss during data transmission, this results in a highly discrete number of sampling points for each charging cycle. For example, some DC fast charging cycles may contain only dozens of sampling points, while AC slow charging cycles may contain thousands of time steps. Such variable-length time series matrices cannot be directly fed into deep neural networks for efficient tensor operations with uniform batch processing. Therefore, this embodiment introduces a linear interpolation algorithm into the data preprocessing pipeline to perform equal-length resampling of the original variable-length charging cycle data. Specifically, a fixed length is uniformly set for the charging cycle sequence. After interpolation, each charging cycle is proportionally mapped to a normalized feature sequence containing 128 standard time steps in the time dimension. This standardization operation not only significantly eliminates the time scale differences caused by different charging rates, but also achieves a perfect engineering balance between preserving the characteristics of the charging polarization voltage plateau and reducing the computing power overhead at the edge.

[0020] In this embodiment, the construction of the multidimensional feature sequence tensor and the historical aging trajectory vector includes: for each historical charging cycle, constructing a multidimensional feature matrix for each historical charging cycle with the type of charging cycle data as the row attribute and the sampling time within the cycle as the column attribute; serializing and concatenating the multidimensional feature matrices of the H consecutive historical charging cycles before the current time according to the time dimension to obtain the multidimensional feature sequence tensor; and serializing and concatenating the original noise SOH sequence of the H consecutive historical charging cycles before the current time according to the time dimension to obtain the historical aging trajectory vector.

[0021] Specifically, based on the resampled features and the smoothed and denoised SOH sequence, this embodiment begins to construct the standard high-dimensional tensor required to match the bi-branch network graph. The history review window length is set to... The future predicted step size is Regarding the first in the historical process Each charging cycle is used to combine its seven physical quantities to construct its cyclic multidimensional feature matrix. : In the current reasoning time slice Below, extract the continuous preceding... The feature matrices of each charging cycle are serialized and concatenated along the time dimension to construct the input of the first branch of the dual-branch network model, i.e., the multidimensional feature sequence tensor, which is represented as: Simultaneously extract the original noise SOH sequence within this historical time period, which forms the input of the second branch of the dual-branch network model, i.e., the historical aging trajectory vector, represented as: ;in, express The battery SOH sequence corresponding to the current charging cycle at any given time. Finally, extract the future continuous... The smoothed SOH value after VMD-LOWESS processing for each period, the corresponding smoothed SOH is expressed as: The prediction target tensor that constitutes deep network regression learning is represented as: .

[0022] In this embodiment, the health evolution of the vehicle battery is controlled by both the intensity of the internal chemical reaction during a single charge at the micro level and the cumulative duration of the entire life cycle at the macro level. Traditional single recursive networks (such as simple LSTM) often fail to address this type of multi-timescale coupled problem. Therefore, this embodiment adopts a parallel dual-branch network structure.

[0023] The first branch of the two-branch network structure is defined as the multivariate feature encoding branch; the first input is... The input is fed into this branch. First, a multi-layer 2D CNN filter slides simultaneously along 128 time steps of a single charging cycle and 7 physical sensor channel dimensions. This operation enables deep feature fusion across physical channels and extraction of local anomalous polarization patterns. The mathematical formula for its convolutional layer operation is expressed as: The high-dimensional feature maps extracted by the CNN are then fed into stacked GRU layers; the GRU utilizes its built-in reset and update gates to process continuous... The nonlinear degradation evolution of battery impedance between charging cycles is stored in memory and its state is changed through a hidden state update formula. This process yields the multivariate spatiotemporal degradation feature latent vector representing the microscopic dynamic response under the current operating conditions, effectively modeling the diachronic temporal dependence of charging depth. Finally, through adaptive average pooling, a highly condensed first latent representation is output. .

[0024] The second branch of the two-branch network structure is defined as the historical SOH modeling branch, which directly processes the second input. Its core employs a Mamba model module based on a selective state-space mechanism; traditional attention-based mechanisms suffer from quadratic computational complexity bottlenecks when processing long sequences, while the Mamba model addresses this through an adaptive selection mechanism. Through dynamic data-dependent parameters and hardware-aware scanning algorithms, it can automatically retain key historical state information, including degradation inflection points such as capacity drops, in extremely long historical sequences with strictly linear computational complexity, while simultaneously suppressing the neglect of meaningless battery smooth degradation fluctuations. To further enhance the targeting of predictions, the output tensor of the Mamba module is fed into a causal multi-head attention layer. By applying a strict upper triangular temporal causality mask, this layer completely eliminates the problem of future information leakage during model training. This utilizes an attention operator with an upper triangular temporal causality mask. This emphasizes the lifecycle stage most instructive for predicting future SOH (Social Health Occurrence). The attention operator automatically assigns the highest weight to the historical lifecycle stage most instructive for predicting future SOH by calculating the dot product correlation within the sequence. This branch thus outputs a long-range health degradation feature latent vector that accurately captures the macro-cumulative aging trend, i.e., the second latent representation. .

[0025] Successfully obtained the first latent representation extracted independently from the two branches. With the second potential representation Subsequently, in this embodiment, the two are cascaded and spliced ​​at the feature fusion layer, and then mapped and reduced to a unified latent space representing the overall aging degree of the battery through a dense linear fully connected layer, thereby generating fused features. .

[0026] Conventional deep regression models are prone to overconfident single-point prediction errors when faced with complex real-world data distribution biases, which is unacceptable for battery management systems that are crucial to the thermal runaway safety threshold of a vehicle. To address this, this invention innovatively introduces a Bayesian Neural Network (BNN) into the prediction head. In the BNN structure, the weight parameters of neurons in the fully connected layers are no longer fixed scalar floating-point numbers, but are modeled as random variables following a specific probability distribution. During model training, based on variational inference theory, the network uses a backpropagation algorithm to find the optimal variational approximation posterior distribution of the weight parameters. Its optimization objective is to minimize the evidence lower bound (ELBO) joint loss function, expressed as: ; In this function, Indicates the sampling parameters The first term in the predicted future SOH sequence encourages the network output probability distribution to accurately fit the true smooth SOH target sequence. The first term ensures prediction accuracy; the second term calculates the approximate posterior distribution and the prior distribution. The Kullback-Leibler (KL) divergence between them plays a strong regularization role. Hyperparameters As a regulating valve, it precisely controls the trade-off between the urgency of data fitting and the smoothness of network weight distribution, fundamentally preventing overfitting to specific noise and overconfidence in prediction results.

[0027] In this embodiment, during the reasoning and decision-making stage, the variational approximation distribution is used. Multiple random weighted samples are performed to generate multiple Monte Carlo prediction trajectories. The mean expected value of the predictions is calculated and used as the length of the predicted trajectory. The deterministic SOH prediction sequence is obtained, and the prediction variance is calculated to construct the confidence interval of the prediction results, so as to achieve a quantitative assessment of the uncertainty of the prediction environment. That is, in the specific inference and decision-making stage, the model freezes the optimized distribution parameters and continuously performs calculations from the variational approximate posterior distribution. This is a Monte Carlo random weighted sampling operation; The next forward propagation will generate Each of these represents a different predicted trajectory for future SOH. The system then calculates these... Statistical expectation mean of the predicted trajectory This serves as the final deterministic SOH prediction value issued to the vehicle controller; its prediction variance is calculated simultaneously. To assess the uncertainty of the predicted environment and construct a 95% confidence interval for the prediction of the true state.

[0028] In this embodiment, the acquisition of the smoothed SOH sequence includes: acquiring the original battery health state sequence for each charging cycle based on the ampere-hour integration method; performing variational mode decomposition on the original battery health state sequence to obtain K intrinsic mode components with different center frequencies, removing intrinsic mode components whose center frequencies exceed a preset frequency threshold, reconstructing the remaining intrinsic mode components, and obtaining the main trend SOH sequence; and performing local weighted regression on the main trend SOH sequence to obtain the smoothed SOH sequence.

[0029] Specifically, while simultaneously acquiring multi-dimensional charging characteristics, this invention needs to construct a benchmark tag sequence reflecting battery capacity decay; this embodiment calculates the initial battery SOH corresponding to each charging cycle based on the industry-recognized ampere-hour (Ah) integration method. Specifically, for the first... The initial State of Harmony (SOH) for each charging cycle is strictly defined as the ratio of the currently calculated charging cycle capacity to the battery's factory rated capacity, expressed as: ;in, The available capacity calculated for the current charging cycle. This refers to the battery's rated nominal capacity.

[0030] Since complete constant current-constant voltage (CC-CV) charging calibration tests from 0% to 100% are rarely available in real-world automotive applications, the current capacity... Highly dependent on the time integral of the current within the local charging segment, it can be expressed as: ;in, and These represent the start and end times of the effective charging segment extracted by the BMS, respectively. Within a continuous charging segment, Indicates at a specific moment Recorded dynamic charging instantaneous current, The system sampling time interval is a fixed constant. Through the rigorous physical integration calculations described above, this embodiment generates a discrete original SOH decay trajectory sequence covering the entire operational lifecycle of each independently operating electric vehicle.

[0031] Specifically, while the original battery health state sequence can reflect capacity degradation macroscopically, it exhibits strong local nonstationarity at the microscopic level. This random fluctuation mainly stems from white noise in BMS sensor measurements, short-term interference of dynamic ambient temperature variations on electrochemical polarization, and the accumulation of errors in the SOC estimation algorithm. Directly using this erratic sequence as a prediction target for deep learning will lead to severe overfitting in the network model.

[0032] Therefore, this embodiment performs a two-stage smoothing process, sequentially applying Variational Mode Decomposition (VMD) and Local Weighted Regression (LOWESS), to obtain a smooth degradation trend. First, the VMD algorithm is applied to the original noisy SOH sequence. VMD completely decouples the original non-stationary signal in the frequency domain by constructing and solving a constrained variational optimization problem. Each intrinsic mode component has a different center frequency, thus achieving rigid physical isolation between the true low-frequency degradation band and the high-frequency noise band. The variational optimization objective function is strictly set as follows: ; in, The first decomposition obtained One modal component, For the first The center frequency corresponding to each modal component Represents the time derivative operator. This represents the operator used to construct analytic signals. For the Dirac impulse function, Represents the imaginary unit. The L2 norm is represented. The optimization process is constrained by the reconstruction constraint, which is that the sum of all modal components must be equal to the original signal. After solving for the Lagrange extrema of the functional, the system automatically removes the high-frequency intrinsic components with extremely high center frequencies and only reconstructs the low-frequency and mid-frequency components to obtain the main trend sequence.

[0033] Subsequently, to address the potential residual micro-high-frequency oscillations in the VMD reconstruction sequence caused by drastic changes in operating conditions, the LOWESS algorithm was applied for secondary processing. LOWESS performs locally weighted multinomial regression by evaluating the spatial distance between data points in the neighborhood of the test point and dynamically assigning weights. Its defined minimization objective function is: ; in, This indicates obtaining the parameters that minimize the objective function. and , Indicates the point to be estimated Within the neighborhood Local weights of each sample and Let represent the intercept and slope of the local linear regression, respectively. This represents the total number of data points in the neighborhood of the point to be measured. Indicates the first The charging cycle index corresponding to each sample This represents the main trend SOH sample to be smoothed. By minimizing this objective function, the LOWESS algorithm finally outputs a smoothed SOH sequence that is highly smooth, removing abrupt spikes while retaining key local fluctuation features in the actual battery aging process (such as the abrupt inflection point of aging rate due to the intensification of internal lithium plating). This sequence will serve as the true label in the subsequent deep model training.

[0034] This embodiment uses the VMD algorithm to decompose the original noisy SOH sequence into multiple modal components at different frequency scales. By solving a constrained variational optimization problem, a strict separation between the true degradation band and the high-frequency noise band is achieved. After reconstructing the low-frequency main trend sequence after removing the high-frequency noise components, the LOWESS algorithm is applied to perform locally weighted polynomial regression calculations on the reconstructed sequence. By minimizing the locally weighted objective function, residual local high-frequency oscillations are further suppressed, generating a smooth SOH sequence that retains the local aging fluctuation characteristics, which can be used as the absolute prediction target for subsequent deep learning model training.

[0035] This invention constructs an uncertainty quantification prediction mechanism based on BNN. Real-world road data is often riddled with sudden noise and measurement errors, making conventional deterministic neural networks prone to overconfident and misleading predictions. This invention, through variational approximation and posterior probability regularization of the network weights, outputs a probabilistic predicted trajectory containing the expected mean and variance interval. This not only provides accurate attenuation predictions but also gives the confidence boundary level of the predictions, providing a solid data foundation for making risk-aware battery maintenance decisions.

[0036] In this embodiment of the invention, the first branch of the dual-branch network model takes as input a multidimensional feature sequence tensor of H consecutive historical charging cycles; the second branch takes as input the original noise SOH sequence corresponding to H consecutive historical charging cycles. After the two inputs are encoded in different feature spaces, they are merged at a fusion node and output by a Bayesian prediction head as the predicted mean and variance sequences of the future P-step SOH. Specifically, the first branch consists of two two-dimensional convolution operations, where the convolution kernel size is 3×3, sliding along multiple dimensions and multiple physical quantity channel dimensions in a single charging cycle to capture the local coupling relationships between various dimensions. Then, the feature map enters the first adaptive average pooling layer to compress redundant local responses and improve the consistency of feature scale under different charging scenarios. Subsequently, the output of the pooling layer continues to flatten, linearly map, and nonlinearly activate, so that the original convolution features are projected to a latent space representation that is more suitable for temporal modeling. After completing the local spatial feature mapping, the first branch further feeds the intermediate features into the GRU network layer for temporal dependency modeling across charging cycles. Preferably, the GRU hidden state dimension is set to 64 to achieve a balance between edge computing power and temporal representation capability. The GRU output then undergoes layer normalization and a second adaptive average pooling layer, ultimately outputting a first latent representation characterizing the current local charging electrochemical dynamics of the vehicle. The second branch extracts long-range degradation dependencies from the historical SOH sequence. First, a linear projection layer maps the original noisy SOH sequence to a high-dimensional hidden representation space suitable for state-space modeling. The mapped features are input into the Mamba SSM module, which, through its selective state update mechanism, retains the most representative state information on capacity decay trends within a long historical window, while mitigating the impact of local stable sections or random noise disturbances. Preferably, the Mamba model's hidden state dimension is set to 64; its output further undergoes layer normalization and Dropout operations to improve network training stability and reduce overfitting risk. A causal multi-head attention mechanism is then introduced to further enhance intermediate features. Finally, the causal multi-head attention output undergoes layer normalization for distribution normalization and is then processed by an adaptive average pooling layer to form a fixed-length second latent representation. In the feature fusion stage, the first and second latent representations are concatenated along their feature dimensions to form a joint representation vector. The concatenated result is then fused through Linear, ReLU, and LayerNorm layers, a standard MLP model capable of unifying the mapping between the two latent representations, performing nonlinear fusion, and numerical stabilization to obtain fused features more suitable as input for probabilistic prediction. In the prediction head, the prediction model consists of two Bayesian Linear layers and a ReLU activation function between them.Unlike conventional deterministic fully connected layers, the weights and bias parameters in the Bayesian Linear layer are modeled using probability distributions, enabling variational inference of the posterior distribution of the learned parameters during the training phase. Ultimately, two types of prediction results are obtained: the mean sequence and the corresponding variance sequence for the future SOH at P steps. The mean sequence provides a point estimate of the future health state, while the variance sequence characterizes the level of prediction uncertainty, facilitating risk boundary assessment in subsequent battery maintenance decisions.

[0037] Based on the above embodiments, to overcome the "data silo" problem caused by the inability to centrally aggregate underlying data among various operating fleets due to commercial confidentiality, this embodiment deploys a cloud-edge collaborative training paradigm based on a federated learning framework. Because the operating environments of different vehicles are extremely non-independent and identically distributed (Non-IID), traditional federated averaging algorithms treat all participating clients equally, making them highly susceptible to contamination by low-quality data nodes, leading to global model degradation. Therefore, this invention innovatively implements a dynamic weighted aggregation mechanism based on validation set loss.

[0038] Specifically, this embodiment of the invention provides a method for predicting the health status of electric vehicle batteries based on domain adaptive federated transfer learning. Based on the domain adaptive federated transfer learning framework, it realizes unsupervised domain adaptive updating of global model parameters and obtains the trained dual-branch network model in each client. The specific implementation steps are shown in S201 to S205.

[0039] S201: The cloud-based central server initializes the model parameters of the dual-branch network model as the initial global model parameters.

[0040] S202: The cloud central server broadcasts the initial global model parameters to the source domain clients of each electric vehicle in the source domain, so that each source domain client can perform stochastic gradient descent training on the dual-branch network model based on its local training set, obtain the trained dual-branch network model, and upload its source domain local model parameters, validation set loss and first latent representation to the cloud central server.

[0041] S203: The cloud central server normalizes the validation set loss of each source domain client by taking the reciprocal, obtains the dynamic aggregation weight of each source domain client, and performs a weighted summation of the global model parameters to obtain the optimized global model parameters.

[0042] S204: The cloud-based central server will optimize the global model parameters and distribute the first latent representations of each source domain client to the target domain clients of each electric vehicle in the target domain. This allows the target domain clients to calculate the correlation alignment loss based on their first latent representations of the target domain and the first latent representations of the source domain clients. Based on the correlation alignment loss of the target domain clients and the inherited source domain training task loss, a joint optimization objective is constructed to fine-tune the global model parameters. The fine-tuned global model parameters are then uploaded to the cloud-based central server.

[0043] S205: The cloud-based central server rebroadcasts the fine-tuned global model parameters to the source domain, trains the source and target domains until the dual-branch network model based on the updated fine-tuned global model parameters converges, and obtains the trained dual-branch network model.

[0044] This embodiment employs a domain-adaptive federated learning framework to train the prediction model with privacy protection across multiple source domain clients (representing different vehicles or fleets). Each source domain client independently performs stochastic gradient descent training using local privacy data, obtaining local model parameters and validation set loss. The model parameters, validation set loss, and first latent representation feature matrix of each source domain client are then uploaded to a central server. The central server calculates dynamic aggregation weights based on the validation set loss and dynamically weights and aggregates the model parameters of each source domain client to obtain a global model updated with source domain knowledge. The central server then distributes the global model and the first latent representation feature matrices of each source domain client to newly added target domain clients that do not possess SOH labels. Locally on the target domain client, the second-order covariance matrix of the first latent representation feature matrices of the source and target domains is calculated. An alignment loss function is constructed using the correlation alignment (CORAL) technique, and backward fine-tuning is performed in conjunction with the supervised knowledge loss inherited from the source domain. This achieves unsupervised domain-adaptive updating of the global model to the feature distribution of the target domain, ultimately obtaining an SOH prediction model adapted to the vehicles in the target domain.

[0045] Specifically, in the first During each round of federated training communications, the cloud-based central server sends data to participants in the joint modeling process. Each source domain client node broadcasts the latest global model parameters. Each source domain client, operating in an isolated local environment, independently performs local stochastic gradient descent training using its private historical charging cycle data, obtaining locally fine-tuned model parameters. The key is that each client needs to run inference on a local validation dataset that was not used for training, and compute and save the validation set loss in scalar form. Simultaneously, extract the feature distribution statistics of the first latent representation of the first branch in the local area. Subsequently, each source domain client uploads the updated parameter matrix only to the central server via an encrypted channel. Scalar validation set loss And the abstract statistical features of the latent representation of features, without containing any real charging data that can be reversibly derived. After the central server gathers information from all parties, it calculates dynamic aggregation weights based on the magnitude of the validation set loss reported by each source domain client. The logic is that the smaller the loss, the stronger the generalization ability of the node's model, and the higher the weight should be assigned. Based on the dynamic weights derived from the exponential smoothing mapping, the server performs a high-order weighted aggregation update of the global model parameters in the cloud, as follows: This novel aggregated global model possesses extremely strong robustness against heterogeneous data interference, and is subsequently used in the next round of communication broadcasting until the entire source domain achieves loss convergence.

[0046] When a global model with mature source domain experience needs to be deployed on a newly purchased target domain vehicle, direct inference can lead to domain shift, and the lack of sufficient SOH (State of Health) historical aging labels to support supervised fine-tuning in the early stages of new vehicle operation. This invention addresses this pain point by cleverly introducing an unsupervised domain adaptive update strategy based on correlation alignment (CORAL) technology. In the first... During round-trip communication, the central server not only distributes the aggregated optimal global model parameters to the target domain client that does not have a SOH tag, but also packages and sends abstract information of the source domain's first latent representation feature matrix, representing the charging polarization characteristics of the source domain group. Locally at the target domain terminal, the new vehicle collects recent untagged charging data and sends it to the first branch of the model, extracting a unique first latent representation feature matrix belonging to that vehicle. .set up The centralized feature matrix representing the source domain is given by the feature dimension . The second-order covariance matrices of the feature matrices of the source and target domains in the latent space are calculated precisely, and expressed as follows: , ; and Let represent the centered feature matrices of the source and target domains, respectively. By directly calculating the Frobenius Norm distance between two second-order statistics, a CORAL alignment loss function, driven without any SOH labels, is constructed, expressed as: During the adaptive fine-tuning process of the target vehicle, a comprehensive unsupervised adaptive joint optimization objective is constructed by combining the parameter knowledge memory loss reserved by the source domain supervision task, denoted as: The computing unit locks the second branch of the network (preserving the macroscopic degradation physical laws unchanged), and only performs reverse fine-tuning of the gradient update on the parameters of the first branch, as shown below: After a finite number of iterations and fine-tuning, the covariance distribution of the first latent feature of the target domain vehicle in the multidimensional manifold space is forcibly "flattened" and aligned to the empirical distribution of the source domain. The target domain client then uploads and confirms this set of customized adaptive parameters, ultimately obtaining high-precision SOH customized prediction model parameters adapted to the evolution characteristics of the vehicle's electrochemical internal resistance.

[0047] Reference Figure 3 The diagram shows the training flowchart of the dual-branch network model on the client's local machine. Based on the above embodiment, in this embodiment, the training process of the dual-branch network model inside a single client specifically includes steps S301 to S309.

[0048] S301: The local client reads the local data required for training from its own storage unit. The local data includes at least the charging cycle multivariate features after equal-length resampling, the original noisy SOH sequence, and the smoothed SOH sequence as the supervision target.

[0049] S302: The local client constructs training samples using a sliding time window method based on a preset historical window length H and prediction step size P. For any training sample, the multivariate feature sequence of H consecutive historical charging cycles is used as the first input, the corresponding H historical original SOHs are used as the second input, and the smoothed SOH sequence of the next P charging cycles is used as the supervision label. Preferably, the historical window length H is set to 100, and the prediction step size P is set to 10.

[0050] S303: The local client sends the two inputs constructed in S302 into the two branches of the model. The first input enters the multivariate feature encoding branch to extract local spatiotemporal coupling features during the charging process; the second input enters the historical SOH modeling branch to extract macroscopic degradation trend features, thereby obtaining the first latent representation and the second latent representation respectively.

[0051] S304: The local client inputs the latent representations of the two branches into the feature fusion layer to obtain the fused comprehensive features. This fusion process is not a simple stacking of the original inputs, but rather a unified representation of micro-level operational response information and macro-level lifetime evolution information at the high-level semantic feature level.

[0052] S305: The fused features are further input into the BNN prediction head, and K random weight samplings are performed to generate K future SOH prediction trajectories. This process is essentially a Monte Carlo forward inference based on an approximate posterior distribution, the purpose of which is to enable a single sample to correspond to multiple probabilistic prediction results in a single training or inference session.

[0053] S306: Based on the K predicted trajectories obtained in S305, the local client calculates the predicted mean sequence and predicted variance sequence corresponding to the future P-step SOH.

[0054] S307: The local client calculates a joint loss function based on the prediction results and the smoothed SOH labels for the next P steps. Preferably, the joint loss is an ELBO loss, which includes a likelihood term reflecting the fitting error of the predicted sequence and a KL divergence regularization term constraining the complexity of the parameter distribution. Through this design, local training not only aims to minimize the error between the predicted mean and the true smoothed SOH labels, but also simultaneously suppresses excessive shifts in the model weight distribution, thereby improving prediction stability and generalization ability.

[0055] S308: The local client performs backpropagation and parameter updates based on the joint loss obtained in S307. Figure 3 The loop from S308 back to S303 indicates that during local training, the model can be trained repeatedly in multiple rounds until the preset number of training rounds or the loss convergence condition is reached.

[0056] S309: The local client saves the model parameters, validation set loss, and first latent representation after the local training is completed in this round. Of the above three items, the model parameters are used to upload to the central server for federated aggregation; the validation set loss is used to characterize the local generalization ability of the current client model and serves as an important basis for the central server's dynamic weighted aggregation; and the first latent representation is used by the target domain client to perform CORAL-based feature alignment.

[0057] Reference Figure 4 The diagram shows the training flowchart based on domain adaptive federated transfer learning. In this embodiment, domain adaptive federated transfer learning is used to train the dual-branch network model of the source domain client and the target domain client using a central server. The specific training process is shown in steps S401 to S409.

[0058] S401: The central server initializes the global model parameters. The initialization parameters can be randomly initialized, serving as a unified starting point for all subsequent collaborative training by all source domain clients.

[0059] S402: The central server broadcasts the current global model parameters to all source domain clients. Each source domain client corresponds to a data holder for a different vehicle, a different fleet, or a different operating environment. Since the raw charging data and SOH sequences of each client are not uploaded to the cloud, the information sent out mainly consists of the parameter values ​​of each layer in the model structure and the necessary training configurations.

[0060] S403: After receiving the global model, each source domain client performs local model training using its own local training data. The local training process corresponds to the aforementioned... Figure 3 S301 to S309 in the diagram represent the processes performed by each client: sample construction, bi-branch feature extraction, Bayesian prediction, ELBO loss optimization, and local parameter update.

[0061] S404: All source domain clients upload their updated local model parameters, validation set loss, and first latent representation to the central server. The local model parameters are used for global aggregation, the validation set loss measures the performance of the local model on its own client's validation set, and the first latent representation characterizes the feature distribution of each source domain client within the multivariate charging response space.

[0062] S405: The central server performs weighted aggregation on the models of each client based on the validation set loss uploaded by each source domain client to obtain updated global model parameters. This invention preferably employs a dynamic weighting strategy based on validation set loss, which gives higher weight to clients with lower validation losses and better generalization performance in the global aggregation, while reducing the impact of clients with higher validation losses on the aggregation result. Therefore, the server can improve the stability and anti-interference capability of the global model in highly heterogeneous source domain environments.

[0063] S406: The central server distributes the updated global model and the first latent representations of each source domain client to the target domain client. The target domain client typically corresponds to new vehicles or fleets newly connected to the system and lacking sufficient SOH tags. Due to the distributional offset between its operating environment and that of the source domain clients, direct prediction relying solely on the aggregated global model from the source domains often fails to achieve ideal results. Therefore, unsupervised adaptive processing based on feature distribution alignment needs to be further performed on the target domain side.

[0064] S407: The target domain client extracts the first latent representation of the target domain using its own unlabeled charging data, and aligns it with the first latent representation of the source domain using second-order statistical features based on CORAL technology to achieve unsupervised adaptive fine-tuning of the domain. Preferably, in this stage, the parameters representing the common laws of long-term degradation in the second branch are fixed, and only the relevant parameters of the first branch are updated in reverse, so that the charging response characteristics of the target domain gradually approximate the empirical feature distribution of the source domain at the covariance level.

[0065] S408: The target domain client obtains the prediction model parameters adapted to the target domain distribution and uploads the parameters to the central server as one of the initialization parameters for the next round of federated-adaptive joint training. Figure 4The closed-loop representation from S408 back to S402 indicates that the process is not terminated after a single execution, but can be repeated within an iterative framework of "source domain collaborative training - global aggregation - target domain adaptation - parameter backpropagation". As the rounds progress, the global model gradually integrates general knowledge from the source domain with the adaptability of the target domain, thereby achieving continuous optimization of model performance.

[0066] S409: When the preset number of communication rounds or model convergence conditions are reached, save the final prediction model adapted to the target domain.

[0067] Based on the above embodiments, in this embodiment, in order to verify the robustness of the prediction method proposed in this invention in dealing with technical problems such as data heterogeneity, ambient temperature fluctuations and sensor sampling noise under real working conditions, the verification in this embodiment is based on three electric vehicle charging cycle datasets from different fleets and different battery chemistry systems; these three datasets are allocated to different local clients to simulate the independent fleet operation scenarios that are not interconnected in actual applications.

[0068] Specifically, Dataset 1 was designated as the core source domain candidate data, collected from 16 pure electric buses operating under real urban road conditions for extended periods. The battery sampling frequency was set to 0.1Hz, and the data records covered a single year of continuous operation. The power battery packs of this fleet consisted of 256 lithium titanate (LTO) cells with a nominal capacity of 115Ah connected in series, exhibiting typical bus charging characteristics. Dataset 2 was designated as one of the target domain candidate data, collected from real on-board charging records of 20 commercial electric vehicles. The sampling interval for this dataset was 8 seconds, and the vehicles' service life spanned approximately 29 months. The power battery packs of these vehicles used a nickel-cobalt-manganese (NCM) ternary lithium battery system, with 90 cells connected in series and a nominal capacity of 145Ah. Simultaneously, this data acquisition system included 32 independent temperature sensor channels to comprehensively monitor the thermodynamic response during charging, providing an excellent data foundation for verifying the cross-channel feature extraction capability of the multivariate feature coding branch of this invention. Dataset 3, also used as candidate data for the target domain, was collected from the operating data of 16 electric vehicles with significant battery aging and degradation characteristics and containing more than 200 valid tag cycles. Its available capacity tags show a large range throughout the entire life cycle, ranging from 28.28Ah to 46.23Ah, and are mainly used to verify the predictive stability of the system in the middle and late stages of battery life.

[0069] In six cross-validation trials using the three datasets as both source and target domains, the mean absolute error (MAE) remained between 0.43% and 0.90%, the root mean square error (RMSE) between 0.51% and 1.09%, and the predicted interval coverage probability between 0.83 and 0.99. Further, in a preferred embodiment, dataset 1 was used as the source domain client training data, and datasets 2 and 3 were used as target domain client validation data, respectively. Results showed that on dataset 2, the method of this invention achieved an MAE of 0.43%, an RMSE of 0.51%, and a predicted interval coverage probability of 0.99; on dataset 3, the MAE was 0.60%, the RMSE was 0.82%, and the predicted interval coverage probability was 0.91. (Refer to...) Figure 5 The figure shown is a display of the SOH prediction mean curves and coverage intervals for sample vehicles from three datasets. Figure 5 (a) is a graph showing the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 1. Figure 5 (b) is a graph showing the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 2. Figure 5 (c) is a graph showing the predicted mean curve and coverage area of ​​SOH for sample vehicles in dataset 3. Figure 5 The results figure shows the original SOH, 95% confidence interval, true SOH and the predicted SOH of the present invention for each cycle in three datasets. The method of the present invention can still maintain high SOH prediction accuracy and good interval reliability under cross-vehicle and cross-operating condition conditions.

[0070] Comparing this embodiment with various existing prediction methods further verifies the superiority of the present invention. On the three datasets, the prediction error of the method described in this embodiment is at a superior level. Specifically, on datasets 1, 2, and 3, the MAE of this embodiment are 0.32%, 0.43%, and 0.60%, respectively, all significantly better than benchmark machine learning and deep learning methods such as SVR, XGBoost, CNN-LSTM, and TCN. Furthermore, compared with MLP and Seq2Seq methods from existing research, the present invention still has certain predictive advantages. (Refer to...) Figure 6 The figure shown is a comparison of the performance metrics of different prediction methods on three datasets. Figure 6 (a) is a comparison of the performance metrics of different prediction methods on dataset 1. Figure 6 (b) is a comparison of the performance metrics of different prediction methods on dataset 2. Figure 6 (c) is a comparison of the performance metrics of different prediction methods on dataset 3; based on Figure 6It can be seen that the method of this invention has the lowest MAE and RMSE on all three datasets, indicating that the prediction accuracy of the method of this invention is superior to the benchmark models. This result shows that it is difficult to fully utilize the multivariate coupled information of the charging process and the long-term degradation information of historical SOH by relying solely on a single time series modeling method or traditional machine learning methods. However, this embodiment extracts multivariate spatiotemporal degradation features of charging through the first branch and extracts long-term health degradation features through the second branch, and then completes the fusion output through the prediction head, which is more conducive to improving the SOH prediction accuracy under complex real-world conditions.

[0071] To demonstrate the irreplaceable nature of this parallel dual-branch architecture compared to a single network structure and its significant beneficial effects, the system underwent rigorous module ablation testing in an experimental environment. The testing process involved separating one branch, constructing a "single-branch multivariate feature encoding model" that only executes the first branch operation, and a "single-branch historical SOH modeling model" that only executes the second branch operation. Excluding interference from other variables such as domain adaptation, the three network models were independently trained and tested on the same dataset. The specific accuracy results of the ablation testing are summarized in Table 1.

[0072] Table 1. Predictive performance evaluation of the dual-branch feature extraction computation module architecture in ablation validation. Dataset 1 First Branch 2.00 2.66 6.35 0.44 1.22 0.48 Second branch 0.88 0.93 -2.91 0.80 1.16 0.04 Complete dual-branch architecture 0.45 0.58 -3.73 0.98 0.03 0.03 Dataset 2 First Branch 1.84 2.37 4.85 0.42 1.2 0.41 Second branch 0.98 1.06 -2.57 0.72 1.21 0.06 Complete dual-branch architecture 0.42 0.59 -3.69 0.96 0.02 0.04 Dataset 3 First Branch 3.62 4.30 20.14 0.17 1.34 1.03 Second branch 1.43 1.73 -0.80 0.50 1.41 0.21 Complete dual-branch architecture 0.81 1.07 -2.67 0.77 1.30 0.08

[0073] As shown in Table 1, when the system relies solely on the multidimensional features of the charging cycle extracted by the first branch, although the model can perceive the polarization state inside the battery, the multidimensional features are more susceptible to interference from fluctuations in external environmental conditions, resulting in high absolute prediction errors (MAE and RMSE). Particularly in dataset 3, the MAE reaches 3.62%, and the prediction interval coverage (PICP) is only 0.17, essentially losing its guiding significance for risk quantification. When the system relies solely on the second branch to model the historical SOH trajectory, the prediction error decreases significantly, indicating that the macro-degradation trend itself has strong guiding significance. However, when this embodiment fuses the first and second latent representations to jointly drive the prediction model, the system performance achieves a significant improvement. On all three datasets, the complete dual-branch architecture achieves the lowest MAE and RMSE levels, and is also optimal in uncertainty assessment metrics (such as lower negative log-likelihood NLL and higher coverage PICP). This system operation verification result strongly demonstrates that there is a complementary relationship between microscopic local spatiotemporal coupling features and macroscopic long-range degradation dependence features. The dual-branch fusion mechanism used in this embodiment allows the prediction model to simultaneously take into account both the current microscopic health abnormalities and the macroscopic aging physical inertia. This is the core structural basis for the high-precision prediction achieved by this invention.

[0074] Furthermore, for the second branch of this invention (historical SOH modeling branch), which specifically uses the Mamba state-space model combined with a cascaded structure of causal attention, this embodiment further verified the internal components through comparative replacement in a system environment. The system replaced the Mamba module with conventional LSTM, TCN, and Transformer backbone networks, respectively, while keeping the remaining modules and system parameters absolutely consistent. Using dataset 1 as the source domain, its generalization performance to datasets 2 and 3 was observed. The verification data is shown in Table 2.

[0075] Table 2. Impact of different time-series modeling backbone networks in the second branch on overall system performance. Dataset 2 Replace with LSTM module 0.68 0.77 -3.40 0.96 0.03 0.03 Replace with TCN module 0.57 0.66 -3.58 0.97 0.03 0.03 Replace with the Transformer module 0.62 0.7 -3.51 0.95 0.02 0.03 This embodiment sets 0.43 0.51 -3.77 0.99 0.03 0.03 Dataset 3 Replace with LSTM module 2.47 3.15 9.40 0.30 1.32 0.62 Replace with TCN module 0.79 1.15 -2.41 0.79 1.3 0.10 Replace with the Transformer module 1.36 1.64 -1.36 0.60 1.53 0.16 This embodiment sets 0.60 0.82 -3.24 0.91 1.27 0.06

[0076] As shown in Table 2, when faced with the harsh environment of Dataset 3, which contains a large number of irregular fluctuations and heterogeneous features, traditional recurrent neural networks (LSTM) and networks relying on global attention (Transformer) exhibit significant performance degradation, with their MAE errors increasing significantly. However, the Mamba module based on a selective state-space mechanism used in this invention, with its powerful linear sequence scanning capability and suppression mechanism for irrelevant fluctuations, not only controls the MAE to an extremely low 0.60%, but also achieves an excellent performance of 0.06 on the probability metric Winkler score (WS, which comprehensively measures the width of the interval and the coverage of the target), far lower than all other tested modules. This directly proves that the specific network construction of the second branch defined in the claims of this application has a greater technical advantage in extracting long-range degradation features.

[0077] To objectively illustrate the technical improvements and beneficial effects of the dynamic weighted aggregation algorithm for verification loss in this embodiment compared to existing federated frameworks, a comparative environment was established. The traditional federated averaging algorithm (FedAvg) and the federated algorithm with proximal regularization constraints (FedProx) were trained on the same source domain client. The output global model was then validated on the corresponding dataset. Detailed comparison of the validation data is shown in Table 3.

[0078] Table 3. Comparison and verification of global prediction error of the cloud federation module under different weighted aggregation algorithms. Dataset 1 Using the FedAvg sample mean algorithm 0.67 0.81 -3.41 0.93 1.38 0.04 Using the FedProx near-end regularization algorithm 0.66 0.74 -3.48 0.97 0.03 0.03 Embodiments of the present invention 0.45 0.58 -3.73 0.98 0.03 0.03 Dataset 2 Using the FedAvg sample mean algorithm 1.48 1.58 -1.35 0.37 1.46 0.15 Using the FedProx near-end regularization algorithm 0.68 0.76 -3.36 0.91 1.18 0.03 Embodiments of the present invention 0.43 0.51 -3.77 0.99 0.03 0.03 Dataset 3 Using the FedAvg sample mean algorithm 1.16 1.34 -2.24 0.72 1.49 0.09 Using the FedProx near-end regularization algorithm 1.66 1.90 0.17 0.35 1.42 0.24 Embodiments of the present invention 0.60 0.82 -3.24 0.91 1.27 0.06

[0079] Table 3 presents test data that clearly demonstrates the necessity of the dynamic weighting mechanism. Electric vehicle data exhibits extreme heterogeneity; some client vehicles may produce poor-quality updates due to frequent exposure to harsh environments or sensor malfunctions. If these nodes are treated uniformly at the federated level (e.g., FedAvg), poor-quality updates will severely drag down the global model, causing the coverage PICP on dataset 2 to plummet to 0.37, with a significant increase in error. While FedProx mitigates model drift to some extent, it remains inflexible. In this embodiment, the central server utilizes validation set loss to automatically weaken the aggregation weights of poor-quality local models, ensuring that the final fused global model incorporates the best healthy aging patterns from all parties. In all tests, the dynamic weighting algorithm of this embodiment minimizes both deterministic error (MAE) and RMSE while ensuring the highest reliability within the uncertainty interval.

[0080] Furthermore, this embodiment also systematically verifies the scale effect of client nodes participating in collaborative training. The experiment, while keeping the amount of local data on each client constant, gradually increases the number of source domain clients (from 1 to the default standard of 4 in this embodiment), and observes the changes in model performance on various validation sets. (Refer to...) Figure 7 The bar chart shows the prediction performance gain for source domain clients of different sizes participating in federated collaborative training. The results demonstrate the outstanding ability of the privacy-preserving federated architecture of this invention to address the "data silo" problem. As the number of source domain clients connected to the cloud for collaborative modeling gradually increases from 1 to 4, the model receives a broader knowledge base of vehicle degradation patterns, which is reflected in its continuously enhancing generalization ability at the underlying physical level. For example, on dataset 2, when the number of clients increases from 1 to 4, the mean absolute error decreases from 1.01% to 0.43%; on dataset 3, the mean absolute error decreases from 1.65% to 0.60%. This indicates that, while ensuring privacy, introducing more representative source domain clients helps the global model learn richer vehicle degradation patterns, improving the model's stability and generalization ability when facing heterogeneous real-world conditions.

[0081] To verify the advantages of the domain adaptive fine-tuning module, a set of comparative experiments was designed in this embodiment; the model was directly trained using only the data of the two vehicles involved in the model fine-tuning, and the comparison results with those in this embodiment on the same test platform are shown in Table 4.

[0082] Table 4. Prediction results of the model trained directly using the fine-tuned dataset. Dataset 1 Training from scratch using only 2 target vehicles 1.57 1.61 -2.06 0.65 1.77 0.07 This embodiment system 0.45 0.58 -3.73 0.98 0.03 0.03 Dataset 2 Training from scratch using only 2 target vehicles 0.90 0.97 -3.16 0.96 0.03 0.04 This embodiment system 0.43 0.51 -3.77 0.99 0.03 0.03 Dataset 3 Training from scratch using only 2 target vehicles 1.70 2.03 -0.76 0.55 1.70 0.21 This embodiment system 0.60 0.82 -3.24 0.91 1.27 0.06

[0083] As shown in Table 4, when the system faces an extreme lack of samples, the directly trained model suffers significant damage, especially on dataset 3 with even smaller sample sizes. Its mean absolute prediction error even exceeds 1.70%, and its prediction interval, due to extreme unreliability, causes the coverage percentage (PICP) to fall below the acceptable level to 0.55. This confirms that a small amount of data is simply insufficient to support the learning of complex battery degradation patterns. In contrast, the method execution flow of this embodiment, by inheriting the degradation trend derived from the source domain federated collaboration and combining it with local unsupervised CORAL covariance alignment, successfully adapts the source domain model to the target vehicle's prediction without consuming any new SOH label overhead.

[0084] In summary, this embodiment objectively provides a complete system workflow test record encompassing everything from low-level sensor signal denoising and preprocessing, to deep high-dimensional multi-physics feature adaptive dual-stream capture, to cloud-based heterogeneous weighted anti-degradation merging across encrypted networks, and finally, probability inference and domain bias correction at edge nodes. Furthermore, by outputting highly accurate prediction curves with a predictive uncertainty range, this invention significantly improves the commercial feasibility, accuracy, and system-level risk control reliability of SOH prediction under real heterogeneous road conditions, fully fulfilling all the beneficial technical commitments made in the background and technical solutions sections of this invention application.

[0085] The electric vehicle battery health prediction method based on federated transfer learning described in this invention introduces a dual-branch network model. Based on this dual-branch architecture mechanism, the invention utilizes CNN-GRU to extract microscopic local spatiotemporal coupling features and employs Mamba networks and causal attention to capture macroscopic long-range degradation dependencies. This dual-dimensional complementary modeling effectively overcomes the shortcomings of single-model information capture, making battery aging characterization more comprehensive and accurate, thereby improving the accuracy of battery health prediction. When acquiring the smoothed SOH sequence, this invention combines VMD to isolate high-frequency noise under variational constraints and then assists with LOWESS to smooth residual oscillations. This two-stage signal processing method filters out interference while perfectly preserving the structural inflection points and true degradation trends in the battery aging process, greatly enhancing the target stability of deep supervised learning.

[0086] This invention employs a domain-adaptive federated transfer learning strategy for model training. On one hand, the federated learning framework enables multiple electric vehicles to achieve collaborative training at the model parameter level without sharing sensitive underlying charging data, alleviating the "data silo" problem caused by privacy constraints. On the other hand, addressing the distributional offset between newly deployed vehicles and historical vehicles, this invention introduces CORAL second-order covariance alignment technology at the feature level. This allows for unsupervised adaptive fine-tuning without requiring historical SOH labels for new vehicles, significantly improving the model's transferability across heterogeneous vehicles and the efficiency of target domain fine-tuning. Furthermore, the invention's dynamic weighted aggregation algorithm based on validation set loss in the federated aggregation stage assigns higher aggregation weights to clients with smaller local generalization errors. This automatically identifies and mitigates the negative impact of clients with severe data heterogeneity or poor data quality, thereby significantly improving the robustness and prediction consistency of the global model in highly non-independent and identically distributed (Non-IID) vehicular data environments.

[0087] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0089] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0090] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0091] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A method for predicting the health of electric vehicle batteries based on federated transfer learning, characterized in that, include: Acquire multiple charging cycle data of electric vehicle batteries in each charging cycle to form a multidimensional feature sequence for each charging cycle; Based on the domain-adaptive federated transfer learning framework, unsupervised domain-adaptive updates of global model parameters are achieved to obtain the trained dual-branch network models in each client. Based on the multidimensional feature sequence of the previous H consecutive historical charging cycles and the original noise SOH sequence, a multidimensional feature sequence tensor and a historical aging trajectory vector are constructed and input into a trained dual-branch network model to obtain the predicted SOH sequence for the next P consecutive charging cycles. The two-branch network model includes: The multidimensional feature sequence tensor is input into the first branch, and then passed through a series of multi-layer two-dimensional CNN convolution, adaptive average pooling, flattening, linear mapping, nonlinear activation, gated recurrent unit (GRU), layer normalization and adaptive average pooling layers in sequence along the forward propagation direction to obtain the first latent representation. The historical aging trajectory vector is input into the second branch, and then passed through a linear projection layer, a Mamba module, a causal multi-head attention layer, and a layer normalization and adaptive average pooling layer connected in sequence along the forward propagation direction to obtain the second latent representation. After concatenating and splicing the first latent representation and the second latent representation, the fused features are obtained through linear mapping, nonlinear activation, and layer normalization. The fused features are input into the Bayesian prediction head, which outputs the predicted mean and variance sequences of SOH for the next P consecutive charging cycles.

2. The electric vehicle battery health prediction method based on federated transfer learning according to claim 1, characterized in that, Acquire multiple charging cycle data of the electric vehicle battery in each charging cycle to form a multidimensional feature sequence for each charging cycle, including: Acquire various charging cycle data of electric vehicle batteries in each charging cycle, including: total battery pack voltage, charging current, state of charge, maximum voltage of individual cells in the battery pack, minimum voltage of individual cells in the battery pack, maximum temperature and minimum temperature; By using linear interpolation, each charging cycle is resampled into a fixed-length time series to obtain a multidimensional feature sequence with a unified dimension.

3. The electric vehicle battery health prediction method based on federated transfer learning according to claim 1, characterized in that, Based on the multidimensional feature sequence of the H consecutive historical charging cycles preceding the current moment and the original noise SOH sequence, a multidimensional feature sequence tensor and a historical aging trajectory vector are constructed, including: For each historical charging cycle, a multidimensional feature matrix of each historical charging cycle is constructed, with the type of charging cycle data as the row attribute and the sampling time within the cycle as the column attribute. The multidimensional feature matrix of the H consecutive historical charging cycles before the current moment is serialized and concatenated according to the time dimension to obtain the multidimensional feature sequence tensor. The original noise SOH sequence of H consecutive historical charging cycles before the current moment is serialized and spliced ​​according to the time dimension to obtain the historical aging trajectory vector.

4. The electric vehicle battery health prediction method based on federated transfer learning according to claim 1, characterized in that, Based on a domain-adaptive federated transfer learning framework, unsupervised domain-adaptive updates of global model parameters are achieved, and pre-trained dual-branch network models from various clients are obtained, including: The cloud-based central server initializes the model parameters of the dual-branch network model as the initial global model parameters; The cloud central server broadcasts the initial global model parameters to the source domain clients of each electric vehicle in the source domain, so that each source domain client can perform stochastic gradient descent training on the dual-branch network model based on its local training set, obtain the trained dual-branch network model, and upload its source domain local model parameters, validation set loss and first latent representation to the cloud central server. The cloud-based central server normalizes the validation set loss of each source domain client by taking the reciprocal, obtains the dynamic aggregation weight of each source domain client, and performs a weighted summation of the global model parameters to obtain the optimized global model parameters. The cloud-based central server will optimize the global model parameters and distribute the first latent representations of each source domain client to the target domain clients of each electric vehicle in the target domain. This allows the target domain clients to calculate the correlation alignment loss based on their first latent representations of the target domain and the first latent representations of the source domain clients. Based on the correlation alignment loss of the target domain clients and the inherited source domain training task loss, a joint optimization objective is constructed to fine-tune the global model parameters. The fine-tuned global model parameters are then uploaded to the cloud-based central server. The cloud-based central server rebroadcasts the fine-tuned global model parameters to the source domain, trains the source and target domains until the dual-branch network model based on the updated fine-tuned global model parameters converges, and the trained dual-branch network model is obtained.

5. The electric vehicle battery health prediction method based on federated transfer learning according to claim 4, characterized in that, Normalize the validation set loss of each source domain client by taking the reciprocal, obtain the dynamic aggregation weights of each source domain client, and then perform a weighted summation of the global model parameters to obtain the optimized global model parameters, including: After taking the reciprocal of the validation set loss for each source domain client and normalizing it, the dynamic aggregate weight for each source domain client is obtained, expressed as: ; Optimize global model parameters, expressed as: ; in, Indicates the first The source domain client in the ... Dynamic aggregation weights during round iterations Indicates the first The source domain client in the ... The validation set loss during round iterations, , Indicates the total number of clients in the source domain. Indicates the preset smoothing term; Indicates the first Optimize global model parameters during round iteration. Indicates the first The source domain client in the ... The source domain local model parameters during round iteration.

6. The electric vehicle battery health prediction method based on federated transfer learning according to claim 4, characterized in that, The target domain client computes a correlation alignment loss based on its first latent representation of the target domain and the first latent representation of the source domain client, including: Based on the first latent representation of each source domain client, a source domain feature matrix is ​​formed and then decentralized to obtain a source domain centralized matrix. Calculate the source domain covariance based on the source domain centered matrix and its transpose; Based on the first latent representation of each target domain client, a target domain feature matrix is ​​formed and then decentralized to obtain the target domain centralized matrix; Calculate the covariance of the target domain based on the target domain centered matrix and its transpose; Based on the Frobenius norm of the difference between the source domain covariance and the target domain covariance, a correlation alignment loss is constructed. , is represented as: ; in, The feature dimension representing the first latent representation; Indicates the first The source domain covariance during round iteration is expressed as follows: , and They represent the first The source domain centering matrix and its transpose during round iteration. Indicates the number of source domain embedded samples; Indicates the first The target domain covariance during round iteration is expressed as follows: , and They represent the first The target domain centering matrix and its transpose during round iteration. This represents the number of embedded samples in the target domain.

7. The electric vehicle battery health prediction method based on federated transfer learning according to claim 6, characterized in that, The source domain training task loss is a joint loss function of the lower bound of evidence, expressed as: ; in, Indicates the first Source domain training task loss during round iteration express The mathematical expectation, This represents a true smooth SOH sequence. This indicates the predicted SOH sequence. This indicates the fusion characteristics of the target domain client. Denotes the square of the L2 norm. Indicates the adjustment parameter. Denotes KL divergence, This indicates that the weights approximate the posterior distribution. Indicates the prior distribution of weights, This represents the sampling parameters.

8. The electric vehicle battery health prediction method based on federated transfer learning according to claim 7, characterized in that, Obtaining a true smooth SOH sequence includes: The original noise SOH sequence for each charging cycle is obtained based on the ampere-hour integration method; Variational mode decomposition is performed on the original noisy SOH sequence to obtain K intrinsic mode components with different center frequencies. Intrinsic mode components with center frequencies exceeding a preset frequency threshold are removed, and the remaining intrinsic mode components are reconstructed to obtain the main trend SOH sequence. Local weighted regression is performed on the main trend SOH sequence to obtain the true smooth SOH sequence, which serves as the true label for model training.

9. The method for predicting the health of electric vehicle batteries based on federated transfer learning according to claim 7, characterized in that, Based on the relevance alignment loss of the target domain client and the inherited source domain training task loss, a joint optimization objective is constructed to fine-tune the global model parameters, expressed as: No. Joint optimization objective during rounds of iteration , is represented as; ; Inverse fine-tuning optimizes global model parameters to obtain the first... Fine-tuning global model parameters during round iterations , is represented as: ; in, This indicates the preset balance coefficient. Indicates the learning rate for the target domain. This represents the gradient of the joint optimization objective with respect to the global model parameters.

10. The method for predicting the health of electric vehicle batteries based on federated transfer learning according to claim 4, characterized in that, After obtaining the trained dual-branch network model, the following is also included: Continuous from the variational approximate posterior distribution Monte Carlo random weight sampling operation to obtain The future SOH prediction trajectory; calculate The expected mean of the future SOH prediction trajectory is used as the target SOH prediction value and sent to the vehicle controller of the electric vehicle. calculate The prediction variance of the future SOH prediction trajectory is used to construct a 95% prediction confidence interval that encloses the true state.