A method and system for detecting health of new energy vehicle battery

The method and system use image-based analysis with a ViT model and CART decision tree to efficiently and accurately assess battery health, addressing the inefficiencies and costs of traditional hardware-dependent methods.

CN118348439BActive Publication Date: 2024-12-03HUBEI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410428383.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2024-12-03
Estimated Expiration
2044-04-10

AI Technical Summary

Technical Problem

Existing methods for detecting the health of new energy vehicle batteries require multiple hardware steps, are costly, and lack versatility due to varying battery models and brands, leading to inconsistent detection methods.

Method used

A method and system using battery-related images and classification models, specifically employing internal structure, appearance, and thermal imaging, combined with a Vision Transformer (ViT) model and a CART classification decision tree, to quickly and accurately determine battery health without hardware dependency.

Benefits of technology

This approach reduces hardware costs and time, enhances detection efficiency, and ensures consistent results across different battery models and brands by leveraging image-based analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118348439B_ABST
    Figure CN118348439B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting the health of a new energy vehicle battery, which includes the following steps: obtaining an internal structure image of a sample battery, a battery appearance image, and a thermal imaging image of the battery when it is working; obtaining the actual health of the sample battery, and determining the battery health level of the sample battery; establishing a battery status training data set according to the internal structure image, the battery appearance image, the thermal imaging image, and the battery health level; inputting the battery status training data set into a ViT model; constructing a classification feature data set; constructing a CART classification decision tree; inputting the internal structure image, the battery appearance image, and the thermal imaging image of the battery to be detected into the classification model to output the health level of the battery to be detected. The present invention only needs to use battery-related images and classification models to quickly and accurately determine the health of the battery. The method is not affected by the battery model and brand, which greatly improves its versatility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of new energy vehicles, and in particular to a method and system for detecting the health of a new energy vehicle battery. Background Art

[0002] As the core component of new energy vehicles, it is particularly important to test the health of batteries and take corresponding maintenance measures. The existing new energy vehicle battery health test solution mainly relies on hardware, which obtains key data such as the battery's electrolyte, electrode active substances, and current and voltage during charging and discharging through hardware equipment, and then obtains the current health status of the battery based on specific calculation methods, such as the battery health calculation formula.

[0003] However, the above solution requires the configuration of various hardware detection equipment first, and the detection needs to be completed in multiple steps, such as requiring multiple charging and discharging processes, which increases economic and time costs. More importantly, batteries of different brands and models vary greatly, so different health calculation methods need to be used, resulting in inconsistent detection methods and the inability to simply and efficiently complete the detection of the health of new energy vehicle batteries. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide a method and system for detecting the health of new energy vehicle batteries, which can quickly and accurately determine the health of the battery only through battery-related images and classification models. This method is not affected by the battery model or brand, which greatly improves its versatility.

[0005] On the one hand, the present application provides a method for detecting the health of a new energy vehicle battery, which comprises the following steps:

[0006] Obtain an internal structure image S of a sample battery, a battery appearance image P, and a thermal imaging image T of the battery when it is working;

[0007] Obtaining the actual health of the sample battery, and determining the battery health level Hr of the sample battery according to the actual health;

[0008] Establish sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr, and construct a battery status training data set D according to the N sample battery status data;

[0009] Input the battery status training dataset D into the ViT model to extract image features;

[0010] Construct a classification feature dataset Dt so that the classification features of each sample battery are composed of image features (S t ,Pt ,T t ) and category features (Hr);

[0011] The classification feature data set Dt is used as training data for training, and a CART classification decision tree is constructed using the Gini value, and the CART classification decision tree is determined as a classification model Ai;

[0012] The internal structure image S0, the battery appearance image P0 and the thermal imaging image T0 of the battery to be tested are obtained and input into the classification model Ai to output the health level Hr0 of the battery to be tested.

[0013] On the other hand, a health detection system for a new energy vehicle battery is also provided, which is characterized by comprising:

[0014] A sample data construction unit, which is used to determine the battery health level Hr of the sample battery according to the actual health of the sample battery, and to establish the sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr;

