Feature extraction model training method, feature extraction method, thermal runaway prediction method and device

During the training process of the thermal runaway prediction model, using a dynamic sliding window to extract training samples from the battery historical data and adjust the step size of the sliding window according to the similarity, the problem of large calculation and low efficiency in the existing technology is solved, and more efficient model training is achieved.

CN119025899BActive Publication Date: 2025-03-18SHANGHAI CAIRI ENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411507250.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-03-18
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The existing thermal runaway prediction methods are large in computing, low efficiency and excessive hardware resource consumption due to the existence of a large number of similar features during model training.

Method used

The dynamic sliding window is used to extract training samples from the battery historical data, and the step size of the sliding window is adjusted according to the similarity, thereby reducing the number of similar training samples extracted, reducing the calculation amount and hardware resource consumption.

Benefits of technology

Through the dynamic sliding window method, the computational amount and hardware resource consumption of model training are reduced, and the efficiency of model training is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025899B_ABST
    Figure CN119025899B_ABST
Patent Text Reader

Abstract

The present application provides a method for training a feature extraction model, a feature extraction method, a thermal runaway prediction method and a device. The method includes: obtaining battery history data before thermal runaway occurs; extracting training samples from the battery history data based on a dynamic sliding window; the step size of the dynamic sliding window is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window; and the residual network is trained using the training samples to obtain a trained feature extraction model. The present application extracts training samples from battery history data through a dynamic sliding window. When the battery history data changes slightly, a sliding window with a large step size is used to extract training samples; when the battery history data changes greatly, a sliding window with a smaller step size is used to extract training samples, thereby reducing the number of similar training samples extracted, thereby reducing the amount of calculation in the model training process, reducing the consumption of hardware resources, and improving the efficiency of training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer model technology, and in particular to a feature extraction model training method, a feature extraction method, a thermal runaway prediction method and a device. Background Art

[0002] Lithium-ion batteries are widely used in energy storage systems and electric vehicles due to their high power density and energy density, long cycle life, and low self-discharge rate. However, with the widespread promotion and popularization, a series of accidents have also occurred frequently. In particular, accidents such as spontaneous combustion and explosion caused by thermal runaway can bring serious consequences.

[0003] Existing thermal runaway prediction methods use feature extraction models to extract useful feature information from the relevant parameters of the battery before thermal runaway, and predict thermal runaway based on the feature information. However, before thermal runaway, the battery is in normal working condition for a long time, and its battery-related parameters are basically the same. When training the feature extraction model, a large number of approximate features will be collected, which increases the amount of calculation in the model training process and reduces the efficiency of model training. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a feature extraction model training method, a feature extraction method, a thermal runaway prediction method and a device, so as to improve the efficiency of model training and the consumption of hardware resources.

[0005] In a first aspect, an embodiment of the present application provides a method for training a feature extraction model, comprising:

[0006] Obtain battery history data before thermal runaway occurs;

[0007] Extracting training samples from battery historical data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window;

[0008] The residual network is trained using the training samples to obtain a trained feature extraction model.

[0009] The embodiment of the present application extracts training samples from battery historical data through a dynamic sliding window. When the battery historical data changes slightly, a sliding window with a large step size is used to extract training samples; when the battery historical data changes greatly, a sliding window with a smaller step size is used to extract training samples, thereby reducing the number of similar training samples extracted, thereby reducing the amount of calculation in the model training process, reducing the consumption of hardware resources, and improving the efficiency of training.

[0010] In any embodiment, extracting training samples from battery historical data based on a dynamic sliding window includes:

[0011] Obtaining a first training sample extracted by a current sliding window and a second training sample extracted by a previous sliding window;

[0012] Calculating the similarity between the first training sample and the second training sample;

[0013] Determine the step size of the next sliding window based on the similarity and the step size corresponding to the current sliding window;

[0014] Based on the window size and step size, the training samples corresponding to the next sliding window are extracted from the battery historical data.

[0015] The embodiment of the present application calculates the similarity between the training samples corresponding to two adjacent sliding windows and adjusts the step size of the sliding window based on the similarity, so that the interval for collecting data can be adjusted to be slightly larger when the battery historical data changes little, and the data can be collected more intensively when the battery historical data changes greatly. In this way, a sufficient number of useful features can be collected and the computational complexity of model training can be reduced.

[0016] In any embodiment, determining the step size of the current sliding window according to the similarity and the step size corresponding to the current sliding window includes:

[0017] If the similarity is greater than the first threshold, then increasing the first preset step length based on the step length corresponding to the current sliding window;

[0018] If the similarity is less than the second threshold, the second preset step length is reduced based on the step length corresponding to the current sliding window.

