Method, device and equipment for detecting battery and storage medium

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, and high-accuracy battery fault detection is achieved in complex environments.

CN120949072AActive Publication Date: 2025-11-14CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202511485812.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2025-11-14
Estimated Expiration
2045-10-17

AI Technical Summary

Technical Problem

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.

Method used

A multi-scale sliding window is used to divide the time series data, and a reconstruction error at multiple scales is generated by combining the codec. By synergistic application of multi-scale reconstruction error and dynamic threshold, the accuracy of battery fault detection is improved.

Benefits of technology

When the amount of data is small, the codec has good robustness and accuracy, and can effectively capture abnormal behavior of the battery during charging or discharging, enhance the ability to perceive instantaneous fluctuations and long-term trend changes, and improve the robustness and accuracy of fault identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120949072A_ABST
    Figure CN120949072A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicles, in particular to a battery detection method, device and equipment and a storage medium, and the method comprises the steps: obtaining time sequence data; the time sequence data is used for representing the state of the battery in the charging or discharging process; dividing the time sequence data into M data sets based on M types of windows with different sizes; inputting each data set in the M data sets into a codec to obtain M reconstructed data sets in one-to-one correspondence with the M data sets; obtaining N reconstruction errors corresponding to the first fragment combination to the Nth fragment combination based on the M data sets and the M reconstruction data sets; wherein the ith fragment combination comprises the ith data fragment in each data set in the M data sets, and i is larger than or equal to 1 and smaller than or equal to N; the reconstruction error is used for indicating the quality of the data fragments included in the corresponding fragment combination; and based on the N reconstruction errors, determining whether the battery fails or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle technology, and in particular to a method, apparatus, device, and storage medium for testing batteries. Background Technology

[0002] With the rapid development of new energy vehicles, testing electric vehicle batteries has become a key means to ensure vehicle operation safety and improve user experience. Batteries are susceptible to performance degradation and even failure risks due to complex operating conditions during use; therefore, there is an urgent need for an effective non-destructive method for real-time battery monitoring.

[0003] In existing technologies, deep learning models are used to identify battery faults. These methods typically rely on large amounts of sensor data. However, in practical applications, due to equipment malfunctions, environmental interference, or network transmission limitations, the amount of data is often insufficient, making it difficult for the model to accurately perform the prediction task. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for detecting batteries, and discloses the following: Firstly, a method for detecting a battery is provided. This method includes: acquiring time-series data; the time-series data characterizing the state of the battery during charging or discharging; dividing the time-series data into M datasets based on M different window sizes; wherein each window corresponds to one dataset; each of the M datasets includes N data segments; M and N are both integers greater than 1; inputting each of the M datasets into an encoder / decoder to obtain M reconstructed datasets corresponding one-to-one with the M datasets; based on the M datasets and the M reconstructed datasets, obtaining N reconstruction errors corresponding to combinations of segments from the 1st to the Nth; wherein the i-th segment combination includes the i-th data segment from each of the M datasets, 1 ≤ i ≤ N; the reconstruction errors are used to indicate the quality of the data segments included in the corresponding segment combination; and determining whether the battery is faulty based on the N reconstruction errors.

[0005] In this embodiment, by employing a multi-scale sliding window to divide time-series data and combining it with a codec to generate reconstruction errors at multiple scales, abnormal battery behavior during charging or discharging can be effectively captured. After reconstruction by the codec, the codec can learn a more comprehensive understanding of temporal dependencies. Simultaneously, aggregation analysis based on multi-scale reconstruction errors enhances the perception of instantaneous fluctuations and long-term trend changes. By using multi-window partitioning to perform multi-granular segmentation of limited time-series data, multi-dimensional temporal features of the data can be mined, improving the utilization rate of the time-series data. Even with limited data volume, the codec exhibits good robustness and accuracy.

[0006] In one possible implementation of the first aspect, the time-series data includes parameters of the battery ordered by time series; the parameters are at least one of voltage, current, temperature, and remaining capacity. Before dividing the time-series data into M datasets based on M different window sizes, the method further includes: generating M different window sizes based on the standard deviation and mean of a target parameter; wherein the target parameter is any one of voltage, current, temperature, and remaining capacity.

[0007] This application can also adaptively generate windows of different sizes based on data fluctuations. By analyzing the statistical characteristics of target parameters such as voltage (standard deviation and mean), it dynamically generates windows of varying sizes, enabling the codec to model data in a way that more closely matches the actual data distribution. This helps enhance the codec's adaptability to data changes under complex operating conditions.

[0008] In one possible implementation of the first aspect, the size of the first window is determined based on the standard deviation and mean of the target parameter and the size of the reference window; the size of the first window is adjusted according to M preset coefficients corresponding to M different window sizes to obtain M different window sizes.

[0009] This application, by setting a baseline window and scaling or enlarging it using multiple preset coefficients, can systematically construct a series of windows of different lengths, covering various time scales from short to long time. This approach not only enhances the codec's ability to perceive local details and overall trends but also strengthens its stability when facing discontinuous or noisy data, providing a richer and more reliable information foundation for subsequent reconstruction error calculation.

[0010] In one possible implementation of the first aspect, for each of the M datasets, based on the dataset and the corresponding reconstructed dataset, the first error of each of the N data segments included in the dataset is obtained; the first errors of the M i-th data segments included in the M datasets are aggregated to obtain the first multi-scale reconstruction error corresponding to the i-th segment combination, and the first multi-scale reconstruction error is the reconstruction error.

[0011] This application calculates the first error for each window segment by segment and aggregates them at the same location to form a multi-scale reconstruction error. This approach enables the codec to evaluate data quality from multiple perspectives, allowing it to capture both instantaneous fluctuations during charging or discharging and long-term trend changes, significantly improving its sensitivity and robustness to anomalous data.

[0012] In one possible implementation of the first aspect, for each of the M datasets, based on the dataset and the corresponding reconstructed dataset, a first error is obtained for each of the N data segments included in the dataset; the mean and variance of all data segments in the M datasets output by the encoder and decoder are obtained; for each data segment, a second error is obtained based on the mean and variance; the first errors of the M i-th data segments included in the M datasets are aggregated to obtain a first multi-scale reconstruction error corresponding to the combination of the i-th segments; the second errors of the M i-th data segments included in the M datasets are aggregated to obtain a second multi-scale reconstruction error corresponding to the combination of the i-th segments; the first multi-scale reconstruction error and the second multi-scale reconstruction error are aggregated to obtain a reconstruction error corresponding to the combination of the i-th segments.

[0013] This application introduces the mean and variance to calculate the second error, and then aggregates it with the first error to more comprehensively characterize the distribution characteristics of the data. The combination of these two methods can more accurately determine whether the data is within the 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.

[0014] In one possible implementation of the first aspect, N reconstruction errors are compared sequentially with a first threshold; if any of the N reconstruction errors is greater than or equal to the threshold, a battery fault is determined.

[0015] This application, by setting a first threshold and comparing it with the reconstruction error, can quickly determine whether anomalies exist. This method is simple and efficient.

[0016] In one possible implementation of the first aspect, the first threshold is generated based on historical sequence data. The method may further include: generating P reconstruction errors based on the historical sequence data; calculating an index value corresponding one-to-one with each of the P reconstruction errors; where P is an integer greater than 1; and using the target reconstruction error as the first threshold, wherein the target reconstruction error is the reconstruction error corresponding to the maximum index value.

[0017] This application dynamically generates a first threshold using historical sequence data, which can reduce the rate of missed anomalies and the rate of false positives, and improve the accuracy of anomaly detection based on reconstruction error.

[0018] In one possible implementation of the first aspect, the metric is the F1 score, and the method includes: taking the j-th reconstruction error among P reconstruction errors as the baseline error, comparing the P reconstruction errors with the j-th reconstruction error, where 1≤j≤P; determining accuracy and recall based on the comparison result; and calculating the F1 score corresponding to the j-th reconstruction error based on accuracy and recall.

[0019] This application uses any j-th error among P reconstruction errors as a benchmark, and calculates accuracy, recall, and corresponding F1 score by comparing it with the remaining errors. It can traverse all candidate benchmarks, comprehensively covering possible error discrimination scenarios in historical data, ensuring that the first threshold corresponding to the highest selected F1 score is a result that has been fully compared and verified, is optimal for historical data discrimination, and balances precision and recall, thus avoiding threshold bias caused by a single benchmark.

