Battery fault determination method and device and electronic equipment

By using a multi-level tree model to screen battery data features in battery fault judgment, it solves the problem of fault judgment errors and waste of computing resources caused by too much data in the existing technology, and achieves more efficient and accurate fault prediction.

CN119335410APending Publication Date: 2025-01-21HEFEI GUOXUAN HIGH TECH POWER ENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411585189.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

When determining a battery failure, the existing technology causes too much input data to cause errors in the fault judgment result, which is large in calculation, high resource consumption, and slow in processing speed.

Method used

By obtaining the battery data of the target battery, determine multiple features corresponding to the data, and input these features into the feature selection model to obtain the first and second features. The feature selection model adopts a multi -level tree model, which is optimized by adjusting each level of tree models to choose from.

Benefits of technology

Through feature screening, the data complexity is reduced, the overfitting is avoided, the accuracy and processing efficiency of fault predictions are improved, and the consumption of computing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119335410A_ABST
    Figure CN119335410A_ABST
Patent Text Reader

Abstract

The invention discloses a battery fault determination method and apparatus, and an electronic device. The method comprises the following steps: acquiring battery data of a target battery; determining a plurality of features corresponding to the battery data; inputting the plurality of features into a feature selection model to obtain a first feature, and determining a second feature according to correlation coefficient values between the plurality of features and the fault item; and obtaining a fault result corresponding to the target battery according to the first feature and the second feature. According to the method and the device, the technical problems that the fault judgment result is easy to make mistakes, the calculation amount is too large, the consumed calculation resource is large and the processing speed is slow due to too much input data when whether the battery has the fault is determined in the related technology are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a method and device for determining a battery fault, and an electronic device. Background Art

[0002] Lithium-ion batteries are the main power source for electric vehicles. As the usage time increases, their comprehensive performance will gradually decline, leading to problems such as shortened driving range, poor battery consistency, and reduced power. By early warning of battery cell undervoltage failure, the trend of performance degradation can be discovered in advance, and corresponding maintenance and repair measures can be taken to keep the vehicle in good operating condition. In addition, serious battery cell undervoltage may even cause safety accidents such as fire and explosion.

[0003] It can be seen that if battery problems can be discovered in advance and dealt with in a timely manner, it can not only maintain vehicle performance, extend battery life, promote technological progress, and reduce maintenance costs, but also ensure the safety of the vehicle and passengers.

[0004] At present, traditional machine learning algorithms are usually used to diagnose and predict the fault status of batteries, such as support vector machines, neural networks, naive Bayes, K-nearest neighbor algorithms, etc. However, when determining whether there is a fault in the battery in the related technology, the fault judgment result is prone to errors due to excessive input data, and there are technical problems such as excessive calculation, large consumption of computing resources, and slow processing speed.

[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0006] The embodiments of the present invention provide a battery fault determination method, device and electronic device to at least solve the technical problems in the related art of determining whether there is a fault in the battery, that is, when determining whether there is a fault, the fault judgment result is prone to errors due to excessive input data, the amount of calculation is too large, the computing resources are consumed, and the processing speed is slow.

[0007] According to one aspect of an embodiment of the present invention, a battery fault determination method is provided, comprising: acquiring battery data of a target battery; determining a plurality of features corresponding to the battery data; inputting the plurality of features into a feature selection model to obtain a first feature, and determining a second feature based on correlation coefficient values ​​between the plurality of features and the fault items, wherein the feature selection model comprises a multi-level tree model, and except for the first-level tree model, each of the remaining tree models is obtained by adjusting the previous-level tree model based on actual results and predicted results of the previous-level tree model, wherein the first feature is a feature whose corresponding first correlation index is greater than a first threshold, and the second feature is a feature whose corresponding second correlation index is greater than a second threshold, and the corresponding second correlation index is determined based on the corresponding correlation coefficient value; and based on the first feature and the second feature, a fault result corresponding to the target battery is obtained.

[0008] Optionally, obtaining a fault result corresponding to the target battery based on the first feature and the second feature includes: determining a target feature based on the first feature and the second feature; inputting the target feature into a fault prediction model to obtain a fault result corresponding to the target battery, wherein the fault prediction model is selected from a plurality of candidate models, the plurality of candidate models are respectively trained by corresponding sample data, and the corresponding sample data are selected from a sample database according to corresponding feature window data.

[0009] Optionally, inputting multiple features into the feature selection model to obtain the first feature includes: determining the number of feature usages corresponding to the multiple features, the feature splitting gains corresponding to the multiple features, and the feature splitting weights corresponding to the multiple features in the multi-level tree model; determining the first association indexes corresponding to the multiple features respectively based on the number of feature usages corresponding to the multiple features, the feature splitting gains corresponding to the multiple features, and the feature splitting weights corresponding to the multiple features; and determining that the feature whose corresponding first association index is greater than the first threshold is the first feature.

[0010] Optionally, determining the second feature based on the correlation coefficient values ​​between the multiple features and the fault items respectively includes: determining the correlation coefficient values ​​between the multiple features and the fault items respectively; determining the absolute values ​​corresponding to the multiple correlation coefficient values ​​to obtain multiple second correlation indexes; and determining that the feature whose corresponding second correlation index is greater than the second threshold is the second feature.