[0019] The embodiment of the present application calculates the similarity between the training samples corresponding to two adjacent sliding windows and adjusts the step size of the sliding window based on the similarity, so that the interval for collecting data can be adjusted to be slightly larger when the battery historical data changes little, and the data can be collected more intensively when the battery historical data changes greatly. In this way, a sufficient number of useful features can be collected and the computational complexity of model training can be reduced.

[0020] In any embodiment, the first training sample includes a plurality of first training data, the second training sample includes a plurality of second training data, and calculating the similarity between the first training sample and the second training sample includes:

[0021] Calculate and obtain a distance matrix based on the first training data and the second training data;

[0022] Determine the shortest path from the upper left element to the lower right element of the distance matrix;

[0023] Similarity is determined based on the shortest path.

[0024] The embodiment of the present application calculates the distance matrix between the first training data and the second training data, and calculates the shortest path from the upper left element to the lower right element of the distance matrix. The larger the shortest path, the smaller the similarity between the two training data, and the smaller the shortest path, the larger the similarity between the two training data. This calculation method can be used to calculate the similarity of data with time series characteristics.

[0025] In any embodiment, the residual network includes an input module, a first residual module, and a second residual module; and training the residual network using training samples includes:

[0026] Get the amount of data for training samples;

[0027] Determine the number of the first residual module and the second residual module according to the amount of data;

[0028] Generating a residual network based on the number of the first residual module and the second residual module;

[0029] The training samples are used as model input, and the features of the training samples are used as labels to train the residual network.

[0030] In an embodiment of the present application, when performing model training, the number of first residual modules and second residual modules in the residual network is determined according to the number of samples. When the number of samples is large, more first residual modules and second residual modules are used to fully extract features; when the number of samples is small, fewer first residual modules and second residual modules are used to reduce resource consumption of network training.

[0031] In a second aspect, an embodiment of the present application provides a feature extraction method, comprising:

[0032] Collect battery data of the battery in a preset time period before the current moment;

[0033] The battery data is input into a feature extraction model to obtain battery features; wherein the feature extraction model is obtained by training using the training method described in the first aspect.

[0034] In a third aspect, an embodiment of the present application provides a thermal runaway prediction method, comprising:

[0035] Obtaining battery features of the battery to be predicted; the battery features are extracted using the feature extraction method described in the second aspect;

[0036] The battery characteristics are input into the thermal runaway prediction model to obtain the prediction results output by the thermal runaway prediction model; the prediction results characterize whether the battery has the possibility of thermal runaway.

[0037] In a fourth aspect, an embodiment of the present application provides a training device for a feature extraction model, comprising:

[0038] A historical data acquisition module, used to acquire the battery historical data before thermal runaway occurs;

[0039] A sample extraction module, used to extract training samples from the battery historical data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the first two sliding windows;

[0040] The training module is used to train the residual network using training samples to obtain a trained feature extraction model.

[0041] In a fifth aspect, an embodiment of the present application provides a feature extraction device, including:

[0042] A battery data collection module is used to collect battery data of the battery in a preset time period before the current moment;

[0043] The feature extraction module is used to input the battery data into the feature extraction model to obtain the battery features; wherein the feature extraction model is obtained by training using the training method described in the first aspect.

[0044] In a sixth aspect, an embodiment of the present application provides a thermal runaway prediction device, comprising:

[0045] A feature acquisition module, used to acquire battery features of the battery to be predicted; the battery features are extracted by using the feature extraction method described in the second aspect;

[0046] The prediction module is used to input the battery characteristics into the thermal runaway prediction model to obtain the prediction results output by the thermal runaway prediction model; the prediction results represent whether the battery has the possibility of thermal runaway.

[0047] In a seventh aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory, and a bus, wherein:

[0048] The processor and the memory communicate with each other via the bus;

[0049] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method of the first aspect, the second aspect, or the third aspect.

[0050] In an eighth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, including:

[0051] The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method of the first aspect, the second aspect, or the third aspect.

[0052] In a ninth aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which, when read and executed by a processor, execute the method of the first aspect, the second aspect or the third aspect.

[0053] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 A flowchart of a method for training a feature extraction model provided in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of the structure of a residual block provided in an embodiment of the present application;

[0057] Figure 3 A schematic diagram of the residual network model structure provided in an embodiment of the present application;

[0058] Figure 4 A schematic diagram of a feature extraction method provided in an embodiment of the present application;

[0059] Figure 5 A schematic diagram of collecting training samples using a sliding time window provided in an embodiment of the present application;

[0060] Figure 6 A schematic diagram of a thermal runaway prediction method provided in an embodiment of the present application;

[0061] Figure 7 A schematic diagram of the structure of a training device for a feature extraction model provided in an embodiment of the present application;

[0062] Figure 8 A schematic diagram of the structure of a feature extraction device provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of the structure of a thermal runaway prediction device provided in an embodiment of the present application;