[0020] In one possible implementation of the first aspect, the method further includes: dividing the historical sequence data into M training datasets based on M windows of different sizes; wherein one window corresponds to one training dataset; each of the M training datasets includes P data segments; inputting each of the M training datasets into an encoder-decoder to obtain M reconstructed training datasets that correspond one-to-one with the M training datasets; obtaining P reconstruction errors corresponding to the combinations of the 1st to Pth segments based on the M training datasets and the M reconstructed training datasets; the kth segment combination includes the kth data segment in each of the M training datasets, 1≤k≤P.

[0021] This application divides the training dataset into multiple groups using windows of different sizes, covering diverse timescale features of historical sequence data. Simultaneously, it calculates the reconstruction error by combining segments, integrating the results of multi-window training while focusing on the consistency error performance of each corresponding segment. This allows the final P reconstruction errors to more comprehensively reflect the true reconstruction situation of the data at different scales, providing a more reliable error basis for subsequent threshold selection.

[0022] Secondly, a device for detecting batteries is provided, the device comprising: The data acquisition module is used to acquire time-series data; the time-series data is used to characterize the state of the battery during charging or discharging. The data partitioning module is used to divide time series data into M datasets based on M different window sizes; one type of window corresponds to one dataset; each of the M datasets includes N data segments; M and N are both integers greater than 1. The input module is used to input each of the M datasets into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets. The error calculation module, based on M datasets and M reconstructed datasets, obtains the reconstruction error of the 1st to Nth segment combinations; wherein the i-th segment combination includes the i-th data segment in each of the M datasets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination; The fault analysis module is used to determine whether the battery is faulty based on the reconstruction error of the combination of the 1st to the Nth segments.

[0023] Thirdly, a device for testing batteries is provided, the device comprising: One or more processors; memory for storing one or more programs, which, when executed by one or more processors, cause the device to implement the methods of the first aspect and any one thereof.

[0024] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the methods of the first aspect and any one thereof.

[0025] This application provides a method for detecting batteries, which divides the battery's time-series data through a multi-scale sliding window and uses a codec to generate reconstruction errors at different scales. This method can more comprehensively capture abnormal behaviors that may occur during battery charging or discharging. Furthermore, the synergistic application of multi-scale errors and dynamic thresholds effectively improves the accuracy of battery anomaly detection. Attached Figure Description

[0026] Figure 1 This is a schematic flowchart of a battery detection method provided in an embodiment of this application; Figure 2 This is a schematic flowchart of another battery detection method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a battery detection method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a battery detection device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a battery testing device provided in an embodiment of this application. Detailed Implementation

[0027] The embodiments of this application will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.

[0028] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0029] With the rapid development of new energy vehicles, testing electric vehicle batteries has become a key means to ensure vehicle operation safety and improve user experience. Batteries are susceptible to performance degradation and even failure risks due to complex operating conditions during use; therefore, there is an urgent need for an effective non-destructive method for real-time battery testing.

[0030] In existing technologies, deep learning models are used for battery detection. These methods typically rely on large amounts of high-quality, continuous sensor data. However, in practical applications, data is often missing or incomplete due to equipment malfunctions, environmental interference, or network transmission problems, resulting in insufficient data volume and making it difficult for the model to accurately perform prediction tasks. Therefore, improving the performance of deep learning models in complex data environments, enhancing the accuracy of fault identification, and reducing safety accidents caused by battery malfunctions has significant theoretical and practical value.

[0031] This application provides a method, apparatus, device, and storage medium for detecting batteries, which can improve the accuracy of battery fault identification. This application utilizes a multi-scale sliding window to divide time-series data and, based on a codec, obtains reconstruction errors at multiple scales, effectively capturing abnormal battery data during charging or discharging. Since each window extracts different data segments, the codec can learn more comprehensive temporal dependencies, enhancing its generalization ability. Even with limited data, the codec exhibits good robustness and accuracy, thereby improving the robustness and accuracy of fault identification.

[0032] The following describes a method for detecting a battery according to an embodiment of this application, with reference to the accompanying drawings and embodiments. This method for detecting a battery can be executed by a server, which can interact with a vehicle, such as a communication module within the vehicle. Figure 1 This application provides a method for detecting batteries, such as... Figure 1 As shown, the method includes: S101, Obtain time series data.

[0033] This time series data is the initial time series data, that is, the unprocessed time series data.

[0034] Time series data is used to characterize the state of a battery during charging or discharging. Time series data refers to a set of data points arranged in chronological order, recording the battery parameters at various moments during charging or discharging. These parameters may include at least one of voltage, current, temperature, and state of charge (SOC). The following example uses time series data recording battery voltage, current, temperature, and SOC at various moments during discharging to illustrate this solution. It should be understood that the battery detection method provided in this application is also applicable to time series data recording battery parameters at various moments during discharging. In other words, the battery detection method provided in this application is applicable not only to fault detection during charging but also to fault detection during discharging.

[0035] In some embodiments, the battery parameters may also include other parameters acquired using novel sensors, including but not limited to strain, expansion force, electrolyte concentration, and acoustic wave propagation characteristics inside the battery.

[0036] For example, let B represent time series data, then .in, Data recorded at each point in time. The following can be represented as: .in, Let be the voltage of the battery at time m. Let be the current of the battery at time m. Let m be the remaining charge of the battery at time m. Let be the temperature of the battery at time m.

[0037] In some embodiments, after the vehicle detects the start of charging, it collects the voltage, current, temperature and remaining charge of the battery at each collection moment during the charging process at a preset frequency, such as 0.5 seconds / time, to obtain time series data.

[0038] In some embodiments, the server can obtain the aforementioned time-series data from the vehicle. In other embodiments, the server can obtain historical time-series data of the vehicle from a preset storage location. That is, the embodiments of this application do not limit the specific method by which the server obtains time-series data; the server can obtain time-series data in real time or read time-series data from a historical database.

[0039] In some embodiments, after acquiring the time series data, the server can preprocess the time series data. Preprocessing includes, but is not limited to, standardization. Standardization is used to transform the voltage, current, temperature, and remaining power in the time series data into data conforming to a standard normal distribution. For example, formula (1) is used to standardize the voltage, current, temperature, and remaining power, respectively.

[0040] , formula (1).

[0041] Where Z is the processed data and X is the original data. It is the mean of the original data. This is the standard deviation of the original data. It should be understood that voltage, current, temperature, and remaining power are all standardized using formula (1). The standardized data has zero mean and unit standard deviation. Ensuring that different data have the same scale is beneficial to improving the stability and convergence speed of the codec. Standardization not only accelerates the training of the codec but also improves the robustness of the codec to outliers.

[0042] S102 divides the time series data into M datasets based on M different window sizes.

[0043] A window is a fixed time period used to segment data in sequence analysis. Each window defines a continuous time range, such as 3 minutes, 5 minutes, or 7 minutes. In this application, the window may be, for example, a sliding window. A sliding window is a window that slides across the time series with a fixed step size.

[0044] Typically, a single window size is used to divide time-series data into a dataset, which comprises multiple data segments divided according to the window size. In this embodiment, time-series data is divided into M datasets using M different window sizes. M is an integer greater than 1. For example, with M equal to 3, window A is 15 seconds in size, window B is 31 seconds in size, and window C is 62 seconds in size. The server can use window A to divide the time-series data into multiple data segments, which together form dataset A corresponding to window A. The server can use window B to divide the time-series data into multiple data segments, which together form dataset B corresponding to window B. The server can use window C to divide the time-series data into multiple data segments, which together form dataset C corresponding to window C. In other words, the server uses window A to divide the time-series data into dataset A, window B to divide the time-series data into dataset B, and window C to divide the time-series data into dataset C. That is, the server uses M different window sizes to divide the time-series data into M corresponding datasets, with one window corresponding to one dataset.

[0045] Here, the dataset can be, for example, a collection of data fragments, or the dataset can be used... , , ..., Let be the time series data, where n is the total length of the time series data, k is the window step size, used to represent the number of steps the window slides each time, and m is the length of the window.