[0011] Optionally, the determining of multiple features corresponding to the battery data includes: when the target battery includes multiple batteries and the battery data includes single cell voltage values, determining multiple single cell voltage differences and a single cell maximum voltage difference based on the corresponding single cell maximum voltage and the corresponding single cell minimum voltage; determining multiple single cell voltage variances and multiple single cell voltage standard deviations based on the multiple single cell voltage differences; determining the multiple features based on the battery data, the multiple single cell voltage differences, the multiple single cell voltage variances, and the multiple single cell voltage standard deviations.

[0012] Optionally, inputting the target feature into a fault prediction model to obtain a fault result corresponding to the target battery includes: when the fault prediction model is a random forest model, inputting the target feature into multiple tree models included in the random forest model to obtain fault classification results corresponding to the multiple tree models, wherein the random forest model includes multiple tree models, each tree model is constructed based on a corresponding randomly selected feature, and the randomly selected feature is a feature randomly selected from the target feature; based on the multiple fault classification results, determining the fault result corresponding to the target battery.

[0013] Optionally, after inputting the target feature into the fault prediction model to obtain the fault result corresponding to the target battery, it also includes: when the fault result is that a fault exists, determining a fault solution corresponding to the fault result; sending a fault warning instruction to a predetermined terminal, wherein the fault warning instruction carries a fault solution and the fault result.

[0014] According to one aspect of an embodiment of the present invention, a battery fault determination device is provided, comprising: an acquisition module for acquiring battery data of a target battery; a first determination module for determining a plurality of features corresponding to the battery data; a second determination module for inputting the plurality of features into a feature selection model to obtain a first feature, and determining a second feature based on correlation coefficient values ​​between the plurality of features and the fault items, wherein the feature selection model comprises a multi-level tree model, and except for the first-level tree model, each of the remaining tree models is obtained by adjusting the previous-level tree model based on actual results and predicted results of the previous-level tree model, wherein the first feature is a feature whose corresponding first correlation index is greater than a first threshold, and the second feature is a feature whose corresponding second correlation index is greater than a second threshold, and the corresponding second correlation index is determined based on the corresponding correlation coefficient value; and a third determination module for obtaining a fault result corresponding to the target battery based on the first feature and the second feature.

[0015] According to one aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any one of the above-mentioned battery fault determination methods.

[0016] According to one aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned battery fault determination methods.

[0017] In an embodiment of the present invention, the battery data of the target battery is obtained; multiple features corresponding to the battery data are determined; the multiple features are input into the feature selection model to obtain the first feature, and the second feature is determined based on the correlation coefficient values ​​between the multiple features and the fault items, wherein the feature selection model includes a multi-level tree model, and except for the first-level tree model, the remaining tree models of each level are obtained by adjusting the previous-level tree model based on the actual results and the predicted results of the previous-level tree model, the first feature is a feature whose corresponding first correlation index is greater than the first threshold, and the second feature is a feature whose corresponding second correlation index is greater than the second threshold; based on the first feature and the second feature, the fault result corresponding to the target battery is obtained. The present invention can avoid the use of a large amount of data by screening the features, thereby solving the technical problems in the related art that when determining whether there is a fault in the battery, the fault judgment result is prone to error due to too much input data, and the calculation amount is too large, the computing resources are consumed, and the processing speed is slow. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 is a flow chart of a method for determining a battery failure according to an embodiment of the present invention;

[0020] Figure 2 is a flow chart of a method for determining a battery fault provided in an optional embodiment of the present invention;

[0021] Figure 3 4 is a structural block diagram of a battery fault determination device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] Example 1

[0025] According to an embodiment of the present invention, an embodiment of a battery fault determination method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] Figure 1 is a flow chart of a method for determining a battery fault according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0027] Step S102, obtaining battery data of a target battery;

[0028] In step S102 provided in the present application, the battery data of the target battery is obtained, and the target battery is the specific battery that needs to be fault-detected. In the scenario of battery management and maintenance, the target battery can be any type of battery such as an electric vehicle battery, an energy storage battery, etc., which is not limited here and can be customized according to actual experience and scenarios.

[0029] The battery data may include but are not limited to battery voltage, current, temperature, charge and discharge times, charge and discharge depth, battery health status and other parameters.

[0030] Obtaining the battery data of the target battery can be to obtain its operating status and historical record data from the BMS or related sensors of the target battery. Collecting battery data is the basis for fault prediction, which provides raw information for subsequent feature extraction. Through in-depth analysis of battery data, the pattern of battery performance changes over time can be discovered, thereby identifying possible precursors to faults.

[0031] Step S104, determining a plurality of features corresponding to the battery data;

[0032] In step S104 provided in the present application, a plurality of features corresponding to the battery data are determined.

[0033] In battery failure prediction, features can be statistics calculated directly or indirectly from battery data, such as average voltage, maximum voltage difference, temperature change rate, etc. These features help the model identify changing patterns or anomalies in the battery health status.

[0034] Determining multiple features corresponding to battery data can extract meaningful information from the raw battery data and convert it into features that can be used in machine learning models. Based on these features, the model can determine whether the battery is likely to fail, as well as the type and severity of the failure. By extracting features, the model's sensitivity to failures and the accuracy of predictions can be improved, and the computational complexity of model training and prediction processes can be reduced, thereby improving overall processing efficiency and resource utilization.

[0035] It should be noted that in the process of determining the features, invalid or abnormal data points can be removed to ensure the accuracy and reliability of the features. Considering that battery data may change over time, time series analysis technology can be used to extract the characteristics of battery status changes over time. Derived features can also be calculated based on the original data, such as the slope of the voltage, the root mean square value of the current, etc. These features may reflect the health status of the battery better than the original data.