[0064] Fig.10 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0067] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0068] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0069] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0070] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0071] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0072] The safety of power batteries and energy storage batteries is one of the important performance indicators. During the use of batteries, there may be problems with thermal runaway. Thermal runaway refers to the phenomenon that the internal diaphragm of a single lithium-ion battery melts due to puncture, overheating, etc., and the electrochemical reaction occurs quickly and converts into heat, causing the temperature of the lithium-ion battery to rise sharply. Usually, thermal runaway will first occur in a single lithium-ion battery. The large amount of heat released by thermal runaway will cause the temperature of the lithium-ion battery to rise sharply. The heat diffusion value of the adjacent lithium-ion battery will cause the adjacent lithium-ion battery to overheat, and thermal runaway will continue to occur, which may cause the entire lithium-ion battery pack to start burning, causing serious consequences.

[0073] Therefore, the prediction of thermal runaway is of great significance. Specifically, the model can be used to extract features of the battery parameters during use, and thermal runaway can be predicted based on the extracted features. When training the model, the data of the battery before thermal runaway occurs can be used, but in the actual use of the battery, the data before thermal runaway occurs are mostly similar. If these data are used for feature extraction, many similar features will be extracted, thereby increasing the computational complexity of model training and reducing the efficiency of model training.

[0074] In order to solve the above technical problems, an embodiment of the present application provides a dynamic sliding window for extracting training samples. The step size of the sliding window is determined according to the training samples corresponding to two adjacent sliding windows. In this way, similar training samples can be extracted as little as possible and different training samples can be extracted as much as possible, thereby reducing the computational complexity of training.

[0075] It can be understood that the feature extraction model training method provided in the embodiment of the present application can not only be used in the battery thermal runaway scenario, but also can be used for model training using data with time series characteristics in other scenarios as training samples.

[0076] The model training method, feature extraction method and thermal runaway prediction method provided in the embodiments of the present application can be applied to electronic devices, which include terminals and servers; wherein the terminal can be a smart phone, a tablet computer, a computer, a personal digital assistant (PDA), etc.; the server can be an application server or a Web server. In addition, the model training method, feature extraction method and thermal runaway prediction method can be executed by the same terminal device or by different terminal devices.

[0077] To facilitate understanding of the technical solution provided in the embodiments of the present application, the application scenarios of the model training method, feature extraction method and thermal runaway prediction method provided in the embodiments of the present application are introduced below, taking the terminal device as the execution subject as an example.

[0078] Figure 1 A flow chart of a training method for a feature extraction model provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0079] Step 101: Obtaining battery history data before thermal runaway occurs;

[0080] Step 102: extracting training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window;

[0081] Step 103: Use the training samples to train the residual network to obtain a trained feature extraction model.

[0082] In the specific implementation process, the battery can be a power battery or an energy storage battery. Battery historical data refers to the relevant parameters collected by the acquisition device during the use of the battery. For example, it can be the temperature and voltage of the battery during the charging and discharging process, and can also include current and other data. It can be understood that the battery historical data is a relevant parameter that can characterize whether the battery has thermal runaway. Since the main purpose of the embodiment of the present application is to predict whether the battery has thermal runaway, what is obtained is the battery historical data before the thermal runaway occurs.

[0083] A dynamic sliding window means that the window size is a preset size, and the step size is dynamically adjusted with the changing trend of the battery history data. The battery history data corresponding to a period of time is intercepted from the battery history data using a window of preset size as a training sample. The step size can be determined specifically based on the training samples corresponding to the current sliding window and the training samples corresponding to the previous sliding window. For example: if the similarity between the training samples corresponding to the current sliding window and the training samples corresponding to the previous sliding window is poor, it is considered that the battery history data has not changed much. In order to reduce the collection of too many similar training samples, the step size can be increased; if the similarity between the training samples corresponding to the current sliding window and the training samples corresponding to the previous sliding window is low, it is considered that the battery history data has changed greatly. In order to collect as many features as possible, the step size can be reduced.

[0084] After the training samples are collected using the dynamic sliding window, multiple training samples have a time series property, and they are sorted in chronological order as a whole training sample to train the residual network. That is, a whole training sample is used as the input of the residual network, and whether thermal runaway occurs is used as a label to optimize the internal parameters of the residual network. It should be noted that the training process is completed through multiple iterations, that is, the battery history data of multiple batteries before thermal runaway occurs can be collected, and then the residual network is iteratively trained using multiple battery history data.

[0085] The residual network is composed of many parts with similar structures, each of which is usually called a "residual block". Figure 2 A schematic diagram of the structure of a residual block provided in an embodiment of the present application is shown in FIG. Figure 2 Assume is the underlying mapping of the neural network, and x represents the first layer input of these layers. We expect the underlying mapping of the neural network to approach , that is, close to The original The advantage of the residual network is that it reduces the learning problem of the complete output to the learning problem of the residual. If the output of the shallow layer is only input to the deep layer with identity mapping (i.e. F(X)=0), the network will not degenerate even if the network is deepened. Therefore, a "short circuit" mechanism is added to the network to solve the gradient vanishing problem.