[0046] In some embodiments, the step size of the window is adjusted to ensure that the number of data segments divided by the M types of windows is consistent. That is, each of the M datasets includes the same number of data segments, for example, each includes N data segments. Here, N is an integer greater than 1.

[0047] S103, input each of the M datasets into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets.

[0048] An encoder-decoder is a neural network model consisting of an encoder and a decoder. The encoder is responsible for mapping input data to a latent space, while the decoder is responsible for reconstructing data from the latent space. This application combines a variational autoencoder (VAE) with a transformer model architecture to construct an encoder-decoder with time-series modeling capabilities for generating reconstructed data. In the embodiments of this application, the encoder-decoder adopts a Transformer-based encoder-decoder structure and introduces a variational inference mechanism in latent representation learning, forming a variational Transformer architecture for learning multi-scale latent representations of time series.

[0049] The encoding and decoding process can be summarized as follows: an encoder encodes the input data into reconstructed features, and a decoder decodes the reconstructed features into reconstructed data. The encoding and decoding process will be described in detail below with specific examples; it will not be repeated here.

[0050] Reconstructed features, also known as latent variables, are the latent space representations obtained after encoder processing. These features reflect the essential characteristics and inherent patterns of the input data. The decoder can restore the reconstructed features to output data similar to the input data—the reconstructed data itself. The difference between the reconstructed data and the input data constitutes the reconstruction error, which is a crucial indicator of whether the data is normal.

[0051] In this embodiment, each of the M datasets is input into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets. For example, inputting dataset A from the previous example into the codec yields a reconstructed dataset A' corresponding to dataset A. Inputting dataset B into the codec yields a reconstructed dataset B' corresponding to dataset B. Inputting dataset C into the codec yields a reconstructed dataset C' corresponding to dataset C. Each reconstructed dataset includes a reconstructed data segment corresponding to a data segment. For example, dataset A includes a first data segment such as data segment A1, a second data segment such as data segment A2, ..., and an Nth data segment such as data segment AN. The corresponding reconstructed dataset A' also includes N corresponding reconstructed data segments, such as reconstructed data segments A1', A2', ..., AN'. The reconstructed data segments are obtained by the codec after encoding and decoding the corresponding data segments; that is, inputting a data segment into the codec yields the corresponding reconstructed data segment.

[0052] 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.

[0053] 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.

[0054] S104: Based on M datasets and M reconstructed datasets, obtain N reconstruction errors corresponding to the combination of the 1st to Nth segments.

[0055] 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.

[0056] 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.

[0057] For example, taking M=3, dataset A includes the first data segment (e.g., data segment A1), the second data segment (e.g., data segment A2), ..., the Nth data segment (e.g., data segment AN). Dataset B includes the first data segment (e.g., data segment B1), the second data segment (e.g., data segment B2), ..., the Nth data segment (e.g., data segment BN). Dataset C includes the first data segment (e.g., data segment C1), the second data segment (e.g., data segment C2), ..., the Nth data segment (e.g., data segment CN). Correspondingly, the first segment combination consists of the three first data segments included in the three reconstructed datasets. For example, the first segment combination consists of data segment A1, data segment B1, and data segment C1. The second segment combination consists of data segment A2, data segment B2, and data segment C2. And so on, the Nth segment combination consists of data segment AN, data segment BN, and data segment CN.

[0058] The reconstruction error corresponding to a fragment combination is used to indicate the quality of the data fragments included in that combination. For example, a fragment combination may include M data fragments with the same index in the dataset; the corresponding reconstruction error is used to indicate the quality of these M data fragments. For instance, the reconstruction error corresponding to the first fragment combination mentioned above is used to indicate the quality of data fragments A1, B1, and C1. A larger reconstruction error indicates a lower quality data fragment included in the combination; a smaller reconstruction error indicates a higher quality data fragment included in the combination.

[0059] S105 determines whether the battery is faulty based on N reconstruction errors.

[0060] In some embodiments, a battery malfunction is determined based on N reconstruction errors and a first threshold. The first threshold may be pre-set in a server. For example, the N reconstruction errors are sequentially compared with the first threshold to determine if the corresponding segment combinations are abnormal. Based on the determination of the segment combinations, a battery malfunction is determined. For instance, if the reconstruction error of a segment combination is greater than or equal to the first threshold, the segment combination is determined to be abnormal. If the reconstruction error of a segment combination is less than the first threshold, the segment combination is determined to be normal. If an abnormal segment combination exists, the battery is determined to be faulty. In other words, a battery malfunction is determined if any of the N reconstruction errors is greater than or equal to the first threshold.

[0061] In other embodiments, the first threshold is generated based on historical sequence data. This historical sequence data refers to time-series data acquired prior to the current detection.

[0062] For example, based on historical sequence data, P reconstruction errors corresponding to the historical sequence data are generated. P is an integer greater than 1. An index value corresponding to each of the P reconstruction errors is calculated. The target reconstruction error is used 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, iterating through the P reconstruction errors and calculating the corresponding index value for each reconstruction error. 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 changes in battery parameters under different operating conditions, thereby improving the adaptability and robustness of the detection method. The index value can be, for example, the F1 score.

[0063] In this application, the index value is used to evaluate the anomaly detection performance under different thresholds. Determining the threshold based on the index value can avoid the false positive problem caused by relying on a single threshold and improve the robustness of the model. The index value not only reflects the predictive ability of the model, but also achieves a good balance between high precision and high recall, thus adapting to the complex and ever-changing battery charging environment.

[0064] The following section uses the F1 score as an example to illustrate this solution. For example, as shown... Figure 2 As shown, S105 may include S201-S203.

[0065] S201 divides the historical sequence data into M training datasets based on M different window sizes.

[0066] M different window sizes are used to divide the historical sequence data into M training datasets. Each window size corresponds to one training dataset. Each of the M training datasets contains P data segments. This implementation is similar to S102; please refer to the previous description, which will not be repeated here.

[0067] S202, input each of the M training datasets into the codec to obtain M reconstructed training datasets that correspond one-to-one with the M training datasets.

[0068] Each of the M training datasets is input into the encoder-decoder. The encoder-decoder extracts each data segment from the training dataset and reconstructs it, thus obtaining M reconstructed training datasets that correspond one-to-one with the M training datasets. This implementation is similar to S103; please refer to the previous description, which will not be repeated here.

[0069] S203, based on M training datasets and M reconstruction datasets, obtain P reconstruction errors corresponding to the combinations of the 1st to Pth segments.

[0070] The k-th segment combination includes the k-th data segment from each of the M training datasets, where 1 ≤ k ≤ P. This implementation is similar to S104; please refer to the previous description for details.

[0071] S204, calculate the F1 score corresponding to each of the P reconstruction errors.

[0072] The F1 score takes into account both precision and recall, balancing the weights of precision and recall through a harmonic average.

[0073] In some embodiments, the F1 score corresponding to each of the P reconstruction errors is calculated in the following manner. Specifically, the j-th reconstruction error among the P reconstruction errors is taken as the baseline error, and the P reconstruction errors are compared sequentially with the j-th reconstruction error. Based on the comparison results, the F1 score corresponding to the j-th reconstruction error is determined. j takes values ​​sequentially in [1, 2, ..., N], i.e., 1 ≤ j ≤ P. Here, the baseline error refers to a reference value selected from all reconstruction error sets to measure the distribution of the remaining reconstruction errors relative to the baseline error.

[0074] For example, the j-th reconstruction error out of P reconstruction errors is used as the baseline error, and the P reconstruction errors are compared with the j-th reconstruction error. If the reconstruction error is less than the j-th reconstruction error, a first label is added to the segment combination corresponding to that reconstruction error. If the reconstruction error is greater than or equal to the j-th reconstruction error, a second label is added to the segment combination corresponding to that reconstruction error. The first label can be, for example, a "True" label, indicating that the labeled segment combination is normal. The second label can be, for example, an "False" label, indicating that the labeled segment combination is abnormal.

[0075] Calculate precision and recall. For example, use formulas (2) and (3) to calculate precision and recall.

[0076] , formula (2).

[0077] , formula (3).