[0036] Step S106, input multiple features into the feature selection model to obtain the first feature, and determine the second feature according to the correlation coefficient values ​​between the multiple features and the fault items, wherein the feature selection model includes a multi-level tree model, and except for the first-level tree model, the remaining tree models of each level are obtained by adjusting the previous-level tree model according to the actual results and the prediction results of the previous-level tree model, the first feature is a feature whose corresponding first correlation index is greater than the first threshold, the second feature is a feature whose corresponding second correlation index is greater than the second threshold, and the corresponding second correlation index is determined according to the corresponding correlation coefficient value;

[0037] In step S106 provided in the present application, the first feature and the second feature are determined.

[0038] Among them, the first feature is determined using a feature selection model. The feature selection model is a machine learning model used to select the most valuable features for battery failure prediction from a large number of original features. The multi-level tree model included in the feature selection model is similar to the hierarchical structure of the decision tree model in the gradient boosting tree algorithm. These models are adjusted through multiple iterations, each time based on the difference between the predicted results of the previous level model and the actual results, thereby optimizing the selection of features.

[0039] Among them, the first feature and the first correlation index are involved. The first feature refers to those features with the highest correlation with fault prediction in the feature selection model. The first correlation index is used to measure the contribution of the feature to the model's prediction ability. The first threshold is a set value that can be customized according to the actual application and scenario.

[0040] In the feature selection model, the adjustment of multiple levels of tree models is involved. Except for the first level tree model, the adjustment of each level of tree models is based on the prediction error of the previous level model. This mechanism ensures that the model gradually reduces the error and improves the prediction accuracy during the training process. Specifically, each level of tree model learns and optimizes by observing the residual (the difference between the actual result and the predicted result) of the previous level model. This iterative process allows the model to gradually focus on the features that are most decisive for predicting faults.

[0041] Through feature screening of the multi-level tree model, the most effective features for fault prediction can be identified, and irrelevant features of the model input can be reduced, thereby improving the accuracy of fault prediction.

[0042] Among them, the second feature and the second correlation index are involved. The second feature is to screen out features whose second correlation index is greater than the second threshold by calculating the correlation coefficient value between each feature and the fault item. The correlation coefficient measures the strength and direction of the linear relationship between two variables. The larger the absolute value, the stronger the linear relationship. The screening of the second feature is based on the correlation between the feature and the fault. If the second correlation index exceeds the set second threshold, the feature is determined to be the second feature. This screening method focuses on the direct linear relationship between the feature and the fault, which helps to identify those features that directly affect battery failure.

[0043] Moreover, by determining the first feature and the second feature from multiple features, feature screening avoids using a large amount of irrelevant data and useless features for calculation, reduces the amount of calculation, saves computing resources, and speeds up processing.

[0044] In addition, in order to further optimize feature screening, cross-validation can be used to determine the optimal first threshold and second threshold to ensure that the screened features can provide sufficient prediction information without causing model overfitting.

[0045] Step S108, obtaining a fault result corresponding to the target battery according to the first feature and the second feature.

[0046] In step S108 provided in the present application, the fault result corresponding to the target battery is obtained based on the first feature and the second feature. The first feature and the second feature are feature subsets screened out from the original multiple features based on different evaluation criteria. By screening the first feature and the second feature, features with low correlation with fault judgment can be removed, thereby reducing the complexity of the data, avoiding overfitting, and improving the accuracy of the prediction. Screening features reduces the amount of data that needs to be processed, thereby reducing the consumption of computing resources, speeding up the processing speed, and making fault prediction possible in scenarios with high real-time requirements. Feature screening is not only based on the internal evaluation of the model (first feature), but also considers the direct correlation between the feature and the fault (second feature), which helps the model maintain good generalization performance in different types of batteries and fault scenarios, thereby achieving the effect of accurately determining the fault.

[0047] Through the above steps S102-S110, the battery data of the target battery is obtained; multiple features corresponding to the battery data are determined; the multiple features are input into the feature selection model to obtain the first feature, and the second feature is determined according to the correlation coefficient values ​​between the multiple features and the fault items, wherein the feature selection model includes a multi-level tree model, except for the first-level tree model, the remaining tree models of each level are obtained by adjusting the previous-level tree model according to the actual results and the predicted results of the previous-level tree model, the first feature is the feature corresponding to the first correlation index greater than the first threshold, and the second feature is the feature corresponding to the second correlation index greater than the second threshold; according to the first feature and the second feature, the fault result corresponding to the target battery is obtained. The present invention can avoid the use of a large amount of data by screening the features, thereby solving the technical problems in the related art that when determining whether there is a fault in the battery, the fault judgment result is prone to error due to too much input data, and the calculation amount is too large, the computing resources are consumed, and the processing speed is slow.

[0048] As an optional embodiment, a fault result corresponding to a target battery is obtained based on a first feature and a second feature, including: determining a target feature based on the first feature and the second feature; inputting the target feature into a fault prediction model to obtain a fault result corresponding to the target battery, wherein the fault prediction model is selected from a plurality of candidate models, the plurality of candidate models are respectively trained by corresponding sample data, and the corresponding sample data are selected from a sample database according to corresponding feature window data.

