Method and apparatus for determining battery anomaly detection model, and electronic device

By migrating the network parameters of the pre-trained model and combining the sliding window method for feature analysis, the existing battery abnormality detection method has solved the problem of high requirements for training samples, and the rapid training and efficient applicability of the battery abnormality detection model are achieved.

WO2025061179A1PCT designated stage expired Publication Date: 2025-03-27SVOLT ENERGY TECHNOLOGY CO LTD

Patent Information

Application Number
PCT/CN2024/120193
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-20
Filing Date
2024-09-20
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

The existing battery abnormality detection methods have extremely high requirements for training samples. In actual operating conditions, battery abnormality data is usually not labeled, and there are many types of abnormalities, and there are sample imbalances, resulting in wasted model training resources and reduced efficiency.

Method used

The battery anomaly detection model is constructed by directly migrating the network parameters in the pre-trained model, and statistical feature analysis is performed using the sliding window method, multiple first training samples are obtained, and the model is fine-tuned in combination with the cross entropy loss function.

Benefits of technology

It improves the training speed and applicability of the battery abnormality detection model, reduces the waste of training resources, and improves the efficiency of model building.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024120193_27032025_PF_FP_ABST
    Figure CN2024120193_27032025_PF_FP_ABST
Patent Text Reader

Abstract

A method and apparatus for determining a battery anomaly detection model, and an electronic device. The method comprises: determining a plurality of first training samples; transferring to a target Encoder network Encode network parameters corresponding to an original Encoder network in a pre-trained overall battery detection model, so as to obtain a battery anomaly detection model to be trained (S400); inputting the plurality of first training samples into the battery anomaly detection model to be trained, so as to obtain a battery state prediction result which is output from the battery anomaly detection model to be trained and corresponds to each first training sample (S500); and on the basis of the battery state prediction result corresponding to each first training sample, and the actual battery state, and in combination with a cross-entropy loss function, performing fine tuning on the battery anomaly detection model to be trained, so as to obtain a trained battery anomaly detection model (S600). In the present method, by means of directly transferring network parameters in a pre-trained model to construct a battery anomaly detection model, the training speed of the battery anomaly detection model is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and electronic device for determining battery abnormality detection model

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application number CN202311222625.8, filed with the Patent Office of China on September 20, 2023, entitled “Method, device and electronic device for determining battery abnormality detection model”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the technical field of battery status detection, and in particular to a method, device, and electronic device for determining a battery abnormality detection model. Background Art

[0004] Existing deep learning-based methods mainly acquire voltage, current, temperature and other data, and directly learn aging information and rules through RNN networks or machine learning methods to complete battery anomaly detection.

[0005] However, existing methods have extremely high requirements for training samples. Under actual working conditions, battery abnormality data is usually unlabeled, and there are many types of abnormalities, all of which are sample imbalanced. Moreover, for different vehicles or different types of on-board batteries, it is often necessary to train models with different structures to achieve corresponding battery abnormality detection. This will greatly waste training resources, and the huge amount of training data will greatly reduce the efficiency of model building.

[0006] Application Contents

[0007] In view of this, the purpose of this application is to provide at least a method and device for determining a battery anomaly detection model, by directly migrating the network parameters in the pre-trained model to construct a battery anomaly detection model, thereby improving the training speed of the battery anomaly detection model and improving the applicability of the model.

[0008] In the first aspect, the present application provides a method for determining a battery abnormality detection model, the method comprising: obtaining multiple target vehicle data, each target vehicle data comprising multiple operating parameters of a thermal runaway vehicle throughout its life cycle and multiple battery parameters generated by an on-board battery of a thermal runaway vehicle under a preset experiment; performing statistical feature analysis on the multiple target vehicle data based on a sliding window method to obtain multiple first training samples; obtaining a pre-built initial battery abnormality detection model, the initial battery abnormality detection model comprising a target Encoder network and a multi-layer perception network; migrating the Encoder network parameters corresponding to the original Encoder network in the pre-trained battery detection overall model to the target Encoder network to obtain a battery abnormality detection model to be trained; inputting multiple first training samples into the battery abnormality detection model to be trained to obtain a battery status prediction result corresponding to each first training sample output by the battery abnormality detection model to be trained; fine-tuning the battery abnormality detection model to be trained based on the battery status prediction result corresponding to each first training sample and the actual battery status, combined with a cross-entropy loss function, to obtain a trained battery abnormality detection model.

[0009] Beneficial effect: The battery anomaly detection model can be constructed by directly migrating the network parameters in the pre-trained model, thereby improving the training speed of the battery anomaly detection model.

[0010] In an optional embodiment, the operating parameters include a battery remaining charge value, wherein a plurality of first training samples are obtained in the following manner: extracting a multivariate time series table from a plurality of target vehicle data at a preset time interval, the multivariate time series table including a plurality of parameter sequences, the plurality of parameter sequences including a data sequence generated at a plurality of moments for each operating parameter and a data sequence generated at a plurality of moments for each battery parameter; cleaning the plurality of parameter sequences to form a first data set from the cleaned plurality of parameter sequences; deleting the parameter sequence corresponding to the battery remaining charge value from the first data set, performing differential calculations on the remaining parameter sequences to form a second data set; performing statistical feature analysis on the first data set and the second data set according to a sliding window method to obtain a third data set and a fourth data set; merging the third data set and the fourth data set to obtain a data table to be processed; and constructing a plurality of first training samples using the sliding window method and the data table to be processed.