[0015] A training data set construction unit is used to construct a battery state training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )};

[0016] The feature extraction unit is used to extract the battery state training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )} Input image features into ViT (Vision Transformer);

[0017] The classification feature data set construction unit is used to construct the classification feature data set Dt{(St1, Pt1, Tt1, Hr1),

[0018] (St2,Pt2,Tt2,Hr2),...,(St N ,Pt N ,Tt N ,Hr N )};

[0019] A classification model generating unit, which is used to train the classification feature data set Dt as training data, and use the Gini value to build a CART classification decision tree, and use the CART classification decision tree as the classification model Ai;

[0020] And a battery health detection unit, which outputs the health level Hr0 of the battery to be detected through the classification model Ai and the internal structure image S0, the battery appearance image P0 and the thermal imaging image T0 of the battery to be detected.

[0021] This application has at least the following technical effects or advantages:

[0022] The present invention only needs to collect battery-related images and corresponding health levels, and complete model training by learning picture features through the model. The trained model can further be used to judge the image of the battery to be tested, so as to quickly and accurately judge the health of the battery, greatly reducing the hardware procurement and maintenance costs and improving the detection efficiency. At the same time, the detection method in the present invention is not affected by the battery model and brand, so its versatility is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 This is a schematic diagram of the steps of the method for detecting the health of a new energy vehicle battery in the present invention;

[0025] Figure 2 The internal structure image, the battery appearance image and the thermal imaging image of the battery when it is working in the present invention;

[0026] Figure 3 It is a structural diagram of the ViT model in the present invention;

[0027] Figure 4 It is a CART classification decision tree structure diagram in the present invention;

[0028] Figure 5 It is a structural schematic diagram of the health detection system of the new energy vehicle battery in the present invention. DETAILED DESCRIPTION

[0029] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0030] Embodiment 1:

[0031] like Figure 1 As shown, this embodiment provides a method for detecting the health of a new energy vehicle battery, which includes the following steps:

[0032] S1. Obtain the internal structure image S of the sample battery (i.e. Figure 2 (a) in the figure), the battery appearance image P (i.e. Figure 2 (b) in the figure) and the thermal imaging image T of the battery when it is working (i.e. Figure 2 (c) in the embodiment; In this embodiment, the sample battery is a new energy vehicle battery;

[0033] Among them, the internal structure image S, the battery appearance image P and the thermal imaging image T are all images of the same sample battery, which are respectively used to display the internal structure of the battery, the battery appearance and the battery working state, wherein the battery working state may include one or more of the information such as the working temperature, the energy density, and the state of charge; and the internal structure image S, the battery appearance image P and the thermal imaging image T are all images of the actual battery, and are all color images composed of the three primary colors of RGB;

[0034] S2. Obtain the actual health of the sample battery, record the actual health as a category feature, and determine the battery health level Hr of the sample battery according to the actual health; and establish the sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr;

[0035] In this embodiment, the actual health degree can be obtained by existing technology;

[0036] The battery health level Hr judgment specification can be set by itself or according to industry standards and technical specifications. For example, the battery health level can be divided according to the remaining battery power: when the remaining battery power is [0, 20%], (20%, 40%], (40%, 60%], (60%, 80%], (80%, 100%], the corresponding battery health levels Hr are 0, 1, 2, 3, and 4 respectively;

[0037] S3, repeat steps S1-S2 to obtain N sample battery status data, and construct a battery status training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )};

[0038] S4, the battery status training data set D{(S1,P1,T1,Hr1),(S2,P2,T2,Hr2),...,(S N ,P N ,T N ,Hr N )} is input into the ViT (Vision Transformer) model to extract image features;

[0039] Specifically, step S4 includes the following steps:

[0040] S41, performing data processing on the battery state training data set D to obtain a model input matrix sequence for inputting into the ViT model; in this embodiment, the data processing includes one or more of image segmentation, dimension conversion, and adding position coding;

[0041] Specifically, the image segmentation includes the following steps:

[0042] Each image in the battery status training data set D (including the internal structure image S, the battery appearance image P, and the thermal imaging image T) is scaled to a pixel size of size*size, wherein the image scaling method can be completed by a method such as bilinear interpolation;

[0043] Each scaled image is divided into several n*n patches according to formula (1):

[0044]

[0045] Wherein, patches is the number of patches obtained after segmentation of each scaled image; n is the pixel size of each patch; size is the pixel size of the scaled image, and size and n can be defined according to actual needs; for example, in this embodiment, if size is 112 and n is 16, then patches = 49, that is, each scaled image is segmented into 49 patches;

[0046] Therefore, the expression of each image in the battery status training data set D after scaling and segmentation is as follows:

[0047] S i ={patch i1 ,patch i2 ,...,patch ij}

[0048] P i ={patch i1 ,patch i2 ,...,patch ij}

[0049] T i ={patch i1 ,patch i2 ,...,patch ij}

[0050] Where i represents the i-th image; j represents the j-th block of the i-th image;

[0051] The dimension conversion comprises the following steps:

[0052] According to formula (2), the three-dimensional information (n, n, 3) of each block of each image in the battery status training data set D is compressed into one-dimensional information:

[0053] dim=n×n×3 (2)

[0054] Wherein, dim is one-dimensional information; in this embodiment, each pixel in each image in the battery status training data set D contains information of three channels: red, green and blue. Therefore, it can be regarded as a three-dimensional vector, that is, the dimension of each block of n*n pixel size is (n, n, 3), where 3 represents the three channels of RGB;

[0055] Convert the one-dimensional information of each block into the corresponding model input dimension (1, dim);

[0056] The adding of position code comprises the following steps:

[0057] According to formulas (3-1)-(3-2), the position code (Com pos,2k ,Com pos,2k+1 ):

[0058]

[0059]

[0060] Among them, Com pos,2k and Com pos,2k+1 are the even and odd bits of the encoding vector of the block position pos, respectively, and k represents the index of the dimension; thereby, it can be ensured that for each position pos, a position code of one-dimensional information dim is generated, and the position code consists of the values ​​of sine and cosine functions;

[0061] Add the position code to the model input dimension of the block at the position pos to complete the position code addition of the block;

[0062] Each patch segmented from the image has its corresponding coordinate position information. In order for the ViT model to recognize the relative position of each patch, it is necessary to add a position code before the input model. The position code is expressed in vector form and generated by sine and cosine functions. Then, it is added to the model input dimension of the corresponding position to complete the addition of the position code.

[0063] Finally, a model input matrix sequence with a dimension of patches*dim is obtained. For example, when dim=768 and patches=49, a model input matrix sequence with a dimension of 49*768 is obtained, and the format of the model input matrix sequence of each scaled image in the battery state training data set D is patches*dim.

[0064] S42, such as Figure 3 As shown, the model input matrix sequence of each block of each image in the battery state training data set D (for example, the model input matrix sequence with a dimension of 49*768) is input into the ViT model, and normalized by the Norm (i.e., LayerNormalized) layer, and the dimension of the model input matrix sequence after normalization remains unchanged (for example, still 49*768), so as to stabilize the output of the hidden layer during the model training process, prevent the gradient from disappearing or exploding, and thus accelerate the convergence speed of the model;

[0065] S43. Copy each model input matrix sequence after normalization, and reduce the dimension of the copied model input matrix sequence according to the number of heads, and then input the copied model input matrix sequence with reduced dimension into the Multi-Head Attention layer. For example, in this embodiment, copy each model input matrix sequence three times, and generate three matrices correspondingly: k (Key), q (Query), and v (Value). Reduce the matrix dimensions of the three matrices k, q, and v according to the number of heads, and then input them into the multi-head attention layer, where the dimensions of the three matrices k, q, and v are related to the number of heads of the model setting parameters. For example, in this embodiment, the dimensions of the three matrices k, q, and v are dim, respectively. k 、dim q 、dim v , then dim k =dim q =dim v = dim / heads, when dim = 768 and heads = 8, dim k =dim q =dim v=96; Thus, the multi-head attention layer can be used to make the model focus on different positions of the model input matrix sequence at the same time, thereby capturing the long-distance dependencies in the model input matrix sequence, so that the model can learn different features of the input in different representation subspaces;