[0049] In this embodiment, the target feature is determined based on the first feature and the second feature, wherein the first feature and the second feature are feature subsets selected from the original multiple features based on different evaluation criteria, and the target feature is the final feature set for battery fault prediction after combining the first feature and the second feature.

[0050] By screening the first and second features, features with low relevance to fault judgment can be removed, thereby reducing the complexity of the model, avoiding overfitting, and improving the accuracy of prediction. Screening features reduces the amount of data that needs to be processed, thereby reducing the consumption of computing resources, speeding up processing, and making fault prediction possible in scenarios with high real-time requirements. Feature screening is not only based on the internal evaluation of the model (the first feature), but also considers the direct correlation between the feature and the fault (the second feature), which helps the model maintain good generalization performance under different types of batteries and fault scenarios.

[0051] In this embodiment, the target features are also input into the fault prediction model to obtain the fault result corresponding to the target battery, wherein the fault prediction model is selected from a plurality of candidate models, the plurality of candidate models are respectively trained by corresponding sample data, and the corresponding sample data are selected from the sample database according to the corresponding feature window data.

[0052] Among them, the fault prediction model is a machine learning model used to predict whether a battery will fail. This model is obtained through training. The training data is samples of known fault states in historical battery data. The model learns the relationship between the characteristics of these samples and the faults so that it can make predictions on new data.

[0053] During the model training process, sample data is used. Sample data is a data set used to train machine learning models. The sample data contains various feature values ​​of the battery under normal and fault conditions. Through this data, the model can learn the association between features and fault conditions.

[0054] When selecting sample data, feature window data is used. Feature window data can include the sample feature window length and the sample time of the selected feature window. Selecting different samples through different feature window data plays a vital role in training the model. They affect the model's ability to capture the battery state change information before the fault, as well as the time range that needs to be traced back when predicting the fault at the scheduled time.

[0055] Among them, a longer feature window length can contain more historical information, which helps the model capture the long-term trends and subtle changes in battery state changes. This helps the model more accurately predict the fault state of the battery at a certain moment in the future. A shorter feature window length can reduce the input dimension of the model, reduce computational complexity and training time, and improve the real-time performance and efficiency of the model. The sample time determines the time range that the model needs to look back to when predicting a fault at a predetermined moment. A longer sample time means that the model needs to look back on historical data for a longer period of time to predict future faults, which helps the model capture battery state change information over a longer period of time. A longer sample time may be more suitable for slowly changing battery states, while a shorter sample time may be more suitable for rapidly changing battery states. Therefore, different feature window data can be selected to select sample training models, and selected from multiple candidate models to ensure that the final model is based on the optimal training strategy and can more effectively predict battery failures.

[0056] As an optional embodiment, before inputting the target feature into the fault prediction model to obtain the fault result corresponding to the target battery, it also includes: obtaining multiple initial models; determining the feature window data corresponding to the multiple initial models, wherein the feature window data includes the sample feature window length, extracting the sample time of the selected feature window, the sample feature window length is used to determine the battery state change information before the fault, and the sample time is the time required to backtrack when predicting the fault at a predetermined time; selecting corresponding sample data from the sample database according to the corresponding feature window data; training the multiple initial models respectively according to the corresponding sample data to obtain multiple models to be selected.

[0057] In this embodiment, multiple initial models are obtained, and these initial models may be the same. By training according to different sample data, it is determined which model trained by the sample determined by the feature window data is the best. The feature window data corresponding to the multiple initial models are determined. Among them, the feature window data includes the sample feature window length and the sample time for extracting the selected feature window. These parameters determine the data range and time used in model training. Through different feature window data, it can be found how to maximize the performance of the model and improve the accuracy of the prediction. Moreover, by reasonably allocating the feature window data, unnecessary waste of computing resources can be avoided and the training efficiency can be improved.

[0058] By selecting the corresponding sample data through appropriate feature window data, it can be ensured that the determined sample data contains sufficient information to reflect the changes in battery status and fault characteristics. Selecting sample data that matches the model requirements can ensure that the model learns key information related to fault prediction. Moreover, by selecting appropriate sample data, the interference of noise and irrelevant information can be avoided, and the generalization ability of the model can be improved.

[0059] As an optional embodiment, multiple features are input into a feature selection model to obtain a first feature, including: determining the number of feature usages corresponding to the multiple features, the feature splitting gains corresponding to the multiple features, and the feature splitting weights corresponding to the multiple features in the multi-level tree model; determining first association indexes corresponding to the multiple features respectively based on the number of feature usages corresponding to the multiple features, the feature splitting gains corresponding to the multiple features, and the feature splitting weights corresponding to the multiple features; determining a feature whose corresponding first association index is greater than a first threshold as the first feature.

[0060] In this embodiment, the process of determining the first feature is explained.

[0061] The number of times the features corresponding to multiple features in the multi-level tree model are used is determined. During the training process of the multi-level tree model, each feature may be used to split the node. This step counts the number of times each feature is used in the multi-level tree model, that is, how many times it participates in the splitting decision. This indicator reflects the participation of the feature in the model building process. A feature is used more frequently, which usually means that it has a higher importance in distinguishing samples or predicting targets.

