A method, apparatus, device and storage medium for detecting a battery
By using a multi-scale sliding window and encoder-decoder method to generate reconstruction errors, the problem of insufficient data in deep learning models for battery fault identification is solved, thereby improving the accuracy and robustness of battery fault identification and adapting to battery detection under complex working conditions.
Patent Information
- Application Number
- CN202511485812.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-17
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-17
AI Technical Summary
In existing technologies, deep learning models struggle to accurately perform prediction tasks in battery fault identification due to insufficient data volume caused by equipment malfunctions, environmental interference, or network transmission problems, thus affecting the accuracy and safety of battery fault identification.
A multi-scale sliding window is used to divide the time series data, and the reconstruction error at multiple scales is generated by combining the codec. By aggregating and analyzing the multi-scale reconstruction error, abnormal behavior of the battery during charging or discharging is captured, thereby enhancing the robustness and accuracy of the codec.
With limited data, it improves the robustness and accuracy of battery fault identification, enabling more comprehensive capture of abnormal battery behavior, reducing the rate of missed detections of abnormalities and the rate of false detections of normalities, and adapting to battery detection under complex operating conditions.
Smart Images

Figure CN120949072B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of vehicles, in particular to a method and device for detecting a battery, an apparatus and a storage medium. BACKGROUND
[0002] With the rapid development of new energy vehicles, detecting the battery of an electric vehicle has become a key means to ensure the safety of vehicle operation and improve user experience. The battery may degrade in performance or even fail due to complex working conditions during use, and therefore an effective non-destructive method is needed to monitor the battery in real time.
[0003] In the prior art, a deep learning model is used to identify battery failures. Such methods usually rely on a large amount of sensor data. However, in actual applications, due to device failure, environmental interference or network transmission, the amount of data is small, making it difficult for the model to accurately perform the prediction task. SUMMARY
[0004] The embodiments of the present application provide a method and device for detecting a battery, an apparatus and a storage medium, and disclose the following content:
[0005] In a first aspect, a method for detecting a battery is provided, which includes: obtaining time series data; the time series data is used to represent the state of the battery during charging or discharging; based on M different size windows, the time series data is divided into M data sets respectively; wherein one window corresponds to one data set; each data set in the M data sets includes N data segments; M and N are both integers greater than 1; each data set in the M data sets is input into a codec to obtain M reconstructed data sets corresponding to the M data sets respectively; based on the M data sets and the M reconstructed data sets, N reconstruction errors corresponding to the combination of the first to N segments are obtained; wherein the i-th segment combination includes the i-th data segment in each data set in the M data sets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination; and based on the N reconstruction errors, it is determined whether the battery is faulty.
[0006] In the embodiments of the present application, the time series data is divided by using a multi-scale sliding window, and the reconstruction errors at multiple scales are generated in combination with the codec, which can effectively capture the abnormal behavior of the battery during charging or discharging. After reconstruction by the codec, the codec can learn more comprehensive time-dependent relationships. At the same time, based on the aggregation analysis of the multi-scale reconstruction errors, the perception ability of instantaneous fluctuations and long-term trend changes can be enhanced, the multi-granularity cutting of the limited time series data is performed by multi-window division, the multi-dimensional time series features of the time series data are mined, and the utilization rate of the time series data is improved. In the case of small amount of data, the codec has good robustness and accuracy.
[0007] In a possible implementation of the first aspect, the time series data comprises parameters of the battery sorted in a time sequence; the parameters are at least one of voltage, current, temperature and remaining power. Before the time series data is divided into M data sets based on M windows of different sizes respectively, the method further comprises: generating the M windows of different sizes based on a standard deviation and a mean value of a target parameter, wherein the target parameter is any one of voltage, current, temperature and remaining power.
[0008] The application can also adaptively generate windows of different sizes based on fluctuations of the data. By analyzing the statistical characteristics of the target parameter such as the standard deviation and the mean value of the voltage, the window size is dynamically generated with differences, so that the codec can model under the premise of more fitting the actual data distribution. This helps to enhance the adaptability of the codec to data changes under complex conditions.
[0009] In a possible implementation of the first aspect, the size of the first window is determined based on the standard deviation and the mean value of the target parameter, and the size of the reference window; and the size of the first window is adjusted according to M preset coefficients corresponding to the M windows of different sizes to obtain the M windows of different sizes.
[0010] The application can systematically construct a series of windows of different lengths by setting a reference window and scaling or increasing it using a plurality of preset coefficients, covering a variety of time scales from short to long. This approach not only improves the codec's ability to perceive local details and overall trends, but also enhances the codec's stability when faced with discontinuous or noisy data, providing a more comprehensive and reliable information base for subsequent reconstruction error calculation.
[0011] In a possible implementation of the first aspect, for each data set in the M data sets, a first error of each data segment included in the data set is obtained based on the data set and the corresponding reconstructed data set; and the first errors of the M data segments included in the M data sets are aggregated to obtain a first multi-scale reconstruction error corresponding to the combination of the i th segment, and the first multi-scale reconstruction error is the reconstruction error.
[0012] The application calculates the first error under each window by segment, and aggregates it at the same position to form a multi-scale reconstruction error. This approach enables the codec to evaluate the quality of the data from multiple perspectives, thereby enabling the codec to capture both transient fluctuations during charging or discharging and long-term trend changes, significantly improving sensitivity and robustness to abnormal data.
[0013] In a possible implementation of the first aspect, for each of the M data sets, a first error of each data segment included in the data set is obtained based on the data set and the corresponding reconstructed data set; the mean and the variance of all data segments output by the codec are obtained; for each data segment, a second error of each data segment is obtained based on the mean and the variance; the first errors of the M i-th data segments included in the M data sets are aggregated to obtain a first multi-scale reconstruction error corresponding to the i-th segment combination; the second errors of the M i-th data segments included in the M data sets are aggregated to obtain a second multi-scale reconstruction error corresponding to the i-th segment combination; and the first multi-scale reconstruction error and the second multi-scale reconstruction error are aggregated to obtain a reconstruction error corresponding to the i-th segment combination.
[0014] The present application can more comprehensively depict the distribution characteristics of data by introducing the mean and the variance to calculate the second error and jointly aggregate the first error and the second error. The combination of the first error and the second error can more accurately determine whether the data is within a normal range, and is particularly suitable for scenarios with noise or non-stationary characteristics, thereby improving the generalization ability and detection performance of the codec.
[0015] In a possible implementation of the first aspect, the N reconstruction errors are sequentially compared with the first threshold value; and in a case where there is a reconstruction error greater than or equal to the threshold value among the N reconstruction errors, it is determined that the battery is faulty.
[0016] The present application can quickly determine whether there is an anomaly by setting the first threshold value and comparing the reconstruction error with the first threshold value. This method is simple and efficient.
[0017] In a possible implementation of the first aspect, the first threshold value is generated based on historical sequence data. The method can further include: generating P reconstruction errors based on the historical sequence data; calculating an index value corresponding to each of the P reconstruction errors; P is an integer greater than 1; and taking a target reconstruction error as the first threshold value, where the target reconstruction error is a reconstruction error corresponding to a maximum index value.
[0018] The present application can reduce the anomaly omission rate and the normal misjudgment rate and improve the anomaly detection accuracy based on the reconstruction error by dynamically generating the first threshold value based on the historical sequence data.
[0019] In a possible implementation of the first aspect, the index value is an F1 score, and the method includes: taking a j-th reconstruction error in the P reconstruction errors as a reference error, and comparing the P reconstruction errors with the j-th reconstruction error, 1≤j≤P; determining an accuracy and a recall rate based on a comparison result; and calculating an F1 score corresponding to the j-th reconstruction error based on the accuracy and the recall rate.
[0020] The application takes any jth error in P reconstruction errors as a reference, and calculates the accuracy, recall rate and corresponding F1 score by comparing with the remaining errors. All candidate references can be traversed to comprehensively cover possible error discrimination scenarios in historical data, and ensure that the first threshold corresponding to the maximum F1 score finally selected is the result of sufficient comparison and verification, which is the optimal result for discriminating historical data and balances precision and recall, avoiding threshold deviation caused by a single reference.
[0021] In a possible implementation of the first aspect, the method further includes: dividing the historical sequence data into M training data sets based on M windows of different sizes respectively; wherein one window corresponds to one training data set; each of the M training data sets includes P data segments; inputting each of the M training data sets into the encoder-decoder to obtain M reconstruction training data sets corresponding to the M training data sets respectively; obtaining P reconstruction errors corresponding to the first to P segment combinations based on the M training data sets and the M reconstruction training data sets; the kth segment combination includes the kth data segment in each of the M training data sets, and 1≤k≤P.
[0022] The application divides multiple groups of training data sets through windows of different sizes, which can cover the time scale characteristics of the historical sequence data. At the same time, the reconstruction error is calculated according to the segment combination, which integrates the results of multi-window training and focuses on the consistency error performance of each corresponding segment, so that the P reconstruction errors finally obtained can more comprehensively reflect the real reconstruction of the data under different scales, and provide more reliable error basis for subsequent threshold selection.
[0023] In a second aspect, a device for detecting a battery is provided, and the device includes:
[0024] A data acquisition module is configured to acquire time series data, and the time series data is used to represent the state of the battery during charging or discharging;
[0025] A data division module is configured to divide the time series data into M data sets based on M windows of different sizes respectively; wherein one window corresponds to one data set; each of the M data sets includes N data segments; M and N are both integers greater than 1;
[0026] An input module is configured to input each of the M data sets into an encoder-decoder to obtain M reconstruction data sets corresponding to the M data sets respectively;
[0027] an error calculation module, configured to obtain reconstruction errors of the first to the Nth segment combinations based on the M data sets and the M reconstructed data sets, wherein the i th segment combination comprises an i th data segment in each data set of the M data sets, 1≤i≤N, and the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination;
[0028] a fault analysis module, configured to determine whether the battery is faulty based on the reconstruction errors of the first to the Nth segment combinations.
[0029] In a third aspect, a device for detecting a battery is provided, and the device comprises:
[0030] one or more processors; and a memory for storing one or more programs, which, when executed by the one or more processors, cause the device to implement the method of the first aspect and any one of the methods.
[0031] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor of a computer, the computer executes the method of the first aspect and any one of the methods.
[0032] The method for detecting a battery provided by the embodiments of the present application can divide the time series data of the battery through a multi-scale sliding window, and generate reconstruction errors at different scales by using a codec. The method can more comprehensively capture abnormal behaviors that may occur in the charging or discharging process of the battery. Meanwhile, the application of multi-scale errors and dynamic thresholds in cooperation can effectively improve the detection accuracy of the abnormal battery. BRIEF DESCRIPTION OF DRAWINGS
[0033] Figure 1 is a flowchart of a method for detecting a battery provided by the embodiments of the present application;
[0034] Figure 2 is a flowchart of another method for detecting a battery provided by the embodiments of the present application;
[0035] Figure 3 is a schematic diagram of a method for detecting a battery provided by the embodiments of the present application;
[0036] Figure 4 is a structural schematic diagram of a device for detecting a battery provided by the embodiments of the present application;
[0037] Figure 5 is a structural schematic diagram of a device for detecting a battery provided by the embodiments of the present application. DETAILED DESCRIPTION
[0038] The present application can be implemented or applied in other different specific embodiments, and various modifications or changes can be made to the details of the application based on different views and applications without departing from the spirit of the application. It should be understood that the preferred embodiments are only for illustrating the application, but not for limiting the protection scope of the application.
[0039] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the application in a schematic manner, and only the components related to the application are shown in the diagrams, not the number, shape and size of the components when actually implemented. The actual implementation of each component may be a random change in type, number and proportion, and the component layout pattern may be more complex.
[0040] With the rapid development of new energy vehicles, detecting the battery of electric vehicles has become a key means to ensure vehicle operation safety and improve user experience. The battery will degrade in performance or even fail due to complex working conditions during use, so an effective non-destructive method is needed to detect the battery in real time.
[0041] In the prior art, a deep learning model is used to detect the battery. Such methods usually rely on a large amount of high-quality and continuous sensor data. However, in actual applications, due to equipment failure, environmental interference or network transmission problems, data often has missing or incomplete situations, resulting in less data, making it difficult for the model to accurately perform the prediction task. Therefore, how to improve the performance of the deep learning model in a complex data environment, improve the accuracy of fault identification, and reduce safety accidents caused by battery failure has important theoretical value and practical significance.
[0042] The embodiments of the present application provide a method, device and equipment for detecting a battery and a storage medium, which can improve the identification accuracy of battery failure. The embodiments of the present application divide time series data by using a multi-scale sliding window, and obtain reconstruction errors at multiple scales based on a codec, which can effectively capture abnormal data of the battery during charging or discharging. Since different data segments are extracted by each window, the codec can learn more comprehensive time-dependent relationships, enhance the generalization ability of the codec, and have good robustness and accuracy in the case of small amount of data, thereby improving the robustness and accuracy of fault identification.
[0043] A method for detecting a battery provided by the embodiments of the present application will be described below in combination with the drawings and embodiments. The method for detecting a battery provided by the embodiments of the present application can be executed by a server, which can interact with a vehicle, such as a communication module in the vehicle. Figure 1A method for detecting a battery is provided in the embodiments of the present application, as shown in the following formula (1). Figure 1 The method comprises the following steps.
[0044] In S101, time series data is acquired.
[0045] The time series data is initial time series data, i.e., time series data that has not been processed.
[0046] The time series data is used to represent the state of the battery during charging or discharging. The time series data refers to a set of data points arranged in chronological order, and records the parameters of the battery at each time point during charging or discharging. The parameters of the battery may include at least one of voltage, current, temperature, and state of charge (SOC), for example. In the following, the time series data records the voltage, current, temperature, and state of charge of the battery at each time point during discharging is taken as an example to introduce the present solution. It should be understood that the method for detecting a battery provided in the embodiments of the present application is also applicable to time series data that records the parameters of the battery at each time point during discharging. That is, the method for detecting a battery provided in the embodiments of the present application is applicable not only to fault detection during charging, but also to fault detection during discharging.
[0047] In some embodiments, the parameters of the battery may also include other parameters collected by using new sensors, including but not limited to strain, expansion force, electrolyte concentration, sound wave propagation characteristics in the battery, etc.
[0048] For example, let B represent the time series data, then . Wherein, is the data recorded at each time point. may be represented as . Wherein, is the voltage of the battery at the mth time point. is the current of the battery at the mth time point. is the state of charge of the battery at the mth time point. is the temperature of the battery at the mth time point.
[0049] In some embodiments, after the vehicle identifies the start of charging, the voltage, current, temperature, and state of charge of the battery at each collection time point during charging are collected at a preset frequency, such as 0.5 seconds / time, to obtain the time series data.
[0050] In some embodiments, the server can obtain the time series data from the vehicle. In other embodiments, the server can obtain the historical time series data of the vehicle from a preset storage location. That is, the embodiments of the present application do not limit the specific way in which the server obtains the time series data. The server can obtain the time series data in real time, or read the time series data from a historical database.
[0051] In some embodiments, after obtaining the time series data, the server can preprocess the time series data. The preprocessing includes, but is not limited to, standardization. Standardization is used to convert the voltage, current, temperature and remaining power in the time series data into data conforming to the standard normal distribution. For example, using formula (1), the voltage, current, temperature and remaining power are standardized respectively.
[0052] , formula (1).
[0053] wherein Z is the processed data, X is the original data, is the mean of the original data, is the standard deviation of the original data. It should be understood that formula (1) is used for standardization processing of voltage, current, temperature and remaining power. The data after standardization processing has zero mean and unit standard deviation. Ensuring that different data have the same scale is conducive to improving the stability and convergence speed of the encoder-decoder. Standardization processing not only accelerates the training of the encoder-decoder, but also improves the robustness of the encoder-decoder to abnormal values.
[0054] S102, based on M different sizes of windows, the time series data is divided into M data sets respectively.
[0055] Window is a fixed time length used to segment data in sequence analysis. Each window defines a continuous time range, such as 3 minutes, 5 minutes or 7 minutes, etc. In the present application, the window can be a sliding window, for example. The sliding window refers to a window that slides on the time series with a fixed step size.
[0056] Generally, a time series data can be divided into a data set by using a window, and the divided data set includes multiple data segments divided according to the size of the window. In an embodiment of the present application, the time series data is divided into M data sets according to M windows of different sizes. M is an integer greater than 1. Taking M equal to 3 as an example, for example, the size of window A is 15 seconds, the size of window B is 31 seconds, and the size of window C is 62 seconds. The server can divide the time series data into multiple data segments using window A, and the multiple data segments form a data set A corresponding to window A. The server can divide the time series data into multiple data segments using window B, and the multiple data segments form a data set B corresponding to window B. The server can divide the time series data into multiple data segments using window C, and the multiple data segments form a data set C corresponding to window C. That is, the server divides the time series data into data set A using window A, the server divides the time series data into data set B using window B, and the server divides the time series data into data set C using window C. That is, the server divides the time series data into M data sets corresponding to M windows of different sizes, and one window corresponds to one data set.
[0057] wherein the data set may, for example, be a collection of data segments, and the data set may, for example, be divided using a window. , wherein n is the total length of the time series data, k is the sliding step of the window, and m is the length of the window.
[0058] In some embodiments, the sliding step of the window is adjusted so that the number of data segments divided according to the M windows is consistent. That is, the number of data segments included in each of the M data sets is consistent, for example, each of the M data sets includes N data segments. N is an integer greater than 1.
[0059] S103, input each of the M data sets into a codec to obtain M reconstructed data sets corresponding to the M data sets.
[0060] The codec is a kind of neural network model composed of an encoder and a decoder. The encoder is responsible for mapping the input data to the latent space, and the decoder is responsible for reconstructing the data from the latent space. The present application adopts a combination of a variational auto encoder (VAE) and a Transformer model architecture to construct a codec with time series modeling capability for generating reconstructed data. In the present application, the codec adopts a Transformer-based codec structure, and introduces a variational inference mechanism in latent representation learning to form a variational Transformer architecture for learning multi-scale latent representations of time series.
[0061] The process of coding and decoding can be summarized as follows: using an encoder to encode the input data into reconstructed features, and then using a decoder to decode the reconstructed features into reconstructed data. The coding and decoding process will be introduced in detail in the following text, which will not be repeated here.
[0062] Among them, the reconstructed feature refers to the latent space representation obtained after the encoder is processed, which can also be called latent variable. The reconstructed feature reflects the essential features and internal laws of the input data. Through the decoder, the reconstructed feature can be restored to the output data similar to the input data, i.e. reconstructed data. The difference between the reconstructed data and the input data constitutes the reconstruction error, which is an important indicator for measuring whether the data is normal.
[0063] In the present application, each data set in the M data sets is input into the codec to obtain M reconstructed data sets corresponding to the M data sets. For example, data set A is input into the codec to obtain reconstructed data set A` corresponding to data set A. Data set B is input into the codec to obtain reconstructed data set B` corresponding to data set B. Data set C is input into the codec to obtain reconstructed data set C` corresponding to data set C. Each reconstructed data set includes reconstructed data segments corresponding to data segments. For example, data set A includes the first data segment, such as data segment A1, the second data segment, such as data segment A2, …, and the Nth data segment, such as data segment AN. The corresponding reconstructed data set A` also includes one-to-one N reconstructed data segments, such as reconstructed data segment A1`, reconstructed data segment A2`, …, and reconstructed data segment AN`. Among them, the reconstructed data segment is obtained by coding and decoding the corresponding data segment based on the codec, that is, the data segment is input into the codec to obtain the corresponding reconstructed data segment.
[0064] In other words, after a dataset is input into the codec, the codec encodes and decodes the N data segments contained in the dataset and outputs N reconstructed data segments corresponding to the N data segments. These N reconstructed data segments constitute the reconstructed dataset. The codec also outputs N parameters corresponding to the N data segments. The parameters define the distribution of the reconstructed features corresponding to the data segments. The parameters include variance and mean. The mean defines the center point of the distribution of the generated reconstructed features corresponding to the data segments. The variance defines the range of uncertainty in the distribution of the generated reconstructed features corresponding to the data segments. It describes the extent to which the reconstructed features can deviate from the center and still be considered valid.
[0065] In other words, by inputting each of the M datasets into the codec, we can obtain M reconstructed datasets and M sets of parameters, each corresponding to one of the M datasets. A reconstructed dataset consists of N reconstructed data segments, each corresponding to one of the N data segments contained in the corresponding dataset. Each set of parameters consists of N parameters, each corresponding to one of the N data segments contained in the corresponding dataset. These parameters include the mean and variance.
[0066] S104: Based on M datasets and M reconstructed datasets, obtain N reconstruction errors corresponding to the combination of the 1st to Nth segments.
[0067] The server obtains N reconstruction errors based on M datasets and M reconstructed datasets. These N reconstruction errors correspond one-to-one with the combinations of the 1st to Nth segments. The method for obtaining the N reconstruction errors corresponding to the combinations of the 1st to Nth segments will be described below with specific examples, and will not be elaborated here.
[0068] In some embodiments, a fragment combination consists of data fragments with the same index from M datasets. For example, the i-th fragment combination consists of the i-th data fragment from each of the M datasets. i takes values in [1, 2, 3, ..., N], i.e., 1 ≤ i ≤ N.
[0069] For example, taking M=3 as an example, the data set A includes a first data segment such as data segment Al, a second data segment such as data segment A2, and an Nth data segment such as data segment AN. The data set B includes a first data segment such as data segment Bl, a second data segment such as data segment B2, and an Nth data segment such as data segment BN. The data set C includes a first data segment such as data segment Cl, a second data segment such as data segment C2, and an Nth data segment such as data segment CN. Correspondingly, a first segment combination is composed of three first data segments included in the three reconstructed data sets, for example, the first segment combination is composed of data segment Al, data segment Bl, and data segment Cl. The second segment combination is composed of data segment A2, data segment B2, and data segment C2. In this way, the Nth segment combination is composed of data segment AN, data segment BN, and data segment CN.
[0070] The reconstruction error corresponding to the segment combination is used to indicate the quality of the data segments included in the corresponding segment combination. For example, the segment combination includes data segments with the same sequence number in the M data sets, and the corresponding reconstruction error is used to indicate the quality of the data segments with the same sequence number in the M data sets. For example, the reconstruction error corresponding to the first segment combination in the foregoing is used to indicate the quality of data segment Al, data segment Bl, and data segment Cl. Wherein, the greater the reconstruction error, the worse the quality of the data segments included in the segment combination; the smaller the reconstruction error, the better the quality of the data segments included in the segment combination.
[0071] In S105, whether the battery is faulty is determined based on the N reconstruction errors.
[0072] In some embodiments, whether the battery is faulty is determined based on the N reconstruction errors and a first threshold. Wherein, the first threshold can be pre-set in the server, for example. For example, the N reconstruction errors are compared with the first threshold in sequence, whether the corresponding segment combination is abnormal is determined, and whether the battery is faulty is determined based on the judgment result of the segment combination. For example, in the case that the reconstruction error of the segment combination is greater than or equal to the first threshold, it is determined that the segment combination is abnormal. In the case that the reconstruction error of the segment combination is less than the first threshold, it is determined that the segment combination is normal. In the case that there is an abnormal segment combination, it is determined that the battery is faulty. That is, in the case that there is a reconstruction error greater than or equal to the first threshold in the N reconstruction errors, it is determined that the battery is faulty.
[0073] In other embodiments, the first threshold is generated based on historical sequence data. Wherein, the historical sequence data is time sequence data acquired before this detection.
[0074] For example, based on the historical sequence data, P reconstruction errors corresponding to the historical sequence data are generated. P is an integer greater than 1. And an index value corresponding to each of the P reconstruction errors is calculated. The target reconstruction error is taken as the first threshold, where the target reconstruction error is the reconstruction error corresponding to the maximum index value. Specifically, a dynamic threshold selection mechanism is adopted to traverse the P reconstruction errors, and for each reconstruction error, its corresponding index value is calculated. Then, from the P index values, the reconstruction error corresponding to the maximum index value is selected as the first threshold. This dynamic threshold selection mechanism can effectively cope with the changes of the parameters of the battery under different working conditions, thereby improving the adaptability and robustness of the detection method. The index value may be, for example, the F1 score.
[0075] In this application, the index value is used to evaluate the abnormal detection effect under different thresholds. Determining the threshold based on the index value can avoid the misjudgment problem caused by relying on a single threshold, and improve the robustness of the model. The index value not only reflects the prediction ability of the model, but also can achieve a good balance between high precision and high recall rate, thereby adapting to the complex and variable battery charging environment.
[0076] Hereinafter, the present scheme is introduced taking the index value as the F1 score. For example, as shown in Figure 2 S105 can include S201-S203.
[0077] S201, based on M different sizes of windows, the historical sequence data is divided into M training data sets respectively.
[0078] M different sizes of windows are adopted to divide the historical sequence data into M training data sets respectively. Each window corresponds to a training data set. Each training data set in the M training data sets includes P data segments. This implementation is similar to S102, please refer to the previous introduction, and will not be repeated here.
[0079] S202, each training data set in the M training data sets is input into the codec to obtain M reconstruction training data sets corresponding to the M training data sets.
[0080] Each training data set in the M training data sets is input into the codec, and the codec reconstructs each data segment in the training data set. In this way, M reconstruction training data sets corresponding to the M training data sets can be obtained. This implementation is similar to S103, please refer to the previous introduction, and will not be repeated here.
[0081] S203, based on the M training data sets and the M reconstruction data sets, P reconstruction errors corresponding to the combination of the first to the P segments are obtained.
[0082] The kth fragment combination includes the kth data fragment in each training data set in the M training data sets, 1≤k≤P. This implementation is similar to S104, please refer to the foregoing description, and will not be repeated.
[0083] S204, calculate the F1 score corresponding to the P reconstruction errors.
[0084] The F1 score takes into account the precision and recall, and balances the weight between the precision and the recall by harmonic mean.
[0085] In some embodiments, the F1 score corresponding to the P reconstruction errors is calculated in the following way. Specifically, the jth reconstruction error in the P reconstruction errors is taken as the reference error, and the P reconstruction errors are compared with the jth reconstruction error in turn. And based on the comparison result, the F1 score corresponding to the jth reconstruction error is determined. j takes values in [1, 2, …, N] in turn, i.e. 1≤j≤P. Wherein, the reference error refers to a reference value selected from the set of all reconstruction errors, used to measure the distribution of the remaining reconstruction errors relative to the reference error.
[0086] For example, the jth reconstruction error in the P reconstruction errors is taken as the reference error, and the P reconstruction errors are compared with the jth reconstruction error. In the case of reconstruction error less than the jth reconstruction error, a first label is added to the fragment combination corresponding to the reconstruction error. In the case of reconstruction error greater than or equal to the jth reconstruction error, a second label is added to the fragment combination corresponding to the reconstruction error. Wherein, the first label may be, for example, a True label, used to indicate that the labeled fragment combination is normal. The second label may be, for example, a False label, used to indicate that the labeled fragment combination is abnormal.
[0087] The precision and recall are calculated. For example, the precision and recall are calculated by using formula (2) and formula (3).
[0088] , formula (2).
[0089] , formula (3).
[0090] P = TP / (TP + FP) R = TP / (TP + FN) F1 = 2 * P * R / (P + R) wherein, P is the precision. R is the recall. TP represents the number of combinations of segments whose actual label is normal and whose predicted result is also normal; FP represents the number of combinations of segments whose actual label is abnormal but whose predicted result is normal; FN represents the number of combinations of segments whose actual label is normal but whose predicted result is abnormal. It should be noted that the P data segments generated based on the historical sequence data are all provided with pre-labeled labels, which directly indicate whether the corresponding data segments belong to normal data segments or abnormal data segments, and provide a basis for determining the precision, recall and F1 score.
[0091] Based on the precision and the recall, the F1 score corresponding to the jth reconstruction error is calculated. For example, the F1 score corresponding to the jth reconstruction error is calculated by using formula (4).
[0092] , formula (4).
[0093] wherein, The function represents the F1 score calculated based on the reconstruction error as the reference error.
[0094] S205, taking the target reconstruction error as the first threshold.
[0095] wherein, the target reconstruction error is the reconstruction error corresponding to the maximum F1 score. By calculating the F1 score corresponding to each reconstruction error, and taking the reconstruction error corresponding to the maximum F1 score as the first threshold.
[0096] S206, determining whether the battery is faulty based on the first threshold and the N reconstruction errors.
[0097] For example, the N reconstruction errors are compared with the first threshold. In the case that there is a reconstruction error greater than or equal to the first threshold among the N reconstruction errors, it is determined that the battery is faulty. In the case that there is no reconstruction error greater than or equal to the first threshold among the N reconstruction errors, it is determined that the battery is normal.
[0098] In the embodiments of the present application, the dynamic threshold can automatically adapt to the data characteristics in different charging scenarios, thereby reducing the missed detection and false detection phenomenon, effectively improving the robustness and generalization ability of the anomaly detection, and further more accurately determining whether the battery is faulty.
[0099] It can be seen that the method for detecting a battery provided in the embodiments of the present application can effectively capture abnormal behaviors of the battery in the charging process by dividing the time series data using the multi-scale sliding window and generating reconstruction errors at multiple scales in combination with the encoder-decoder. Since different local features are extracted by each window, the encoder-decoder can learn more comprehensive time-dependent relationships after reconstruction. Meanwhile, based on the aggregation analysis of the multi-scale reconstruction errors, the perception ability of instantaneous fluctuations and long-term trend changes can be enhanced, thereby improving the robustness and accuracy of the anomaly detection.
[0100] The method for obtaining the N reconstruction errors corresponding to the first to N segment combinations will be described below in combination with specific embodiments.
[0101] In some embodiments, the reconstruction error of the segment combination is obtained by aggregating the first errors of the data segments with the same sequence number in the M data sets.
[0102] For example, the server first obtains the first errors of all the data segments included in the M data sets, i.e., the first errors of the MxN data segments, and then aggregates the first errors of the data segments with the same sequence number to obtain the reconstruction errors of the respective segment combinations. The first error is used to indicate the difference between the data segment input into the encoder-decoder and the reconstructed data segment output by the encoder-decoder. The first error reflects the reconstruction capability of the encoder-decoder for the data segment. By calculating the error for each data segment, local abnormal features can be captured more finely, and the detection accuracy can be improved. The first error can be a mean squared error (MSE), a mean absolute error (MAE), or a Huber error, etc. Hereinafter, the first error is taken as the Huber error for description.
[0103] Specifically, for each data set in the M data sets, the server can obtain the first errors of the N data segments included in the data set based on the data set and the corresponding reconstructed data set. Taking the data set A, the data set B and the data set C in the foregoing as examples, the server can obtain the first errors of the N data segments included in the data set A based on the data set A and the corresponding reconstructed data set A'. The server can obtain the first errors of the N data segments included in the data set B based on the data set B and the corresponding reconstructed data set B'. The server can obtain the first errors of the N data segments included in the data set C based on the data set C and the corresponding reconstructed data set C'.
[0104] For example, for a data set, the server compares each data segment in the data set with the reconstructed data segment with the same sequence number in the reconstructed data set one by one, and calculates the first error between the data segment and the corresponding reconstructed data segment using formula (5).
[0105] Equation (5).
[0106] where δ is a hyper-parameter. is the reconstructed data, is the input data. is the first error.
[0107] The method of calculating the first error of the N data segments included in the data set A is introduced in combination with Equation (2) taking the data set A as an example. The data set A includes data segments A1 to AN, and the corresponding reconstructed data set A` includes corresponding reconstructed data segments A1` to AN`. Taking one data segment, for example, the i-th data segment, as an example, the method of calculating the first error of one data segment is introduced. It should be understood that the first error of each data segment in the M data sets can be calculated by this method.
[0108] For example, the i-th data segment in the data set A may be , and the corresponding i-th data segment in the reconstructed data set A` may be The server calculates the first error of each data element by element using Equation (2), such as calculating the first error between each corresponding position value in the two matrices using Equation (2). Then, the server takes the average of the first errors of the multiple data included in the matrix as the first error of the i-th data segment.
[0109] Based on the above method, the server can obtain the first error of the N data segments included in each data set in the M data sets. That is, the server can obtain the first error of MxN data segments. Then, the server can aggregate the first errors of the data segments with the same serial number in the M data sets to obtain the first multi-scale reconstruction error of the segment combination, which is the reconstruction error of the segment combination. For example, the reconstruction error of the i-th data segment is obtained by aggregating the first errors of the M i-th data segments included in the M data sets. Wherein, the aggregation can be mean, weighted mean, median, mode, etc. Hereinafter, taking the aggregation as the weighted mean as an example, the present scheme is introduced.
[0110] For example, the reconstruction error of the i-th segment combination is × the first error of the i-th data segment in the first data set + × the first error of the i-th data segment in the second data set + … + × the first error of the i-th data segment in the M-th data set. Wherein, , , …, is a weight coefficient, which can be preset in the server. That is, the server aggregates the first errors of the Mth i data segments included in the M data sets to obtain the first multi-scale reconstruction error corresponding to the i segment combination, and the first multi-scale reconstruction error is the reconstruction error.
[0111] Taking data set A, data set B and data set C as an example, the reconstruction error of the 1st segment combination is × the first error of the 1st data segment in data set A + αi × the first error of the 1st data segment in data set B + αi × the first error of the 1st data segment in data set C. The reconstruction error of the 2nd segment combination is × the first error of the 2nd data segment in data set A + αi × the first error of the 2nd data segment in data set B + αi × the first error of the 2nd data segment in data set C. Similarly, the reconstruction error of the Nth segment combination is × the first error of the Nth data segment in data set A + αi × the first error of the Nth data segment in data set B + αi × the first error of the Nth data segment in data set C. Wherein, the calculation method of the first error of each data segment can refer to the introduction in the foregoing, which will not be repeated here.
[0112] That is, the first errors of the data segments at the same position in different data sets are aggregated to form the corresponding first multi-scale reconstruction error. The aggregation operation enables the codec to not only focus on the abnormal situation of a single data segment, but also combine the information of multiple data segments to enhance the recognition ability.
[0113] In the embodiments of the present application, the first error is calculated for each data segment, and the first multi-scale reconstruction error is further aggregated. The processing capability of the codec for time series data can be enhanced, and thus the accuracy and robustness of battery fault detection can be improved.
[0114] In other embodiments, the reconstruction error of the segment combination is obtained by aggregating the first errors and the second errors of the data segments with the same sequence number in the M data sets. The first error of the data segment is as described above, which will not be repeated here.
[0115] The second error is used to measure the difference between the distribution of the latent variable and the standard normal distribution, so as to constrain the learning process of the codec and prevent the codec from overfitting or generating unreasonable prediction distribution. The second error may be, for example, a KL divergence error, a cross-entropy loss error, a regularization error, etc. In the embodiments of the present application, the second error is a KL divergence error, which can be calculated by formula (6).
[0116] , formula (6).
[0117] wherein, is the second error, is the mean of the latent variable in the nth dimension, is the variance of the latent variable in the nth dimension, and Q is the dimension of the latent variable. As discussed above, when the data set is input into the codec, the codec can output not only the corresponding reconstructed data set but also a set of parameters corresponding to the N data segments, including the mean and the variance. The mean can include the mean in the Q dimensions, and the variance can include the variance in the Q dimensions.
[0118] In some embodiments, the server can first obtain the M sets of parameters output by the codec, including the mean and the variance of all data segments in the M data sets. That is, M sets of parameters corresponding to the M data sets are obtained. Then, for each data segment, the second error of the data segment can be calculated using formula (6). That is, for all data segments included in the M data sets, the second error of each data segment can be calculated using formula (6).
[0119] Then, the server can aggregate the second errors of the data segments with the same sequence number in the M data sets to obtain the second multi-scale reconstruction error of the segment combination. That is, the second multi-scale reconstruction error of the ith data segment is the aggregation of the second errors of the M ith data segments included in the M data sets.
[0120] For example, the second multi-scale reconstruction error of the ith segment combination is × the second error of the ith data segment in the first data set + × the second error of the ith data segment in the second data set + … + × the second error of the ith data segment in the Mth data set. Wherein, , , …, is a weight coefficient, which can be preset in the server.
[0121] Taking data set A, data set B and data set C as an example, the second multi-scale reconstruction error of the first segment combination is × the second error of the first data segment in data set A + × the second error of the first data segment in data set B + × the second error of the first data segment in data set C. The second multi-scale reconstruction error of the second segment combination is × the second error of the second data segment in data set A + the second error of the 2nd data segment in dataset B the second error of the 2nd data segment in dataset C. Similarly, the second multi-scale reconstruction error of the Nth segment combination is the second error of the Nth data segment in dataset A the second error of the Nth data segment in dataset B the second error of the Nth data segment in dataset C. Wherein, the calculation method of the second error of each data segment can refer to the foregoing description, which will not be repeated here.
[0122] After obtaining the first multi-scale reconstruction error and the second multi-scale reconstruction error of the segment combination, the server can aggregate the first multi-scale reconstruction error and the second multi-scale reconstruction error of the segment combination to obtain the reconstruction error of the segment combination. For example, the reconstruction error of the ith segment combination is the first multi-scale reconstruction error of the ith segment combination the second multi-scale reconstruction error of the ith segment combination. Wherein, and are weight coefficients. In this way, the influences of short-term accuracy, long-term trend and distribution constraint can be dynamically balanced.
[0123] In some implementations, before dividing the time series data based on M windows of different sizes, the M windows can be generated first.
[0124] For example, as discussed in the foregoing, the time series data includes parameters of the battery sorted in time series. The parameters are at least one of voltage, current, temperature and remaining power. Before dividing the time series data into M data sets based on M windows of different sizes, the above method further includes: generating M windows of different sizes based on the standard deviation and mean value of the target parameter. Wherein, the target parameter is any one of the parameters. That is, M windows of different sizes are generated according to the standard deviation and mean value of at least one of the parameters of voltage, current, temperature and remaining power. By analyzing the statistical characteristics of the standard deviation and mean value of the target parameter such as voltage, the window size with difference is dynamically generated so that the codec can select the appropriate window size for data with different volatility.
[0125] For example, the server first determines the size of the first window based on the standard deviation and mean value of the target parameter and the size of the reference window. For example, the server determines the size of the first window based on formula (7).
[0126] , formula (7).
[0127] wherein, is the size of the first window, i.e., the size of the adaptively adjusted window. is the size of the reference window, e.g., the size of the window in the default case, which can be set to a certain fixed value. is the standard deviation of the parameter, e.g., the standard deviation of voltage, current, remaining power, or temperature, used to represent the volatility of the data. is the mean of the data, e.g., the mean of voltage, current, remaining power, or temperature. It should be understood that the above mean and standard deviation are based on the unstandardized data. That is, before the data is standardized, the mean and standard deviation based on the data can be generated first, and M windows of different sizes are generated. is an adjustment coefficient used to control the influence of volatility on the size of the window, which is usually positive and can be adjusted according to specific circumstances. Higher volatility (larger standard deviation) will result in an increase in the size of the first window, so that smaller windows are used to capture rapid changes in the data more finely. Lower volatility (smaller standard deviation) will result in a decrease in the size of the first window, so that larger windows are used to capture long-term trends in the data.
[0128] Then, the size of the first window is adjusted according to M preset coefficients to obtain M windows of different sizes. For example, w1=k1×w adapted ; w2=k2×w adapted ; …; w M =k M ×w adapted . Wherein, , , …, is the size of the M windows. , , …, is the preset coefficient.
[0129] In some other embodiments, the size of the M windows can be determined by grid search or validation set performance optimization. Please refer to the prior art, which will not be described here.
[0130] The present application can systematically construct a series of windows of different lengths by setting a reference window and scaling it using multiple preset coefficients, covering a variety of time scales from short to long. This approach improves the ability of the codec to perceive local details and overall trends.
[0131] Next, a method for detecting a battery provided by an embodiment of the present application will be described in conjunction with the electric vehicle charging scenario.
[0132] In recent years, the new energy vehicle industry has made significant progress in addressing climate change, promoting green development, and achieving sustainable economic growth. With increasing policy support and growing market demand, China's new energy vehicle technology has improved significantly, with production and sales ranking first in the world for several consecutive years. In this context, China has played a leading role in the commercialization, standardization, and international cooperation of new energy vehicles, becoming a key driving force for the transformation of the global automotive industry. However, as electric vehicles become more widespread, problems during operation are increasingly evident. The high energy density and complex manufacturing process of electric vehicle batteries pose challenges to their lifespan and can cause serious safety incidents such as fires. These issues pose challenges to vehicle safety, economy, and user satisfaction. Therefore, early warning and remaining life prediction of electric vehicle faults are of great and far-reaching significance to ensure safe operation, reduce maintenance costs, and optimize user experience.
[0133] Currently, traditional battery health assessment methods rely on testing the chemical and physical properties of the battery. However, such destructive testing often causes damage to the battery, rendering it unusable, and thus causing significant economic losses for consumers and automakers. Therefore, how to use non-destructive methods to monitor the performance and health status of the battery in real time has become a research hotspot in electric vehicle battery management systems. By monitoring the voltage, current, temperature, and other parameters of the battery during different charging stages, and combining data analysis techniques, the health status of the battery can be assessed non-destructively, providing real-time support for electric vehicle battery management. Therefore, data analysis-based battery monitoring methods are gradually becoming a gentle and effective alternative. With the development of deep learning technology, deep learning technology combined with data analysis has shown strong data fitting and prediction capabilities, especially for complex nonlinear relationship modeling. However, existing electric vehicle battery fault detection and remaining capacity prediction models are mainly based on supervised learning, and the training of such models usually relies on a large amount of high-quality data. However, sensor data may be missing or incomplete due to equipment failure, environmental interference, or network problems, resulting in a small amount of data. The model's high dependence on complete data makes it difficult to effectively perform fault detection and capacity prediction in these situations. Data for different fault types often exhibit an imbalance. For some rare faults, the model's prediction accuracy is insufficient due to the small amount of data. In addition, the battery data collected in the laboratory is usually continuous, while the battery data in actual applications is often discontinuous. These problems limit the effective application of deep learning methods in handling complex battery system data. Therefore, how to overcome the problems of data imbalance and discontinuity, improve the performance of deep learning in complex data environments, and reduce safety accidents caused by battery faults has important theoretical value and practical significance.
[0134] Related technology 1 builds a data enhancement model by combining variational autoencoder (VAE) and generative adversarial network (GAN), uses the VAE decoder as the GAN generator, generates enhanced data conforming to the real distribution, and improves the generalization ability of the battery health prediction model. However, the invention focuses on data generation (solves data scarcity), only processes static EIS data (real / imaginary impedance), does not involve time series modeling, cannot capture the dynamic characteristics of the charging process, and the generated data needs to be input into the downstream classifier. However, the present application processes charging time series data (voltage, current, temperature, and remaining power) by introducing a Transformer encoder / decoder, realizes end-to-end anomaly detection using reconstruction error, does not need to generate synthetic data, and directly improves fault detection accuracy.
[0135] Related technology 2 combines VAE-Transformer to reconstruct audio features, calculates an abnormal score through reconstruction error, and identifies the type of abnormal sound through a long short-term memory network (LSTM) classifier. However, it is only applicable to elevator audio signals and does not adapt to battery multi-dimensional heterogeneous data (such as voltage, current, remaining power, and temperature), and requires labeled abnormal samples to train the classifier, manually sets a fixed threshold, and the threshold setting is rough. The present application designs multi-dimensional feature separation and remodeling, and innovatively proposes a joint error function of Huber error plus KL divergence, which significantly improves the robustness to noise and outliers.
[0136] Related technology 3 uses a semi-supervised Transformer model to combine labeled samples and unlabeled samples (pseudo-labels) to predict battery SOH. This patent requires a small number of labeled samples for initialization training, and needs to manually extract the Indifference Curve health factors (peak value, peak area), which is complex. The present application automatically captures fault features through VAE-Transformer latent space learning, avoids manual feature engineering, and uniquely proposes a dynamic threshold selection mechanism (iterates F1 score to optimize threshold), which significantly improves detection sensitivity.
[0137] The present application provides a self-supervised battery fault detection method based on a VAE-Transformer model in an electric vehicle charging scenario, which can effectively overcome the problems of data imbalance and discontinuity, and improve the fault detection accuracy during battery charging. To implement this method, the present application is implemented according to the following technical solutions. As shown in Figure 3 The present application comprises the following steps:
[0138] Step 1: Data preprocessing.
[0139] Data preprocessing is used to normalize and sliding window sample the acquired time series data.
[0140] First, time series data during the charging process of electric vehicles are acquired, which contain information such as voltage, current, temperature and remaining capacity of the battery during charging, providing a basis for subsequent fault detection. Next, the time series data are preprocessed, mainly including sliding window sampling and extraction and separation of single feature data, in order to convert the data into a format suitable for model input, ensuring the time series and feature quality.
[0141] For example, given the acquired time series data B of an electric vehicle during charging. The time series data can be represented as . Wherein, is the data recorded at each time point. The specific representation of B is as follows . Wherein, is the voltage of the battery at the mth time point. is the current of the battery at the mth time point. is the remaining capacity of the battery at the mth time point. is the temperature of the battery at the mth time point.
[0142] Next, the time series data are preprocessed to obtain a format that can be read by the codec. The specific steps are as follows:
[0143] (1) Standardization. Standardization is performed using equation (1) to make the mean of the data zero and the standard deviation one, converting the data to a standard normal distribution.
[0144] (2) Sliding window segmentation. In order to better adapt to the data characteristics of different time scales, this application introduces a multi-scale window mechanism. Under different time scales such as short time window, medium time window and long time window, the reconstruction error of each scale is calculated. In order to make the model more flexible, the window size is dynamically adjusted through the volatility of the data. By calculating the standard deviation or coefficient of variation and other metrics of each time period, the window size of each scale is automatically adjusted so that the model can select the appropriate window size for data with different volatility.
[0145] For example, based on the standard deviation of data such as voltage, current, remaining capacity and temperature, and setting a reference window size w base , the adaptively adjusted window size w is calculated using equation (7). The calculated w For example, with the mean of voltage μ = 50, the standard deviation σ = 10, the reference window size = 30s, and λ = 0.2, the size of the first window is 31s. According to this value, the window size of different scales can be defined. For example, the short-time window ws = 0.5 x 31 ≈ 15s; the medium-time window wm = 1.0 x 31 = 31s; and the long-time window wl = 2.0 x 31 = 62s.
[0146] In the embodiments of the present application, the size of the short-time window, the size of the medium-time window, and the size of the long-time window can be calculated respectively, and the time series data can be divided into three data sets in sequence based on the short-time window, the medium-time window, and the long-time window.
[0147] After step 1, three data sets can be obtained, such as data set A divided based on the short-time window, data set B divided based on the long-time window, and data set C divided based on the medium-time window. Steps 2-4 can be performed for each data set to obtain the corresponding reconstructed data set.
[0148] Step 2, data remodeling.
[0149] For the data segments in the data set, the following method is used for data remodeling. According to the pre-set index list, the corresponding column data is selected from the input data segment. Then, the extracted column data is converted into a format suitable for model processing. The extraction process can be represented by formula (8).
[0150] Formula (8).
[0151] wherein, is the column data extraction function. , is the index of the data column. is the feature column index table related to the task. For example, is used to extract the first column data such as voltage, the second column data such as current, the third column data such as remaining power, and the fourth column data such as temperature in the data segment, respectively. After data extraction is performed on each segment, the results are as follows: That is, the data sequence is divided into after the extraction operation, which respectively represent the tensors of four features of voltage , current , remaining power , and battery temperature . represents the data segment after data remodeling. is specifically represented as follows . Similarly.
[0152] For example, a data fragment is Using a feature column index table Process the data fragments into voltage fragments, such as... Current segments such as Remaining battery level segment as follows and temperature segments such as After performing this process on each data segment, the voltage segments are then aggregated together. By combining the current segments, we obtain By combining the remaining energy fragments, we obtain By combining temperature segments, we obtain .
[0153] Step 3, encoding.
[0154] The feature data tensor after step 2 preprocessing is used as the input of the encoder and decoder. The Transformer encoder maps the feature data to the latent space to calculate the mean and variance.
[0155] For example, the feature data tensor in step 2 By inputting the data into the encoder in batches, we can obtain... Where M is the batch size input to the encoder each time, and in this paper, M is 128. m is the length of the window. D is the feature dimension. These are reconstructed features. This application uses a batch of input data as an example for illustration. It should be understood that for each batch of input data, the methods shown in steps 3 and 4 can be executed to obtain the corresponding reconstructed encoded dataset.
[0156] The specific process of latent space learning by the encoder-decoder is as follows:
[0157] (1) Input data projection.
[0158] Projection is used to project input data through a fully connected layer onto the high-dimensional space of the model, thereby improving the model's ability to capture more features and patterns. For example, projection can be represented by formula (9).
[0159] , formula (9).
[0160] Where h is the encoder input, For fully connected layer functions, This is the weight matrix. For bias vectors, In this embodiment of the application, the number of input dimensions required by the encoder is specified. is set to 64. In the embodiments of the present application, the input of the encoder is each data segment.
[0161] (2) Encoder encoding.
[0162] The encoder processes the data through multiple self-attention layers and feedforward neural network layers to capture the global dependency in the data. The output of each encoder layer is passed to the next layer, and finally the hidden state is obtained through the pooling operation. For example, the encoding can be represented by the following formula (10) and formula (11).
[0163] , formula (10).
[0164] , formula (11).
[0165] wherein, is the output sequence of the encoder, and the dimension is wherein, m is the sequence length, and d is the feature dimension.
[0166] denotes the mapping function of the Transformer encoder, is the hidden state obtained by averaging the encoder output, is the output vector of the encoder representing the i-th time step (or position).
[0167] (3) Latent space inference.
[0168] Through a fully connected layer, the hidden state of the encoder is mapped into the mean and variance of the latent variable. In the embodiments of the present application, the latent variable is the reconstructed feature. The mapping process can be represented by formula (12).
[0169] , formula (12).
[0170] wherein, is the mean of the latent variable, is the sample variance of the latent variable, Q represents the dimension of the latent variable, is the weight matrix, is the bias vector. The standard deviation of the latent variable is obtained by exponential change on the sample variance of the latent variable .
[0171] Then, the latent variable z is sampled from the latent space distribution using the reparameterization trick, is the Gaussian white noise obeying the standard normal distribution, the mean is 0, the variance is 1, and the covariance matrix is the unit matrix , as shown in formula (13).
[0172] Equation (13).
[0173] Step 4, decoding.
[0174] The latent space variable is decoded by the decoder, and the target data is reconstructed. The specific steps of data decoding are as follows:
[0175] (1) Decoder decoding. The latent variable is mapped back to the hidden space and served as the input of the decoder. The decoder generates an output sequence by introducing the embedding of the target data. The process is shown in Equation (14) and Equation (15).
[0176] Equation (14).
[0177] Equation (15).
[0178] wherein, is the input of the decoder, is the Transformer decoder, is the weight matrix, is the bias vector, is the output of the decoder, is the embedding of the target sequence, and one of the four features is selected as the embedding. The implementation process is shown in Equation (16).
[0179] Equation (16).
[0180] wherein, is the extracted data sequence, is the feature extraction function, is the feature column index table related to the task, and different from the feature extraction operation in step 2, only one feature is extracted as the embedding, and is obtained through the input data projection operation in step 3 (1). wherein, is the weight matrix, is the bias vector.
[0181] The VAE-Transformer model adopted in the present application has high detection effect. As shown in Table 1 and Table 2, Table 1 shows the performance comparison of different algorithms in terms of recall rate, precision and area under curve (AUC) on two battery datasets (Battery dataset 1 and Battery dataset 3).
[0182] Table 1
[0183]
[0184] Table 2 shows the performance comparison of different algorithms on the battery state anomaly detection task.
[0185] Table 2
[0186]
[0187] The VAE-Transformer model used in the present application has the advantages of strong time series modeling capability, high computational efficiency, and strong ability to process complex data.
[0188] 2) Output reconstruction. The output of the decoder passes through a linear mapping layer to obtain the reconstructed model input data, which can be represented by formula (18), for example.
[0189] , formula (18).
[0190] wherein, is the reconstruction output of the model, representing the sequence generated by the model from the latent space, i.e., the reconstructed data. is a weight matrix, is a bias vector.
[0191] After steps 3 and 4 are executed in turn, the server can obtain the reconstructed data set A` corresponding to the short time window, the reconstructed data set B` corresponding to the long time window, and the reconstructed data set C` corresponding to the medium time window. The server can also obtain a set of parameters corresponding to the short time window, a set of parameters corresponding to the long time window, and a set of parameters corresponding to the medium time window. One parameter includes the mean value in Q dimensions and the variance in Q dimensions . Then, the server can perform step 5 to calculate the reconstruction error of the segment combination.
[0192] Step 5: Reconstruction error calculation.
[0193] (1) Calculate the Huber error.
[0194] The Huber error of the N data segments is calculated based on the data set A corresponding to the short window and the reconstructed data set A' based on formula (5). The Huber error of the N data segments is calculated based on the data set B corresponding to the long window and the reconstructed data set B' based on formula (5). The Huber error of the N data segments is calculated based on the data set C corresponding to the medium window and the reconstructed data set C' based on formula (5). Wherein, the Huber error is an error function combining the mean square error and the absolute error. When the error is small, the Huber error behaves like MSE, while when the error is large, it behaves like MAE. The Huber error is more robust in the face of outliers. The Huber error combining the mean square error and the absolute error is adopted in the present application.
[0195] (2) Calculate the first multi-scale reconstruction error.
[0196] For N segment combinations, the first multi-scale reconstruction error of each segment combination is calculated using formula (19).
[0197] , formula (19).
[0198] Wherein, is the first multi-scale reconstruction error of the segment combination. , , are the weight coefficients of the data segments corresponding to the short window, the weight coefficients of the data segments corresponding to the medium window and the weight coefficients of the data segments corresponding to the long window, respectively. is the Huber error of a data segment in the data set A corresponding to the short window, is the Huber error of the data segment with the same serial number in the data set B corresponding to the medium window. is the Huber error of the data segment with the same serial number in the data set C corresponding to the long window.
[0199] (3) Calculate the KL divergence error.
[0200] The KL divergence is used to measure the difference between the distribution of the latent variable and the standard normal distribution to constrain the learning process of the model and prevent the model from overfitting or producing unreasonable prediction distribution. For example, based on a group of parameters corresponding to the short window output by the encoder and decoder, the KL divergence error of N data segments is calculated using formula (6). Based on a group of parameters corresponding to the long window output by the encoder and decoder, the KL divergence error of N data segments is calculated using formula (6). Based on a group of parameters corresponding to the medium window output by the encoder and decoder, the KL divergence error of N data segments is calculated using formula (6).
[0201] (4) Calculate the multi-scale KL divergence error.
[0202] To further improve the stability and robustness of the model in learning potential space at different time scales, the present application introduces a multi-scale KL divergence error, i.e., a second multi-scale reconstruction error, on the basis of the multi-scale reconstruction error. The core idea is to establish a constraint mechanism for the latent distribution on the short, medium, and long time windows respectively, so that the latent representation at each scale can approach the standard normal distribution, thereby avoiding overfitting of the model at a single scale.
[0203] The multi-scale KL divergence error is obtained by weighted fusion using formula (20):
[0204] , formula (20).
[0205] Among them, is the multi-scale KL divergence error. , , and are the weight coefficients of the data segments corresponding to the short window, the weight coefficients of the data segments corresponding to the medium window, and the weight coefficients of the data segments corresponding to the long window, respectively. is the KL divergence error of a data segment in data set A corresponding to the short window, is the KL divergence error of a data segment with the same serial number in data set B corresponding to the medium window. is the KL divergence error of a data segment with the same serial number in data set C corresponding to the long window.
[0206] (5) Calculate the total error of the segment combination, i.e., the reconstruction error.
[0207] The reconstruction error of the segment combination = × the first multi-scale reconstruction error of the segment combination + × the second multi-scale reconstruction error of the segment combination.
[0208] It should be understood that for time series data or historical sequence data, a plurality of reconstruction errors corresponding thereto can be obtained based on steps 1-5. For example, N reconstruction errors corresponding to the time series data and P reconstruction errors corresponding to the historical sequence data can be obtained.
[0209] Step 6: anomaly detection.
[0210] All reconstruction errors corresponding to the historical sequence data are traversed, and the one with the optimal F1 score is selected as the dynamic threshold, i.e., the first threshold. Then, the reconstruction error corresponding to the time series data is compared with the dynamic threshold to determine whether the current segment combination is abnormal. The specific detection steps of determining whether the current data segment is abnormal by comparing the reconstruction error with the dynamic threshold are as follows:
[0211] Dynamic threshold selection. The dynamic threshold is selected based on the fact that the failure rate of existing electric vehicle batteries is generally low. Through the above five steps, the reconstruction errors corresponding to the P segment combinations can be obtained as . Wherein, P is the number of data set data segments. Select as the reference error, j ranges from 1 to P, and then compare the threshold with the P reconstruction errors, as shown in the following formula (21).
[0212] , formula (21).
[0213] Wherein, the L( ) function is an anomaly judgment function, greater than or equal to the reference error is determined to be abnormal , less than the threshold is determined to be normal . Repeating the above steps can obtain the predicted label value of each segment combination, and then the predicted label value is compared with the true label value. Based on the method in the foregoing, the precision P and recall R are calculated. And based on the precision P and recall R, the F1 score corresponding to is calculated. The maximum value corresponds to the optimal threshold, which is used to determine the final result prediction of the model. Under normal circumstances, the reconstruction error is small, such as less than the first threshold; while in the case of failure or anomaly, the reconstruction error is large, such as greater than the first threshold, so the difference can be used for fault judgment.
[0214] For example, among the N reconstruction errors corresponding to the time series data, the reconstruction error can be compared with the first threshold based on formula (22), and it is determined whether the data segment is abnormal.
[0215] For example, formula (22) can be used to represent
[0216] , formula (22).
[0217] Wherein, the function is an anomaly judgment function. The reconstruction error is greater than or equal to the threshold , it is determined that the corresponding segment combination is abnormal; the reconstruction error is less than the threshold , it is determined that the corresponding segment combination is normal True. In the case of abnormal segment combination, it is determined that the battery is faulty; in the case of no abnormal segment combination, it is determined that the battery is normal.
[0218] As can be seen, the embodiments of the present application can detect anomalies in time series data generated during the charging process of an electric vehicle, realize anomaly detection of discontinuous battery feature data, and improve the sensitivity and accuracy in electric vehicle battery time series anomaly detection.
[0219] The method embodiments of the present application are described in detail above in combination with the drawings. The device embodiments of the present application will be described in detail below in combination with the drawings. It should be understood that the description of the device embodiments corresponds to the method embodiments, and therefore, the parts not described in detail can be referred to the method embodiments described above.
[0220] Figure 4 is a structural schematic diagram of a device for detecting a battery provided by an embodiment of the present application. As shown in Figure 4 The device for detecting a battery 400 includes an acquisition module 410, a data division module 420, an input module 430, an error calculation module 440, and a fault analysis module 450.
[0221] The acquisition module 410 is configured to acquire time series data. The time series data is used to represent the state of the battery during the charging process.
[0222] The data division module 420 is configured to divide the time series data into M data sets based on M windows of different sizes respectively; wherein one window corresponds to one data set; each data set in the M data sets includes N data segments; M and N are both integers greater than 1.
[0223] The input module 430 is configured to input each data set in the M data sets into a codec to obtain M reconstructed data sets corresponding to the M data sets respectively.
[0224] The error calculation module 440 is configured to acquire N reconstruction errors corresponding to the first to N segment combinations based on the M data sets and the M reconstructed data sets; wherein the i-th segment combination includes the i-th data segment in each data set in the M data sets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination.
[0225] The fault analysis module 450 is configured to determine whether the battery is faulty based on the N reconstruction errors.
[0226] In some embodiments, the time series data includes parameters of the battery sorted in time series; the parameter is at least one of voltage, current, temperature, and remaining power. The device for detecting a battery 400 can further include a window generation module. The window generation module is configured to generate the M windows of different sizes based on the standard deviation and the mean value of a target parameter; wherein the target parameter is any one of the parameters.
[0227] The window generation module is further configured to determine the size of a first window based on the standard deviation and the mean value of the target parameter, and the size of a reference window; and adjust the size of the first window according to M preset coefficients to obtain the M windows of different sizes.
[0228] The error calculation module 440 is further configured to, for each of the M data sets, obtain a first error of each of the N data segments included in the data set based on the data set and the corresponding reconstructed data; aggregate the first errors of the M i-th data segments included in the M data sets to obtain a first multi-scale reconstruction error corresponding to the combination of the i-th segments, the first multi-scale reconstruction error being the reconstruction error.
[0229] The error calculation module 440 is further configured to, for each of the M data sets, obtain a first error of each of the N data segments included in the data set based on the data set and the corresponding reconstructed data; obtain the mean and variance of all data segments included in the M data sets output by the codec; for each data segment, obtain a second error of each data segment based on the mean and variance; aggregate the first errors of the M i-th data segments included in the M data sets to obtain a first multi-scale reconstruction error corresponding to the combination of the i-th segments; aggregate the second errors of the M i-th data segments included in the M data sets to obtain a second multi-scale reconstruction error corresponding to the combination of the i-th segments; and aggregate the first multi-scale reconstruction error and the second multi-scale reconstruction error to obtain the reconstruction error corresponding to the combination of the i-th segments.
[0230] The fault analysis module 450 is further configured to compare the N reconstruction errors with the first threshold value in sequence; and in a case where there is a reconstruction error greater than or equal to the threshold value among the N reconstruction errors, determine that the battery is faulty.
[0231] The fault analysis module 450 is further configured to generate P reconstruction errors based on historical sequence data; calculate an index value corresponding to each of the P reconstruction errors; P is an integer greater than 1; and take the target reconstruction error as the first threshold value, wherein the target reconstruction error is the reconstruction error corresponding to the maximum index value.
[0232] The fault analysis module 450 is further configured to take the j-th reconstruction error among the P reconstruction errors as a reference error, and compare the P reconstruction errors with the j-th reconstruction error, 1≤j≤P; based on the comparison result, determine an accuracy and a recall rate; and based on the accuracy and the recall rate, calculate an F1 score corresponding to the j-th reconstruction error.
[0233] The fault analysis module 450 is further configured to divide the historical sequence data into M training data sets based on M different size windows respectively, wherein one window corresponds to one training data set, each of the M training data sets includes P data segments, and each of the M training data sets is input into the encoder-decoder to obtain M reconstructed training data sets corresponding to the M training data sets respectively; and based on the M training data sets and the M reconstructed training data sets, P reconstruction errors corresponding to the combinations of the first to P segments are obtained, wherein each of the combinations of the first to P segments includes the kth data segment in each of the M training data sets, and 1≤k≤P.
[0234] Figure 5 is a structural schematic diagram of a device for detecting a battery provided by an embodiment of the present application. The device for detecting a battery 500 includes one or more processors 510 and one or more memories 520.
[0235] The processor 510 can support the device for detecting a battery to implement the method described in the foregoing method embodiments.
[0236] The memory 520 stores a program, which can be executed by the processor 510 to enable the processor 510 to perform the method described in the foregoing method embodiments. The memory 520 can be independent of the processor 510 or integrated in the processor 510.
[0237] Optionally, the vehicle 500 can further include a transceiver 560. The processor 510 can communicate with other devices or chips through the transceiver 560. For example, the processor 510 can perform data transceiving with other devices or chips through the transceiver 560.
[0238] An embodiment of the present application provides a computer storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method of any of the above embodiments.
[0239] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0240] The processor can be at least one of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, or a microprocessor. It can be understood that the electronic device for implementing the functions of the processor can also be other electronic devices, and the embodiments of the present application are not limited.
[0241] The computer storage medium / memory can be a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, a compact disc read only memory (CD ROM), or the like.
[0242] The embodiments of the present application provide a computer program, including computer readable code, when the computer readable code runs in an electronic device, a processor in the electronic device performs part or all steps of the above method.
[0243] The embodiment of the present application provides a computer program product, the computer program product includes a non-transitory computer readable storage medium storing a computer program, and when the computer program is read and executed by a computer, part or all steps in the above method are realized. The computer program product can be realized by hardware, software or a combination thereof. In some embodiments, the computer program product is embodied as a computer storage medium, and in other embodiments, the computer program product is embodied as a software product, such as a software development kit (software development kit, SDK) and the like.
[0244] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each step / process does not mean the order of execution, and the execution order of each step / process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence number of the above embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments.
[0245] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0246] In several embodiments provided by 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 only schematic, for example, the division of units is only a logical function division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0247] The units described as separate components above can or can not be physically separate, and the components displayed as units can or can not be physical units; they can be located in one place or distributed on multiple network units; and part or all of the units can be selected to achieve the purposes of the embodiments of the present application according to actual needs.
[0248] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
[0249] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the aforementioned program can be stored in a computer readable storage medium, and the program executes the steps including the above-mentioned method embodiments when executed; and the aforementioned storage medium includes mobile storage equipment, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0250] Alternatively, the integrated units of the present application, if implemented in the form of software functional modules and sold or used as independent products, can also be stored in a computer readable storage medium. According to such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium and includes several instructions to make a vehicle terminal (which can be a personal computer, server or network equipment) execute all or part of the method embodiments of the present application. The aforementioned storage medium includes mobile storage equipment, ROM, magnetic disc or optical disc and various storage program codes.
[0251] The above is only an embodiment of the present application, but the protection scope of the present application is not limited thereto, and any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.
[0252] The above embodiments are only preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Any equivalent replacement or transformation of the present application based on the present application is within the protection scope of the present application.
Claims
1. A method of detecting a battery, characterized by, The method comprises: obtaining time series data; the time series data is used to represent the state of the battery during charging or discharging; dividing the time series data into M data sets based on M different sizes of windows respectively; wherein one window corresponds to one data set; each of the M data sets comprises N data segments; M and N are both integers greater than 1; inputting each of the M data sets into a codec to obtain M reconstructed data sets corresponding to the M data sets respectively; based on the M data sets and the M reconstructed data sets, obtaining N reconstruction errors corresponding to 1st to Nth segment combinations; wherein the ith segment combination comprises the ith data segment in each of the M data sets; 1≤i≤N; determining whether the battery is faulty based on the N reconstruction errors.
2. The method of claim 1, wherein, The time series data comprises parameters of the battery sorted in time series; the parameters are at least one of voltage, current, temperature and remaining power; Before dividing the time series data into M data sets based on M different sizes of windows respectively, the method further comprises: generating the M different sizes of windows based on the standard deviation and mean value of a target parameter; wherein the target parameter is any one of the voltage, current, temperature and remaining power.
3. The method of claim 2, wherein, The generating the M different sizes of windows based on the standard deviation and mean value of the target parameter comprises: determining the size of a first window based on the standard deviation and mean value of the target parameter and the size of a reference window; adjusting the size of the first window according to M preset coefficients corresponding to the M different sizes of windows to obtain the M different sizes of windows.
4. The method of claim 1, wherein, The obtaining N reconstruction errors corresponding to 1st to Nth segment combinations based on the M data sets and the M reconstructed data sets comprises: for each of the M data sets, obtaining a first error of each data segment in the N data segments included in the each data set based on the each data set and the corresponding reconstructed data set; aggregating the first errors of the M ith data segments included in the M data sets to obtain a first multi-scale reconstruction error corresponding to the ith segment combination; the first multi-scale reconstruction error is the reconstruction error.
5. The method of claim 1, wherein, The obtaining N reconstruction errors corresponding to 1st to Nth segment combinations based on the M data sets and the M reconstructed data sets comprises: for each of the M data sets, obtaining a first error of each data segment in the N data segments included in the each data set based on the each data set and the corresponding reconstructed data set; obtaining a second error of each data segment based on the mean value and variance output by the codec corresponding to all data segments included in the M data sets; aggregating the first errors of the M ith data segments included in the M data sets to obtain a first multi-scale reconstruction error corresponding to the ith segment combination; aggregating second errors of M i-th data segments included in the M data sets to obtain a second multi-scale reconstruction error corresponding to the i-th segment combination; aggregating the first multi-scale reconstruction error and the second multi-scale reconstruction error to obtain a reconstruction error corresponding to the i-th segment combination.
6. The method according to any one of claims 1 to 5, characterized in that, The determining whether the battery is faulty based on the N reconstruction errors comprises: comparing the N reconstruction errors with a first threshold value in sequence; in the case that there is a reconstruction error greater than or equal to the first threshold value among the N reconstruction errors, determining that the battery is faulty.
7. The method of claim 6, wherein, The first threshold value is generated based on historical sequence data; before the comparing the N reconstruction errors with a first threshold value in sequence, the method further comprises: generating P reconstruction errors based on the historical sequence data; P is an integer greater than 1; calculating an index value corresponding to each of the P reconstruction errors; taking a target reconstruction error as the first threshold value, wherein the target reconstruction error is a reconstruction error corresponding to the maximum index value.
8. The method of claim 7, wherein, The index value is an F1 score, and the calculating an index value corresponding to each of the P reconstruction errors comprises: taking a j-th reconstruction error in the P reconstruction errors as a reference error, and comparing the P reconstruction errors with the j-th reconstruction error, 1≤j≤P; based on the comparison result, determining an accuracy and a recall rate; based on the accuracy and the recall rate, calculating an F1 score corresponding to the j-th reconstruction error.
9. The method according to claim 7 or 8, characterized in that, The generating P reconstruction errors based on the historical sequence data comprises: based on M different sizes of windows, respectively dividing the historical sequence data into M training data sets; wherein one window corresponds to one training data set; each of the M training data sets comprises P data segments; inputting each of the M training data sets into a codec to obtain M reconstruction training data sets corresponding to the M training data sets in one-to-one correspondence; based on the M training data sets and the M reconstruction training data sets, obtaining P reconstruction errors corresponding to 1st to Pth segment combinations; wherein a k-th segment combination comprises a k-th data segment in each of the M training data sets, 1≤k≤P.
10. An apparatus for detecting a battery, the apparatus comprising: The device comprises: a data acquisition module configured to acquire time series data; the time series data is used to represent the state of the battery during charging or discharging; a data division module configured to divide the time series data into M data sets based on M different sizes of windows; wherein one window corresponds to one data set; each of the M data sets comprises N data segments; M and N are both integers greater than 1; an input module configured to input each of the M data sets into a codec to obtain M reconstruction data sets corresponding to the M data sets in one-to-one correspondence; An error calculation module obtains reconstruction errors of first to Nth segment combinations based on the M data sets and the M reconstructed data sets; wherein, an ith segment combination includes an ith data segment in each data set of the M data sets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination; A fault analysis module is configured to determine whether the battery is faulty based on the reconstruction errors of the first to Nth segment combinations.
11. An apparatus for detecting a battery, the apparatus comprising: The device includes: one or more processors; a memory for storing one or more programs, which, when executed by the one or more processors, cause the device to implement the method of any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, a computer program stored thereon, which, when executed by a processor of a computer, causes the computer to perform the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Battery state evaluation method based on automatic encoder
CN113076689A
Generative model-oriented few-sample video stream classification method and system
CN117077030A