Battery system time series data feature extraction constraint enhancement training method
By optimizing the model using a joint loss function of KL divergence loss function and adaptive weights in battery system time-series data, the collapse problem in feature extraction of battery system time-series data is solved, the feature extraction accuracy and model interpretability are improved, the battery state monitoring capability is enhanced, and the safety and health management of the battery system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-14
AI Technical Summary
Existing battery system time-series data suffers from difficulties in feature extraction, feature collapse, and insufficient constraints, resulting in weak generalization ability, poor model interpretability, and insufficient monitoring accuracy.
The latent space is constrained to follow a standard normal distribution by using the KL divergence loss function, and the model is optimized by combining a joint loss function with adaptive weights. The latent space representation is generated through a high-ratio masking mechanism and a Transformer encoder, which avoids feature collapse and enhances the accuracy and interpretability of feature extraction.
It improves feature extraction accuracy and model interpretability, enhances the ability to monitor battery status, improves the model's generalization ability, and ensures the safety and health management of the battery system.
Smart Images

Figure CN121858960A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery system data processing technology, and specifically to a method for constrained enhancement training of time-series data features in battery systems. Background Technology
[0002] With the rapid development of electric vehicles and energy storage systems, the safety monitoring and health management of battery systems have become increasingly prominent issues. Cloud-based battery status monitoring algorithms, based on big data, have become an important technical means for proactive safety management of battery systems due to their ability to identify abnormal problems in advance. This technology mines real-time and historical data to construct characteristic factors corresponding to battery failure mechanisms, enabling accurate identification of battery safety and health status, and thus achieving functions such as safety warnings and health estimation.
[0003] However, the time-series data generated during battery system operation contains extremely rich and complex electrochemical, mechanical, and thermal information, making it difficult to accurately and efficiently extract key features characterizing battery state. This directly affects the effective capture of battery fault and aging-related data features, and also leads to generally poor interpretability of existing monitoring models, failing to clearly elucidate the correlation logic between features and battery state. To address this challenge, self-supervised feature extraction methods based on reconstruction models are widely adopted, with masked reconstruction feature extraction algorithms being particularly prevalent. However, these algorithms have significant flaws in loss function design. Existing algorithms mostly use mean square error (MSE) as the core loss function. Such loss functions are prone to feature collapse and cannot effectively constrain the feature distribution in the hidden layer space, further exacerbating the poor model interpretability and making it difficult for the extracted features to truly reflect the actual state of the battery.
[0004] More importantly, most current related technologies rely on a single loss function for model optimization. This optimization method has weak generalization ability to data and is difficult to adapt to the ever-increasing scale of battery data scenarios. When faced with larger and more complex data scales, the model performance will significantly degrade, making it impossible to stably achieve accurate monitoring and health management of battery status. This may lead to the failure to identify battery safety hazards in a timely manner, which not only affects the service life of the battery system, but also poses a potential threat to the safety of equipment operation and personnel, seriously hindering the high-quality development of the electric vehicle and energy storage system industry. Summary of the Invention
[0005] The present invention aims to provide a constraint-enhanced training method for feature extraction of battery system time-series data, in order to solve the problems of difficulty in extracting key features of existing battery time-series data, easy feature collapse and insufficient constraints, weak generalization ability, resulting in poor model interpretability and insufficient monitoring accuracy.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for constrained enhancement training of time-series data features in a battery system, comprising the following steps: S1, Data Preprocessing: Read data from the vehicle battery system operating cloud platform, select the required fields and perform preprocessing; S2, Data Mask: Randomly mask 50%-90% of the time points in the battery system timing data segment; S3, Encoder processing: Input the unmasked segment into the Transformer encoder to generate a latent space representation; S4, Construction of latent space constraints: Using the KL divergence loss function, the latent space is constrained to follow a standard normal distribution; S5, Decoder Reconstruction: The latent representation and mask mark after splicing the sampled data are used to form a complete sequence, which is then input into the Transformer decoder to reconstruct the original temporal data; S6, Joint Loss Optimization: The model is optimized by reconstructing the joint function of loss and KL loss, and adaptive weights are used to balance the weight of the two.
[0007] The principles and advantages of this scheme are: In existing technologies, temporal feature extraction based on reconstruction models often relies on a single MSE loss, without considering the structured constraints of the latent space. This proposed solution combines KL divergence constraints with adaptive joint loss and introduces a high-ratio masking mechanism. The synergistic effect of these three elements improves feature extraction accuracy, interpretability, and generalization ability.
[0008] This scheme addresses the efficiency problem of feature extraction from long-term time-series data by randomly masking 50%-90% of time points in battery time-series data segments and inputting only the unmasked segments into the Transformer encoder to generate latent space representations. The latent space is constrained to follow a standard normal distribution using the KL divergence loss function, avoiding feature collapse, ensuring spatial smoothness, and enhancing the structure and interpretability of the latent space. Simultaneously, a joint function of reconstruction loss and KL loss is employed to optimize the model, with adaptive weighting to balance their proportions, ensuring feature fidelity while improving model generalization ability through regularization. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating a method for constrained enhancement training of time-series data feature extraction in a battery system according to the present invention. Detailed Implementation
[0010] The following detailed description illustrates the specific implementation method: This embodiment presents a constrained enhancement training method for feature extraction of time-series data from battery systems. Based on a masked reconstruction model, it addresses the cumulative error problem of autoregressive models and structures the latent space to avoid feature collapse and ensure spatial smoothness. It can effectively adapt to various types of data, balance reconstruction accuracy and representation decoupling, avoid overfitting, and improve the model's generalization ability.
[0011] A method for constrained enhancement training of feature extraction from time-series data of a battery system is provided, as shown in the appendix. Figure 1 As shown, it includes the following steps: S1, Data Preprocessing: Read data from the vehicle battery system operating cloud platform, select the required fields, and perform preprocessing.
[0012] In this embodiment, valid fields containing battery data are selected, including individual cell voltage sequences, current, total voltage, SOC, mileage, temperature list, highest individual cell voltage, and lowest individual cell voltage. The selected fields are then preprocessed. In this embodiment, data preprocessing includes cleaning the selected fields as needed, such as deleting abnormal characters and invalid data, like NAN, to ensure data integrity and consistency.
[0013] S2, Data Mask: Randomly mask 50%-90% of the time points in the battery system timing data segment.
[0014] In this embodiment, the timing data segment of the input battery system is represented as: Where T is the time step and D is the feature dimension. 50%-90% of time points are randomly masked. In this embodiment, the masking ratio can be selected as 75%, generating a sequence containing masked labels, forcing the model to learn the dependencies of unmasked segments.
[0015] S3, Encoder processing: Input the unmasked segment into the Transformer encoder to generate a latent space representation.
[0016] Only the K unmasked time points (K=T) (1-mask rate) fragments are input into the Transformer encoder to generate a latent space representation. In this embodiment, the latent space representation is as follows: In the formula, The number of unmasked dots; This is the hidden layer dimension. It captures high-dimensional abstract features of time-series data (such as voltage change trends and temperature coupling relationships).
[0017] S4, Construction of latent space constraints: The KL divergence loss function is used to constrain the latent space to follow a standard normal distribution.
[0018] A latent space constraint loss function is constructed by using the Kullback-Leibler Divergence function, thereby constraining the latent space to follow a certain regular distribution, namely the standard normal distribution, in order to improve feature decoupling and continuity, avoid overfitting, and enhance generation ability.
[0019] In this embodiment, the distribution constraint can also be implemented using methods such as maximum mean difference loss, adversarial loss, or cosine similarity loss.
[0020] Specifically, the distribution constraints include the following sub-steps: S4.1, Calculate the mean of the latent space representation Z. and variance ; S4.2, Calculate the KL loss function, expressed as: ; S4.3, reparameterized sampling, denoted as ; In the formula, To obtain from the standard normal distribution A noise vector randomly sampled from the data. Ensure gradient backpropagation.
[0021] S5, Decoder Reconstruction: The latent representation after splicing and sampling is marked with a mask to form a complete sequence, which is then input into the Transformer decoder to reconstruct the original temporal data.
[0022] In this embodiment, the sampled Concatenated with the mask marker to form a complete sequence, represented as The Transformer decoder outputs a reconstructed sequence with the same dimensions as the original data, minimizing the error in the masked region. This sequence is then input to obtain the reconstructed original time-series data. .
[0023] S6, Joint Loss Optimization: The model is optimized by reconstructing the joint function of loss and KL loss, and adaptive weights are used to balance the weight of the two.
[0024] The model optimizes itself by dynamically balancing the weights of the reconstruction loss (MSE) and KL divergence loss as the total loss function. The reconstruction loss ensures the fidelity of features to the original data, while the KL loss constrains the structured distribution of the latent space. In this embodiment, the joint function optimization model is expressed as follows: ; In the formula, To reconstruct the loss function; The adaptive weights can be determined using algorithms such as monotonically increasing methods, periodic cyclic methods, and adaptive methods based on reconstruction error. The adaptive weights are dynamically adjusted according to the training stage. For example, in the initial stage, the focus is on reconstruction accuracy (weights biased towards MSE), and in the later stage, the focus is on latent space structure (weights biased towards KL), which can better balance the weights of the two and ultimately achieve a balance between feature extraction accuracy, interpretability, and generalization ability.
[0025] The reconstruction loss function is expressed as follows: ; In the formula, This represents the masked region. The reconstruction loss function ensures feature fidelity, while the KL loss provides regularization, balancing reconstruction with the latent space structure.
[0026] It also includes using the encoder's output latent space representation Z after training as input features for downstream tasks (classification / prediction).
[0027] In this embodiment, a mask-based reconstruction model addresses the cumulative error problem of autoregressive models, making it suitable for long-term time-series data processing. A high masking rate further enhances model robustness and improves data efficiency. Simultaneously, a structured latent space design prevents feature collapse, ensuring spatial smoothness and making feature dimensions more independent, effectively improving interpretability. An adaptive weighting mechanism effectively adapts to various data types, balancing reconstruction accuracy and representation decoupling, preventing overfitting, and improving model generalization ability. This solution offers advantages such as efficient data utilization, strong generalization ability, and high scalability, providing efficient and accurate high-dimensional feature inputs for battery system safety diagnosis and health assessment tasks, thus improving the accuracy of downstream models.
[0028] The above descriptions are merely embodiments of the present invention, and common knowledge such as specific technical solutions and / or characteristics are not described in detail here. It should be noted that those skilled in the art can make various modifications and improvements without departing from the technical solutions of the present invention, and these should also be considered within the scope of protection of the present invention. These modifications and improvements will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.
Claims
1. A method for constrained augmentation training of feature extraction from time-series data of a battery system, characterized in that, Includes the following steps: S1, Data Preprocessing: Read data from the vehicle battery system operating cloud platform, select the required fields and perform preprocessing; S2, Data Mask: Randomly mask 50%-90% of the time points in the battery system timing data segment; S3, Encoder processing: Input the unmasked segment into the Transformer encoder to generate a latent space representation; S4, Construction of latent space constraints: Using the KL divergence loss function, the latent space is constrained to follow a standard normal distribution; S5, Decoder Reconstruction: The latent representation and mask mark after splicing the sampled data are used to form a complete sequence, which is then input into the Transformer decoder to reconstruct the original temporal data; S6, Joint Loss Optimization: The model is optimized by reconstructing the joint function of loss and KL loss, and adaptive weights are used to balance the weight of the two.
2. The method for constrained augmentation training of time-series data feature extraction in a battery system according to claim 1, characterized in that: The time-series data segment is represented as: Where T is the time step and D is the feature dimension.
3. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 1, characterized in that: The data mask has a masking ratio of 75%.
4. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 2, characterized in that: The hidden space is represented as In the formula, The number of unmasked dots; For hidden layer dimensions.
5. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 4, characterized in that, S4 includes the following sub-steps: S4.1, Calculate the mean of the latent space representation Z. and variance ; S4.2, Calculate the KL loss function, expressed as: ; S4.3, reparameterized sampling, denoted as ; In the formula, To obtain from the standard normal distribution The noise vector randomly sampled from the middle.
6. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 5, characterized in that: In S5, the sampled Concatenated with the mask marker to form a complete sequence, represented as After input, the reconstructed original time series data is obtained. .
7. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 6, characterized in that: In S6, the joint function optimization model is expressed as follows: ; In the formula, To reconstruct the loss function; For adaptive weights.
8. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 7, characterized in that: The reconstruction loss function is expressed as follows: ; In the formula, This is the mask area.
9. The method for constrained enhancement training of time-series data feature extraction in a battery system according to claim 1, characterized in that: The data preprocessing includes data cleaning, removing abnormal characters and invalid data.
10. The method for constrained augmentation training of time-series data feature extraction in a battery system according to claim 1, characterized in that: It also includes using the encoder's output latent space representation Z as the input feature for downstream tasks after training.