Battery fault diagnosis model construction method and device, equipment, medium and product

By constructing an integrated learning model based on multi-dimensional feature fusion and XGBoost, the adaptability and accuracy of existing lithium-ion battery fault diagnosis methods under complex working conditions are solved, achieving efficient and accurate fault identification of lithium-ion batteries and meeting the safety requirements of electric vehicles and energy storage systems.

CN121598233APending Publication Date: 2026-03-03GAC AION NEW ENERGY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511763128.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing signal processing-based fault diagnosis methods for lithium-ion batteries have poor adaptability under complex operating conditions and are difficult to accurately distinguish specific fault types, affecting their accuracy and reliability in electric vehicles and energy storage systems.

Method used

An ensemble learning model based on multi-dimensional feature fusion and XGBoost is adopted. By acquiring the original training and test sets of battery operation data, a target training and test set is constructed. A gradient boosting decision tree ensemble learning model is built and multi-level fault diagnosis is performed. Combined with time series data reconstruction technology, battery pack-level fault diagnosis is achieved.

Benefits of technology

It significantly improves the identification and classification accuracy of fault characteristics under complex working conditions, and realizes efficient and accurate fault identification of lithium-ion batteries, meeting the needs of engineering practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121598233A_ABST
    Figure CN121598233A_ABST
Patent Text Reader

Abstract

The invention discloses a battery fault diagnosis model construction method and device, equipment, a medium and a product. The method comprises the following steps: acquiring an original training set and an original test set comprising battery operation data; constructing a target training set and a target test set according to the multi-dimensional statistical features of the original training set and the original test set; constructing a gradient boosting decision tree ensemble learning model oriented to the multi-classification task; training the gradient boosting decision tree ensemble learning model through the target training set to obtain a target model; performing multi-level fault diagnosis on the target model through the target test set to obtain a multi-level fault diagnosis result; and when the target model passes the performance evaluation based on the multi-level fault diagnosis result, determining the target model as a trained battery fault diagnosis model. The method can solve the problems that an existing method is poor in adaptability under complex working conditions, and specific fault types are difficult to accurately distinguish.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery technology, specifically to a method, apparatus, electronic device, readable storage medium, and computer program product for constructing a battery fault diagnosis model. Background Technology

[0002] With the widespread application of electric vehicles and energy storage systems, the safe operation of lithium-ion batteries is crucial, and fault diagnosis is a core component of battery management systems. Currently, signal processing-based diagnostic methods, such as analyzing battery voltage signals using wavelet packet energy entropy to identify early faults, have attracted considerable attention due to their simplicity. However, these methods exhibit poor adaptability under complex and variable operating conditions, are sensitive to noise, and struggle to accurately distinguish specific fault types, limiting their accuracy and reliability in engineering practice. Summary of the Invention

[0003] In view of the above problems, this application provides a battery fault diagnosis model construction method, device, electronic device, readable storage medium and computer program product, which can solve the problems of poor adaptability of existing methods under complex working conditions and difficulty in accurately distinguishing specific fault types.

[0004] Firstly, this application provides a method for constructing a battery fault diagnosis model, including: Obtain the raw training set and raw test set, which include battery operation data; Based on the multi-dimensional statistical features of the original training set and the original test set, construct the target training set and the target test set; Construct an ensemble learning model of gradient boosting decision trees for multi-classification tasks; The gradient boosting decision tree ensemble learning model is trained using the target training set to obtain the target model; Multi-level fault diagnosis is performed on the target model using the target test set to obtain multi-level fault diagnosis results; When the target model passes the performance evaluation based on the multi-level fault diagnosis results, the target model is determined as the trained battery fault diagnosis model.

[0005] In the above technical solution, this method can mine multi-dimensional statistical features based on the original training set and the original test set, thereby providing better data support for the model and ensuring the reliability of the data source for subsequent training and testing. Then, the method can train a target model with excellent multi-fault type discrimination ability by relying on gradient boosting decision trees and target training sets. Finally, the target model is tested for multi-level fault diagnosis through the target test set to achieve comprehensive verification of the target model at different fault levels, thereby ensuring the accuracy and reliability of the final model.

[0006] In some implementations, constructing the target training set and target test set based on the multi-dimensional statistical features of the original training set and the original test set includes: Feature extraction is performed on the original training set and the original test set to obtain a multidimensional statistical feature training set and a multidimensional statistical feature test set. The multidimensional statistical feature training set is reconstructed to obtain a three-dimensional tensor training set, and the multidimensional statistical feature test set is reconstructed to obtain a three-dimensional tensor test set. The three-dimensional tensor training set and the three-dimensional tensor test set are normalized respectively to obtain normalized three-dimensional tensor training set and normalized three-dimensional tensor test set; A two-dimensional feature matrix training set is constructed based on the normalized three-dimensional tensor training set, and a two-dimensional feature matrix test set is constructed based on the normalized three-dimensional tensor test set. The sample distribution of the training set of the two-dimensional feature matrix is ​​optimized to obtain the target training set; Construct a target test set based on the two-dimensional feature matrix test set.

[0007] In the above technical solution, the method can strengthen the spatiotemporal correlation of faults through multi-dimensional feature extraction and tensor reconstruction, eliminate dimensional differences through normalization, optimize the sample distribution to balance the proportion of categories, and construct a high-quality training set and test set that are adapted to the ensemble learning model, thereby effectively improving the fault feature identification and classification accuracy under complex working conditions.

[0008] In some embodiments, the normalization process performed on the three-dimensional tensor training set and the three-dimensional tensor test set to obtain a normalized three-dimensional tensor training set and a normalized three-dimensional tensor test set includes: Normalized parameters are obtained from the three-dimensional tensor training set; The three-dimensional tensor training set and the three-dimensional tensor test set are normalized according to the normalization parameters to obtain normalized three-dimensional tensor training set and normalized three-dimensional tensor test set.