[0011] In an optional embodiment, the operating parameters further include battery cell voltage and temperature probe temperature, wherein the third data set and the fourth data set are formed in the following manner: the following statistical processing is performed on the first data set and the second data set respectively: statistical calculations are performed on the battery cell voltage and temperature probe temperature in each frame of data respectively, and the parameter sequences corresponding to the battery cell voltage and temperature probe temperature are converted into a plurality of corresponding statistical feature sequences respectively using the statistical calculation results, and the statistical calculations include mean calculation, median calculation, range calculation and standard deviation calculation; the first data set after statistical processing is determined as the first data set to be processed, and the second data set after statistical processing is determined as the second data set to be processed. Processing a data set; for a first data set to be processed, selecting a first preset sliding window to perform sliding window calculation along the column direction according to a preset step size: for a window formed by each sliding, performing statistical calculation on sequences within the window except for the battery remaining charge value, to form a third data set, wherein the length of the first preset sliding window in the column direction is a first preset value, and the horizontal width is the same as the number of sequences within the first data set to be processed; for a second data set to be processed, selecting a second preset sliding window to perform sliding window calculation along the column direction according to a preset step size: for a window formed by each sliding, performing statistical calculation on each sequence within the window, to form a fourth data set, wherein the length of the second preset sliding window in the column direction is the first preset value, and the horizontal width is the same as the number of sequences within the second data set to be processed.

[0012] In an optional embodiment, the step of constructing multiple first training samples using a sliding window method and a table of data to be processed includes: for the first data set, selecting a first preset sliding window to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, calculating the cumulative battery capacity in the window by ampere-hour integration to form a statistical feature sequence corresponding to the cumulative battery capacity; for the second data set, selecting a second preset sliding window to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, using the voltage differential value and the current differential value at different times to calculate the corresponding battery internal resistance in the window to form a statistical feature sequence corresponding to the battery internal resistance; and comparing the statistical feature sequence corresponding to the cumulative battery capacity with the battery internal resistance. The corresponding statistical feature sequence is incorporated into the data table to be processed to form a fifth data set; for the first data set, a first preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step size, and the battery remaining charge value corresponding to the last frame of data in each window formed by sliding forms a statistical feature sequence corresponding to the battery remaining charge value and is incorporated into the fifth data set to form a sixth data set, which includes multiple target feature sequences; for the sixth data set, a third preset sliding window is selected to perform sliding window processing along the column direction according to a preset step size: for the window formed by each sliding, a first training sample is formed by multiple feature data frames in the window, the column length of the third preset sliding window is the second preset value, and the horizontal width of the second preset sliding window is the same as the number of sequences in the sixth data set.

[0013] In an optional embodiment, the Encoder network includes multiple attention mechanism layers, and the Encoder network parameters include multiple linear transformation parameters corresponding to each attention mechanism layer, wherein the battery anomaly detection model to be trained is determined in the following manner: for each attention mechanism layer in the original Encoder network, the pre-trained linear transformation parameters of the attention mechanism layer are migrated to the attention mechanism layer corresponding to the target Encoder network; and the target Encoder network is updated to obtain the battery anomaly detection model to be trained.

[0014] In an optional embodiment, before inputting a plurality of first training samples into the battery anomaly detection model to be trained, the method further includes: for each first training sample: determining a sample matrix corresponding to the first training sample, wherein the horizontal columns of the sample matrix represent feature data frames in the first training sample, and the vertical columns of the sample matrix represent target feature sequences; dividing the sample matrix into a plurality of matrix blocks of equal size, wherein the length of each matrix block is divisible by the length of the sample matrix, and the width of each matrix block is divisible by the width of the sample matrix; performing random masking on the plurality of matrix blocks according to a first preset ratio The invention relates to a method for processing a plurality of mask matrix blocks, a plurality of unmasked matrix blocks and a mask position subscript corresponding to each mask matrix block, respectively performing one-dimensional feature mapping on the plurality of unmasked matrix blocks and the plurality of mask matrix blocks to obtain an unmasked vector and a mask vector corresponding to the first training sample; introducing a preset vector before the unmasked vector to form a target unmasked vector, wherein the dimension of the preset vector is the same as the dimension of the unmasked vector; randomly initializing the target unmasked vector to obtain a random unmasked vector, and adding the random unmasked vector to the target unmasked vector to obtain a processed target unmasked vector.

[0015] In an optional embodiment, the Encoder network includes an Encoder layer and a Decode layer, wherein the battery status prediction result corresponding to each feature data frame is obtained in the following manner: for each first training sample: the processed target unmasked vector corresponding to the first training sample is input into the Encoder layer in the battery anomaly detection model to be trained, and the unmasked feature vector output by the Encoder layer is obtained, and the dimension of the unmasked feature vector is the same as the dimension of the unmasked vector; the unmasked feature vector and the mask vector are spliced ​​and reconstructed according to the mask position subscript corresponding to each mask matrix block to obtain a sample vector; the sample vector is input and decoded into the Decode layer to obtain a reconstructed first training sample; the reconstructed multiple first training samples are input into the multi-layer perception network in the battery anomaly detection model to be trained, and the battery status prediction result corresponding to each feature data frame output by the multi-layer perception network is obtained.

[0016] In an optional embodiment, the cross entropy loss function is:

[0017] In this formula, Loss represents the cross entropy loss function, output size represents the number of feature data frames output by the battery anomaly detection model to be trained, and y i Indicates the actual battery status corresponding to the i-th feature data frame, Represents the predicted battery state corresponding to the i-th feature data frame output by the anomaly detection model to be trained.

