Battery state feature extraction method based on pre-training model
By using an unsupervised feature extraction method based on a pre-trained model, the problems of insufficient accuracy and generalization ability of feature extraction in battery systems are solved, enabling efficient and flexible battery state monitoring and diagnosis, and improving the agility and scalability of the battery management system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE ENG RES INST
- Filing Date
- 2025-11-10
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies struggle to accurately extract key features from battery systems. Traditional machine learning methods lack generalization ability and are difficult to adapt to multiple scenarios and battery types, resulting in low accuracy in safety and health state estimation and limited model transferability and scenario adaptability.
An unsupervised feature extraction method based on a pre-trained model is adopted. A general battery feature extraction model is constructed by pre-training with large-scale unlabeled battery data. An upstream and downstream separation design is introduced, and a lightweight downstream model is used to adapt to diverse scenario requirements.
It improves the accuracy of feature extraction and data utilization, enhances the generalization ability and scalability of the model, realizes efficient battery status monitoring and diagnosis, and reduces the dependence on labeled data and the demand for computing resources.
Smart Images

Figure CN121834286A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power battery technology, and specifically to a method for extracting battery state features based on a pre-trained model. Background Technology
[0002] With the rapid popularization of electric vehicles and large-scale energy storage systems, the safety monitoring and health management of battery systems has become a key challenge in the industry. In this context, cloud-based battery state monitoring technology based on big data is gradually becoming an important path to improve system safety. This technology relies on the in-depth mining of massive amounts of real-time and historical operating data to construct characteristic factors closely related to battery failure mechanisms, thereby achieving accurate judgment of battery safety status and health level, and further supporting functions such as safety early warning and lifespan estimation. However, battery systems are highly complex nonlinear dynamic systems, and their internal electrochemical reactions and multi-physics characteristics exhibit significant nonlinear time-varying behavior under different operating conditions, making it difficult to accurately model the battery aging trajectory and abnormal evolution mechanism. Currently, mechanistic research on the root causes of battery safety failure and abnormal aging is still in the exploratory stage, resulting in a lack of sufficient prior knowledge to support algorithm development, making it difficult to achieve effective early warning of potential risks.
[0003] Under these environmental constraints, existing technologies face multiple bottlenecks. On the one hand, because battery data is significantly affected by fluctuations in operating conditions, the causes of faults and abnormal aging are not yet clear. Relying solely on expert experience and mechanistic knowledge makes it difficult to systematically and comprehensively extract key features that accurately characterize battery status, resulting in an estimation accuracy of safety and health status that fails to meet practical needs. On the other hand, traditional machine learning methods generally suffer from insufficient generalization ability when facing complex applications across vehicle models and multiple scenarios. They struggle to adapt to diverse operating environments and battery types using a single model, significantly limiting their engineering practical value. Furthermore, traditional models are often built around a single task, failing to fully explore the potential universal feature representations in battery data. This leads to significant limitations in the transferability and scenario adaptability of the constructed models, making it difficult to support the needs of large-scale, platform-based intelligent analysis of battery data. Summary of the Invention
[0004] The present invention aims to provide a battery state feature extraction method based on a pre-trained model, which achieves unsupervised, high-precision feature extraction, improves data utilization, and enhances generalization ability and scalability.
[0005] To achieve the above objectives, the present invention employs the following technical solution: a battery state feature extraction method based on a pre-trained model, comprising the following steps: S1. Select valid battery data fields from the vehicle operation cloud platform data, reorganize the battery data in a certain way, and construct the unit training database. S2, normalize and convolve the unit training database to the appropriate dimension to generate matrix X; S3, input matrix X into the pre-trained model architecture for pre-training, and calculate the loss function used for training; S4. Using the unit training database built in S1, perform large-scale pre-training of real vehicle data according to steps S2-S3 to obtain the pre-trained model. S5, process the data to be processed in the same way as S1 and S2 to obtain the input matrix X', input the input matrix X' into the pre-trained model to obtain the high-dimensional feature space Z' of the battery data; S6 inputs the feature space Z' into the downstream model structure to perform multi-task diagnosis of the vehicle and outputs the diagnosis results.
[0006] The principles and advantages of this scheme are: This solution employs a pre-training and fine-tuning architecture. Through unsupervised learning, it autonomously extracts universally applicable operational patterns and degradation characteristics from massive amounts of unlabeled battery data, constructing a powerful general-purpose battery feature extraction model. This addresses the problem of model overfitting due to insufficient label data, thereby improving data processing efficiency. Furthermore, the entire architecture fully considers the autocorrelation and periodicity of time series data during training. Simultaneously, the large-scale operational data containing one or more battery pack types effectively enhances the model's feature recognition ability for different battery pack types, giving the model strong generalization capabilities and enabling it to handle time series prediction tasks in various scenarios.
[0007] Based on this, this solution introduces a key upstream and downstream separation design, separating general feature extraction capabilities from specific application tasks. The upstream model extracts high-precision battery features, which are then used as a general battery model to solidify core knowledge. The downstream model only needs to connect to a lightweight model, which can be quickly adapted to diverse scenarios such as health assessment and safety diagnosis using a small amount of labeled data, thus meeting the needs of various task scenarios.
[0008] This principle architecture fundamentally solves the bottlenecks of traditional methods, such as high dependence on labeled data and insufficient model generalization ability. It not only achieves extreme optimization of data and computing efficiency and empowers countless downstream tasks through one pre-training, but also gives the system higher agility and scalability. It can quickly respond to future changing business needs at the lowest cost, thus providing a strategic solution for battery management systems that combines deep insights, strong generalization ability and sustainable evolution capability. Attached Figure Description
[0009] Figure 1 This is a schematic diagram of the overall process of a battery state feature extraction method based on a pre-trained model according to the present invention. Figure 2This is a schematic diagram of the framework of a battery state feature extraction method based on a pre-trained model according to the present invention; Figure 3 This is a schematic diagram of the steps of a battery state feature extraction method based on a pre-trained model according to the present invention. Figure 4 This is a visualization diagram of the high-dimensional feature representation of battery data in a battery state feature extraction method based on a pre-trained model according to the present invention. Detailed Implementation
[0010] The following detailed description illustrates the specific implementation method: This embodiment presents a battery state feature extraction method based on a pre-trained model. By utilizing a large amount of unlabeled data for pre-training, it addresses the problem of model overfitting caused by insufficient labeled data. Furthermore, it fully considers the autocorrelation and periodicity characteristics of time series data, and based on operational data from a large number of battery pack types, effectively improves the model's feature recognition ability for different types of battery packs. This results in a model with strong generalization ability, capable of handling time series prediction tasks in various scenarios.
[0011] This embodiment provides a battery state feature extraction method based on a pre-trained model, as shown in the attached figure. Figure 1 and attached Figure 2 As shown, it includes the following steps: S1. Select valid battery data fields from the vehicle operation cloud platform data, reorganize the battery data in a certain way, and construct a unit training database. Use the unit training database to train the pre-trained model. This training database does not require feature labels and can contain one or more vehicle models.
[0012] In this embodiment, the database data fragments are all from the vehicle operation cloud platform data. The effective battery data fields include a list of individual cell voltages (96 cells, i.e., 96 columns), total voltage, maximum voltage, minimum voltage, current, SOC, mileage, maximum temperature, minimum temperature, average temperature, and insulation resistance data, totaling 106 columns.
[0013] The selected collected data is cleaned, and the cleaned data is then reconstructed. In this embodiment, data cleaning involves deleting abnormal characters and invalid data, such as NAN, from the collected data.
[0014] The data restructuring includes recombining and resampling battery data in a certain manner to adapt to the model's input requirements. Recombination methods include, but are not limited to, charging segments, discharging segments, and rule-based combinations of charging and discharging segments. Resampling methods include, but are not limited to, nearest neighbor filling, linear interpolation, polynomial interpolation, and time-indexed linear interpolation.
[0015] In this embodiment, the data is reassembled by combining the charging and discharging segments according to equal SOC intervals, where the SOC interval is 20%; the reassembled data is then linearly interpolated to obtain a data matrix Y with a length of 1000 and a dimension of 106*1000.
[0016] S2, normalizes and convolves the unit training database to the appropriate dimension to generate matrix X.
[0017] In this embodiment, the data matrix Y obtained from the unit training database is expanded to a suitable dimension through one-dimensional convolution and denoted as matrix X, thus obtaining matrix X.
[0018] S3. Input matrix X into the pre-trained model architecture for pre-training and calculate the loss function used for training.
[0019] In this embodiment, matrix X is input into a pre-trained model architecture for pre-training to obtain the latent representation space Z. Specifically, the pre-trained model architecture includes reconstructive and generative models, including but not limited to the following models: MconvTCN, TimesNet, Masked Authorcoder, and combinations thereof.
[0020] In this embodiment, the pre-trained model architecture is a masked autoencoder; its pre-training process includes the following sub-steps: S3.1, randomly mask the matrix X along its rows, with a masking rate ranging from 30% to 85%. In this embodiment, the masking rate can be set to 75%.
[0021] S3.2, The masked data is fed into the encoder to obtain the feature matrix Z. In this embodiment, the encoder contains 24 Transformer modules, each of which contains a normalization layer, an attention layer, a dropout layer, a multilayer perceptron (MLP) block, and a residual structure.
[0022] S3.3, the feature matrix Z is fed into the decoder for data reconstruction. The mean squared error (MSE) between the reconstructed data and the original data matrix X is calculated and used as the training loss function. The mean squared error is expressed as... (1); In the formula, The number of matrix elements; To reconstruct the data; This is the original data.
[0023] In this embodiment, the decoder contains 8 Transformer modules, and each layer has the same structure as the encoder.
[0024] S4. Using the unit training database built in S1, perform large-scale pre-training with real vehicle data according to steps S2-S3 to obtain the pre-trained model.
[0025] In this embodiment, large-scale real vehicle data pre-training is performed according to steps S2-S3 until the loss function of equation (1) is minimized, thus obtaining the trained encoder, which is the pre-trained model. This encoder has the ability to extract high-precision battery data.
[0026] Combined with appendix Figure 3 As shown, the pre-trained model is then used as a basis to construct a small downstream diagnostic model based on the downstream fault diagnosis task, so as to realize fault early warning based on battery operation data.
[0027] S5 processes the data to be processed in the same way as S1 and S2 to obtain the input matrix X'. The input matrix X' is then input into the pre-trained model to obtain the high-dimensional feature space Z' of the battery data.
[0028] In this embodiment, the construction of the high-latitude feature space Z' specifically includes the following sub-steps: S5.1 For the vehicle requiring diagnosis, its data is acquired, cleaned, reassembled, and normalized according to the rules described in S1 and S2 to obtain the input matrix X'.
[0029] S5.2, input the input matrix X' into the encoder trained in S4 to obtain the feature space Z', as shown in the appendix. Figure 4 The figure shows a visual representation of the feature space Z'. As can be seen from the figure, the hidden layer space can represent the information intensity in different dimensions, which can be used to determine the underlying mechanistic features of the data.
[0030] S6 inputs the feature space Z' into the downstream model structure to perform multi-task diagnosis of the vehicle and outputs the diagnosis results.
[0031] In this embodiment, the downstream model structure is a CNN structure, which includes four convolutional modules, a global average pooling layer, a global average pooling layer, and a Softmax classification layer.
[0032] In this embodiment, the principle of designing "upstream pre-training" and "downstream model" separately is adopted, fundamentally reconstructing the construction logic of the battery model. This solution first creates a foundational model that is proficient in general battery knowledge, and then, based on this foundation, flexibly constructs lightweight application models to cope with various specific tasks.
[0033] Specifically, this solution involves a large-scale unsupervised pre-training process upstream, allowing the model to autonomously discover dynamic response patterns, decay trends, periodic regularities, and anomalies inherent in raw sequences such as voltage, current, and temperature. This process distills the common patterns found in massive amounts of unlabeled battery data into a high-precision, general-purpose feature extraction model, making it a powerful "battery expert." Subsequently, downstream, this expert model is frozen and used as a fixed feature extractor. A lightweight, dedicated model is provided only for each new specific task, such as health assessment or fault diagnosis. This lightweight model does not need to learn the complex principles of batteries from scratch; it only needs to learn to map the rich features provided upstream to specific task objectives based on a small amount of labeled data.
[0034] Through this clear upstream and downstream hierarchical decoupling model, firstly, it achieves ultimate reuse of knowledge and efficiency. The results of a resource-intensive pre-training can be used infinitely and at low cost by countless downstream tasks, greatly reducing dependence on labeled data and computational overhead. Meanwhile, the downstream models are very lightweight, and the computational resources and time required for training decrease by orders of magnitude, achieving intensive use of resources.
[0035] Secondly, it endows the system with agility and scalability. When faced with new business needs, there is no need to change the core foundation. A lightweight downstream model can be quickly trained to respond and deploy new capabilities in a short period of time, making the system a continuously evolving capability platform that can respond agilely to the ever-changing and growing business needs in the future.
[0036] Third, this architecture ensures the long-term value and stability of technological assets. The upstream model, as the core knowledge base, can remain stable once it is trained. Encapsulating core knowledge in a stable upstream model protects it from interference from frequent downstream iterations, ensuring the universality and accuracy of upstream features and guaranteeing the robustness of the system's basic capabilities.
[0037] 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 extracting battery state features based on a pre-trained model, characterized in that, Includes the following steps: S1. Select valid battery data fields from the vehicle operation cloud platform data, reorganize the battery data in a certain way, and construct the unit training database. S2, normalize and convolve the unit training database to the appropriate dimension to generate matrix X; S3, input matrix X into the pre-trained model architecture for pre-training, and calculate the loss function used for training; S4. Using the unit training database built in S1, perform large-scale pre-training of real vehicle data according to steps S2-S3 to obtain the pre-trained model. S5, process the data to be processed in the same way as S1 and S2 to obtain the input matrix X', input the input matrix X' into the pre-trained model to obtain the high-dimensional feature space Z' of the battery data; S6 inputs the feature space Z' into the downstream model structure to perform multi-task diagnosis of the vehicle and outputs the diagnosis results.
2. The battery state feature extraction method based on a pre-trained model according to claim 1, characterized in that, In S3, the pre-trained model architecture is a masked autoencoder; its pre-training includes the following sub-steps: S3.1, randomly mask the matrix X along its rows, with a masking rate ranging from 30% to 85%; S3.2, put the masked data into the encoder to obtain the feature matrix Z; S3.3, the feature matrix Z is fed into the decoder for data reconstruction. The mean squared error between the reconstructed data and the original data matrix X is calculated and used as the loss function for training; where the mean squared error is expressed as... ; In the formula, The number of matrix elements; To reconstruct the data; This is the original data.
3. The battery state feature extraction method based on a pre-trained model according to claim 1, characterized in that: In S1, the effective battery data fields include a list of individual cell voltages, total voltage, maximum voltage, minimum voltage, current, SOC, mileage, maximum temperature, minimum temperature, average temperature, and insulation resistance data, totaling 106 columns.
4. The battery state feature extraction method based on a pre-trained model according to claim 1, characterized in that: In S1, the process also includes cleaning the collected data and reconstructing the cleaned data. The data reconstruction includes recombination and resampling. The recombination includes charging segments, discharging segments, and regular combinations of charging and discharging segments. The resampling includes nearest neighbor filling, linear interpolation, polynomial interpolation, and time-indexed linear interpolation.
5. The battery state feature extraction method based on a pre-trained model according to claim 2, characterized in that: The encoder contains 24 Transformer modules, each containing a normalization layer, an attention layer, a dropout layer, a multilayer perceptron module, and a residual structure; the decoder contains 8 Transformer modules and has the same structure as the encoder.
6. The battery state feature extraction method based on a pre-trained model according to claim 2, characterized in that: The pre-trained model architectures include reconstructive and generative models, including MconvTCN, TimesNet, MaskedAutuencoder, and combinations thereof.
7. The battery state feature extraction method based on a pre-trained model according to claim 1, characterized in that: In S6, the downstream model structure is a CNN structure, including four convolutional modules, a global average pooling layer, a global average pooling layer, and a Softmax classification layer.
8. The battery state feature extraction method based on a pre-trained model according to claim 2, characterized in that: In S4, large-scale real vehicle data pre-training is performed following the steps in S2-S3 until the loss function is minimized, thus obtaining the pre-trained model.
9. The battery state feature extraction method based on a pre-trained model according to claim 4, characterized in that: The data cleaning process involves removing abnormal characters and invalid data from the collected data.
10. The battery state feature extraction method based on a pre-trained model according to claim 4, characterized in that: The data recombination involves combining the charging and discharging segments according to equal SOC intervals, with the SOC interval being 20%. The recombined data is then linearly interpolated to obtain a data matrix Y of length 1000, with dimensions of 106*1000.