[0009] In the above technical solution, the method can determine the normalization parameters based on the training set data and apply them uniformly to the training set and the test set. This eliminates the difference in feature dimensions while avoiding the leakage of test set information, ensuring the consistency of data distribution, and improving the stability of model training and the reliability of fault diagnosis results.

[0010] In some implementations, the step of optimizing the sample distribution of the two-dimensional feature matrix training set to obtain the target training set includes: The total number of samples, the total number of fault categories, and the number of samples for each fault category in the training set of the two-dimensional feature matrix are counted. Calculate the weight coefficient for each fault category based on the total number of samples, the total number of fault categories, and the number of samples for each fault category; The target training set is constructed by using the weight coefficients and the two-dimensional feature matrix training set.

[0011] In the above technical solution, the method can balance the proportion of samples of different fault categories by statistically analyzing the sample distribution and calculating the weight coefficients of each category, avoid the model training being biased towards the majority class samples, improve the ability to identify minority class faults, and ensure the balance and comprehensiveness of fault classification.

[0012] In some implementations, the objective function of the gradient boosting decision tree ensemble learning model is set as a multiple softmax function; The gradient boosting decision tree ensemble learning model balances the model's expressive power and generalization performance through maximum tree depth; The gradient boosting decision tree ensemble learning model introduces feature subsampling and sample subsampling mechanisms; The training process of the gradient boosting decision tree ensemble learning model adopts an early stopping strategy; The training process of the gradient boosting decision tree ensemble learning model is optimized by minimizing the regularization objective function; The training objective of the gradient boosting decision tree ensemble learning model is multi-class log loss.

[0013] In the above technical solution, the method can adapt to the requirements of multi-fault classification by using multiple Softmax functions, balance the model expression and generalization ability with the maximum tree depth, suppress overfitting by using feature / sample subsampling, and combine early stopping strategy and regularization to optimize the training process, ultimately improving the accuracy, stability and generalization performance of multi-fault classification.

[0014] In some implementations, the step of performing multi-level fault diagnosis on the target model using the target test set to obtain multi-level fault diagnosis results includes: The target test set is subjected to fault diagnosis using the target model to obtain a fault diagnosis result set; wherein, the fault diagnosis result set includes sample-level diagnostic results including normal state and fault state; The sample-level diagnostic results are reconstructed according to the original battery pack structure to obtain the cell state matrix of each battery pack; Calculate the overall health of the battery pack based on the cell state matrix; The battery pack-level diagnostic results are determined based on the overall health of the battery pack. By summarizing the sample-level diagnostic results and the battery pack-level diagnostic results, a multi-level fault diagnosis result is obtained.

[0015] In the above technical solution, the method can accurately identify the fault state of a single sample and assess the health of the entire battery pack, thereby covering multiple levels of needs from specific fault location to system-level status judgment, making the diagnostic results more comprehensive and more in line with actual engineering application scenarios.

[0016] In some embodiments, after performing multi-level fault diagnosis on the target model using the target test set to obtain multi-level fault diagnosis results, the method further includes: The model evaluation metrics are calculated based on the sample-level diagnostic results and the target test set; wherein the model evaluation metrics include at least sample-level accuracy, sample-level recall, and sample-level F1 score. The overall diagnostic accuracy is calculated based on the battery pack-level diagnostic results and the test set. The target model is evaluated based on the model evaluation indicators and overall diagnostic accuracy to obtain the evaluation results; When the evaluation result reaches the preset evaluation index threshold, the target model is determined to have passed the performance evaluation based on the multi-level fault diagnosis results, and the process of determining the target model as a trained battery fault diagnosis model is executed.

[0017] In the above technical solution, the method can comprehensively verify the diagnostic performance of the model at different levels through a comprehensive evaluation of multiple indicators at the sample level (accuracy, recall, F1 score) and the overall accuracy at the battery pack level, ensuring that the model meets the preset standards and guaranteeing the reliability and engineering applicability of the final delivered model.

[0018] In some implementations, after determining the target model as a trained battery fault diagnosis model, the method further includes: Obtain the operating data of the battery to be diagnosed; Feature extraction is performed on the operating data of the battery to be diagnosed to obtain the diagnostic features; The battery fault diagnosis model is used to detect faults in the features to be diagnosed, and multi-level diagnostic results are obtained.

[0019] In the above technical solution, the method can quickly output multi-level fault diagnosis results by extracting features and detecting models from the operating data of the battery to be diagnosed, thereby achieving efficient and accurate identification of battery faults.

[0020] Secondly, this application provides a battery fault diagnosis model construction device, comprising: The acquisition unit is used to acquire the raw training set and the raw test set, which include battery operation data. The first construction unit is used to construct a target training set and a target test set based on the multi-dimensional statistical features of the original training set and the original test set; The second building unit is used to build a gradient boosting decision tree ensemble learning model for multi-classification tasks; The training unit is used to train the gradient boosting decision tree ensemble learning model using the target training set to obtain the target model; The testing unit is used to perform multi-level fault diagnosis on the target model using the target test set, and obtain multi-level fault diagnosis results. The determining unit is used to determine the target model as a trained battery fault diagnosis model when the target model passes the performance evaluation based on the multi-level fault diagnosis results.

[0021] In the above technical solution, the device can mine multi-dimensional statistical features based on the original training set and the original test set, thereby providing basic data support for the model with better data and ensuring the reliability of the data source for subsequent training and testing. Then, the method can train a target model with excellent multi-fault type discrimination ability by relying on gradient boosting decision trees and target training sets. Finally, the target model is tested for multi-level fault diagnosis through the target test set to achieve comprehensive verification of the target model at different fault levels, thereby ensuring the accuracy and reliability of the final model.

[0022] Thirdly, this application provides an electronic device, the electronic device including a memory and a processor, the memory for storing a computer program, the processor running the computer program to cause the electronic device to perform the battery fault diagnosis model construction method described in any one of the first aspects.

[0023] Fourthly, this application provides a readable storage medium storing a computer program, which, when executed by a processor, performs the battery fault diagnosis model construction method described in any one of the first aspects.