[0078] Where P represents precision, and R represents recall. TP represents the number of fragment combinations where both the actual label and the predicted result are normal; FP represents the number of fragment combinations where the actual label is anomalous but the predicted result is normal; and FN represents the number of fragment combinations where the actual label is normal but the predicted result is anomalous. It is important to note that the P data fragments generated based on historical sequence data all have pre-labeled tags. These tags directly indicate whether the corresponding data fragment belongs to the normal or anomalous data fragment, providing a basis for subsequent calculations of precision, recall, and F1 score.

[0079] Based on precision and recall, calculate the F1 score corresponding to the j-th reconstruction error. For example, use formula (4) to calculate the F1 score corresponding to the j-th reconstruction error.

[0080] , formula (4).

[0081] in, Function representation of reconstruction error The F1 score is calculated based on the baseline error.

[0082] S205, the target reconstruction error is used as the first threshold.

[0083] The target reconstruction error is the reconstruction error corresponding to the maximum F1 score. This is achieved by calculating the F1 score for each reconstruction error and using the reconstruction error corresponding to the maximum F1 score as the first threshold.

[0084] S206, based on the first threshold and N reconstruction errors, determine whether the battery is faulty.

[0085] For example, N reconstruction errors are compared with a first threshold. If any of the N reconstruction errors is greater than or equal to the first threshold, the battery is determined to be faulty. If none of the N reconstruction errors is greater than or equal to the first threshold, the battery is determined to be normal.

[0086] In this embodiment, the dynamic threshold can automatically adapt to the data characteristics under different charging scenarios, thereby reducing missed detections and false detections, effectively improving the robustness and generalization ability of anomaly detection, and thus more accurately determining whether the battery has malfunctioned.

[0087] As can be seen, this application provides a method for detecting batteries. By employing a multi-scale sliding window to divide time-series data and combining it with an encoder-decoder to generate reconstruction errors at multiple scales, it can effectively capture abnormal battery behavior during charging. Since each window extracts different local features, the encoder-decoder can learn a more comprehensive temporal dependency after reconstruction. Simultaneously, the aggregation analysis based on multi-scale reconstruction errors enhances the ability to perceive instantaneous fluctuations and long-term trend changes, thereby improving the robustness and accuracy of anomaly detection.

[0088] The following describes a method for obtaining N reconstruction errors corresponding to the combination of the 1st to Nth segments, using specific embodiments.

[0089] In some embodiments, the reconstruction error of the fragment combination is obtained by aggregating the first error of data fragments with the same sequence number in M ​​datasets.

[0090] For example, the server first obtains the first error of all data segments included in the M datasets, i.e., the first error of M×N data segments. Then, it aggregates the first errors of data segments with the same sequence number to obtain the reconstruction error of each segment combination. The first error is used to indicate the difference between the data segment input to the codec and the reconstructed data segment output by the codec. The first error reflects the codec's ability to reconstruct the data segment. By calculating the error for each data segment, local anomaly features can be captured more precisely, improving detection accuracy. The first error can be the mean squared error (MSE), the mean absolute error (MAE), or the Huber error, etc. The following section uses the Huber error as an example for the first error.

[0091] Specifically, for each of the M datasets, the server can obtain the first error of the N data segments included in that dataset based on that dataset and the corresponding reconstructed dataset. Taking datasets A, B, and C as examples, the server can obtain the first error of the N data segments included in dataset A based on dataset A and the corresponding reconstructed dataset A'. The server can obtain the first error of the N data segments included in dataset B based on dataset B and the corresponding reconstructed dataset B'. The server can obtain the first error of the N data segments included in dataset C based on dataset C and the corresponding reconstructed dataset C'.

[0092] For example, for a dataset, the server compares each data segment in the dataset with the corresponding reconstructed data segment in the reconstructed dataset one by one, and uses formula (5) to calculate the first error between the data segment and the corresponding reconstructed data segment.

[0093] , formula (5).

[0094] Where δ is a hyperparameter. It's about reconstructing the data. This is the input data. This is the first error.

[0095] Taking dataset A as an example and combining it with formula (2), this paper introduces a method for calculating the first error of the N data segments included in dataset A. Dataset A includes data segments A1 to AN, and the corresponding reconstructed dataset A' includes the corresponding reconstructed data segments A1' to AN'. Taking one of the data segments, such as the i-th data segment, as an example, this paper introduces a method for calculating the first error of a data segment. It should be understood that the first error of each data segment in the M datasets can be calculated using this method.

[0096] For example, the i-th data segment in dataset A could be... The reconstructed data segment corresponding to the i-th data fragment in dataset A' could be, for example, The server calculates the first error of each data element using formula (2), such as using formula (2) to calculate the first error between corresponding values ​​in two matrices. 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.

[0097] Based on the above method, the server can obtain the first error of N data segments included in each of the M datasets. That is, the server can obtain the first error of M×N data segments. Then, the server can aggregate the first errors of data segments with the same index in the M datasets to obtain the first multi-scale reconstruction error of the segment combination. This first multi-scale reconstruction error 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 datasets. Aggregation can be done by calculating the mean, weighted mean, median, mode, etc. The following section uses the aggregation of weighted mean as an example to introduce this scheme.

[0098] For example, the reconstruction error of the i-th segment combination = × First error of the i-th data segment in the first dataset + × the first error of the i-th data segment in the second dataset + ... + × The first error of the i-th data segment in the M-th dataset. Where, , , ..., These are weighting coefficients, which can be preset in the server. Specifically, the server aggregates the first errors of the M i-th data segments from the M datasets to obtain the first multi-scale reconstruction error corresponding to the combination of the i-th segments. This first multi-scale reconstruction error is the reconstruction error itself.

[0099] Taking datasets A, B, and C as an example, the reconstruction error of the first segment combination = ×The first error of the first data segment in dataset A + ×The first error of the first data segment in dataset B + × The first error of the first data segment in dataset C. The reconstruction error of the second segment combination, etc. = ×The first error of the second data segment in dataset A + ×The first error of the second data segment in dataset B+ × The first error of the second data segment in dataset C. And so on, the reconstruction error of the Nth segment combination = ×The first error of the Nth data segment in dataset A + ×The first error of the Nth data segment in dataset B + × The first error of the Nth data segment in dataset C. The method for calculating the first error of each data segment can be found in the previous section and will not be repeated here.

[0100] In other words, the first errors of data segments at the same location in different datasets are aggregated to form the corresponding first multi-scale reconstruction error. This aggregation operation allows the codec to not only focus on anomalies in individual data segments but also to combine information from multiple data segments, thus enhancing its recognition capabilities.

[0101] In this embodiment, a first error is calculated for each data segment, and these errors are further aggregated to generate a first multi-scale reconstruction error. This enhances the codec's ability to process time-series data, thereby improving the accuracy and robustness of battery fault detection.

[0102] In other embodiments, the reconstruction error of the fragment combination is obtained by aggregating the first and second errors of data fragments with the same sequence number in M ​​datasets. The first error of the data fragments is as described above and will not be repeated here.

[0103] 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 encoder and decoder and prevent the encoder and decoder from overfitting or producing unreasonable prediction distributions. The second error can be, for example, KL divergence error, cross-entropy loss error, regularization error, etc. In this application, the embodiment of the second error is introduced as KL divergence error. For example, the second error can be calculated using formula (6).

[0104] , formula (6).

[0105] in, This is the second error. Let n be the mean of the latent variable along the nth dimension. Let Q be the variance of the latent variable in the nth dimension, and Q be the dimension of the latent variable. As discussed earlier, when the dataset is input into the encoder-decoder, the encoder-decoder can output not only the corresponding reconstructed dataset but also a set of parameters corresponding to the N data segments. The parameters include the mean and variance. The mean can be the mean across the Q dimensions, and the variance can be the variance across the Q dimensions.

[0106] In some embodiments, the server can first obtain the mean and variance of all data segments in the M datasets output by the codec. That is, obtain the M sets of parameters corresponding one-to-one with the M datasets. Then, for each data segment, the second error of the data segment can be calculated using formula (6). In other words, the second error of each data segment can be calculated using formula (6) for all data segments included in the M datasets.

[0107] Then, the server can aggregate the second errors of data segments with the same index from the M datasets to obtain the second multi-scale reconstruction error of the segment combination. In other words, the second multi-scale reconstruction error of the i-th data segment is obtained by aggregating the second errors of the M i-th data segments included in the M datasets.