[0018] In a second aspect, the present application provides a device for determining a battery anomaly detection model, the device comprising: a first acquisition module for acquiring multiple target vehicle data, each target vehicle data comprising multiple operating parameters of a thermal runaway vehicle throughout its life cycle and multiple battery parameters generated by an on-board battery of a thermal runaway vehicle under a preset experiment; a statistical module for performing statistical feature analysis on the multiple target vehicle data based on a sliding window method to obtain multiple first training samples, each first training sample comprising multiple feature data frames; a second acquisition module for acquiring a pre-built initial battery anomaly detection model, the initial battery anomaly detection model comprising a target encoder network and a multi-layer perception network; a migration module for migrating the encoder network parameters corresponding to the original encoder network in the pre-trained battery detection overall model to the target encoder network to obtain a battery anomaly detection model to be trained; a training module for inputting multiple first training samples into the battery anomaly detection model to be trained to obtain a battery status prediction result corresponding to each first training sample output by the battery anomaly detection model to be trained; a determination module for fine-tuning the battery anomaly detection model to be trained based on the battery status prediction result corresponding to each first training sample and the actual battery status, combined with a cross-entropy loss function, to obtain a trained battery anomaly detection model.

[0019] In a third aspect, the present application provides an electronic device comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the battery abnormality detection model method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the description of the prior art. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0021] FIG1 shows a flow chart of a method for determining a battery abnormality detection model provided by an embodiment of the present application;

[0022] FIG2 shows a flow chart of a method for obtaining a plurality of first training samples provided by an embodiment of the present application;

[0023] FIG3 shows a flow chart of a method for determining a plurality of first training samples according to an embodiment of the present application;

[0024] FIG4 is a schematic diagram showing a sample reconstruction process provided by an embodiment of the present application;

[0025] FIG5 shows a schematic structural diagram of a device for determining a battery abnormality detection model provided by an embodiment of the present application;

[0026] FIG6 shows a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] To make the purpose, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.

[0028] Existing deep learning-based methods mainly acquire voltage, current, temperature and other data, and directly learn aging information and rules through RNN networks or machine learning methods to complete battery anomaly detection. However, such methods are based on extremely high requirements for training samples. Under actual working conditions, battery abnormal data usually has no labels, and there are many types of anomalies, and there is sample imbalance. Secondly, the existing unsupervised model anomaly detection methods for reconstructing data require manual setting of thresholds. Thirdly, there are many types of batteries, and one model is only applicable to one type of fault in a battery type. For anomaly detection of different types of batteries, models with different structures need to be trained to complete anomaly detection of different types of batteries, which reduces the efficiency of model training and the applicability of the model is not high.

[0029] Based on this, the embodiments of the present application provide a method and apparatus for determining a battery anomaly detection model. By directly migrating network parameters from a pre-trained model, the battery anomaly detection model is constructed, thereby improving the training speed of the battery anomaly detection model. The specific details are as follows:

[0030] Please refer to Figure 1, which shows a flow chart of a method for determining a battery anomaly detection model provided by an embodiment of the present application. As shown in Figure 1, the method provided by an embodiment of the present application includes the following steps:

[0031] S100: Acquire data of multiple target vehicles.

[0032] Among them, each target vehicle data includes multiple operating parameters of a thermal runaway vehicle throughout its life cycle and multiple battery parameters generated by an on-board battery on a thermal runaway vehicle under preset experiments.

[0033] S200 , performing statistical feature analysis on multiple target vehicle data based on a sliding window method to obtain multiple first training samples.

[0034] Each first training sample includes multiple feature data frames.

[0035] S300: Obtain a pre-built initial battery anomaly detection model.

[0036] The initial battery anomaly detection model includes a target encoder network and a multi-layer perception network.

[0037] S400: Migrate the encoder network parameters corresponding to the original encoder network in the pre-trained battery detection model to the target encoder network to obtain a battery anomaly detection model to be trained.

[0038] S500: Input a plurality of first training samples into a battery anomaly detection model to be trained, and obtain a battery state prediction result corresponding to each first training sample output by the battery anomaly detection model to be trained.

[0039] S600 , fine-tuning the battery anomaly detection model to be trained based on the battery state prediction result and the actual battery state corresponding to each first training sample in combination with a cross entropy loss function to obtain a trained battery anomaly detection model.

[0040] Specifically, in step S100, the cloud platform pre-records a driving data set and a battery data set. The driving data set includes multiple operating parameters of multiple vehicles throughout their life cycle, and the battery data set includes multiple battery parameters obtained from preset experiments on multiple vehicle batteries within a preset time period. Among them, the driving data set covers all vehicle models, and the driving data set covers all battery models. In this application, multiple operating parameters of the thermal runaway vehicle throughout its life cycle are obtained from the driving data set, and multiple battery parameters corresponding to the vehicle batteries on the thermal runaway vehicle are obtained from the battery data set.

[0041] In the present application, the operating parameters include but are not limited to at least one of the following items: temperature probe temperature, brake pedal travel value, accelerator pedal travel value, motor speed, vehicle speed, battery discharge current, battery remaining charge value, vehicle cumulative mileage and motor voltage, and the battery parameters include but are not limited to at least one of the following items: battery cell voltage, battery pack total voltage and insulation resistance.

[0042] In a preferred embodiment, please refer to FIG2 , which shows a flow chart of a method for obtaining multiple first training samples provided by an embodiment of the present application. As shown in FIG2 , in step S200 , multiple first training samples are obtained by:

[0043] S210 , extracting a multivariate time series table from the data of a plurality of target vehicles according to a preset time interval.

[0044] The multivariate time series table is expressed vertically as multiple parameter sequences, which include data sequences generated by each operating parameter at multiple moments and data sequences generated by each battery parameter at multiple moments. The multivariate time series table is horizontally expressed in units of moments, forming multiple data frames, each data frame including multiple operating parameters and multiple battery parameters corresponding to a moment.

[0045] S220 , cleaning the multiple parameter sequences, and forming a first data set from the cleaned multiple parameter sequences.