[0024] Fifthly, this application provides a computer program product, which includes a computer program that, when run by a processor, executes the battery fault diagnosis model construction method described in any one of the first aspects.

[0025] The beneficial effects of this application are: it can extract multi-dimensional statistical features of battery operation through systematic feature engineering, use an ensemble learning model based on XGBoboost for fault classification, and combine time-series data reconstruction technology to achieve fault diagnosis at the battery pack level, thereby significantly improving diagnostic accuracy and engineering practicality. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating the battery fault diagnosis model construction method in some embodiments of this application; Figure 2 This is a flowchart illustrating the battery fault diagnosis model construction method in some embodiments of this application; Figure 3 This is a schematic diagram showing the variation curves of test target loss and classification accuracy in some embodiments of this application; Figure 4 This is a schematic diagram of the learning results of the XGBoost model in some embodiments of this application; Figure 5 This is a schematic diagram of the battery fault diagnosis model construction device in some embodiments of this application; Figure 6 This is a schematic diagram of the structure of an electronic device in some embodiments of this application. Detailed Implementation

[0028] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0030] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more (including two), similarly, "multiple sets" refers to two or more sets (including two sets), and "multiple pieces" refers to two or more pieces (including two pieces) unless otherwise explicitly defined.

[0031] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0032] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.

[0033] With the development of electric vehicles and energy storage systems, lithium-ion battery fault diagnosis technology has become a key component of battery management systems, playing a crucial role in ensuring safety. Current lithium battery fault diagnosis methods are mainly categorized into three types: model-based, signal processing-based, and data-driven methods.

[0034] However, model-based methods rely on precise mathematical models, but are difficult to accurately model due to battery aging, individual differences, and changes in operating conditions; signal processing-based methods are sensitive to noise, have poor adaptability to complex operating conditions, and cannot effectively distinguish different fault types; deep learning methods with application potential suffer from insufficient interpretability and opaque decision-making processes, making it difficult for users to know the basis and credibility of diagnostic results, and thus failing to meet the engineering application requirements of safety-critical scenarios.

[0035] To address the aforementioned technical problems, this application provides a lithium-ion battery fault diagnosis method based on multi-dimensional feature fusion and XGBoost. This method can extract multi-dimensional statistical features of battery operation through systematic feature engineering, perform fault classification using an ensemble learning model based on XGBoboost, and combine time-series data reconstruction technology to achieve battery pack-level fault diagnosis, thereby significantly improving diagnostic accuracy and engineering practicality.

[0036] like Figure 1 As shown, some embodiments of this application provide a method for constructing a battery fault diagnosis model, which includes: S101. Obtain the original training set and the original test set, which include battery operation data; S102. Based on the multi-dimensional statistical characteristics of the original training set and the original test set, construct the target training set and the target test set; S103. Construct a gradient boosting decision tree ensemble learning model for multi-classification tasks; S104. Train the gradient boosting decision tree ensemble learning model using the target training set to obtain the target model; S105. Perform multi-level fault diagnosis on the target model using the target test set to obtain multi-level fault diagnosis results; S106. When the target model passes the performance evaluation based on the multi-level fault diagnosis results, the target model is determined as the trained battery fault diagnosis model.

[0037] In some embodiments, the original training set refers to a dataset containing raw data such as voltage and current collected during the operation of a lithium-ion battery, which is used for model training.

[0038] In some embodiments, the raw test set refers to a dataset containing raw data such as voltage and current collected during the operation of a lithium-ion battery, used for model testing and performance evaluation.

[0039] In some embodiments, multidimensional statistical features refer to statistical indicators (such as arithmetic mean, median, variance, skewness, kurtosis, etc.) extracted from battery operation data, covering multiple dimensions such as extreme values, extreme value locations, central tendency, dispersion, and distribution pattern.

[0040] In some embodiments, the target training set refers to the dataset used for training the gradient boosting decision tree ensemble learning model after multi-dimensional statistical feature extraction, data reconstruction, class imbalance optimization, and normalization of the original training set.

[0041] In some embodiments, the target test set refers to a dataset used for target model testing and fault diagnosis after the original test set has undergone multi-dimensional statistical feature extraction, data reconstruction, and normalization processing consistent with the original training set.

[0042] In some embodiments, the gradient boosting decision tree ensemble learning model refers to an ensemble learning model (such as the XGBoost model) built for battery multi-fault classification tasks, which improves performance by integrating multiple decision trees and combining gradient optimization and regularization mechanisms.

[0043] In some embodiments, the target model refers to a gradient boosting decision tree ensemble learning model that, after being trained on a target training set, initially possesses the capability to diagnose battery faults.

[0044] In some embodiments, multi-level fault diagnosis results refer to the comprehensive diagnostic results output by the target model after diagnosing the target test set, which include cell-level fine-grained fault status (normal / fault type) and battery pack-level overall health status assessment.

[0045] In some embodiments, performance evaluation refers to the process of verifying the diagnostic performance of the target model based on multi-level fault diagnosis results by calculating indicators such as sample-level accuracy, recall, F1 score, and overall diagnostic accuracy at the battery pack level.

[0046] In some embodiments, a battery fault diagnosis model refers to a trained model that, after performance evaluation, can achieve multi-level fault identification at the cell and pack levels of lithium-ion batteries and meet preset diagnostic accuracy requirements.

[0047] For example, the formula for calculating the arithmetic mean is as follows: ; Among them, the arithmetic mean represents the average level of the signal; x i Represents the i-th data point in a sequence (such as a voltage sequence); N is the total length of the sequence.

[0048] For example, the formula for calculating the median is as follows: ; The median reflects the middle value of the data and is not sensitive to outliers.

[0049] For example, the discreteness feature is represented as follows: ; Among them, the dispersion feature is used to describe the range of data fluctuation, and is characterized by variance by measuring the average deviation of data points from the mean.

[0050] For example, the distribution morphology characteristics are represented as follows: , ; Among them, the morphological characteristics of the distribution reveal the shape properties of the data distribution. Skewness and kurtosis are characterized by statistics that describe the asymmetry of the distribution and the degree of peaks in the distribution curve, respectively.