[0108] For example, the second multi-scale reconstruction error of the i-th segment combination = × the second error of the i-th data segment in the first dataset + × the second error of the i-th data segment in the second dataset + ... + × the second error of the i-th data segment in the M-th dataset. Where, , , ..., These are weighting coefficients, which can be preset in the server.

[0109] Taking datasets A, B, and C as an example, the second multi-scale reconstruction error of the first segment combination = ×The second error of the first data segment in dataset A + ×The second error of the first data segment in dataset B+ × The second error of the first data segment in dataset C. The second multi-scale reconstruction error of the second segment combination = ×The second error of the second data segment in dataset A+ ×The second error of the second data segment in dataset B+ × The second error of the second data segment in dataset C. Similarly, the second multi-scale reconstruction error of the Nth segment combination = ×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. The calculation method for the second error of each data segment can be found in the previous section and will not be repeated here.

[0110] After obtaining the first and second multi-scale reconstruction errors of the fragment combination, the server can aggregate the first and second multi-scale reconstruction errors of the fragment combination to obtain the reconstruction error of the fragment combination. For example, the reconstruction error of the i-th fragment combination = × the first multi-scale reconstruction error of the i-th segment combination + × the second multi-scale reconstruction error of the i-th segment combination. Where, and These are weighting coefficients. This allows for a dynamic balance between the effects of short-term accuracy, long-term trends, and distribution constraints.

[0111] In some implementations, the M types of windows can be generated before dividing the time series data based on M different window sizes.

[0112] For example, as discussed earlier, time-series data includes battery parameters ordered by time series. The parameters are at least one of voltage, current, temperature, and remaining charge. Before dividing the time-series data into M datasets based on M different window sizes, the method further includes generating M different window sizes based on the standard deviation and mean of a target parameter. Here, the target parameter is any one of the parameters. That is, M different window sizes are generated according to the standard deviation and mean of at least one of the parameters: voltage, current, temperature, and remaining charge. By analyzing the statistical characteristics of the target parameter, such as voltage (standard deviation and mean), differentially sized windows are dynamically generated so that the codec can select an appropriate window size for data with varying degrees of fluctuation.

[0113] For example, the server first determines the size of the first window based on the standard deviation and mean of the target parameters, as well as the size of the baseline window. For instance, the server determines the size of the first window based on formula (7).

[0114] , formula (7).

[0115] in, It refers to the size of the first window, i.e., the window size after adaptive adjustment. It is the base window size, such as the default window size, which can be set to a fixed value. It is the standard deviation of a parameter, such as the standard deviation of voltage, current, remaining charge, or temperature, used to represent the volatility of data. This refers to the mean of the data, such as the mean of voltage, current, remaining charge, or temperature. It should be understood that the mean and standard deviation mentioned above are derived from unstandardized data. In other words, before standardizing the data, M different sized windows can be generated based on the mean and standard deviation of the data. This is an adjustment factor used to control the impact of volatility on window size. It is usually a positive number, and its value can be adjusted according to specific circumstances. Higher volatility (larger standard deviation) leads to an increase in the size of the first window, allowing for a smaller window to capture rapid changes in the data more precisely. Lower volatility (smaller standard deviation) leads to a decrease in the size of the first window, allowing for a larger window to capture long-term trends in the data.

[0116] Then, the size of the first window is adjusted according to M preset coefficients to obtain M different window sizes. For example, w1 = k1 × w adapted w2 = k2 × w adapted ;……;w M =k M ×w adapted .in, , , ..., There are M types of window sizes. , , ..., These are preset coefficients.

[0117] In other embodiments, the sizes of the M windows can be determined through grid search or validation set performance optimization. Existing technologies can be referenced, and will not be elaborated further.

[0118] This application, by setting a baseline window and scaling it using multiple preset coefficients, can systematically construct a series of windows of different lengths, covering various time scales from short to long time. This approach enhances the codec's ability to perceive local details and overall trends.

[0119] The following section describes a method for detecting batteries provided in an embodiment of this application, using an electric vehicle charging scenario as an example.

[0120] In recent years, the new energy vehicle industry, as a crucial strategic measure to address climate change, promote green development, and achieve sustainable economic growth, has achieved remarkable results globally. Driven by increasing policy support and sustained market demand, my country's new energy vehicle technology has significantly improved, and its production and sales volume have ranked first globally for many consecutive years. In this context, my country 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, with the widespread adoption of electric vehicles, potential problems during operation are becoming increasingly apparent. The high energy density and complex manufacturing processes of electric vehicle batteries challenge their lifespan and may lead to serious safety accidents such as fires. These issues pose challenges to vehicle safety, economy, and user satisfaction. Therefore, achieving early warning and remaining lifespan prediction for electric vehicle faults is of great and far-reaching significance for ensuring safe operation, reducing maintenance costs, and optimizing user experience.

[0121] Currently, traditional battery health assessment methods rely on testing the chemical and physical properties of batteries. However, such destructive tests often damage batteries, rendering them unusable and leading to significant economic losses for consumers and automakers. Therefore, how to achieve real-time monitoring of battery performance and health status using non-destructive methods has become a research hotspot in electric vehicle battery management systems. By monitoring parameters such as voltage, current, and temperature at different charging stages and combining them with data analysis techniques, the health status of batteries 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 mild and effective alternative. With the development of deep learning technology, deep learning combined with data analysis has demonstrated powerful data fitting and prediction capabilities, particularly suitable for modeling complex nonlinear relationships. However, existing electric vehicle battery fault detection and remaining capacity prediction models are mainly based on supervised learning, and the training of these models typically relies on large amounts of high-quality data. Sensor data may be missing or incomplete due to equipment failure, environmental interference, or network problems, resulting in a limited data volume. The high dependence of models on complete data makes it difficult to effectively perform fault detection and capacity prediction in these situations. Furthermore, data imbalance often exists between different fault types. For certain rare faults, the model's predictive accuracy is insufficient due to limited data. Furthermore, battery data collected in laboratories is typically continuous, while real-world battery data is often discontinuous. These issues limit the effective application of deep learning methods in handling the complex data of real-world battery systems. Therefore, overcoming the problems of data imbalance and discontinuity, improving the performance of deep learning in complex data environments, and reducing safety incidents caused by battery faults have significant theoretical and practical value.

[0122] Related technology 1 constructs a data augmentation model by combining a variational autoencoder (VAE) and a generative adversarial network (GAN), using the VAE decoder as a GAN generator to generate augmented data that conforms to the real distribution, thereby improving the generalization ability of the battery health prediction model. However, this invention focuses on data generation (solving the problem of data scarcity), only processing static EIS data (real / imaginary impedance), without involving time series modeling, and cannot capture the dynamic features of the charging process. Furthermore, the generated data needs to be input into a downstream classifier. In contrast, this application introduces a Transformer encoder / decoder to process charging time-series data (voltage, current, temperature, and remaining capacity), and uses reconstruction errors to achieve end-to-end anomaly detection, eliminating the need to generate synthetic data and directly improving fault detection accuracy.

[0123] Related technology 2 combines VAE-Transformer to reconstruct audio features, calculates anomaly scores through reconstruction errors, and then uses a long short-term memory network (LSTM) classifier to identify the type of abnormal noise. However, it only applies to elevator audio signals and is not adapted to multidimensional heterogeneous battery data (such as voltage, current, remaining power, temperature, etc.). Furthermore, it requires labeling abnormal samples to train the classifier and manually setting fixed thresholds, resulting in coarse threshold settings. This application designs a multidimensional feature separation and reshaping approach for battery charging scenarios and innovatively proposes a joint error function combining Huber error and KL divergence, significantly improving robustness to noise and outliers.

[0124] Related technology 3 utilizes a semi-supervised Transformer model, combining labeled and unlabeled samples (pseudo-labels) to predict battery SOH. This patent requires a small number of labeled samples for initial training and manual extraction of indifference curve (indifference curve) health factors (peak value, peak area), resulting in complex feature engineering. This application automatically captures fault features through VAE-Transformer latent space learning, avoiding manual feature engineering, and features a unique dynamic threshold selection mechanism (iterates through F1 scores to optimize the threshold), significantly improving detection sensitivity.