[0086] Residual networks have become a mainstream model in the field of images, and are mostly used for feature extraction of two-dimensional images. Battery thermal runaway data is one-dimensional time series data. When designing a neural network corresponding to one-dimensional time series data, the network degradation problem is also faced. The embodiment of this application integrates the idea of ​​residual blocks to design a residual network in the thermal runaway scenario.

[0087] The embodiment of the present application extracts training samples from battery historical data through a dynamic sliding window. When the battery historical data changes slightly, a sliding window with a large step size is used to extract training samples; when the battery historical data changes greatly, a sliding window with a smaller step size is used to extract training samples, thereby reducing the number of similar training samples extracted, thereby reducing the amount of calculation in the model training process, reducing the consumption of hardware resources, and improving the efficiency of training.

[0088] On the basis of the above embodiment, a training sample is extracted from the battery history data based on a dynamic sliding window, including:

[0089] Obtaining a first training sample extracted by a current sliding window and a second training sample extracted by a previous sliding window;

[0090] Calculating the similarity between the first training sample and the second training sample;

[0091] Determine the step size of the next sliding window based on the similarity and the step size corresponding to the current sliding window;

[0092] Based on the window size and step size, the training samples corresponding to the next sliding window are extracted from the battery historical data.

[0093] In the specific implementation process, if the battery is in a normal working state, its battery-related parameters are in a relatively stable state. When thermal runaway is about to occur, the battery-related parameters will change significantly and show certain characteristics. The battery will be in a normal working state most of the time. Therefore, when collecting training samples, a large number of training samples under normal working conditions may be collected, which will undoubtedly increase the subsequent calculation amount. Moreover, these training samples are not very helpful for the prediction of thermal runaway. The characteristics of the battery parameters when thermal runaway is about to occur have a greater reference value for the prediction of thermal runaway. Therefore, it is necessary to collect more features during this period. Therefore, the embodiment of the present application adopts a dynamic sliding window method to collect training samples.

[0094] The current sliding window refers to the sliding window corresponding to the first training sample extracted from the battery history data for the last time at the current moment. The previous sliding window is the sliding window corresponding to the second training sample extracted from the battery history data once before the current sliding window. After obtaining the first training sample and the second training sample, the similarity between the first training sample and the second training sample can be calculated.

[0095] The step size corresponding to the current sliding window refers to the step size from the previous sliding window to the current sliding window. The step size of the next sliding window refers to the step size from the current sliding window to the next sliding window. If the similarity is large, it means that the first training sample is relatively similar to the second training sample, and the battery history data does not change much. It can be increased again on the basis of the step size corresponding to the current sliding window as the step size of the next sliding window; if the similarity is small, it means that the first training sample is quite different from the second training sample, and the battery history data changes greatly. The step size can be reduced on the basis of the step size corresponding to the current sliding window as the step size of the next sliding window. After obtaining the step size of the next sliding window, the training sample corresponding to the next sliding window can be extracted from the battery history data based on the window size and the step size. Therefore, after each training sample is collected using the sliding window, the similarity between the extracted training sample and the last extracted training sample is calculated, and then the next step size is determined based on the calculated similarity, and then the window is moved using the step size to continue collecting training samples until the collection is completed.

[0096] The embodiment of the present application calculates the similarity between the training samples corresponding to two adjacent sliding windows and adjusts the step size of the sliding window based on the similarity, so that the interval for collecting data can be adjusted to be slightly larger when the battery historical data changes little, and the data can be collected more intensively when the battery historical data changes greatly. In this way, a sufficient number of useful features can be collected and the computational complexity of model training can be reduced.

[0097] On the basis of the above embodiment, the step size of the current sliding window is determined according to the similarity and the step size corresponding to the current sliding window, including:

[0098] If the similarity is greater than the first threshold, then increasing the first preset step length based on the step length corresponding to the current sliding window;

[0099] If the similarity is less than the second threshold, the second preset step length is reduced based on the step length corresponding to the current sliding window.

[0100] The first threshold and the second threshold can be set according to the actual situation. For example, the first threshold includes but is not limited to 80%, and the second threshold includes but is not limited to 50%. When the similarity is greater than 80%, it means that the battery history data has not changed much. The length of the first preset step length can be increased based on the step length corresponding to the current sliding window. For example, if the step length corresponding to the current sliding window is 3 seconds, it can be increased to 5 seconds. The specific step length increase can be adjusted according to the actual situation, and the embodiment of the present application does not make specific limitations on this.