[0062] The feature splitting gains corresponding to multiple features in the multi-level tree model are determined. Feature splitting gain measures the information gain or purity improvement brought by a feature when splitting a node. Feature splitting gain is a specific, quantitative indicator used to measure the degree of improvement in model performance (such as accuracy, purity, etc.) when using a certain feature for splitting. This indicator is usually obtained by calculating the information gain before and after the split, the reduction in Gini impurity, etc. In tree models such as decision trees, selecting the feature with the largest splitting gain for splitting can optimize the performance of the model on the training set.

[0063] The feature splitting weights corresponding to multiple features in the multi-level tree model are also determined. The feature splitting weight may be a further weighted processing of the feature splitting gain, or an additional evaluation based on other criteria (such as feature stability, interpretability, etc.). The feature splitting weight is a relatively complex indicator. Generally speaking, the feature splitting weight can be regarded as a measure of the importance of the feature in the model, but this importance is not only based on the number of times the feature is used, but may also include the information gain brought about by feature splitting, the degree of improvement in model performance, the stability of the feature, and other aspects.

[0064] Based on the above three indicators, the first correlation index corresponding to each of the multiple features is determined. The first correlation index can be a comprehensive index that combines the number of feature usages, feature splitting gains, and feature splitting weights. It reflects the overall performance and importance of each feature in the model training process.

[0065] Then, the feature whose corresponding first correlation index is greater than the first threshold is determined to be the first feature. By setting a threshold (first threshold), the features that perform well on the first correlation index can be screened out. By screening out the most important features, the complexity of the model can be reduced, and the training speed and prediction performance can be improved. At the same time, these key features can more accurately reflect the inherent laws and patterns of the data, thereby improving the accuracy of the model. The first features screened out are usually those variables that have a significant impact on the model prediction results, so as to improve the interpretability and credibility of the model.

[0066] As an optional embodiment, the second feature is determined based on the correlation coefficient values ​​between the multiple features and the fault items, including: determining the correlation coefficient values ​​between the multiple features and the fault items; determining the absolute values ​​corresponding to the multiple correlation coefficient values ​​to obtain multiple second correlation indexes; determining the feature whose corresponding second correlation index is greater than the second threshold as the second feature.

[0067] In this embodiment, a process of determining the second feature is described. A process of determining a feature (ie, the second feature) highly correlated with the fault item based on the correlation coefficient value.

[0068] First, we can determine the correlation coefficient values ​​between multiple features and the fault items. The purpose of this step is to calculate the correlation between each feature and the fault item. The correlation coefficient value is an indicator to measure the degree of linear correlation between two variables, and its value is between -1 and 1. When the correlation coefficient is 1, it means that the two variables are completely positively correlated; when the correlation coefficient is -1, it means that the two variables are completely negatively correlated; when the correlation coefficient is 0, it means that there is no linear correlation between the two variables.

[0069] Then, the absolute values ​​corresponding to the multiple correlation coefficient values ​​are determined to obtain multiple second correlation indexes. Since the correlation coefficient value can be positive or negative, we only care about the size of the correlation (that is, the absolute value of the correlation degree) and do not care whether it is positive or negative. Therefore, it is necessary to calculate the absolute value of each correlation coefficient value, which is used as the second correlation index to measure the degree of correlation between the feature and the fault item.

[0070] Finally, the feature whose corresponding second correlation index is greater than the second threshold is determined as the second feature. That is, by setting a threshold (the second threshold), those features that are highly correlated with the fault item can be screened out, namely, the second features. These features are considered to be the most important for predicting or diagnosing faults.

[0071] By screening out features that are highly correlated with the fault item, more accurate prediction or diagnosis models can be built. These models can more effectively capture the signal of the fault occurrence, thereby improving the accuracy of prediction and diagnosis. When building a model, using features that are highly correlated with the fault item can reduce the complexity of the model. This not only helps speed up the training of the model, but also improves the generalization ability of the model, making it perform better when faced with new data.

[0072] As an optional embodiment, multiple features corresponding to the battery data are determined, including: when the target battery includes multiple batteries and the battery data includes single cell voltage values, multiple single cell voltage differences and single cell maximum voltage differences are determined based on the corresponding single cell maximum voltage and the corresponding single cell minimum voltage; multiple single cell voltage variances and multiple single cell voltage standard deviations are determined based on the multiple single cell voltage differences; multiple features are determined based on the battery data, multiple single cell voltage differences, multiple single cell voltage variances, and multiple single cell voltage standard deviations.

[0073] In this embodiment, the process of determining multiple features is described. In a battery management system, in particular, when the target battery contains multiple single cells, multiple single cell voltage differentials and single cell maximum voltage differentials can be determined. That is, first, the voltage value of each single cell needs to be measured and recorded. Then, the voltage difference between adjacent single cells (i.e., single cell voltage differential) is calculated, and these differences reflect the degree of voltage imbalance between single cells in the battery pack. In addition, it is necessary to find the maximum value of all single cell voltage differentials, i.e., the single cell maximum voltage differential, which represents the maximum degree of voltage imbalance in the battery pack. Then, multiple single cell voltage variances and multiple single cell voltage standard deviations are determined. That is, the voltage value of the single cell is used to calculate the variance of the single cell voltage. Variance is a statistic that measures the degree of discreteness of data distribution, which reflects the degree of deviation of the single cell voltage value from the average voltage. The larger the variance, the greater the voltage difference between the single cells. The single cell voltage standard deviation is the square root of the variance, which is easy to understand and compare.