[0125] This application provides a self-supervised battery fault detection method based on the VAE-Transformer model for electric vehicle charging scenarios. This method can effectively overcome the problems of data imbalance and discontinuity, and improve the fault detection accuracy during battery charging. To implement this method, this application is carried out according to the following technical solution. Figure 3 As shown, this application includes the following steps: Step 1: Data preprocessing.

[0126] Data preprocessing is used to standardize and perform sliding window sampling on the acquired time series data.

[0127] First, time-series data of the electric vehicle charging process is acquired. This data includes information such as battery voltage, current, temperature, and remaining charge during charging, providing a foundation for subsequent fault detection. Next, this time-series data is preprocessed, primarily including sliding window sampling and the extraction and separation of individual feature data, to transform the data into a format suitable for model input, ensuring both temporal accuracy and feature quality.

[0128] For example, given B, the acquired time-series data of an electric vehicle charging. This time-series data can be represented as... .in, Data recorded at each point in time. The specific representation is as follows: .in, Let be the voltage of the battery at time m. Let be the current of the battery at time m. Let m be the remaining charge of the battery at time m. Let be the temperature of the battery at time m.

[0129] Next, the time series data is preprocessed to obtain a format that the codec can read. The specific steps are as follows: (1) Standardization. The data is standardized using formula (1) so that the mean is zero and the standard deviation is one, thus transforming the data into a standard normal distribution.

[0130] (2) Sliding window segmentation. To better adapt to the data characteristics at different time scales, this application introduces a multi-scale window mechanism. The reconstruction error is calculated for each scale, such as short, medium, and long time windows. To make the model more flexible, the window size is dynamically adjusted based on data volatility. By calculating metrics such as the standard deviation or coefficient of variation for each time period, the window size at each scale is automatically adjusted so that the model can select an appropriate window size for data with varying degrees of volatility.

[0131] For example, based on the standard deviation of data such as voltage, current, remaining charge, and temperature, and by setting a reference window size w. base Formula (7) is used to calculate the adaptively adjusted window size. Calculated The specific window size for each scale is set according to a certain proportional relationship. For example, taking the voltage mean μ=50, standard deviation σ=10, baseline window size=30s, and λ=0.2 as an example, the size of the first window is 31s. Based on this value, window sizes for different scales can be defined. For example, short time window: ws=0.5×31≈15s; medium time window: wm=1.0×31=31s; long time window: wl=2.0×31=62s.

[0132] In this embodiment of the 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 separately, and the time series data can be divided into three datasets based on the short time window, the medium time window, and the long time window.

[0133] After step 1, three datasets are obtained: dataset A based on a short time window, dataset B based on a long time window, and dataset C based on a medium time window. Steps 2-4 can be performed on each dataset to obtain the corresponding reconstructed dataset.

[0134] Step 2, data reshaping.

[0135] For the data segments in the dataset, the data is reshaped in the following way. Based on the preset index list, the corresponding column data is selected from the input data segments. Then, the extracted column data is converted into a format suitable for model processing. The extraction process can be represented by formula (8).

[0136] , formula (8).

[0137] in, This is a function for extracting column data. , It is the index of the data column. It is an index table of feature columns related to the task. For example, This is used to extract the first column of data (e.g., voltage), the second column (e.g., current), the third column (e.g., remaining power), and the fourth column (e.g., temperature) from a data segment. After extracting the data segment by segment, the results are as follows: That is, data sequence. After extraction, it was divided into... , respectively representing voltage Current Remaining battery power and battery temperature Tensors with four characteristics. This represents a data segment after data reshaping. The specific representation is as follows: . Similarly.

[0138] 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 .

[0139] Step 3, encoding.

[0140] 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.

[0141] 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.

[0142] The specific process of latent space learning by the encoder-decoder is as follows: (1) Input data projection.

[0143] 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).

[0144] , formula (9).

[0145] 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. The value is set to 64. In this embodiment, the encoder input is each data segment.

[0146] (2) Encoder encoding.

[0147] The encoder processes the data through multiple self-attention layers and feedforward neural network layers to capture global dependencies in the data. The output of each encoder layer is passed to the next layer, and the hidden state is finally obtained through pooling. For example, the encoding can be represented by the following formulas (10) and (11).

[0148] , formula (10).

[0149] , formula (11).

[0150] in, The encoder's complete output sequence, with dimension . , where m is the sequence length and d is the feature dimension.

[0151] , This represents the mapping function of the Transformer encoder. The hidden state is obtained after average pooling the encoder output. Let be the output vector of the encoder at the i-th time step (or position).

[0152] (3) Latent space reasoning.

[0153] The encoder's hidden state is achieved through a fully connected layer. The latent variables are mapped to their mean and variance. In this embodiment, the latent variables are the reconstructed features. The mapping process can be represented by formula (12).

[0154] , formula (12).

[0155] in, The mean of the latent variables. Let be the sample variance of the latent variable, and Q represent the dimension of the latent variable. This is the weight matrix. This is the bias vector. The standard deviation of the latent variables. It is through the sample variance of the latent variables. It is obtained by applying an exponential change.

[0156] Then, the reparameterization technique is used to sample the latent variable z from the latent space distribution. It follows a standard normal distribution with a mean of 0, a variance of 1, and a covariance matrix that is the identity matrix. Gaussian white noise, as shown in formula (13).

[0157] , formula (13).

[0158] Step 4, Decode.

[0159] The latent spatial variables are decoded using a decoder, and then the target data is reconstructed. The specific steps of data decoding are as follows: (1) Decoder decoding. Decode the latent variables. The data is mapped back to the hidden space and used as input to the decoder. The decoder generates the output sequence by introducing the embedding of the target data. The process is shown in Equations (14) and (15).

[0160] , formula (14).

[0161] , formula (15).

[0162] in, For the input of the decoder, For Transformer decoder, This is the weight matrix. For bias vectors, For decoder output, For embedding the target sequence, one of the four features is selected as the embedding. The implementation process is shown in formula (16).

[0163] , formula (16).

[0164] in, The extracted data sequence, For feature extraction function, It is a feature column index table related to the task, which differs from the feature extraction operation in step 2. Only one feature is extracted as the embedding, and then the input data is projected through step 3(1) to obtain... . .in, This is the weight matrix. This is the bias vector.

[0165] This application employs the VAE-Transformer model, which demonstrates high detection performance. As shown in Tables 1 and 2, Table 1 presents a performance comparison of different algorithms on two battery datasets (Battery dataset 1 and Battery dataset 3) in terms of recall, precision, and area under the curve (AUC).

[0166] Table 1

[0167] Table 2 shows a performance comparison of different algorithms on the task of detecting abnormal battery conditions.

[0168] Table 2

[0169] The VAE-Transformer model used in this application has the advantages of strong time series modeling capability, high computational efficiency, and strong ability to process complex data.

[0170] 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.

[0171] , formula (18).

[0172] in, It is the model's reconstructed output, representing the sequence generated by the model from the latent space, i.e., the reconstructed data. This is the weight matrix. This is the bias vector.

[0173] After executing steps 3 and 4 sequentially, the server obtains the reconstructed dataset A' corresponding to the short time window, the reconstructed dataset B' corresponding to the long time window, and the reconstructed dataset C' corresponding to the medium time window. The server also obtains 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 across the Q dimensions. and variance in Q dimensions Next, the server can perform step 5 to calculate the reconstruction error of the fragment combination.

[0174] Step 5: Calculate the reconstruction error.

[0175] (1) Calculate Huber error.

[0176] Based on dataset A corresponding to the short window and reconstructed dataset A', Huber error for N data segments is calculated using formula (5). Based on dataset B corresponding to the long window and reconstructed dataset B', Huber error for N data segments is calculated using formula (5). Based on dataset C corresponding to the medium window and reconstructed dataset C', Huber error for N data segments is calculated using formula (5). Huber error is an error function that combines mean squared error and absolute error. When the error is small, Huber error behaves like MSE, while when the error is large, it becomes like MAE. Huber error is more robust to outliers. This application uses Huber error that combines mean squared error and absolute error.

[0177] (2) Calculate the first multi-scale reconstruction error.