[0101] When the similarity is less than 50%, it means that the battery history data has changed greatly. The length of the second preset step size can be reduced based on the step size corresponding to the current sliding window. For example, if the step size corresponding to the current sliding window is 5 seconds, it can be reduced to 4 seconds. The specific step size increase can be adjusted according to actual conditions, and the embodiment of the present application does not specifically limit this.

[0102] It should be noted that the first preset step length may be the same as or different from the second preset step length. Furthermore, the first preset step length may be adjusted according to the specific similarity. For example, the first preset step length may be determined according to the magnitude of the similarity greater than the first threshold. The greater the magnitude, the greater the first preset step length; the smaller the magnitude, the smaller the first preset step length. The second preset step length is similar to the first preset step length and will not be described in detail here.

[0103] In addition, if the similarity is between the first threshold and the second threshold, the step size does not need to be adjusted and can be equal to the step size corresponding to the current sliding window.

[0104] The embodiment of the present application calculates the similarity between the training samples corresponding to two adjacent sliding windows and adjusts the step size of the sliding window based on the similarity, so that the interval for collecting data can be adjusted to be slightly larger when the battery historical data changes little, and the data can be collected more intensively when the battery historical data changes greatly. In this way, a sufficient number of useful features can be collected and the computational complexity of model training can be reduced.

[0105] Based on the above embodiment, the first training sample includes a plurality of first training data, the second training sample includes a plurality of second training data, and calculating the similarity between the first training sample and the second training sample includes:

[0106] Calculate and obtain a distance matrix based on the first training data and the second training data;

[0107] Determine the shortest path from the upper left element to the lower right element of the distance matrix;

[0108] Similarity is determined based on the shortest path.

[0109] In a specific implementation process, the similarity between the first training sample and the second training sample can be calculated in the following manner:

[0110] 1. Fill the distance matrix:

[0111] Given two time series A (i.e. the first training data) and B (the second training data), their lengths are m and n respectively.

[0112] Construct an m×n matrix grid, where each element (i, j) in the matrix represents the distance between the i-th point in A and the j-th point in B. Euclidean distance is usually used as a metric.

[0113] When filling the matrix, start at the lower left corner (0,0) and move upward or right, calculating and accumulating the distance of each point.

[0114] 2. Find the shortest path:

[0115] After filling the distance matrix, you need to find a path from the lower left corner to the upper right corner so that the sum of the distances of all points on the path is minimized.

[0116] This path is called the Warping Path, and it represents the best alignment, or similarity, between A and B.

[0117] The selection of the path needs to meet certain constraints, such as continuity (can only match adjacent points), monotonicity (the points on the path progress monotonically over time and cannot go back), etc.

[0118] The embodiment of the present application calculates the distance matrix between the first training data and the second training data, and calculates the shortest path from the upper left element to the lower right element of the distance matrix. The larger the shortest path, the smaller the similarity between the two training data, and the smaller the shortest path, the larger the similarity between the two training data. This calculation method can be used to calculate the similarity of data with time series characteristics.

[0119] Based on the above embodiment, the residual network includes an input module, a first residual module and a second residual module; the residual network is trained using training samples, including:

[0120] Get the amount of data for training samples;

[0121] Determine the number of the first residual module and the second residual module according to the amount of data;

[0122] Generating a residual network based on the number of the first residual module and the second residual module;

[0123] The training samples are used as model input, and the features of the training samples are used as labels to train the residual network.

[0124] In the specific implementation process, the traditional residual network, such as: ResNet18, ResNet 34, ResNet 50, ResNet 101, ResNet 152, etc., includes: 64-dimensional convolutional layer, 64-dimensional residual block, 128-dimensional residual block, 256-dimensional residual block and 512-dimensional residual block. There is a large difference in the amount of data in the thermal runaway scenario compared to the image field, and the amount of thermal runaway data is relatively small. Therefore, the embodiment of the present application can use a 64-dimensional convolutional layer, a 64-dimensional residual block and a 128-dimensional residual block. And compared with the traditional residual network, the embodiment of the present application configures the convolution kernel and step size inside the convolution layer and the residual block accordingly according to the temporal characteristics of the thermal runaway data.