[0051] In the above embodiments, the method can mine multi-dimensional statistical features based on the original training set and the original test set, thereby providing better data support for the model and ensuring the reliability of the data source for subsequent training and testing. Then, the method can train a target model with excellent multi-fault type discrimination ability by relying on gradient boosting decision trees and target training sets. Finally, the target model is tested for multi-level fault diagnosis through the target test set to achieve comprehensive verification of the target model at different fault levels, thereby ensuring the accuracy and reliability of the final model.

[0052] In some embodiments, a target training set and a target test set are constructed based on the multi-dimensional statistical characteristics of the original training set and the original test set, including: Feature extraction is performed on the original training set and the original test set to obtain a multidimensional statistical feature training set and a multidimensional statistical feature test set. The training set of multidimensional statistical features is reconstructed to obtain the three-dimensional tensor training set, and the test set of multidimensional statistical features is reconstructed to obtain the three-dimensional tensor test set. The training set and test set of the three-dimensional tensor are normalized respectively to obtain the normalized training set and test set of the three-dimensional tensor. A training set of two-dimensional feature matrices is constructed from a normalized three-dimensional tensor training set, and a test set of two-dimensional feature matrices is constructed from a normalized three-dimensional tensor test set. The sample distribution of the two-dimensional feature matrix training set is optimized to obtain the target training set. Construct the target test set based on the two-dimensional feature matrix test set.

[0053] In some embodiments, the method can extract 14-dimensional statistical features based on battery operation data, including multi-dimensional indicators such as extreme values, extreme value locations, central trends, dispersion, and distribution patterns. This feature system comprehensively covers time-domain statistics and distribution pattern parameters, and can completely characterize the battery operating state. The feature set constructed by this method significantly enhances the ability to characterize abnormal battery states.

[0054] In some embodiments, the method can reconstruct the data into a three-dimensional tensor structure (number of battery packs × number of cells × feature dimension). This structure retains cell-level features while maintaining the spatial correlation characteristics between cells within the battery pack, thus establishing a data foundation for multi-level fault diagnosis.

[0055] In some embodiments, the method can reconstruct three-dimensional battery data into a two-dimensional feature matrix (total number of samples × feature dimension), where each cell sampling point is regarded as an independent sample, and the label data undergoes dimensional transformation synchronously.

[0056] For example, after feature calculation is completed, this method can use Min-Max normalization to scale each feature to the [0,1] interval, as shown in the following formula: .

[0057] For example, this method reconstructs the three-dimensional data tensor into a two-dimensional feature matrix, treating each battery cell as an independent sample, thus providing sufficient learning samples for the model. Simultaneously, to address the class imbalance problem, an inverse proportional weighting method is used to calculate the weight w for each class k. k : ; In the formula, N total The total number of samples in the training set; K is the total number of categories; N k The number of samples in category k.

[0058] In some embodiments, class weight settings ensure that classes with fewer samples receive greater weight. These weights are taken into account during model training (such as when calculating gradients or building decision tree split points), increasing the model's attention to the minority class (faulty class).

[0059] In the above embodiments, the method can strengthen the spatiotemporal correlation of faults through multi-dimensional feature extraction and tensor reconstruction, eliminate dimensional differences through normalization, optimize the sample distribution to balance the proportion of categories, and construct a high-quality training set and test set that are adapted to the ensemble learning model, thereby effectively improving the fault feature identification and classification accuracy under complex working conditions.

[0060] In some embodiments, the three-dimensional tensor training set and the three-dimensional tensor test set are normalized respectively to obtain a normalized three-dimensional tensor training set and a normalized three-dimensional tensor test set, including: Normalized parameters are obtained from the 3D tensor training set; The training set and test set of the three-dimensional tensor are normalized according to the normalization parameters to obtain the normalized training set and test set of the three-dimensional tensor.

[0061] In some embodiments, the normalization parameter includes the maximum and minimum values ​​of each statistical feature in the multidimensional statistical feature training set.

[0062] In some embodiments, the method may employ a Min-Max normalization method based on the training set to perform independent normalization on each feature dimension and save the parameters for use on the test set, thereby ensuring the consistency of data distribution.

[0063] In the above embodiments, the method can determine normalization parameters based on training set data and apply them uniformly to the training set and test set, eliminating differences in feature dimensions while avoiding leakage of test set information, ensuring data distribution consistency, and improving the stability of model training and the reliability of fault diagnosis results.

[0064] In some embodiments, the training set of the two-dimensional feature matrix is ​​subjected to sample distribution optimization processing to obtain the target training set, including: The total number of samples, the total number of fault categories, and the number of samples in each fault category of the training set of the two-dimensional feature matrix are statistically analyzed. Calculate the weight coefficient for each fault category based on the total number of samples, the total number of fault categories, and the number of samples for each fault category; The target training set is constructed by using the weight coefficients and the two-dimensional feature matrix training set.

[0065] In some embodiments, the method can employ an inverse proportional weighting strategy to optimize the sample distribution. By statistically analyzing the class frequency in the training set, higher weight coefficients are assigned to fault classes with fewer samples, enabling the model training process to focus on learning rare fault modes. Specifically, by calculating the number of samples in each class and combining the total number of samples with the number of classes to generate a weight mapping, sample weights are applied when constructing the training dataset, alleviating the model skew caused by normal samples dominating the training process and significantly improving the sensitivity to the identification of minority fault classes.

[0066] In the above embodiments, the method can balance the proportion of samples of different fault categories by statistically analyzing the sample distribution and calculating the weight coefficients of each category, avoid model training bias towards the majority class samples, improve the ability to identify minority class faults, and ensure the balance and comprehensiveness of fault classification.