[0074] Based on the calculated single cell voltage difference, single cell maximum voltage difference, single cell voltage variance and single cell voltage standard deviation, a series of features can be constructed. These features include not only direct measures of voltage imbalance within the battery pack (such as single cell maximum voltage difference), but also statistical characteristics of voltage distribution (such as single cell voltage variance and standard deviation), which together provide a comprehensive description of the health status of the battery pack.

[0075] By monitoring and analyzing these characteristics, the battery management system can more accurately assess the health status of the battery pack, promptly detect potential voltage imbalance problems, and take appropriate measures to intervene, such as balanced charging or adjusting discharge strategies, thereby improving the overall performance and life of the battery pack. Moreover, voltage imbalance is one of the common causes of battery pack failures and safety accidents. By continuously monitoring these characteristics, safety hazards such as overheating and short circuits caused by voltage imbalance can be promptly detected and prevented, thereby enhancing the safety of the battery pack.

[0076] As an optional embodiment, the target feature is input into a fault prediction model to obtain a fault result corresponding to the target battery, including: when the fault prediction model is a random forest model, the target feature is input into multiple tree models included in the random forest model to obtain fault classification results corresponding to the multiple tree models, wherein the random forest model includes multiple tree models, each tree model is constructed based on corresponding randomly selected features, and the randomly selected features are features randomly selected from the target features; based on multiple fault classification results, the fault result corresponding to the target battery is determined.

[0077] In this embodiment, the steps of determining the fault result are described. The steps are described when the fault prediction model is a random forest model, which includes multiple tree models, and the random forest model is composed of multiple decision tree models, which are independently constructed during the training process. Each decision tree is constructed based on a subset of features randomly selected from the original feature set, which helps to increase the diversity of the model and reduce the risk of overfitting. That is, when constructing each decision tree, instead of using all the target features, a portion of the features are randomly selected from the target features as the basis for constructing the tree. This randomness enables each decision tree to learn different feature combinations and decision paths, thereby improving the generalization ability of the entire model.

[0078] When a target battery failure prediction is required, a data set containing the target battery-related features is input into the random forest model. Each decision tree will classify the data based on its own feature subset and output a fault classification result. Since the random forest model contains multiple decision trees, multiple fault classification results will be obtained. These results may not be exactly the same because each decision tree is built based on a different feature subset.

[0079] In order to obtain the final fault prediction result, the random forest model usually uses a voting mechanism or an averaging mechanism to integrate the prediction results of multiple decision trees. For example, the number of votes for each fault category can be counted or the average prediction probability of each fault category can be calculated, and the fault category with the most votes or the highest average prediction probability can be selected as the final prediction result.

[0080] The random forest model can reduce the bias and overfitting that may be generated by a single decision tree by constructing multiple decision trees and combining their prediction results, thereby improving the accuracy of fault prediction. Since each decision tree is constructed based on a randomly selected subset of features, the random forest model can learn more feature combinations and decision paths, thereby enhancing the generalization ability of the model and performing better when faced with new data. The random forest model constructs decision trees by randomly selecting features, reducing the model's dependence on specific features. This means that even if some features are missing or of low quality in the data set, the model can still make effective fault predictions.

[0081] As an optional embodiment, after the target feature is input into the fault prediction model and the fault result corresponding to the target battery is obtained, it also includes: when the fault result is that a fault exists, determining a fault solution corresponding to the fault result; sending a fault warning instruction to a predetermined terminal, wherein the fault warning instruction carries a fault solution and a fault result.

[0082] In this embodiment, the steps after determining the fault are described. When the fault prediction model outputs the result that the target battery has a fault, the system will automatically determine the solution corresponding to the fault result according to the preset fault handling process or knowledge base. These solutions may include specific maintenance steps, suggestions for replacing parts, guidance on adjusting operating parameters, etc., aiming to eliminate the fault as soon as possible or prevent the fault from further deteriorating. After determining the fault solution, the system will generate a fault warning instruction and send it to a predetermined terminal. These terminals can be mobile devices of maintenance personnel, display screens of monitoring centers, control centers of automation systems, etc. The fault warning instruction not only includes the fault result (such as fault type, fault level, etc.), but also comes with the corresponding fault solution, so that the recipient can quickly understand the fault situation and take corresponding countermeasures.

[0083] By automatically determining fault solutions and sending fault warning instructions, the time from fault discovery to response measures can be significantly shortened, thereby improving the timeliness of fault handling. This helps reduce the impact of faults on normal system operation and reduce potential economic losses. Moreover, the preset fault handling process or knowledge base is usually based on rich experience and professional knowledge, and can provide accurate solutions for different types of faults. This helps to avoid blindness and misoperation of maintenance personnel when handling faults, and improves the accuracy and efficiency of fault handling.

[0084] Based on the above embodiments and optional embodiments, an optional implementation is provided, which is described in detail below.

[0085] In an optional embodiment of the present invention, a method for determining a battery fault is provided, specifically, a method for determining an undervoltage fault, which realizes accurate early warning of a single cell fault of a battery of a new energy vehicle. Figure 2 is a flow chart of a method for determining a battery fault provided in an optional embodiment of the present invention, such as Figure 2 As shown, it is introduced below.

[0086] S1: Based on the internal mechanism of the battery and the existing characteristics of the battery, the derived characteristics related to the undervoltage failure of the battery cell of the new energy vehicle are calculated.