[0125] Figure 3 A schematic diagram of the residual network model structure provided in the embodiment of the present application is shown in FIG. Figure 3 As shown in Figure 2, the network structure is divided into three parts: input part ( Figure 3 The top dotted box), 64-dimensional residual block ( Figure 3 The leftmost dashed box) and the 128-dimensional residual block ( Figure 3 The rightmost dotted box). The input part consists of a convolution layer Convld-64 (3*1 convolution kernel, step size 1), a normalization layer BachNormld, an activation layer ReLU and a pooling layer MaxPoolld (3*1 convolution kernel, step size 2). The input layer simplifies the input data and greatly reduces the occupancy of storage space. The 64-dimensional residual blocks are designed to be 5, and the 128-dimensional residual blocks are designed to be 8. It should be noted that the number of 64-dimensional residual blocks and 128-dimensional residual blocks can be determined according to the data volume of the training sample of the data. The data volume can refer to the number of data points contained in the training sample or the data length. The larger the data volume, the larger the number of the first residual module and the second residual module. On the contrary, the smaller the data volume, the smaller the number of the first residual module and the second residual module. Specifically, when the data volume is 900, the number of 64-dimensional residual blocks can be set to 5 by default, and the number of 128-dimensional residual blocks can be set to 8 by default. When the data length increases by 20%, the number of residual blocks increases by 5% dynamically; similarly, when the data length decreases by 20%, the number of residual blocks decreases by 5% dynamically.

[0126] In an embodiment of the present application, when performing model training, the number of first residual modules and second residual modules in the residual network is determined according to the number of samples. When the number of samples is large, more first residual modules and second residual modules are used to fully extract features; when the number of samples is small, fewer first residual modules and second residual modules are used to reduce resource consumption of network training.

[0127] Figure 4 A flow chart of a feature extraction method provided in an embodiment of the present application is shown in FIG. Figure 4As shown, the method includes:

[0128] Step 401: Collecting battery data of the battery in a preset time period before the current moment;

[0129] Step 402: Input the battery data into a feature extraction model to obtain battery features; wherein the feature extraction model is obtained by training using the training methods described in the above embodiments.

[0130] Figure 5 A schematic diagram of using a sliding time window to collect training samples is provided in an embodiment of the present application, such as Figure 5 As shown in the figure, the battery data mainly includes voltage and temperature. The window size can be 64. Assuming that there is one data sampling point per second, the time window of 64 means that the battery voltage and temperature data within 64 seconds is used as a training sample, and simple statistical features (maximum, mean, variance, etc.) are added to the sample. Figure 5 It can be seen that the voltage and temperature in the first half change little, and the data of the two 64 seconds before and after are basically the same. If a fixed step size is used, the adjacent samples obtained after sliding will be very similar. Therefore, the embodiment of the present application adopts a dynamic sliding step size, and the step size adjustment method is as follows:

[0131] 1. Set the current step variable S=1 (default value).

[0132] 2. Calculate the dynamic time warping (DTW) distance between the time series data in the current window and the previous window.

[0133]

[0134] As shown in the above formula, represents the shortest path distance from the starting point to the (i, j)th element, Represents the distance of the (i, j)th element (Baidu has a relatively detailed explanation of dynamic time warping, so there is no need to describe it too much here). The distance formula of DTW measures the similarity of two sequences by calculating the shortest path between them. Specifically, DTW regards two sequences as a two-dimensional matrix, in which each element represents the distance between the data at two time points. Then, through the dynamic programming method, the shortest path from the starting point to the end point is calculated, and this path is the best match between the two sequences.

[0135] 3. When the DTW distance is less than the set threshold (the specific value is set according to the data characteristics of thermal runaway), it means that the data in the front and rear windows are very similar. Therefore, at this time, the step variable S needs to be expanded to twice the original. In this way, the step length of the sliding window becomes longer when it slides next time, thereby reducing the number of similar samples. Similarly, when the DTW distance is greater than the set threshold, it means that the data in the front and rear windows are very different. At this time, the step variable S needs to be reduced to 1 / 2 of the original, so as to ensure that more samples are collected in the area where the battery voltage and temperature change significantly, which is more conducive to the subsequent feature extraction of the neural network.

[0136] 4. Input the extracted training samples into the feature extraction model to obtain battery features.

[0137] Figure 6 A schematic diagram of a thermal runaway prediction method provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the method includes:

[0138] Step 601: Obtain battery characteristics of a battery to be predicted;

[0139] Step 602: Input the battery characteristics into the thermal runaway prediction model to obtain a prediction result output by the thermal runaway prediction model; the prediction result indicates whether the battery has the possibility of thermal runaway.

[0140] In the specific implementation process, the battery features are extracted by using the feature extraction methods described in the above embodiments; after obtaining the battery features, the battery features are input into the thermal runaway prediction model, and the battery features are analyzed by the thermal runaway prediction model to obtain the prediction results. Among them, the thermal runaway prediction model is obtained by pre-training with training samples, and the training samples include training battery features and labels of whether thermal runaway occurs; among them, the training battery features are extracted by using the feature extraction models provided in the above embodiments.

[0141] The embodiment of the present application extracts training samples from battery historical data with time series characteristics through a dynamic sliding window, thereby solving the problem of a large number of similar training samples, and proposes a feature extraction model based on a residual network, which reduces the possibility of gradient disappearance. At the same time, when training the feature extraction model, the embodiment of the present application adjusts the number of residual modules according to the amount of data of the training samples, so that when the amount of data is large, a deeper network structure is achieved to fully extract the characteristics of thermal runaway, and when the amount of data is small, the number of network layers is reduced, the resource consumption of network training is reduced, and the overall feature extraction performance of thermal runaway is improved.