[0178] For N segments, the first multiscale reconstruction error of each segment combination is calculated using formula (19).

[0179] , formula (19).

[0180] in, It is the first multi-scale reconstruction error of the fragment combination. , , These are the weight coefficients for the data segments corresponding to the short window, the medium window, and the long window, respectively. It is the Huber error of a data segment in dataset A corresponding to the short window. It is the Huber error of the data segment with the same index as the data segment in dataset B corresponding to the middle window. It is the Huber error of the data segment with the same index in dataset C corresponding to the long window.

[0181] (3) Calculate the KL divergence error.

[0182] KL divergence is used to measure the difference between the distribution of a latent variable and the standard normal distribution, in order to constrain the learning process of the model and prevent the model from overfitting or producing unreasonable predicted distributions. For example, based on a set of parameters corresponding to the short window in the encoder-decoder output, the KL divergence error of N data segments is calculated using formula (6). Based on a set of parameters corresponding to the long window in the encoder-decoder output, the KL divergence error of N data segments is calculated using formula (6). Based on a set of parameters corresponding to the medium window in the encoder-decoder output, the KL divergence error of N data segments is calculated using formula (6).

[0183] (4) Calculate the multi-scale KL divergence error.

[0184] To further enhance the stability and robustness of the model's latent space learning across different time scales, this application introduces a multi-scale KL divergence error, also known as a second multi-scale reconstruction error, in addition to the multi-scale reconstruction error. The core idea is to establish constraint mechanisms for the latent distribution at short, medium, and long time windows, ensuring that the latent representation at each scale approximates a standard normal distribution, thereby preventing overfitting of the model at a single scale.

[0185] The multi-scale KL divergence error is obtained by weighted fusion using formula (20): , formula (20).

[0186] in, It is the KL divergence error of the multiscale. , , These are the weight coefficients for the data segments corresponding to the short window, the medium window, and the long window, respectively. It is the KL divergence error of a data segment in dataset A corresponding to the short window. It is the KL divergence error of the data segment with the same index as the data segment in dataset B corresponding to the middle window. It is the KL divergence error of the data segment with the same index in the dataset C corresponding to the long window.

[0187] (5) Calculate the total error of the fragment combination, i.e. the reconstruction error.

[0188] Reconstruction error of fragment combination = ×First multi-scale reconstruction error of fragment combination+ × The second multi-scale reconstruction error of this segment combination.

[0189] It should be understood that for both time series data and historical series data, multiple reconstruction errors can be obtained based on steps 1-5. For example, N reconstruction errors can be obtained for time series data, and P reconstruction errors can be obtained for historical series data.

[0190] Step 6: Anomaly detection.

[0191] The process involves iterating through all reconstruction errors corresponding to historical sequence data, selecting the one with the best F1 score as the dynamic threshold (i.e., the first threshold), and then comparing the reconstruction error corresponding to the time series data with the dynamic threshold to determine whether the current segment combination is abnormal. The specific detection steps for determining whether the current data segment is abnormal by comparing the reconstruction error with the dynamic threshold are as follows: The selection of the dynamic threshold is based on the assumption that the failure rate of existing electric vehicle batteries is generally low. Through the above five steps, the reconstruction error corresponding to the combination of P segments can be obtained, as shown below. Where P is the number of data segments in the dataset. (Selection) As a baseline error, j ranges from 1 to P, and then the threshold is... The process of comparing the P reconstruction errors is shown in the following formula (21).

[0192] , formula (21).

[0193] Among them, the L() function is the anomaly detection function, which is greater than or equal to the baseline error. It is then judged as abnormal. less than the threshold Then it is judged as normal. Repeating the above steps yields the predicted label value for each fragment combination. Then, the predicted label values ​​are statistically compared with the true label values, and precision P and recall R are calculated based on the method described above. Finally, based on precision P and recall R, a correlation is calculated... The corresponding F1 score. The reconstruction error corresponding to the maximum value is considered the optimal threshold, used to determine the final prediction result of the model. Under normal circumstances, the reconstruction error is small, such as less than the first threshold; while in the event of a fault or anomaly, the reconstruction error is large, such as greater than the first threshold. Therefore, this difference can be used to determine the fault.

[0194] For example, among the N reconstruction errors corresponding to time series data, the reconstruction error can be compared with the first threshold based on formula (22) to determine whether the data segment is abnormal.

[0195] For example, it can be represented by formula (22).

[0196] , formula (22).

[0197] in, This function is for anomaly detection. The reconstruction error is greater than or equal to a threshold. If the corresponding fragment combination is abnormal, the reconstruction error is less than the threshold. If an abnormal segment combination is found, the corresponding segment combination is determined to be normal (True). If an abnormal segment combination exists, the battery is determined to be faulty; if no abnormal segment combination exists, the battery is determined to be normal.

[0198] As can be seen, the embodiments of this application can detect anomalies in time series data generated during the charging process of electric vehicles, realize the anomaly detection of discontinuous battery feature data, and improve the sensitivity and accuracy of anomaly detection in electric vehicle battery time series.

[0199] The method embodiments of this application have been described in detail above with reference to the accompanying drawings. The device embodiments of this application will now be described in detail with reference to the accompanying drawings. It should be understood that the description of the device embodiments corresponds to the method embodiments; therefore, any parts not described in detail can be referred to the method embodiments above.

[0200] Figure 4 This is a schematic diagram of a battery detection device provided in an embodiment of this application. Figure 4 As shown, the battery detection device 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.

[0201] The acquisition module 410 is used to acquire time-series data. The time-series data is used to characterize the state of the battery during the charging process.

[0202] The data partitioning module 420 is used to divide the time series data into M datasets based on M different window sizes; one type of window corresponds to one dataset; each of the M datasets includes N data segments; M and N are both integers greater than 1.

[0203] Input module 430 is used to input each of the M datasets into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets.

[0204] The error calculation module 440 is used to obtain N reconstruction errors corresponding to the combinations of the 1st to the Nth segments based on M datasets and M reconstructed datasets; wherein the i-th segment combination includes the i-th data segment in each of the M datasets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination.

[0205] The fault analysis module 450 is used to determine whether the battery is faulty based on N reconstruction errors.

[0206] In some embodiments, the time-series data includes parameters of the battery ordered by time series; the parameters are at least one of voltage, current, temperature, and remaining charge. The battery detection device 400 may further include a window generation module. The window generation module is used to generate M windows of different sizes based on the standard deviation and mean of a target parameter; wherein the target parameter is any one of the parameters.

[0207] The window generation module is also used to determine the size of the first window based on the standard deviation and mean of the target parameters and the size of the baseline window; and to adjust the size of the first window according to M preset coefficients to obtain M different window sizes.

[0208] The error calculation module 440 is also used to obtain the first error of each data segment in the N data segments included in the dataset for each of the M datasets, based on the dataset and the corresponding reconstructed data; and to aggregate the first errors of the M i-th data segments included in the M datasets to obtain the first multi-scale reconstruction error corresponding to the i-th segment combination, wherein the first multi-scale reconstruction error is the reconstruction error.

[0209] The error calculation module 440 is further configured to, for each of the M datasets, obtain the first error of each data segment among the N data segments included in the dataset based on the dataset and the corresponding reconstructed data; obtain the mean and variance of all data segments in the M datasets output by the encoder and decoder; for each data segment, obtain the 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 datasets to obtain the 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 datasets to obtain the 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.

[0210] The fault analysis module 450 is also used to compare the N reconstruction errors with the first threshold in sequence; if there is a reconstruction error among the N reconstruction errors that is greater than or equal to the threshold, a battery fault is determined.

[0211] The fault analysis module 450 is also used to generate P reconstruction errors based on historical sequence data; calculate the index value corresponding to each of the P reconstruction errors; P is an integer greater than 1; and use the target reconstruction error as the first threshold, where the target reconstruction error is the reconstruction error corresponding to the maximum index value.

[0212] The fault analysis module 450 is also used to take the j-th reconstruction error among the P reconstruction errors as the baseline error, compare the P reconstruction errors with the j-th reconstruction error, 1≤j≤P; determine the accuracy and recall based on the comparison results; and calculate the F1 score corresponding to the j-th reconstruction error based on the accuracy and recall.