[0067] In some embodiments, the objective function of the gradient boosting decision tree ensemble learning model is set to a multi-Softmax function; Gradient boosting decision tree ensemble learning models balance model expressive power and generalization performance through maximum tree depth; Gradient boosting decision tree ensemble learning model introduces feature subsampling and sample subsampling mechanisms; The training process of the gradient boosting decision tree ensemble learning model employs an early stopping strategy; The training process of the gradient boosting decision tree ensemble learning model optimizes by minimizing the regularization objective function. The training objective of the gradient boosting decision tree ensemble learning model is multi-class log loss.

[0068] In some embodiments, the method can construct an XGBoost ensemble learning model for multi-class classification tasks.

[0069] In some embodiments, the model parameters are specifically optimized. Specifically, the GIA method employs multiple softmax objective functions to adapt to the three-class classification requirement, sets a maximum tree depth to balance model expressive power and generalization performance, and introduces feature subsampling and sample subsampling mechanisms to prevent overfitting, effectively improving model robustness. An early stopping strategy is used during training, and adaptive control of training epochs is achieved through validation set performance monitoring. The model training objective is multi-class log loss, used to record the performance change curves of the training and test sets. Through iterative training, the model eventually converges to the optimal state, maintaining high classification accuracy and generalization ability, providing model support for fault diagnosis of lithium-ion batteries.

[0070] In the above embodiments, the method can adapt to the requirements of multi-fault classification by using multiple Softmax functions, balance the model expression and generalization ability with the maximum tree depth, suppress overfitting by using feature / sample subsampling, and combine early stopping strategy and regularization to optimize the training process, ultimately improving the accuracy, stability and generalization performance of multi-fault classification.

[0071] In some embodiments, multi-level fault diagnosis is performed on the target model using a target test set to obtain multi-level fault diagnosis results, including: Fault diagnosis is performed on the target test set using the target model to obtain a fault diagnosis result set; the fault diagnosis result set includes sample-level diagnostic results including normal state and fault state. The sample-level diagnostic results are reconstructed according to the original battery pack structure to obtain the cell state matrix of each battery pack; Calculate the overall health of the battery pack based on the cell status matrix; Determine the battery pack-level diagnostic results based on the overall health of the battery pack; By summarizing the sample-level diagnostic results and the battery pack-level diagnostic results, multi-level fault diagnosis results are obtained.

[0072] In some embodiments, the method can, at the primary diagnostic level, classify the state of each cell sampling point independently and output fine-grained diagnostic results including normal state and two types of fault states. This level of diagnosis can accurately identify the abnormal state of specific cells in the battery pack, providing a basis for precise maintenance. At the system-level diagnostic level, the sample-level diagnostic results are reconstructed according to the original battery pack structure to form a cell state matrix for each battery pack. The overall health of the battery pack is calculated based on the reconstruction results, and the battery pack-level diagnostic results are determined by the full consistency criterion (i.e., all cells in the pack must be diagnosed correctly).

[0073] In the above embodiments, the method can accurately identify the fault state of a single sample and assess the health of the entire battery pack, thereby covering multiple levels of needs from specific fault location to system-level status judgment, making the diagnostic results more comprehensive and more in line with actual engineering application scenarios.

[0074] In some embodiments, after performing multi-level fault diagnosis on the target model using a target test set to obtain multi-level fault diagnosis results, the method further includes: The model evaluation metrics are calculated based on the sample-level diagnostic results and the target test set; among them, the model evaluation metrics include at least sample-level accuracy, sample-level recall, and sample-level F1 score. The overall diagnostic accuracy is calculated based on the battery pack-level diagnostic results and the test set. The target model is evaluated based on the model evaluation metrics and overall diagnostic accuracy to obtain the evaluation results; When the evaluation results reach the preset evaluation index threshold, the target model is determined to pass the performance evaluation based on the multi-level fault diagnosis results, and the target model is determined as the trained battery fault diagnosis model.

[0075] In some embodiments, the method can calculate sample-level precision, recall and F1 score, as well as overall diagnostic precision at the battery pack level, and finally output evaluation results such as confusion matrix and classification accuracy.

[0076] In the above embodiments, the method can comprehensively verify the diagnostic performance of the model at different levels by comprehensively evaluating multiple indicators (accuracy, recall, F1 score) at the sample level and the overall accuracy at the battery pack level, ensuring that the model meets the preset standards and guaranteeing the reliability and engineering applicability of the final delivered model.

[0077] In some embodiments, after determining the target model as a pre-trained battery fault diagnosis model, the method further includes: Obtain the operating data of the battery to be diagnosed; Feature extraction is performed on the battery operation data to be diagnosed to obtain the diagnostic features; By using a battery fault diagnosis model to detect faults in the features to be diagnosed, multi-level diagnostic results are obtained.

[0078] In the above embodiments, the method can quickly output multi-level fault diagnosis results by extracting features and detecting models from the operating data of the battery to be diagnosed, thereby achieving efficient and accurate identification of battery faults.