[0142] Figure 7 The present invention provides a structural diagram of a training device for a feature extraction model. The device may be a module, program segment or code on an electronic device. Figure 1 The method embodiment corresponds to and can be executed Figure 1 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, detailed description is appropriately omitted here. The device includes: a historical data acquisition module 701, a sample extraction module 702 and a training module 703, wherein:

[0143] The historical data acquisition module 701 is used to acquire the battery historical data before thermal runaway occurs;

[0144] The sample extraction module 702 is used to extract training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the first two sliding windows;

[0145] The training module 703 is used to train the residual network using training samples to obtain a trained feature extraction model.

[0146] Based on the above embodiment, the sample extraction module 702 is specifically used for:

[0147] Obtaining a first training sample extracted by a current sliding window and a second training sample extracted by a previous sliding window;

[0148] Calculating the similarity between the first training sample and the second training sample;

[0149] Determining the step size of the next sliding window according to the similarity and the step size corresponding to the current sliding window;

[0150] A training sample corresponding to the next sliding window is extracted from the battery history data based on the window size and the step size.

[0151] Based on the above embodiment, the sample extraction module 702 is specifically used for:

[0152] If the similarity is greater than a first threshold, increasing a first preset step length based on the step length corresponding to the current sliding window;

[0153] If the similarity is less than a second threshold, the second preset step length is reduced based on the step length corresponding to the current sliding window.

[0154] Based on the above embodiment, the first training sample includes a plurality of first training data, the second training sample includes a plurality of second training data, and the sample extraction module 702 is specifically used for:

[0155] Calculate and obtain a distance matrix according to the first training data and the second training data;

[0156] Determine the shortest path from the upper left corner element to the lower right corner element of the distance matrix;

[0157] The similarity is determined based on the shortest path.

[0158] Based on the above embodiment, the residual network includes an input module, a first residual module and a second residual module; the training module 703 is specifically used for:

[0159] Obtaining the data volume of the training samples;

[0160] Determine the number of the first residual modules and the second residual modules according to the data amount;

[0161] Generating the residual network based on the number of the first residual modules and the second residual modules;

[0162] The training samples are used as model input, and the features of the training samples are used as labels to train the residual network.

[0163] Figure 8 This is a schematic diagram of a feature extraction device provided in an embodiment of the present application. The device may be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above-mentioned Figure 4 The method embodiment corresponds to and can be executed Figure 4 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, detailed description is appropriately omitted here. The device includes: a battery data acquisition module 801 and a feature extraction module 802, wherein:

[0164] The battery data collection module 801 is used to collect battery data of the battery in a preset time period before the current moment;

[0165] The feature extraction module 802 is used to input the battery data into the feature extraction model to obtain the battery features; wherein the feature extraction model is obtained by training using the training methods described in the above embodiments.

[0166] Fig. 9 This is a schematic diagram of the structure of a thermal runaway prediction device provided in an embodiment of the present application. The device may be a module, program segment or code on an electronic device. It should be understood that the device is similar to the above-mentioned Figure 6 The method embodiment corresponds to and can be executed Figure 6 The various steps involved in the method embodiment and the specific functions of the device can be found in the above description. To avoid repetition, detailed description is appropriately omitted here. The device includes: a feature acquisition module 901 and a prediction module 902, wherein:

[0167] A feature acquisition module, used to acquire battery features of the battery to be predicted; the battery features are extracted by using the feature extraction methods described in the above embodiments;

[0168] The prediction module is used to input the battery characteristics into the thermal runaway prediction model to obtain the prediction results output by the thermal runaway prediction model; the prediction results represent whether the battery has the possibility of thermal runaway.

[0169] Fig.10 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present application, such as Fig.10 As shown, the electronic device includes: a processor (processor) 1001, a memory (memory) 1002 and a bus 1003; wherein,

[0170] The processor 1001 and the memory 1002 communicate with each other via the bus 1003;

[0171] The processor 1001 is used to call the program instructions in the memory 1002 to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining battery history data of the battery before thermal runaway occurs; extracting training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window respectively; and using the training samples to train the residual network to obtain a trained feature extraction model.

[0172] The processor 1001 may be an integrated circuit chip with signal processing capabilities. The processor 1001 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It may implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0173] The memory 1002 may include, but is not limited to, random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0174] The present embodiment discloses a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining battery history data of the battery before thermal runaway occurs; extracting training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window respectively; and using the training samples to train the residual network to obtain a trained feature extraction model.