[0066] S44, the Multi-Head Attention layer concatenates the copied model input matrix sequence after dimension reduction, so that the dimension of the output result is the same as that of the model input matrix sequence before it is input to the Norm layer (for example, the dimension of the output result is also 49*768), and the output result is input to the above-mentioned Norm layer again after the residual connection (the "+" in the figure indicates the residual connection) operation for normalization again; the residual connection can alleviate the gradient vanishing problem in the deep neural network training process, so that the model can effectively learn deeper representations

[0067] S45, each model input matrix sequence after normalization is input into the MLP layer (i.e., Multilayer Perceptron), and the MLP layer first enlarges the dimension of the model input matrix sequence (e.g., enlarges it by 4 times, to 49*3072), and then reduces it to the same dimension as the model input matrix sequence before it is input into the Norm layer (e.g., from 49*3072 to 49*768), so as to output the preliminary sequence O1 corresponding to each model input matrix sequence; in this step, MLP is a multilayer perceptron, which is a fully connected neural network, which can learn nonlinear combinations of input features and enhance the expression ability of the model;

[0068] S46, after all preliminary sequences O1 are subjected to residual connection operation, they are input into the Norm layer again, and steps S42-S45 are repeated L times, and preliminary sequences O2, ..., O3 are output after each step is repeated. L , the initial sequence O output after the last step is repeated L (i.e., the initial sequence output after repeating L times) is output through the output layer, and the features of all blocks of an image {feature 1, feature 2, ..., feature j}, where each feature corresponds to a block;

[0069] Repeating the above steps S42-46, the image features of each block of each image in the battery status training data set D can be obtained:

[0070] St i = {St i1 ,St i2 ,...,St ij}

[0071] Pt i = {Pti1 ,Pt i2 ,...,Pt ij}

[0072] Tt i ={Tt i1 ,Tt i2 ,...,Tt ij}

[0073] Among them, S t , P t 、T t They represent the image features of the internal structure image S, the battery appearance image P, and the thermal imaging image T, respectively. i represents the index of the image, i.e., the sequence number of the image. j represents the index of the block, i.e., the sequence number of each image block. The image feature of each sample in the battery status training data set D is (S t ,P t ,T t );

[0074] S47, performing a flattening operation on each image to obtain a feature length len of image features of all blocks of each image, and the feature length len of each image is the same, and len=patches×dim;

[0075] S5, construct the classification feature data set Dt{(St1,Pt1,Tt1,Hr1),(St2,Pt2,Tt2,Hr2),...,

[0076] (St N ,Pt N ,Tt N ,Hr N )}, that is, the classification features of each sample battery are composed of image features (S t ,P t ,T t ) and category feature (Hr), where the total length of the three image features is Length = 3*len, and the category feature length is 1;

[0077] S6, using the classification feature data set Dt as training data for training, and using the Gini value to construct a CART classification decision tree;

[0078] Specifically, step S6 includes the following steps:

[0079] S61. Obtain the Gini value of the category feature Hr according to formula (4):

[0080]

[0081] Among them, H is the category feature Hr; pi is the probability that the tuple in H belongs to the Ci category; i represents a certain category; m represents the number of categories;

[0082] S62, calculate (S t ,P t ,T t ) under different classification criteria, and select the minimum Gini value and its corresponding classification criterion;

[0083]

[0084] Among them, GiniA(H) is the image feature A(A∈(S t ,P t ,T t ))The minimum Gini value under different classification criteria; m is the category set of image feature A; |H i | is the number of a category i in the image feature A; |H m-i | is the total number of remaining categories in image feature A except category i, |H| is the total number of categories of image feature A; where,

[0085] (S t ,P t ,T t ) are generally continuous values;