[0046] In one example, the cleaning method includes outlier cleaning and missing value deletion. For example, for each parameter sequence, the empty values ​​in the parameter sequence are first removed, and then the data values ​​that do not conform to the standard range corresponding to the parameter sequence are deleted. Specifically, for example, the standard range corresponding to the battery remaining charge value is 0%-100%, the standard range corresponding to the temperature probe temperature is -40-210℃, the single cell voltage is less than 5000mv, the total battery voltage is less than 480v, the vehicle speed is between 0-200km / h, and the acceleration / brake pedal travel is between 0%-100%. After cleaning according to the preset cleaning rules, the first data set can be formed.

[0047] S230 : For the first data set, delete the parameter sequence corresponding to the battery remaining charge value, and perform differential calculation on the remaining parameter sequences to form a second data set.

[0048] Specifically, assuming that the first data set includes 12 parameter sequences corresponding to the multiple operating parameters and multiple battery parameters, then after deleting the parameter sequence corresponding to the battery remaining charge value, the remaining 11 parameter sequences form the second data set.

[0049] S240 , performing statistical feature analysis on the first data set and the second data set respectively according to a sliding window method to obtain a third data set and a fourth data set.

[0050] In a preferred embodiment, the third data set and the fourth data set are formed in the following manner:

[0051] The following statistical processing is performed on the first data set and the second data set, respectively: statistical calculations are performed on the battery cell voltage and the temperature of the temperature probe in each frame of data, and the parameter sequences corresponding to the battery cell voltage and the temperature of the temperature probe are converted into multiple corresponding statistical feature sequences using the statistical calculation results. The statistical calculations include mean calculation, median calculation, range calculation, and standard deviation calculation. The first data set after statistical processing is determined as the first data set to be processed, and the second data set after statistical processing is determined as the second data set to be processed.

[0052] In the present application, the vehicle battery includes multiple battery cells. Therefore, at any moment, the data corresponding to the battery cell voltage includes the voltage values ​​corresponding to multiple battery cells. For example, the vehicle battery includes 4 battery cells. Then, in the data frame corresponding to the time T1, there are 4 recorded values ​​of the battery cell voltage. In the present application, statistical calculations are performed on the battery cell voltage of each frame of data, that is, the corresponding mean, median, range and standard deviation between the 4 recorded values ​​are calculated. In this way, the parameter sequence corresponding to the battery cell voltage is converted into a total of 4 statistical feature sequences corresponding to the mean, median, range and standard deviation.

[0053] Similarly, the vehicle-mounted battery of the present application includes multiple temperature probes arranged at different positions. Therefore, for each data frame, the temperature of the temperature probe also includes multiple recorded values. Similarly, statistical calculations are performed on each frame to obtain the corresponding 4 statistical feature sequences. The statistical calculation method here is similar to that of the battery cell voltage and will not be repeated here.

[0054] In this application, by performing statistical calculations on the data, the consistency differences between battery packs can be discovered, thereby improving the accuracy of the subsequent model.

[0055] For the first data set to be processed, a first preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, statistical calculation is performed on the sequences in the window except the battery remaining charge value to form a third data set, where the column length of the first preset sliding window is the first preset value, and the horizontal width is the same as the number of sequences in the first data set to be processed; for the second data set to be processed, a second preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, statistical calculation is performed on each sequence in the window to form a fourth data set, where the column length of the second preset sliding window is the first preset value, and the horizontal width is the same as the number of sequences in the second data set to be processed.

[0056] In this application, the statistical values ​​of each feature in the time dimension are calculated through a sliding window in order to explore the changing rules of each feature in the time dimension, including the changing rules of the single-cell voltage statistical values ​​and the changing rules of the single-cell voltage differential, so that the prediction effect of the subsequent model will be more accurate.

[0057] S250: Merge the third data set and the fourth data set to obtain a data table to be processed.

[0058] The third and fourth datasets were merged column by column, resulting in a total of 137 sequences.

[0059] S260: Construct a plurality of first training samples using a sliding window method and a table of data to be processed.

[0060] In a preferred embodiment, please refer to FIG3 , which shows a flow chart of a method for determining a plurality of first training samples according to an embodiment of the present application. As shown in FIG3 , step S260 includes:

[0061] S2601. For the first data set, select a first preset sliding window and perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, calculate the cumulative battery capacity within the window by ampere-hour integration to form a statistical feature sequence corresponding to the cumulative battery capacity.

[0062] Specifically, the cumulative battery capacity in each window is calculated using the following formula:

[0063] Q represents the cumulative battery capacity from time t0 to time t1 in the window, that is, the cumulative battery capacity between the battery current corresponding to the data frame at time t0 and the battery current corresponding to the data frame at time t0, and I is the battery current.

[0064] The calculation of cumulative battery capacity can characterize the charge and discharge capacity of the battery pack in each time period, and to a certain extent can reflect the battery charge and discharge speed.

[0065] S2602. For the second data set, select a second preset sliding window and perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, use the voltage difference value and current difference value at different times to calculate the corresponding battery internal resistance in the window, and form a statistical feature sequence corresponding to the battery internal resistance.

[0066] The battery internal resistance in each window is calculated using the following formula:

[0067] R represents the internal resistance of the battery within the window, ΔU t Indicates the voltage difference value corresponding to time t, ΔI t represents the current differential value corresponding to the t-th moment, and n represents the column length of the preset window.

[0068] Battery internal resistance is also a key indicator for measuring whether the battery is abnormal. The battery internal resistance changes over time. The longer the time, the greater the abnormal battery internal resistance.

[0069] S2603: Merge the statistical feature sequence corresponding to the cumulative battery capacity and the statistical feature sequence corresponding to the battery internal resistance into the table of data to be processed to form a fifth data set.

[0070] At this time, the fifth data set includes a total of 139 sequences.

[0071] S2604. For the first data set, select a first preset sliding window to perform sliding window calculation along the column direction according to a preset step size. The battery remaining charge value corresponding to the last frame of data in each window formed by sliding forms a statistical feature sequence corresponding to the battery remaining charge value and incorporates it into the fifth data set to form a sixth data set. The sixth data set includes multiple target feature sequences.