[0079] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below. In some embodiments, such as Figure 2 As shown, the method for constructing this battery fault diagnosis model includes: S201. Obtain the original training set and the original test set, which include battery operation data; S202. Extract features from the original training set and the original test set to obtain a multidimensional statistical feature training set and a multidimensional statistical feature test set. S203. Reconstruct the multidimensional statistical feature training set to obtain a three-dimensional tensor training set, and reconstruct the multidimensional statistical feature test set to obtain a three-dimensional tensor test set. S204. Obtain normalized parameters from the three-dimensional tensor training set; S205. Normalize the three-dimensional tensor training set and the three-dimensional tensor test set according to the normalization parameters to obtain the normalized three-dimensional tensor training set and the normalized three-dimensional tensor test set. S206. Construct a two-dimensional feature matrix training set based on the normalized three-dimensional tensor training set, and construct a two-dimensional feature matrix test set based on the normalized three-dimensional tensor test set. S207. Calculate the total number of samples, the total number of fault categories, and the number of samples for each fault category in the training set of the two-dimensional feature matrix. S208. Calculate the weight coefficient for each fault category based on the total number of samples, the total number of fault categories, and the number of samples for each fault category. S209. Construct the target training set using the weight coefficients and the two-dimensional feature matrix training set; S210. Construct the target test set based on the two-dimensional feature matrix test set; S211. Construct a gradient boosting decision tree ensemble learning model for multi-classification tasks; S212. Train the gradient boosting decision tree ensemble learning model using the target training set to obtain the target model; S213. Perform fault diagnosis on the target test set using the target model to obtain a fault diagnosis result set; wherein, the fault diagnosis result set includes sample-level diagnostic results including normal state and fault state. S214. Reconstruct the sample-level diagnostic results according to the original battery pack structure to obtain the cell state matrix of each battery pack. S215. Calculate the overall health of the battery pack based on the cell state matrix; S216. Determine the battery pack-level diagnostic results based on the overall health of the battery pack; S217. Summarize the sample-level diagnostic results and the battery pack-level diagnostic results to obtain multi-level fault diagnosis results; S218. Calculate model evaluation metrics based on sample-level diagnostic results and the target test set; wherein, the model evaluation metrics include at least sample-level accuracy, sample-level recall, and sample-level F1 score; S219. Calculate the overall diagnostic accuracy based on the battery pack-level diagnostic results and the test set. S220. Evaluate the target model based on the model evaluation indicators and the overall diagnostic accuracy to obtain the evaluation results; S221. When the evaluation results reach the preset evaluation index threshold, the target model is determined to pass the performance evaluation based on the multi-level fault diagnosis results. S222. The target model is determined to be the trained battery fault diagnosis model.

[0080] In some embodiments, the XGBoost model design and optimization are specifically achieved by integrating K decision trees f k The classification is expressed as follows: ; In the formula, F represents the regression tree space.

[0081] In some embodiments, the method trains the model by minimizing the following regularization objective function L: ; The first item measures the output value. With real labels The loss function is the difference between the two terms. The second regularization term is used to control model complexity and prevent overfitting, and is defined as:

[0082] Where T is the number of leaf nodes in the tree; w is the score vector of the leaf nodes; γ and λ are hyperparameters that control the complexity of the algorithm.

[0083] Finally, the model learns these tree structures through additive training and a greedy algorithm. At each step (generating the t-th tree), the goal is to find the optimal tree structure f by minimizing the following approximation function. t : ; Where g i and h i These are the loss function output values ​​of the previous stage. The first and second gradients.

[0084] For example, this method is validated using a real-vehicle fault dataset of lithium-ion batteries, comprising 340 new energy vehicles. Each vehicle contains current and voltage data for a battery pack and voltage and current timing signals for multiple cells. Among these, 231 vehicles and 109 vehicles contain cells with "one high and one low" faults and cells with self-discharge faults, respectively. In the charge-discharge voltage curves of lithium-ion batteries, a "one high and one low" fault is a fault type in which the curves of adjacent cells change significantly and instantaneously in two directions, one high and one low, within a short period of time. Cells with self-discharge faults have significantly lower voltages than other cells during discharge, and their rate of voltage drop is also higher than that of other cells.

[0085] This method divides the dataset into training and testing sets, selecting 60% of the battery dataset to train the model, and using the remaining data for testing; the selection of hyperparameters, specifically the XGboost model, affects the network's performance and diagnostic capabilities.

[0086] The method uses a maximum tree depth of 4, a feature subsampling of 1.0 and a sample subsampling of 0.8 to balance the model's expressive power and generalization performance. The optimizer is Adam, the number of iterations is 100, and the learning rate is set to 0.05 to ensure stable convergence of the gradient descent process.

[0087] This method uses three accuracy evaluation metrics: precision, recall, and F1 score. Higher values ​​for these three metrics indicate more accurate model classification and better performance. In this embodiment, the data is reconstructed by mixing all battery cells to create a battery cell dataset containing normal cells and two types of faults.

[0088] Table 1. Classification and performance evaluation results of battery cells by fault category

[0089] Based on the fault diagnosis performance evaluation results shown in Table 1, the battery fault diagnosis model based on multi-dimensional feature fusion and XGBoost proposed in this application can achieve good classification performance.

[0090] Specifically, the method achieved an accuracy of 99%, a recall of 99.5%, and an F1 score of 99.4% for the "normal" category, demonstrating its extremely accurate identification of healthy battery cells with a very low false alarm rate.

[0091] When dealing with "one high and one low" faults, the model of this method achieved 100% accuracy and 93.8% recall, which means that all samples judged as having this fault were real faults, with only a small number of missed detections.

[0092] For "self-discharge" faults, although the accuracy is slightly lower (88.9%), the recall rate reaches 100%, meaning that all such faults are successfully detected without any omissions, which is crucial for ensuring battery safety. The model's battery pack fault diagnosis accuracy is 91.3%.

[0093] In summary, the model maintains extremely high accuracy in diagnosis at both the battery and cell levels, validating the effectiveness of the proposed feature engineering and classification methods.

[0094] Figure 3 The curves showing the changes in test target loss and classification accuracy are presented, based on... Figure 3 It can be seen that the model of this method can achieve the aforementioned performance within 100 rounds, and has a relatively fast training convergence speed.

[0095] Figure 4 The learning results of the XGBoost model are shown. Specifically, based on... Figure 4 The decision tree structure learned by the XGBoost model clearly reveals the classification basis and decision logic of the model proposed in this patent. This decision tree achieves fault classification through hierarchical judgment of multiple features, among which the sum_value feature is selected at the root node, indicating that the total accumulated charge during battery charging and discharging is the most important basis for distinguishing different states.

[0096] Furthermore, the model makes branch decisions based on statistical features such as max_value and mean_value, reflecting the crucial role of extreme value characteristics and average state in fault identification during battery operation. The numerical differences between leaf nodes in the decision tree reflect the model's response strength to different categories of samples; for example, high output values ​​at certain leaf nodes correspond to a strong correlation with specific fault modes.

[0097] This multi-feature hierarchical decision-making mechanism solves the interpretability problem of machine learning models and provides reliable decision support for fault diagnosis results.