[0086] For example, the battery energy density Te is selected as the image feature A (Te∈T t ), and there are Y=10 data (i.e., there are 10 categories): 50, 60, 50, 100, 60, 100, 60, 60, 50, 60, |H|=10;

[0087] The above 10 data are divided into 3 numerical ranges: [0, 50], [51, 80], [81, +∞], then the data of battery energy density Te contained in the 3 numerical ranges are 3, 5, and 2 respectively. After removing the duplicate values ​​and sorting them in ascending order, the battery energy density Te data set after removing the duplicate values ​​is {50, 60, 100}. The median of two adjacent data is calculated, that is, the category set of battery energy density Te is obtained as m = {55, 80} (that is, 55 = (50 + 60) / 2, 80 = (60 + 100) / 2);

[0088] Furthermore, let category i = {55}, then mi = {80}, and the division criterion can be split1 = {≤55, >55} (|H i |=3 (i.e. 50, 50, 50), |H m-i|=7(i.e. 60, 100, 60, 100, 60, 60, 60)), split2={≤80,>80}(|H i |=8 (i.e. 50, 60, 50, 60, 60, 50, 60), |H m-i |=2(i.e. 100, 100)), calculate the Gini value under each classification standard, assuming that Gini split1 =0.31, Gini split2 =0.48, then the minimum Gini value of the image feature of battery energy density Te is Gini split1 =0.31, defined as a1;

[0089] And so on, to obtain the minimum Gini values ​​a2, a3, ...a of other image features under different classification standards. Length ;

[0090] S63, set all the minimum Gini values ​​a1, a2, a3, ..., a Length Compare to determine the global minimum Gini value min (i.e. a1, a2, a3, ..., a Length the minimum value in );

[0091] S64, determining the division standard corresponding to the global minimum Gini value min as the branch node of the CART classification decision tree;

[0092] S65, repeat the above steps S62-S64 to construct Figure 4 The CART classification decision tree shown is the classification model Ai; Figure 4 In the figure, the square frame nodes represent image features; the branches represent the categories of image features, with 1 and 0 representing two categories; the elliptical frame nodes represent the battery health level Hr prediction results corresponding to different categories;

[0093] S7. Obtain the internal structure image S0, the battery appearance image P0 and the thermal imaging image T0 of the battery to be tested, and input the three into the classification model Ai to output the health level Hr0 of the battery to be tested. For example, when the output Hr0=4, it means that the battery health of the battery to be tested is relatively good, and the maximum remaining battery capacity is between (80%, 100%], wherein the battery to be tested is also a new energy vehicle battery.

[0094] In this embodiment, a large number of image features can be processed through the CART classification decision tree, and the most important features can be selected from them. It is particularly suitable for multivariate feature processing of batteries of different brands and models, and can therefore be used for health detection of batteries of different brands and models. In addition, the CART classification decision tree is highly interpretable, and it can clearly display the features that play a key role in judging the health of the battery, which helps to understand and improve the design and maintenance strategies of the battery. At the same time, the training and prediction speed of the above CART classification decision tree is fast, and it only needs to be built once and can be used repeatedly, which is low in cost and suitable for real-time monitoring of the health of the battery.

[0095] Therefore, this embodiment uses three types of images: internal structure images, battery appearance images, and thermal imaging images to establish a CART classification decision tree, and uses it as a classification model Ai. When it is necessary to perform a health test on the battery to be tested, it is only necessary to input its image into the classification model Ai. The model conducts a deep analysis of the image, extracts key features, and classifies it, so that the health status of the battery can be quickly obtained. There is no need to use traditional detection methods such as hardware detection, physical disassembly, and charging and discharging, which realizes true image drive, which is conducive to significantly reducing costs and improving detection efficiency. At the same time, since the above detection method only requires an image of the battery to be tested, there is no need to design a special detection algorithm corresponding to different models and batteries, which realizes the unification of the detection method, thereby improving compatibility.

[0096] Embodiment 2:

[0097] This embodiment provides a new energy vehicle battery health detection system, which can implement the health detection method described in Example 1, such as Figure 5 As shown, the health detection system includes:

[0098] An image storage unit 1, which is used to store an internal structure image S of a sample battery, a battery appearance image P, and a thermal imaging image T of the battery when it is working;

[0099] A sample data construction unit 2, which is used to determine the battery health level Hr of the sample battery according to the actual health of the sample battery, and to establish the sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr;

[0100] The training data set construction unit 3 is used to construct a battery state training data set D {(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )};

[0101] The feature extraction unit 4 is used to extract the battery state training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )} Input the image features into ViT (Vision Transformer), and the steps are the same as S4;

[0102] The classification feature data set construction unit 5 is used to construct the classification feature data set Dt{(St1, Pt1, Tt1, Hr1),

[0103] (St2,Pt2,Tt2,Hr2),...,(St N ,Pt N ,Tt N ,Hr N )};

[0104] A classification model generating unit 6 is used to train the classification feature data set Dt as training data, and to construct a CART classification decision tree using the Gini value, and to use the CART classification decision tree as the classification model Ai, and its steps are the same as S6;

[0105] And a battery health detection unit 7, which outputs the health level Hr0 of the battery to be detected through the classification model Ai and the internal structure image S0 of the battery to be detected, the battery appearance image P0, and the thermal imaging image T0.

[0106] To sum up, the present invention does not need to rely on various parameter hardware to detect the health of the battery. It only needs to collect battery-related images and corresponding health levels, and complete the model training by learning the picture features through the model. The trained model is further used to judge the image of the battery to be detected, so as to quickly and accurately judge the health of the battery, greatly reduce the hardware procurement and maintenance costs, and improve the detection efficiency. At the same time, the detection method in the present invention is not affected by the battery model and brand, so its versatility is greatly improved.

[0107] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for detecting the health of a new energy vehicle battery, characterized in that: The steps include: Obtain an internal structure image S of a sample battery, a battery appearance image P, and a thermal imaging image T of the battery when it is working; Obtaining the actual health of the sample battery, and determining the battery health level Hr of the sample battery according to the actual health; Establish sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr, and construct a battery status training data set D according to the N sample battery status data; Input the battery status training dataset D into the ViT model to extract image features; Construct a classification feature dataset Dt so that the classification features of each sample battery are composed of image features (S t ,P t ,T t ) and category features (Hr); The classification feature data set Dt is used as training data for training, and a CART classification decision tree is constructed using the Gini value, and the CART classification decision tree is determined as a classification model Ai; Obtain the internal structure image S0, the battery appearance image P0 and the thermal imaging image T0 of the battery to be tested, and input them into the classification model Ai to output the health level Hr0 of the battery to be tested; The classification feature data set Dt is used as training data for training, and the Gini value is used to build a CART classification decision tree, including the following steps: The Gini value of the category feature Hr is obtained according to the following formula: Among them, H is the category feature Hr; pi is the probability that the tuple in H belongs to the Ci category; i represents a certain category; m represents the number of categories; According to the following formula (5), each image feature (S t ,P t ,T t ) Gini values ​​under different classification criteria, and select the minimum Gini value and its corresponding classification criteria; Among them, GiniA(H) is the image feature A(A∈(S t ,P t ,T t ))The minimum Gini value under different classification criteria; m is the category set of image feature A; |H i | is the number of a category i in the image feature A; |H m-i | is the total number of remaining categories in image feature A except category i, |H| is the total number of categories of image feature A; Compare all minimum Gini values ​​to determine the global minimum Gini value min; The division standard corresponding to the global minimum Gini value min is determined as the branch node of the CART classification decision tree; the above steps are repeated to construct the CART classification decision tree.