[0072] The number of target feature sequences in the sixth dataset is 130.

[0073] S2605. For the sixth data set, select the third preset sliding window to perform sliding window processing along the column direction according to the preset step size: for the window formed by each sliding, a first training sample is formed by multiple feature data frames within the window, the column length of the third preset sliding window is the second preset value, and the horizontal width of the second preset sliding window is the same as the number of sequences in the sixth data set.

[0074] The ninth dataset finally generated includes a total of 140 feature sequences.

[0075] Specifically, taking the above-mentioned sixth data set as an example, it contains a total of 140 target feature sequences. It is assumed that the sixth data set includes N data frames, that is, the dimension of the sixth data set is N×140. It is assumed that the column length of the third preset sliding window is L, then a total of NL first training samples with a dimension of L×140 will be formed.

[0076] In step S300, the target Encoder network includes an Encoder layer and a Decoder layer. The Encoder layer includes multiple parallel attention mechanism layers and Norm layers. The Encode network parameters include multiple linear transformation parameters corresponding to each attention mechanism layer. Different attention mechanism layers are used to achieve different feature transformations of the input data.

[0077] For each attention mechanism layer in the original Encoder network, the pre-trained linear transformation parameters of the attention mechanism layer are migrated to the corresponding attention mechanism layer in the target Encoder network, and the target Encoder network is updated to obtain the battery anomaly detection model to be trained.

[0078] Specifically, the linear transformation parameters represent different feature extraction matrices. In this application, the pre-trained battery detection overall model is a masked Transformer model, which has strong transferability and can directly transfer the feature extraction matrix in the original Encoder network to the attention mechanism layer corresponding to the target Encoder network. This can save a lot of training process and reduce training time.

[0079] Specifically, the present application may pre-train a battery detection overall model. In another preferred embodiment, the battery anomaly detection model to be trained is determined by the following method:

[0080] Taking the driving data set and the battery data set as basic data, statistical feature analysis is performed on the driving data set and the battery data set in the manner of step S200 to obtain multiple second training samples, and the pre-built initial battery detection total model is trained using the multiple second training samples. The initial battery detection total model includes the original Encoder network. Training the initial battery detection total model actually involves inputting the multiple second training samples into the original Encoder network to obtain multiple second training samples reconstructed from the output of the original Encoder network. Then, the MSE loss function is used to adjust the initial battery detection total model to obtain a trained battery detection total model. The data processing principle of the original Encoder network is similar to that of the target Encoder network and will not be elaborated here.

[0081] in:

[0082] Where K represents the number of second training samples, x represents the second training sample, It represents the reconstructed second training sample output by the original Encoder network. When the MSE is less than the preset loss value, it is determined that the model has been trained and the trained battery detection overall model is directly obtained.

[0083] More specifically, before step S500, the method further includes:

[0084] For each first training sample: determining a sample matrix corresponding to the first training sample, wherein the horizontal columns of the sample matrix represent feature data frames in the first training sample, and the vertical columns of the sample matrix represent target feature sequences; dividing the sample matrix into multiple matrix blocks of equal size, wherein the length of each matrix block is divisible by the length of the sample matrix, and the width of each matrix block is divisible by the width of the sample matrix; performing random masking processing on the multiple matrix blocks according to a first preset ratio to obtain multiple masked matrix blocks, multiple unmasked matrix blocks, and mask position subscripts corresponding to each masked matrix block; performing one-dimensional feature mapping on the multiple unmasked matrix blocks and the multiple masked matrix blocks respectively to obtain an unmasked vector and a masked vector corresponding to the first training sample; introducing a preset vector before the unmasked vector to form a target unmasked vector; the dimension of the preset vector is the same as the dimension of the unmasked vector; randomly initializing the target unmasked vector to obtain a random unmasked vector; adding the random unmasked vector to the target unmasked vector to obtain a processed target unmasked vector.

[0085] As mentioned above, the dimension of each sample matrix is ​​L×140. Assuming that the preset unit length is l patch and preset unit width w patch Cut the L×140 sample matrix to obtain n1×n2 matrix blocks, where The dimension of each matrix block is [l patch , w patch ].

[0086] Assuming that the first preset ratio is 75%, if there are 100 matrix blocks, 75 of them are randomly masked to obtain 75 mask matrix blocks. The mask position subscript corresponding to each mask matrix block is the position of the mask matrix block in the sample matrix to which it belongs. Please refer to Figure 4, which shows a schematic diagram of a sample reconstruction process provided by an embodiment of the present application. As shown in Figure 4, for training sample A, it is divided into 9 matrix blocks, according to 1 / 3 ratio is used for masking, and three mask matrix blocks a11, a22 and a33, and six unmasked matrix blocks a12, a13, a21, a23, a31 and a32 are obtained. For each mask matrix block a11, the corresponding mask position subscript is 11. Then, one-dimensional feature mapping is performed on multiple mask matrix blocks and multiple unmasked matrix blocks respectively, that is, the unmasked vector C and the mask vector D shown in Figure 4 are obtained.

[0087] As shown in Figure 4, for the unmasked vector C, its corresponding dimension is [6, 1], then the dimension corresponding to the introduced preset vector cls_token is also [6, 1]. After adding the preset vector cls_token before the first unmasked vector C, each element in the preset vector cls_token is d, and the value of d can be set according to actual conditions. The dimension of the target unmasked vector C1 formed becomes [6, 2]. Then, the target unmasked vector C1 is randomly initialized to obtain a random unmasked vector pos_embedding. The random unmasked vector pos_embedding is added to the target unmasked vector C1 to obtain the processed target unmasked vector C2. The dimension of the processed target unmasked vector C2 is the same as that of the target unmasked vector C1, both of which are [6, 2].