[0087] As the name implies, the undervoltage fault of a new energy vehicle battery cell must be more related to voltage-related features, and the voltage-related features involved in the vehicle data collection features are only the battery cell voltage cellVoltages, the maximum cell voltage batteryMaxVoltage, and the minimum cell voltage batteryMinVoltage, which are relatively limited. In order to improve the accuracy of the subsequent battery cell undervoltage warning algorithm, other derived features must also be considered. By analyzing the relevant internal mechanism knowledge of the battery, it can be seen that the battery cell undervoltage fault is also related to the cell voltage difference, the maximum cell voltage drop, the cell voltage variance, the cell voltage standard deviation, and the cell voltage lower quartile. The calculation process of the relevant derivative features is as follows:

[0088] Cell pressure difference = batteryMaxVoltage - batteryMinVoltage;

[0089]

[0090] Where n is the number of single cells, i is the i-th single cell, and t represents time;

[0091] In summary, the derived features related to the undervoltage fault of the battery cell of the new energy vehicle can be calculated (same as the above process of determining multiple features corresponding to the battery data).

[0092] S2: Perform Pearson correlation and XGBoost feature importance analysis between the relevant feature items of new energy vehicle batteries and the fault items, and select the key feature items that are more correlated with the fault items (the same as the process of determining the target features mentioned above).

[0093] The real vehicle data involved in the present invention has many existing feature items and derived feature items, and when training the battery cell undervoltage fault warning model in the subsequent process, it is not the case that the more features are input, the better. If all features are input into the fault warning model, the accuracy and operation efficiency of the model may be reduced. Therefore, the features need to be screened before training the model. This paper performs feature screening by analyzing the XGBoost feature importance and Pearson correlation coefficient between the existing feature items and derived feature items related to the real vehicle data and the fault items. The greater the feature importance and correlation coefficient, the greater the correlation between the feature and the fault item. Therefore, the feature item with a greater correlation with the fault item can be selected according to the analysis results.

[0094] S3: Construct a sample library of undervoltage fault characteristics of battery cells in new energy vehicles.

[0095] The feature items that are more relevant to the battery cell undervoltage fault after screening are used as the input features of the model, and the fault items are used as the output labels of the model. According to the knowledge of the internal mechanism of the battery, the cause of the battery cell undervoltage fault is not only related to the feature items at the current moment, but also related to the feature items at multiple moments before the current moment. Therefore, the input features of the model cannot only consider the features of a certain frame corresponding to the moment of fault occurrence, but need to take a certain number of frames of data forward to form a feature window. In addition, in order to achieve the purpose of early warning of faults, the selection of the feature window can be advanced by a certain time, that is, the model warning time, and the model output is still the fault item at the current moment, thereby constructing a feature sample library of battery cell undervoltage faults for new energy vehicles.

[0096] S4: Optimize the feature window length and the advance time for selecting the feature window, and train and verify the random forest model based on the optimal result to achieve early warning of battery cell undervoltage failure.

[0097] Random Forest is an ensemble learning method that combines multiple decision trees for classification and regression. For classification problems, the advantages of the random forest model are more prominent. In terms of accuracy, random forests can usually provide high accuracy, especially when the data set is large and the number of features is large. By building multiple decision trees and combining them, random forests can effectively reduce the variance of the model and improve the overall performance. In terms of robustness, since random forests are built on the basis of multiple decision trees, they have good resistance to the overfitting problem of a single decision tree. In addition, random forests are also highly robust to outliers and noisy data. In terms of fit, since random forests average the results of multiple decision trees, their generalization ability is usually stronger than that of a single decision tree.

[0098] Therefore, the random forest model is selected as the early warning model for undervoltage failure of battery cells in new energy vehicles.

[0099] Here, the early warning model will be affected by two important parameters, namely the length of the feature window and the time in advance when the feature window is selected. When the feature window length is too long, too much redundant data may be input into the model, affecting the model's early warning accuracy and efficiency. When the lead time when extracting the feature window is too long, it may result in the failure to capture relevant information using the data in the feature window, affecting the model's early warning accuracy. Therefore, in order to ensure the accuracy and efficiency of the early warning model, the process of tuning the above two parameters is very critical.

[0100] The feature window length is optimized by 10 frames each time, and the advance time for selecting the feature window is optimized by 1 hour each time. A feature library is constructed to train and test the random forest model, and the optimal feature window length and the advance time for selecting the feature window are selected according to the model accuracy. Based on the optimal result, an early warning of undervoltage fault of a battery cell of a new energy vehicle is realized (the above S3-S4 is the same as the above-mentioned input of the target feature into the fault prediction model to obtain the fault result corresponding to the target battery, wherein the fault prediction model is selected from multiple candidate models, and the multiple candidate models are respectively trained by corresponding sample data, and the corresponding sample data is selected from the sample database according to the corresponding feature window data).

[0101] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of various embodiments of the present invention.

[0103] Example 2

[0104] According to an embodiment of the present invention, a device for implementing the above-mentioned battery fault determination method is also provided. Figure 3is a structural block diagram of a battery fault determination device according to an embodiment of the present invention. Figure 3 As shown, the device includes: an acquisition module 302, a first determination module 304, a second determination module 306 and a third determination module 30. The device is described in detail below.