[0213] The fault analysis module 450 is also used to divide the historical sequence data into M training datasets based on M different window sizes; one type of window corresponds to one training dataset; each of the M training datasets includes P data segments; each of the M training datasets is input into the codec to obtain M reconstructed training datasets that correspond one-to-one with the M training datasets; based on the M training datasets and the M reconstructed training datasets, P reconstruction errors corresponding to the combinations of the 1st to Pth segments are obtained; the kth segment combination includes the kth data segment in each of the M training datasets, 1≤k≤P.

[0214] Figure 5 This is a schematic diagram of a battery detection device provided in an embodiment of this application. The battery detection device 500 includes one or more processors 510 and one or more memories 520.

[0215] The processor 510 can support devices that detect batteries to implement the methods described in the preceding method embodiments.

[0216] The memory 520 stores a program that can be executed by the processor 510, causing the processor 510 to perform the methods described in the preceding method embodiments. The memory 520 may be independent of the processor 510 or integrated into the processor 510.

[0217] Optionally, vehicle 500 may also include transceiver 560. Processor 510 can communicate with other devices or chips via transceiver 560. For example, processor 510 can send and receive data with other devices or chips via transceiver 560.

[0218] This application provides a computer storage medium that stores one or more programs, which can be executed by one or more processors to implement the steps of the methods described in any of the above embodiments.

[0219] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0220] The aforementioned processor can be at least one of the following: application-specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), field-programmable gate array (FPGA), central processing unit (CPU), controller, microcontroller, and microprocessor. It is understood that other electronic devices can also implement the functions of the aforementioned processor, and this application does not specifically limit the specific implementation.

[0221] The aforementioned computer storage media / memory can be read-only memory, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD ROM), etc.

[0222] This application provides a computer program including computer-readable code. When the computer-readable code runs in an electronic device, the processor in the electronic device executes some or all of the steps in the above-described method.

[0223] This application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0224] It should be understood that the phrase "one embodiment" or "an embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0225] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0226] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0227] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0228] In addition, each functional unit in the various embodiments of this 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 implemented in hardware or in the form of hardware plus software functional units.

[0229] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0230] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an in-vehicle terminal (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.

[0231] The above are merely embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

[0232] The above embodiments are merely preferred embodiments provided to fully illustrate this application, and the scope of protection of this application is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on this application are all within the scope of protection of this application.

Claims

1. A method for detecting batteries, characterized in that, The method includes: Acquire time-series data; the time-series data is used to characterize the state of the battery during charging or discharging. The time series data is divided into M datasets based on M different window sizes; one type of window corresponds to one dataset; each of the M datasets includes N data segments; M and N are both integers greater than 1. Each of the M datasets is input into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets. Based on the M datasets and the M reconstructed datasets, obtain N reconstruction errors corresponding to the combinations of the 1st to Nth segments; wherein, the i-th segment combination includes the i-th data segment in each of the M datasets, 1≤i≤N; Based on the N reconstruction errors, it is determined whether the battery is faulty.

2. The method according to claim 1, characterized in that, 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 charge. Before dividing the time series data into M datasets based on M different window sizes, the method further includes: generating the M different window sizes based on the standard deviation and mean of a target parameter; wherein the target parameter is any one of the voltage, current, temperature, and remaining power.

3. The method according to claim 2, characterized in that, The generation of the M different window sizes based on the standard deviation and mean of the target parameters includes: The size of the first window is determined based on the standard deviation and mean of the target parameters and the size of the baseline window; The size of the first window is adjusted according to M preset coefficients corresponding to the M different window sizes to obtain the M different window sizes.

4. The method according to claim 1, characterized in that, The step of obtaining N reconstruction errors corresponding to the combinations of the 1st to Nth segments based on the M datasets and the M reconstructed datasets includes: For each of the M datasets, based on each dataset and the corresponding reconstructed dataset, obtain the first error of each of the N data segments included in each dataset; The first error of the M i-th data segments included in the M datasets is aggregated to obtain the first multi-scale reconstruction error corresponding to the combination of the i-th segments; the first multi-scale reconstruction error is the reconstruction error.

5. The method according to claim 1, characterized in that, The step of obtaining N reconstruction errors corresponding to the combinations of the 1st to Nth segments based on the M datasets and the M reconstructed datasets includes: For each of the M datasets, based on each dataset and the corresponding reconstructed dataset, obtain the first error of each of the N data segments included in each dataset; Based on the mean and variance of the output of the encoder and decoder, which correspond one-to-one with all data segments included in the M datasets, the second error of each data segment is obtained; The first errors of the M i-th data segments included in the M datasets are aggregated to obtain the first multi-scale reconstruction error corresponding to the combination of the i-th segments; By aggregating the second errors of the M data segments included in the M datasets, a second multi-scale reconstruction error corresponding to the combination of the M data segments is obtained; By aggregating the first multi-scale reconstruction error and the second multi-scale reconstruction error, the reconstruction error corresponding to the i-th segment combination is obtained.

6. The method according to any one of claims 1-5, characterized in that, Determining whether the battery is faulty based on the N reconstruction errors includes: The N reconstruction errors are compared sequentially with the first threshold. If any of the N reconstruction errors is greater than or equal to a threshold, the battery is determined to be faulty.

7. The method according to claim 6, characterized in that, The first threshold is generated based on historical sequence data; before comparing the N reconstruction errors sequentially with the first threshold, the method further includes: Based on the historical sequence data, P reconstruction errors are generated; P is an integer greater than 1. Calculate the index values ​​that correspond one-to-one with the P reconstruction errors; The target reconstruction error is used as the first threshold, wherein the target reconstruction error is the reconstruction error corresponding to the maximum index value.

8. The method according to claim 7, characterized in that, The index value is the F1 score, and the calculation of the index value corresponding one-to-one with the P reconstruction errors includes: The j-th reconstruction error among the P reconstruction errors is used as the reference error. The P reconstruction errors are compared with the j-th reconstruction error, where 1≤j≤P. Based on the comparison results, accuracy and recall are determined; Based on the accuracy and the recall, calculate the F1 score corresponding to the j-th reconstruction error.

9. The method according to claim 7 or 8, characterized in that, The generation of P reconstruction errors based on the historical sequence data includes: The historical sequence data is divided into M training datasets based on M different window sizes; each type of window corresponds to one training dataset; each of the M training datasets includes P data segments. Each of the M training datasets is input into the codec to obtain M reconstructed training datasets that correspond one-to-one with the M training datasets. Based on the M training datasets and the M reconstructed training datasets, obtain P reconstruction errors corresponding to the combinations of the 1st to Pth segments; wherein, the kth segment combination includes the kth data segment in each of the M training datasets, 1≤k≤P.

10. A device for detecting batteries, characterized in that, The device includes: The data acquisition module is used to acquire time-series data; the time-series data is used to characterize the state of the battery during charging or discharging. The data partitioning module is used to divide the time series data into M datasets based on M different window sizes; wherein, one type of window corresponds to one dataset; each of the M datasets includes N data segments; M and N are both integers greater than 1. The input module is used to input each of the M datasets into the codec to obtain M reconstructed datasets that correspond one-to-one with the M datasets. The error calculation module obtains the reconstruction error of the 1st to Nth segment combinations based on the M datasets and the M reconstructed datasets; wherein the i-th segment combination includes the i-th data segment in each of the M datasets, 1≤i≤N; the reconstruction error is used to indicate the quality of the data segments included in the corresponding segment combination; The fault analysis module is used to determine whether the battery is faulty based on the reconstruction error of the combination of the first to Nth segments.

11. A device for testing batteries, characterized in that, The device includes: One or more processors; A memory for storing one or more programs that, when executed by one or more processors, cause the device to perform the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Battery state evaluation method based on automatic encoder

    CN113076689A

  • Unmanned aerial vehicle sensor zero sample fault detection method based on CVAE-GAN model

    CN117034020A

  • Generative model-oriented few-sample video stream classification method and system

    CN117077030A

  • Detection method and device for judging abnormity of self-encoder electric energy meter based on segment consistency

    CN117092581A

  • Lithium ion battery fault automatic threshold optimization method and system and electronic equipment

    CN120652316A