[0175] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining battery history data before thermal runaway occurs in the battery; extracting training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window respectively; and using the training samples to train the residual network to obtain a trained feature extraction model.

[0176] It should be noted that the above-mentioned electronic device, computer program product, and non-transitory computer-readable storage medium can also be used to execute feature extraction methods and thermal runaway prediction methods.

[0177] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods 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, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

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

[0179] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0180] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0181] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for training a feature extraction model, characterized in that: include: Acquire battery history data before thermal runaway occurs in the battery; the battery history data is a relevant parameter that can characterize whether thermal runaway occurs in the battery; Extracting training samples from the battery history data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the current sliding window and the previous sliding window respectively; Using the training samples to train the residual network to obtain a trained feature extraction model; The residual network includes an input module, a first residual module and a second residual module; the training of the residual network using the training samples includes: Obtaining the data volume of the training samples; Determine the number of the first residual modules and the second residual modules according to the data amount; Generating the residual network based on the number of the first residual modules and the second residual modules; The training samples are used as model input, and the features of the training samples are used as labels to train the residual network.

2. The method according to claim 1, characterized in that The extracting training samples from the battery historical data based on a dynamic sliding window includes: Obtaining a first training sample extracted by a current sliding window and a second training sample extracted by a previous sliding window; Calculating the similarity between the first training sample and the second training sample; Determining the step size of the next sliding window according to the similarity and the step size corresponding to the current sliding window; A training sample corresponding to the next sliding window is extracted from the battery history data based on the window size and the step size.

3. The method according to claim 2, characterized in that The step size of the current sliding window is determined according to the similarity and the step size corresponding to the current sliding window, including: If the similarity is greater than a first threshold, increasing a first preset step length based on the step length corresponding to the current sliding window; If the similarity is less than a second threshold, the second preset step length is reduced based on the step length corresponding to the current sliding window.

4. The method according to claim 2, characterized in that: The first training sample includes a plurality of first training data, the second training sample includes a plurality of second training data, and the calculating the similarity between the first training sample and the second training sample includes: Calculate and obtain a distance matrix according to the first training data and the second training data; Determine the shortest path from the upper left corner element to the lower right corner element of the distance matrix; The similarity is determined based on the shortest path.

5. A feature extraction method, characterized in that: include: Collect battery data of the battery in a preset time period before the current moment; The battery data is input into a feature extraction model to obtain battery features; wherein the feature extraction model is obtained by training using the training method described in any one of claims 1 to 4.

6. A thermal runaway prediction method, characterized in that: include: Obtaining battery features of the battery to be predicted; the battery features are extracted using the feature extraction method as described in claim 5; The battery characteristics are input into a thermal runaway prediction model to obtain a prediction result output by the thermal runaway prediction model; the prediction result indicates whether the battery has the possibility of thermal runaway.

7. A training device for a feature extraction model, characterized in that: include: A historical data acquisition module, used to acquire the battery historical data before thermal runaway occurs in the battery; the battery historical data is a relevant parameter that can characterize whether thermal runaway occurs in the battery; A sample extraction module, used to extract training samples from the battery historical data based on a dynamic sliding window; wherein the window size of the dynamic sliding window is a preset size, and the step size is determined according to the similarity between the training samples corresponding to the first two sliding windows; A training module, used to train the residual network using the training samples to obtain a trained feature extraction model; The residual network includes an input module, a first residual module and a second residual module; the training module is specifically used for: Obtaining the data volume of the training samples; Determine the number of the first residual modules and the second residual modules according to the data amount; Generating the residual network based on the number of the first residual modules and the second residual modules; The training samples are used as model input, and the features of the training samples are used as labels to train the residual network.

8. A feature extraction device, characterized in that: include: A battery data collection module is used to collect battery data of the battery in a preset time period before the current moment; A feature extraction module is used to input the battery data into a feature extraction model to obtain battery features; wherein the feature extraction model is obtained by training using the training method described in any one of claims 1 to 4.

9. A thermal runaway prediction device, characterized in that: include: A feature acquisition module, used to acquire battery features of the battery to be predicted; the battery features are extracted by using the feature extraction method as claimed in claim 5; The prediction module is used to input the battery characteristics into a thermal runaway prediction model to obtain a prediction result output by the thermal runaway prediction model; the prediction result indicates whether the battery has the possibility of thermal runaway.

10. An electronic device, characterized in that: include: processor, memory and bus, wherein, The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 6.

11. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which, when executed by a computer, enable the computer to perform the method according to any one of claims 1 to 6.

12. A computer program product, characterized in that The method comprises computer program instructions, and when the computer program instructions are read and executed by a processor, the method according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Network traffic Hurst parameter estimation method of dynamic step sliding window

    CN113938934A

  • Method and system for detecting abnormal charging and discharging temperature behaviors of battery pack

    CN117951629A