[0105] An acquisition module 302 is used to acquire battery data of a target battery; a first determination module 304 is connected to the acquisition module 302 and is used to determine a plurality of features corresponding to the battery data; a second determination module 306 is connected to the first determination module 304 and is used to input a plurality of features into a feature selection model to obtain a first feature, and determine a second feature based on correlation coefficient values ​​between the plurality of features and the fault items, wherein the feature selection model includes a multi-level tree model, and except for the first-level tree model, each of the remaining tree models is obtained by adjusting the previous-level tree model based on actual results and predicted results of the previous-level tree model, wherein the first feature is a feature whose corresponding first correlation index is greater than a first threshold, and the second feature is a feature whose corresponding second correlation index is greater than a second threshold; a third determination module 308 is connected to the second determination module 306 and is used to obtain a fault result corresponding to the target battery based on the first feature and the second feature.

[0106] It should be noted here that the above-mentioned acquisition module 302, the first determination module 304, the second determination module 306 and the third determination module 308 correspond to steps S102 to S108 in the method for implementing a battery fault determination, and the instances and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0107] Example 3

[0108] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement any of the above-mentioned battery fault determination methods.

[0109] Example 4

[0110] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute any of the above-mentioned battery fault determination methods.

[0111] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0112] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0115] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0117] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for determining a battery failure, characterized in that: include: Get the battery data of the target battery; determining a plurality of features corresponding to the battery data; Input multiple features into a feature selection model to obtain a first feature, and determine a second feature based on correlation coefficient values ​​between the multiple features and the fault items, wherein the feature selection model includes a multi-level tree model, and except for the first-level tree model, the remaining tree models of each level are obtained by adjusting the previous-level tree model based on actual results and prediction results of the previous-level tree model, the first feature is a feature whose corresponding first correlation index is greater than a first threshold, the second feature is a feature whose corresponding second correlation index is greater than a second threshold, and the corresponding second correlation index is determined based on the corresponding correlation coefficient value; According to the first feature and the second feature, a fault result corresponding to the target battery is obtained.

2. The method according to claim 1, characterized in that The obtaining, according to the first feature and the second feature, a fault result corresponding to the target battery includes: Determining a target feature according to the first feature and the second feature; The target feature is input into a fault prediction model to obtain a fault result corresponding to the target battery, wherein the fault prediction model is selected from a plurality of candidate models, the plurality of candidate models are respectively trained by corresponding sample data, and the corresponding sample data are selected from a sample database according to corresponding feature window data.

3. The method according to claim 2, characterized in that Before inputting the target feature into the fault prediction model to obtain the fault result corresponding to the target battery, the method further includes: Obtain multiple initial models; Determine the characteristic window data corresponding to the multiple initial models respectively, wherein the characteristic window data includes a sample characteristic window length, extract a sample time of the selected characteristic window, the sample characteristic window length is used to determine the battery state change information before the fault, and the sample time is the time to be traced back when predicting the fault at the predetermined time; Selecting corresponding sample data from the sample database according to corresponding feature window data; The multiple initial models are trained respectively according to the corresponding sample data to obtain the multiple models to be selected.

4. The method according to claim 1, characterized in that The step of inputting the plurality of features into the feature selection model to obtain the first feature includes: Determine, in the multi-level tree model, the number of feature usages respectively corresponding to the plurality of features, the feature splitting gains respectively corresponding to the plurality of features, and the feature splitting weights respectively corresponding to the plurality of features; Determine first association indexes corresponding to the plurality of features respectively according to feature usage counts corresponding to the plurality of features respectively, feature splitting gains corresponding to the plurality of features respectively, and feature splitting weights corresponding to the plurality of features respectively; Determine that a feature whose corresponding first correlation index is greater than the first threshold is the first feature.

5. The method according to claim 1, characterized in that The determining of the second feature according to the correlation coefficient values ​​between the plurality of features and the fault items respectively comprises: Determine the correlation coefficient values ​​between the plurality of features and the fault items respectively; Determine the absolute values ​​corresponding to the multiple correlation coefficient values ​​to obtain multiple second correlation indexes; Determine that a feature whose corresponding second correlation index is greater than the second threshold is the second feature.

6. The method according to claim 1, characterized in that The determining of a plurality of features corresponding to the battery data comprises: When the target battery includes multiple batteries and the battery data includes single cell voltage values, multiple single cell voltage differences and a single cell maximum voltage difference are determined according to the corresponding single cell maximum voltage and the corresponding single cell minimum voltage; Determine multiple single cell voltage variances and multiple single cell voltage standard deviations based on multiple single cell voltage differences; The plurality of features are determined based on the battery data, the plurality of cell voltage differences, the plurality of cell voltage variances, and the plurality of cell voltage standard deviations.

7. The method according to claim 2, characterized in that The step of inputting the target feature into a fault prediction model to obtain a fault result corresponding to the target battery includes: In the case where the fault prediction model is a random forest model, the target feature is input into a plurality of tree models included in the random forest model to obtain fault classification results corresponding to the plurality of tree models, wherein the random forest model includes a plurality of tree models, each of which is constructed based on a corresponding randomly selected feature, and the randomly selected feature is a feature randomly selected from the target feature; According to the multiple fault classification results, a fault result corresponding to the target battery is determined.

8. The method according to claim 2, characterized in that: After inputting the target feature into the fault prediction model to obtain the fault result corresponding to the target battery, the method further includes: In the case where the fault result is that a fault exists, determining a fault solution corresponding to the fault result; A fault warning instruction is sent to a predetermined terminal, wherein the fault warning instruction carries a fault solution and the fault result.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the battery fault determination method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the battery failure determination method according to any one of claims 1 to 8.