[0088] In another preferred embodiment, in step S500, the battery state prediction result corresponding to each feature data frame is obtained by:

[0089] For each first training sample: the processed target unmasked vector corresponding to the first training sample is input into the Encoder layer in the battery anomaly detection model to be trained, and the unmasked feature vector output by the Encoder layer is obtained. The dimension of the unmasked feature vector is the same as the dimension of the unmasked vector. The unmasked feature vector, the mask vector and the mask position subscript corresponding to each mask matrix block are input into the Decoder layer for splicing and reconstruction to obtain a sample vector. The sample vector is input into the linear layer for dimensionality restoration to obtain the reconstructed first training sample. The reconstructed multiple first training samples are input into the multi-layer perception network in the battery anomaly detection model to be trained, and the battery status prediction result corresponding to each feature data frame output by the multi-layer perception network is obtained.

[0090] Specifically, each target Encoder layer contains multiple attention mechanism layers and Norm layers. Multiple attention mechanism layers implement feature changes of different dimensions of the input data in parallel. The Norm layer receives the output data of multiple attention mechanism layers for dimensional integration and data reconstruction to generate reconstructed data with the same dimension as the input data. Therefore, in this application, as shown in Figure 4, the processed target unmasked vector C2 is first input into the target Encoder layer. In the target Encoder layer, multiple attention mechanism layers perform linear transformation. For each attention mechanism layer, the transformation process is as follows:

[0091] In this formula, Z represents the output data of the attention mechanism layer, d k represents the input hidden layer dimension, softmax(.) represents the activation function, where Q = x·W Q , K=x·W K , V=x·WV , x represents the processed target unmasked vector, W Q 、W K and W V Encode network parameters migrated from the pre-trained battery detection model.

[0092] The output data Z of each attention mechanism layer is then input into the Norm layer for data integration and reconstruction, and the unmasked feature vector C3 can be output, as shown in Figure 4. The unmasked feature vector and the mask vector are spliced ​​according to the mask position subscript corresponding to each mask matrix block to obtain the sample vector E and input it into the Decoder layer. The Decoder layer decodes the input sample vector E to obtain the decoded sample vector F. The decoded sample vector F is input into a linear layer for dimensionality restoration to obtain the reconstructed first training sample G. The dimension of the reconstructed first training sample is the same as the dimension of the first training sample before reconstruction.

[0093] The reconstructed multiple first training samples are input into the multi-layer perception network in the battery anomaly detection model to be trained, and the battery state prediction result corresponding to each feature data frame output by the multi-layer perception network is obtained.

[0094] In a preferred embodiment, in step S600, the cross entropy loss function is:

[0095] In this formula, Loss represents the cross entropy loss function, output size represents the number of feature data frames output by the battery anomaly detection model to be trained, and y i Indicates the actual battery status corresponding to the i-th feature data frame, Represents the predicted battery state corresponding to the i-th feature data frame output by the anomaly detection model to be trained.

[0096] In the present application, for each first training sample, the actual battery status corresponding to each feature data frame can be determined by obtaining the battery status label pre-marked for each feature data frame. The battery status label indicates the battery status at the corresponding moment of the feature data frame. The battery status label includes a normal label and an abnormal label. The multi-layer perception network is used to determine the battery status prediction result based on the input feature data frame. In the present application, the multi-layer perception network is trained using the above-mentioned cross-entropy loss function. When the cross-entropy loss function is stable within the preset error range, it is determined that the multi-layer perception network has been completed. At this time, a trained battery anomaly detection model will be obtained.

[0097] For a trained battery anomaly detection model, for a target vehicle, if one wants to obtain the battery status of the target vehicle at the current moment, multiple data frames to be analyzed within a preset time period before the current moment are obtained. The data frames to be analyzed include multiple operating parameters and multiple battery parameters corresponding to the target vehicle at the moment. By inputting the multiple data frames to be analyzed into the battery anomaly detection model, the predicted battery status of the target vehicle at the current moment can be obtained.

[0098] A more significant effect of this application is that for different types of batteries or different types of vehicles, the Encode network parameters in the pre-trained battery detection model can be directly migrated. It is only necessary to add a regression prediction network after the encoder module and use a small amount of data for training to complete the corresponding model construction. This greatly shortens the modeling time and improves the modeling efficiency while ensuring the accuracy of the model prediction.

[0099] Based on the same application concept, the embodiments of the present application also provide a battery abnormality detection device corresponding to the battery abnormality detection method provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the battery abnormality detection method in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0100] Please refer to Figure 5, which shows a schematic diagram of the structure of a device for determining a battery abnormality detection model provided by an embodiment of the present application. As shown in Figure 5, the device includes:

[0101] The first acquisition module 700 is used to acquire multiple target vehicle data, each target vehicle data including multiple operating parameters of a thermal runaway vehicle throughout its life cycle and multiple battery parameters generated by an on-board battery on a thermal runaway vehicle under a preset experiment.

[0102] The statistical module 710 is configured to perform statistical feature analysis on the data of multiple target vehicles based on a sliding window method to obtain multiple first training samples, each of which includes multiple feature data frames.

[0103] The second acquisition module 720 is used to acquire a pre-built initial battery anomaly detection model, which includes a target encoder network and a multi-layer perception network.

[0104] The migration module 730 is used to migrate the encoder network parameters corresponding to the original encoder network in the pre-trained battery detection model to the target encoder network to obtain the battery anomaly detection model to be trained.

[0105] The training module 740 is configured to input a plurality of first training samples into the battery anomaly detection model to be trained, and obtain a battery state prediction result corresponding to each first training sample output by the battery anomaly detection model to be trained.