[0098] Figure 5 A schematic diagram of a battery fault diagnosis model building device is shown. It should be understood that this device is related to... Figure 1 The method executed in the middle corresponds to the steps involved in the aforementioned method. The specific functions and effects of the device can be found in the description above. To avoid repetition, detailed descriptions are omitted here.

[0099] The battery fault diagnosis model construction device includes: Acquisition unit 310 is used to acquire the original training set and the original test set, which include battery operation data; The first construction unit 320 is used to construct the target training set and the target test set based on the multi-dimensional statistical characteristics of the original training set and the original test set; The second building unit 330 is used to build a gradient boosting decision tree ensemble learning model for multi-classification tasks; Training unit 340 is used to train the gradient boosting decision tree ensemble learning model using the target training set to obtain the target model; Test unit 350 is used to perform multi-level fault diagnosis on the target model through the target test set and obtain multi-level fault diagnosis results. The determination unit 360 is used to determine the target model as a trained battery fault diagnosis model when the target model passes the performance evaluation based on the multi-level fault diagnosis results.

[0100] In some embodiments, the first building unit 320 includes: Extraction subunit 321 is used to extract features from the original training set and the original test set to obtain a multidimensional statistical feature training set and a multidimensional statistical feature test set. The first reconstruction subunit 322 is used to reconstruct the multidimensional statistical feature training set to obtain a three-dimensional tensor training set, and to reconstruct the multidimensional statistical feature test set to obtain a three-dimensional tensor test set. Normalization subunit 323 is used to normalize the three-dimensional tensor training set and the three-dimensional tensor test set respectively to obtain the normalized three-dimensional tensor training set and the normalized three-dimensional tensor test set. Subunit 324 is constructed to construct a two-dimensional feature matrix training set based on the normalized three-dimensional tensor training set, and to construct a two-dimensional feature matrix test set based on the normalized three-dimensional tensor test set. The optimization subunit 325 is used to optimize the sample distribution of the two-dimensional feature matrix training set to obtain the target training set. Subunit 324 is also used to construct a target test set based on a two-dimensional feature matrix test set.

[0101] In some embodiments, the normalization subunit 323 is specifically used to obtain normalization parameters based on the three-dimensional tensor training set; The training set and test set of the three-dimensional tensor are normalized according to the normalization parameters to obtain the normalized training set and test set of the three-dimensional tensor.

[0102] In some embodiments, the optimization subunit 325 is specifically used to count the total number of samples in the two-dimensional feature matrix training set, the total number of fault categories, and the number of samples in each fault category. Calculate the weight coefficient for each fault category based on the total number of samples, the total number of fault categories, and the number of samples for each fault category; The target training set is constructed by using the weight coefficients and the two-dimensional feature matrix training set.

[0103] In some embodiments, the objective function of the gradient boosting decision tree ensemble learning model is set to a multi-Softmax function; Gradient boosting decision tree ensemble learning models balance model expressive power and generalization performance through maximum tree depth; Gradient boosting decision tree ensemble learning model introduces feature subsampling and sample subsampling mechanisms; The training process of the gradient boosting decision tree ensemble learning model employs an early stopping strategy; The training process of the gradient boosting decision tree ensemble learning model optimizes by minimizing the regularization objective function. The training objective of the gradient boosting decision tree ensemble learning model is multi-class log loss.

[0104] In some embodiments, the test unit 350 includes: The diagnostic subunit 351 is used to perform fault diagnosis on the target test set through the target model to obtain a fault diagnosis result set; wherein, the fault diagnosis result set includes sample-level diagnostic results including normal state and fault state. The second reconstruction subunit 352 is used to reconstruct the sample-level diagnostic results according to the original battery pack structure to obtain the cell state matrix of each battery pack. The calculation subunit 353 is used to calculate the overall health of the battery pack based on the cell state matrix. Subunit 354 is defined to determine the battery pack-level diagnostic results based on the overall health of the battery pack. The summary subunit 355 is used to summarize the sample-level diagnostic results and the battery pack-level diagnostic results to obtain multi-level fault diagnosis results.

[0105] In some embodiments, the battery fault diagnosis model building apparatus further includes: The calculation unit 370 is used to calculate the model evaluation index based on the sample-level diagnosis results and the target test set after the test unit 350 performs multi-level fault diagnosis on the target model through the target test set and obtains the multi-level fault diagnosis results; wherein, the model evaluation index includes at least sample-level accuracy, sample-level recall and sample-level F1 score. The computing unit 370 is also used to calculate the overall diagnostic accuracy based on the battery pack-level diagnostic results and the test set. Evaluation unit 380 is used to evaluate the target model based on model evaluation indicators and overall diagnostic accuracy to obtain evaluation results; The determination unit 360 is specifically used to determine the target model through the performance evaluation based on the multi-level fault diagnosis results when the evaluation result reaches the preset evaluation index threshold, and to determine the target model as the trained battery fault diagnosis model.

[0106] In some embodiments, the battery fault diagnosis model building apparatus further includes: The acquisition unit 310 is used to acquire the battery operation data to be diagnosed after the determination unit 360 determines the target model as the trained battery fault diagnosis model. Detection unit 390 is used to extract features from the operating data of the battery to be diagnosed, and obtain the features to be diagnosed. The detection unit 390 is also used to perform fault detection on the features to be diagnosed through the battery fault diagnosis model, and obtain multi-level diagnostic results.

[0107] like Figure 6 As shown, this application provides an electronic device 400, which includes a processor 401 and a memory 402. The processor 401 and the memory 402 are interconnected and communicate with each other through a communication bus 403 and / or other forms of connection mechanism (not shown). The memory 402 stores a computer program that can be executed by the processor 401. When the computing device is running, the processor 401 executes the computer program to perform the method in any of the aforementioned optional implementations.

[0108] This application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the method in any of the aforementioned optional implementations.

[0109] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0110] This application provides a computer program product, which includes a computer program that, when run by a processor, executes the method in any of the aforementioned optional implementations.