2. The health detection method according to claim 1, characterized in that: The battery status training dataset D is input into the ViT model to extract image features, including the following steps: Performing data processing on the battery state training data set D to obtain a model input matrix sequence for inputting into the ViT model; The model input matrix sequence of each block of each image in the battery state training dataset D is input into the ViT model and normalized through the Norm layer, and the dimension of the model input matrix sequence after normalization remains unchanged; Each normalized model input matrix sequence is copied, and the dimensions of the copied model input matrix sequence are reduced. Then, the copied model input matrix sequences with reduced dimensions are input into the Multi-HeadAttention layer. The Multi-HeadAttention layer concatenates the copied model input matrix sequence after dimension reduction, so that the dimension of the output result is the same as that of the model input matrix sequence before it is input to the Norm layer, and the output result is input to the Norm layer again after the residual connection operation to perform normalization again; Each model input matrix sequence after normalization is input into the MLP layer, and the MLP layer first enlarges the dimension of the model input matrix sequence, and then reduces it to the same dimension as the model input matrix sequence before being input into the Norm layer, so as to output a preliminary sequence O1 corresponding to each model input matrix sequence; After all the preliminary sequences O1 are subjected to the residual connection operation, they are input into the Norm layer again, and the above steps are repeated L times, and the preliminary sequences O2, ..., O3 are output after each step is repeated. L , the initial sequence O output after the last step is repeated L Through the output layer output, the features of all blocks of an image can be obtained {feature 1, feature 2, ..., feature j }; Repeat the above steps to obtain the image features (S t ,P t ,T t ).

3. The health detection method according to claim 1, characterized in that: Reduce the dimensions of the sequence of replicated model input matrices by the number of heads.

4. The health detection method according to claim 1, characterized in that: The data processing includes image segmentation, and the image segmentation includes the following steps: Scale each image in the battery status training dataset D to a pixel size of size*size; Each scaled image will be divided into several n*n patches according to the following formula: Among them, patches is the number of blocks obtained after segmentation of each scaled image; n is the pixel size of each block; size is the pixel size of the scaled image.

5. The health detection method according to claim 1, characterized in that: The data processing includes dimensionality conversion, and the dimensionality conversion includes the following steps: The three-dimensional information (n, n, 3) of each block of each image in the battery status training data set D is compressed into one-dimensional information according to the following formula: dim=n×n×3 Among them, dim is one-dimensional information, and n is the pixel size of each block; Convert the one-dimensional information of each block into the corresponding model input dimension (1, dim).

6. The health detection method according to claim 5, characterized in that: The data processing includes adding a position code, and the adding a position code includes the following steps: According to the following formula, the position code (Com pos,2k ,Com pos,2k+1 ): Among them, Com pos,2k and Com pos,2k+1 are the even and odd bits of the encoding vector at the block position pos, respectively, and k represents the index of the dimension; The position code is added to the model input dimension of the block at the position pos to complete the position code addition of the block.

7. The health detection method according to claim 6, characterized in that: The dimension of the model input matrix sequence is patches*dim.

8. The health detection method according to claim 1, characterized in that: The internal structure image S, the battery appearance image P and the thermal imaging image T are all images of a physical battery, and are all color images composed of the three primary colors of RGB.

9. A health detection system for a new energy vehicle battery for implementing the health detection method according to any one of claims 1 to 8, characterized in that: include: A sample data construction unit, which is used to determine the battery health level Hr of the sample battery according to the actual health of the sample battery, and to establish the sample battery status data (S, P, T, Hr) according to the internal structure image S, the battery appearance image P, the thermal imaging image T, and the battery health level Hr; A training data set construction unit is used to construct a battery state training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )}; The feature extraction unit is used to extract the battery state training data set D{(S1, P1, T1, Hr1), (S2, P2, T2, Hr2), ..., (S N ,P N ,T N ,Hr N )} Input image features into ViT (Vision Transformer); Classification The feature data set construction unit is used to construct the classification feature data set Dt{(St1, Pt1, Tt1, Hr1), (St2,Pt2,Tt2,Hr2),...,(St N ,Pt N ,Tt N ,Hr N )}; A classification model generating unit, which is used to train the classification feature data set Dt as training data, and use the Gini value to build a CART classification decision tree, and use the CART classification decision tree as the classification model Ai; And a battery health detection unit, which outputs the health level Hr0 of the battery to be detected through the classification model Ai and the internal structure image S0, the battery appearance image P0 and the thermal imaging image T0 of the battery to be detected.