[0106] The determination module 750 is used to fine-tune the battery anomaly detection model to be trained based on the battery state prediction result and the actual battery state corresponding to each first training sample in combination with the cross entropy loss function to obtain a trained battery anomaly detection model.

[0107] Based on the same application concept, please refer to Figure 6, which shows a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Electronic device 800 includes: a processor 810, a memory 820, and a bus 830. The memory 820 stores machine-readable instructions executable by the processor 810. When the electronic device 800 is running, the processor 810 and the memory 820 communicate via the bus 830. The machine-readable instructions are executed by the processor 810 to execute the steps of the method for determining a battery abnormality detection model provided in any of the above embodiments.

[0108] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for determining the battery abnormality detection model provided in the above embodiment are executed.

[0109] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only 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 communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0111] In addition, each functional unit in each embodiment of the present application 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.

[0112] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0113] Although the embodiments of the present application have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations shall fall within the scope defined by the appended claims. Industrial Applicability

[0114] The technical solution provided in the present application obtains multiple first training samples by performing statistical feature analysis on multiple target vehicle data; migrates the encoder network parameters corresponding to the encoder network in the pre-trained battery detection overall model to the encoder network in the initial battery anomaly detection model to obtain the battery anomaly detection model to be trained; inputs the multiple first training samples into the battery anomaly detection model to be trained to obtain the battery status prediction result corresponding to each feature data frame output by the battery anomaly detection model to be trained; based on the battery status prediction result corresponding to each feature data frame and the actual battery status, combined with the cross-entropy loss function, the battery anomaly detection model to be trained is fine-tuned to obtain a trained battery anomaly detection model.

[0115] This application constructs a battery anomaly detection model by directly migrating the network parameters in the pre-trained model, thereby improving the training speed of the battery anomaly detection model.

Claims

1. A method for determining a battery abnormality detection model, characterized in that: The method comprises: Acquire multiple target vehicle data, each target vehicle data including multiple operating parameters of a thermal runaway vehicle in its entire life cycle and multiple battery parameters generated by an onboard battery of a thermal runaway vehicle under a preset experiment; Performing statistical feature analysis on the plurality of target vehicle data based on a sliding window method to obtain a plurality of first training samples; Obtaining a pre-built initial battery anomaly detection model, wherein the initial battery anomaly detection model includes a target encoder network and a multi-layer perception network; Migrate the encoder network parameters corresponding to the original encoder network in the pre-trained battery detection model to the target encoder network to obtain the battery anomaly detection model to be trained; Inputting the plurality of first training samples into the battery abnormality detection model to be trained, and obtaining a battery state prediction result corresponding to each first training sample output by the battery abnormality detection model to be trained; According to the battery state prediction result and the actual battery state corresponding to each first training sample, in combination with the cross entropy loss function, the battery anomaly detection model to be trained is fine-tuned to obtain a trained battery anomaly detection model.

2. The method according to claim 1, characterized in that: The operating parameters include the remaining charge value of the battery, Wherein, a plurality of first training samples are obtained by the following method: Extracting a multivariate time series table from the plurality of target vehicle data at preset time intervals, the multivariate time series table comprising a plurality of parameter sequences, the plurality of parameter sequences comprising a data sequence generated at a plurality of moments for each operating parameter and a data sequence generated at a plurality of moments for each battery parameter; Cleaning the multiple parameter sequences to form a first data set from the cleaned multiple parameter sequences; For the first data set, delete the parameter sequence corresponding to the battery remaining charge value, and perform difference calculation on the remaining parameter sequences to form a second data set; Performing statistical feature analysis on the first data set and the second data set respectively according to a sliding window method to obtain a third data set and a fourth data set; Merging the third data set and the fourth data set to obtain a data table to be processed; A plurality of first training samples are constructed by using a sliding window method and a data table to be processed.

3. The method according to claim 2, characterized in that The operating parameters also include battery cell voltage and temperature probe temperature, The third data set and the fourth data set are formed in the following manner: The following statistical processing is performed on the first data set and the second data set respectively: statistical calculation is performed on the battery cell voltage and the temperature of the temperature probe in each frame of data respectively, and the parameter sequences corresponding to the battery cell voltage and the temperature of the temperature probe are converted into a plurality of statistical feature sequences corresponding to each of them respectively using the statistical calculation results, wherein the statistical calculation includes mean calculation, median calculation, range calculation and standard deviation calculation; Determining the first data set after the statistical processing as a first data set to be processed, and determining the second data set after the statistical processing as a second data set to be processed; For the first data set to be processed, a first preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step length: for a window formed by each sliding, a statistical calculation is performed on the sequences in the window except the battery remaining charge value to form a third data set, wherein the length of the first preset sliding window in the column direction is a first preset value, and the width in the horizontal direction is the same as the number of sequences in the first data set to be processed; For the second data set to be processed, a second preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, statistical calculations are performed on each sequence in the window to form a fourth data set, and the column length of the second preset sliding window is the first preset value, and the horizontal width is the same as the number of sequences in the second data set to be processed.

4. The method according to claim 2, characterized in that: The steps of constructing a plurality of first training samples by using the sliding window method and the data table to be processed include: For the first data set, a first preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step length: for a window formed by each sliding, the cumulative battery capacity in the window is calculated by ampere-hour integration to form a statistical feature sequence corresponding to the cumulative battery capacity; For the second data set, a second preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step size: for the window formed by each sliding, the voltage difference value and the current difference value at different times are used to calculate the corresponding battery internal resistance in the window, so as to form a statistical feature sequence corresponding to the battery internal resistance; Merging the statistical feature sequence corresponding to the cumulative battery capacity and the statistical feature sequence corresponding to the battery internal resistance into the to-be-processed data table to form a fifth data set; For the first data set, a first preset sliding window is selected to perform sliding window calculation along the column direction according to a preset step length, and the battery remaining charge value corresponding to the last frame of data in each window formed by sliding is formed to form a statistical feature sequence corresponding to the battery remaining charge value and incorporated into the fifth data set to form a sixth data set, and the sixth data set includes multiple target feature sequences; For the sixth data set, a third preset sliding window is selected to perform sliding window processing along the column direction according to a preset step size: for a window formed by each sliding, a first training sample is formed by multiple feature data frames in the window, the column length of the third preset sliding window is a second preset value, and the horizontal width of the second preset sliding window is the same as the number of sequences in the sixth data set.