[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for constructing a battery fault diagnosis model, characterized in that, include: Obtain the raw training set and raw test set, which include battery operation data; Based on the multi-dimensional statistical features of the original training set and the original test set, construct the target training set and the target test set; Construct an ensemble learning model of gradient boosting decision trees for multi-classification tasks; The gradient boosting decision tree ensemble learning model is trained using the target training set to obtain the target model; Multi-level fault diagnosis is performed on the target model using the target test set to obtain multi-level fault diagnosis results; When the target model passes the performance evaluation based on the multi-level fault diagnosis results, the target model is determined as the trained battery fault diagnosis model.

2. The battery fault diagnosis model construction method according to claim 1, characterized in that, The step of constructing the target training set and target test set based on the multi-dimensional statistical features of the original training set and the original test set includes: Feature extraction is performed on the original training set and the original test set to obtain a multidimensional statistical feature training set and a multidimensional statistical feature test set. The multidimensional statistical feature training set is reconstructed to obtain a three-dimensional tensor training set, and the multidimensional statistical feature test set is reconstructed to obtain a three-dimensional tensor test set. The three-dimensional tensor training set and the three-dimensional tensor test set are normalized respectively to obtain normalized three-dimensional tensor training set and normalized three-dimensional tensor test set; A two-dimensional feature matrix training set is constructed based on the normalized three-dimensional tensor training set, and a two-dimensional feature matrix test set is constructed based on the normalized three-dimensional tensor test set. The sample distribution of the training set of the two-dimensional feature matrix is ​​optimized to obtain the target training set; Construct a target test set based on the two-dimensional feature matrix test set.

3. The battery fault diagnosis model construction method according to claim 2, characterized in that, The step of normalizing the three-dimensional tensor training set and the three-dimensional tensor test set to obtain normalized three-dimensional tensor training set and normalized three-dimensional tensor test set includes: Normalized parameters are obtained from the three-dimensional tensor training set; The three-dimensional tensor training set and the three-dimensional tensor test set are normalized according to the normalization parameters to obtain normalized three-dimensional tensor training set and normalized three-dimensional tensor test set.

4. The battery fault diagnosis model construction method according to claim 2, characterized in that, The step of optimizing the sample distribution of the training set of the two-dimensional feature matrix to obtain the target training set includes: The total number of samples, the total number of fault categories, and the number of samples for each fault category in the training set of the two-dimensional feature matrix are counted. Calculate the weight coefficient for each fault category based on the total number of samples, the total number of fault categories, and the number of samples for each fault category; The target training set is constructed by using the weight coefficients and the two-dimensional feature matrix training set.

5. The battery fault diagnosis model construction method according to claim 1, characterized in that, The objective function of the gradient boosting decision tree ensemble learning model is set to a multi-Softmax function. The gradient boosting decision tree ensemble learning model balances the model's expressive power and generalization performance through maximum tree depth; The gradient boosting decision tree ensemble learning model introduces feature subsampling and sample subsampling mechanisms; The training process of the gradient boosting decision tree ensemble learning model adopts an early stopping strategy; The training process of the gradient boosting decision tree ensemble learning model is optimized by minimizing the regularization objective function; The training objective of the gradient boosting decision tree ensemble learning model is multi-class log loss.

6. The battery fault diagnosis model construction method according to claim 1, characterized in that, The step of performing multi-level fault diagnosis on the target model using the target test set to obtain multi-level fault diagnosis results includes: The target test set is subjected to fault diagnosis using the target model to obtain a fault diagnosis result set; wherein, the fault diagnosis result set includes sample-level diagnostic results including normal state and fault state; The sample-level diagnostic results are reconstructed according to the original battery pack structure to obtain the cell state matrix of each battery pack; Calculate the overall health of the battery pack based on the cell state matrix; The battery pack-level diagnostic results are determined based on the overall health of the battery pack. By summarizing the sample-level diagnostic results and the battery pack-level diagnostic results, a multi-level fault diagnosis result is obtained.

7. The battery fault diagnosis model construction method according to claim 6, characterized in that, After performing multi-level fault diagnosis on the target model using the target test set to obtain multi-level fault diagnosis results, the method further includes: The model evaluation metrics are calculated based on the sample-level diagnostic results and the target test set; wherein the model evaluation metrics include at least sample-level accuracy, sample-level recall, and sample-level F1 score. The overall diagnostic accuracy is calculated based on the battery pack-level diagnostic results and the test set. The target model is evaluated based on the model evaluation indicators and overall diagnostic accuracy to obtain the evaluation results; When the evaluation result reaches the preset evaluation index threshold, the target model is determined to have passed the performance evaluation based on the multi-level fault diagnosis results, and the process of determining the target model as a trained battery fault diagnosis model is executed.

8. The battery fault diagnosis model construction method according to claim 1, characterized in that, After determining the target model as a trained battery fault diagnosis model, the method further includes: Obtain the operating data of the battery to be diagnosed; Feature extraction is performed on the operating data of the battery to be diagnosed to obtain the diagnostic features; The battery fault diagnosis model is used to detect faults in the features to be diagnosed, and multi-level diagnostic results are obtained.

9. A battery fault diagnosis model construction device, characterized in that, The battery fault diagnosis model construction device includes: The acquisition unit is used to acquire the raw training set and the raw test set, which include battery operation data. The first construction unit is used to construct a target training set and a target test set based on the multi-dimensional statistical features of the original training set and the original test set; The second building unit is used to build a gradient boosting decision tree ensemble learning model for multi-classification tasks; The training unit is used to train the gradient boosting decision tree ensemble learning model using the target training set to obtain the target model; The testing unit is used to perform multi-level fault diagnosis on the target model using the target test set, and obtain multi-level fault diagnosis results. The determining unit is used to determine the target model as a trained battery fault diagnosis model when the target model passes the performance evaluation based on the multi-level fault diagnosis results.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the battery fault diagnosis model construction method according to any one of claims 1 to 8.

11. A readable storage medium, characterized in that, The readable storage medium stores a computer program, which, when executed by a processor, performs the battery fault diagnosis model construction method according to any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, performs the battery fault diagnosis model construction method according to any one of claims 1 to 8.