5. The method according to claim 1, characterized in that The Encoder network includes multiple attention mechanism layers, and the Encoder network parameters include multiple linear transformation parameters corresponding to each attention mechanism layer. The battery anomaly detection model to be trained is determined in the following way: For each attention mechanism layer in the original Encoder network, migrate the pre-trained linear transformation parameters of the attention mechanism layer to the corresponding attention mechanism layer of the target Encoder network; Update the target Encoder network to obtain the battery anomaly detection model to be trained.

6. The method according to claim 1, characterized in that Before inputting the plurality of first training samples into the battery abnormality detection model to be trained, the method further includes: For each first training sample: Determine a sample matrix corresponding to the first training sample, wherein the horizontal columns of the sample matrix represent feature data frames in the first training sample, and the vertical columns of the sample matrix represent target feature sequences; Divide the sample matrix into multiple matrix blocks of equal size, the length of each matrix block is divisible by the length of the sample matrix, and the width of each matrix block is divisible by the width of the sample matrix; Performing random masking processing on the plurality of matrix blocks according to a first preset ratio to obtain a plurality of masked matrix blocks, a plurality of unmasked matrix blocks, and a mask position subscript corresponding to each masked matrix block; Performing one-dimensional feature mapping on the multiple unmasked matrix blocks and the multiple masked matrix blocks respectively to obtain an unmasked vector and a masked vector corresponding to the first training sample; A preset vector is introduced before the unmasked vector to form a target unmasked vector, and the dimension of the preset vector is the same as the dimension of the unmasked vector; The target unmasked vector is randomly initialized to obtain a random unmasked vector, and the random unmasked vector is added to the target unmasked vector to obtain a processed target unmasked vector.

7. The method according to claim 6, characterized in that The Encoder network includes an Encoder layer and a Decode layer. The battery status prediction result corresponding to each feature data frame is obtained in the following way: For each first training sample: Inputting the processed target unmasked vector corresponding to the first training sample into the Encoder layer in the battery anomaly detection model to be trained, obtaining an unmasked feature vector output by the Encoder layer, where the dimension of the unmasked feature vector is the same as the dimension of the unmasked vector; According to the mask position subscript corresponding to each mask matrix block, the unmasked feature vector and the mask vector are concatenated and reconstructed to obtain a sample vector; The sample vector is input and decoded into the Decode layer to obtain the reconstructed first training sample; The reconstructed multiple first training samples are input into the multi-layer perception network in the battery anomaly detection model to be trained, and the battery state prediction result corresponding to each feature data frame output by the multi-layer perception network is obtained.

8. The method according to claim 1, characterized in that The cross entropy loss function is: Among them, Loss represents the cross entropy loss function, output size represents the number of feature data frames output by the battery anomaly detection model to be trained, and y i Indicates the actual battery status corresponding to the i-th feature data frame, Represents the predicted battery state corresponding to the i-th feature data frame output by the anomaly detection model to be trained.

9. A device for determining a battery abnormality detection model, characterized in that: The device comprises: A first acquisition module is used to acquire multiple target vehicle data, each target vehicle data includes multiple operating parameters of a thermal runaway vehicle in the whole life cycle and multiple battery parameters generated by a vehicle battery on the thermal runaway vehicle under a preset experiment; A statistical module, used for performing statistical feature analysis on the plurality of target vehicle data based on a sliding window method to obtain a plurality of first training samples, each of which includes a plurality of feature data frames; A second acquisition module is used to acquire a pre-built initial battery anomaly detection model, wherein the initial battery anomaly detection model includes a target encoder network and a multi-layer perception network; A migration module is used to migrate the encoder network parameters corresponding to the original encoder network in the pre-trained battery detection model to the target encoder network to obtain the battery anomaly detection model to be trained; A training module, used for inputting the plurality of first training samples into the battery abnormality detection model to be trained, and obtaining a battery state prediction result corresponding to each first training sample output by the battery abnormality detection model to be trained; The determination module is used to fine-tune the battery anomaly detection model to be trained according to the battery state prediction result and the actual battery state corresponding to each first training sample in combination with the cross entropy loss function to obtain a trained battery anomaly detection model.

10. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for determining a battery abnormality detection model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Battery anomaly detection model training and detection method and device

    CN112379269A

  • Power lithium battery thermal runaway fault classification and risk prediction method and system

    CN113343633A

  • Method for establishing battery anomaly detection model and battery anomaly detection method

    CN115358295A

  • Model training method and device, battery detection method and device, equipment and medium

    CN116559667A

  • Battery voltage estimation method and device and storage medium

    CN116660757A

Cited By

  • Battery internal state identification method and device, computer equipment and storage medium

    CN120280518A

  • Nonlinear dynamic data anomaly detection method for multi-process stage of silicon single crystal growth

    CN120296643A

  • Transformer substation voltage abnormity monitoring method based on Fourier transform and graph neural network

    CN120352720A

  • Lithium ion battery pack self-discharge diagnosis algorithm oriented to multi-stage dynamic charging scene and based on residual chargeable capacity prediction

    CN120385934A

  • Battery fault diagnosis method based on DBSCAN, empirical distribution function and information entropy combination

    CN120468664A