Battery safety detection method, device and electronic equipment
By using self-supervised and supervised transfer learning methods in the battery safety detection model, the charging pattern characteristics of the charging data are explored, and the problem of poor robustness of the battery safety detection model in the existing technology is solved, and more accurate battery safety detection is achieved.
Patent Information
- Application Number
- CN202210817033.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-12
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2042-07-12
AI Technical Summary
The battery safety detection model obtained by the prior art is poorly robust and cannot accurately detect the battery, mainly due to the indiscriminate data imbalance and charging data characteristics.
The battery safety detection model is trained using a self-supervised representation learning method and a supervised transfer learning method. The feature extraction module can mine the charging pattern characteristics of the charging data, thereby improving the accuracy of detection.
By mining the charging law characteristics of charging data, the robustness of the battery safety detection model is improved, and the safety status of the battery can be detected more accurately, alleviating the problem of data imbalance and indistinguishability of features.
Smart Images

Figure CN115343646B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of batteries, and in particular to a method, device and electronic equipment for battery safety detection. Background Art
[0002] Battery safety testing is to identify whether the battery has safety hazards, which belongs to the category of anomaly detection. In the anomaly detection problem, the problem of sample data imbalance is often encountered, because anomalies do not appear in most cases. Battery safety testing is no exception. The batteries of most vehicles are normal and safe, and only the batteries of individual vehicles have safety problems. Therefore, for the classification of battery safety testing, the problem of data imbalance must be solved first. At present, the commonly used methods for dealing with data imbalance are mainly: (1) When training the model, set the weight of the loss function so that the loss of the minority class is greater than the loss of the majority class; (2) When collecting training samples, undersample the majority class or oversample the minority class to achieve data balance.
[0003] The above-mentioned commonly used methods will encounter the following problems when the charging pile performs safety testing on the battery: as the charging side, it has to deal with various types of batteries on the market, and their charging rules are also different. Therefore, undersampling will cause the final trained model to not cover most scenarios, and oversampling will bring about the problem of overfitting; in addition, at present, when the charging pile charges the battery, the charging data directly obtained contains less information. In the scenario of unbalanced sample data, the characteristics of positive and negative charging data samples cannot be clearly distinguished, which brings great difficulties to the model for battery safety testing. That is, the robustness of the battery safety detection model trained by the above two schemes is poor, and it is impossible to obtain accurate battery safety detection results.
[0004] In summary, the battery safety detection model obtained by the prior art has poor robustness and is unable to perform accurate safety detection on the battery. Summary of the invention
[0005] In view of this, an object of the present invention is to provide a method, device and electronic device for battery safety detection, so as to alleviate the technical problem that the battery safety detection model obtained in the prior art has poor robustness and cannot perform accurate safety detection on the battery.
[0006] In a first aspect, an embodiment of the present invention provides a method for battery safety detection, comprising:
[0007] When a battery of a vehicle is DC charged, obtaining current charging data of the battery for a first preset time period;
[0008] A battery safety detection model is used to perform battery safety detection on the charging data to obtain a safety detection result of the battery, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is first trained on the initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data.
[0009] Furthermore, the method further comprises:
[0010] Acquire a first sub-charging data sample of a second preset time length of a single charging process and a second sub-charging data sample of the first preset time length of two charging processes, wherein the second preset time length is twice the first preset time length;
[0011] The first sub-charging data sample and the second sub-charging data sample are used to train the initial feature extraction model to obtain a trained feature extraction model, wherein the initial feature extraction model includes: the initial feature extraction module and the initial comparison prediction module, and the trained feature extraction model includes: the intermediate feature extraction module and the trained comparison prediction module.
[0012] Furthermore, the loss function when training the feature extraction model is: Wherein, j represents a charging data sample in a batch, L represents the loss value calculated on the charging data sample, N represents the total number of charging data samples in the batch, m represents any charging data sample in the batch, m=1, ..., N, n represents the known part in the time series of a charging data sample, starting from step 1, and currently proceeding to step n, K represents the length to be predicted in the time series of a charging data sample, k represents a step to be predicted in the time series of a charging data sample, starting from step n+1, and predicting to step n+K, f represents the similarity measurement function, z represents the 8-dimensional feature of a time step of a charging data sample extracted based on the initial feature extraction module, Represents the 8-dimensional features of a charging data sample at a certain time step predicted by the gated recurrent unit of the initial comparison prediction module.
[0013] Furthermore, the method further comprises:
[0014] Obtaining positive samples of charging data of the first preset time length of the accident battery and / or the high-risk battery and negative samples of charging data of the first preset time length of the normal battery;
[0015] The positive samples and the negative samples are used to train an initial battery safety detection model to obtain the battery safety detection model, wherein the initial battery safety detection model includes: the intermediate feature extraction module and the initial battery safety detection module.
[0016] Furthermore, the charging data includes: time step, required voltage, required current, actual voltage, actual current, BMS voltage, BMS current, maximum cell voltage, maximum temperature, minimum temperature, charge amount, maximum temperature cell number, minimum temperature cell number, maximum voltage cell number, and maximum voltage cell group number.
[0017] Further, if the charging time of the current charging process is M minutes, the safety test result of the battery is:
[0018]
[0019] In a second aspect, an embodiment of the present invention further provides a battery safety detection device, including:
[0020] An acquisition unit, used for acquiring charging data of a first preset time period of the battery when DC charging is performed on the battery of the vehicle;
[0021] A battery safety detection unit is used to perform battery safety detection on the charging data using a battery safety detection model to obtain a safety detection result of the battery, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is obtained by first training the initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then training the trained intermediate feature extraction module and the initial battery safety detection module through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data.
[0022] Furthermore, the device is also used for:
[0023] Acquire a first sub-charging data sample of a second preset time length of a single charging process and a second sub-charging data sample of the first preset time length of two charging processes, wherein the second preset time length is twice the first preset time length;
[0024] The first sub-charging data sample and the second sub-charging data sample are used to train the initial feature extraction model to obtain a trained feature extraction model, wherein the initial feature extraction model includes: the initial feature extraction module and the initial comparison prediction module, and the trained feature extraction model includes: the intermediate feature extraction module and the trained comparison prediction module.
[0025] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0026] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to execute any method described in the first aspect above.
[0027] In an embodiment of the present invention, a method for battery safety detection is provided, comprising: when DC charging a battery of a vehicle, obtaining charging data of the battery for a first preset time period; performing battery safety detection on the charging data using a battery safety detection model to obtain a battery safety detection result, wherein the battery safety detection model comprises: a feature extraction module and a battery safety detection module, and the battery safety detection model is obtained by first training an initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then training the trained intermediate feature extraction module and the initial battery safety detection module through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data. From the above description, it can be seen that the battery safety detection model of the present invention is first trained by a self-supervised representation learning method and a first charging data sample to train the initial feature extraction module, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample. The feature extraction module of the battery safety detection model can mine the charging regularity characteristics of the charging data, and then when the battery safety detection is performed again through the mined charging regularity characteristics, the safety detection result of the battery detected is more accurate. Compared with the battery safety detection model directly obtained by a supervised training method and charging data sample training, the battery safety detection model of the present invention has good robustness, because it can mine the charging regularity characteristics of the charging data, and the charging regularity characteristics can clearly distinguish whether the battery has an abnormality. In this way, the accuracy of the final determined battery safety detection result is good, which alleviates the technical problem that the battery safety detection model obtained in the prior art has poor robustness and cannot perform accurate safety detection on the battery. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0029] Figure 1 A flowchart of a battery safety detection method provided by an embodiment of the present invention;
[0030] Figure 2 A schematic diagram of the network structure of a feature extraction model provided by an embodiment of the present invention;
[0031] Figure 3 A schematic diagram of the network structure of a feature extraction module provided in an embodiment of the present invention;
[0032] Figure 4 A schematic diagram of the network structure of a battery safety detection model provided by an embodiment of the present invention;
[0033] Figure 5 A schematic diagram of a battery safety detection device provided by an embodiment of the present invention;
[0034] Figure 6 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] At present, the battery safety detection model is directly trained in a supervised manner using charging data samples, but the resulting battery safety detection model has poor robustness and cannot perform accurate battery safety detection.
[0037] Based on this, the battery safety detection model of the present invention is first trained by a self-supervised representation learning method and a first charging data sample to train an initial feature extraction module, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample. The feature extraction module of the battery safety detection model can mine the charging regularity characteristics of the charging data, and then when the battery safety detection is performed again through the mined charging regularity characteristics, the safety detection result of the battery detected is more accurate. Compared with the battery safety detection model directly obtained by a supervised training method and charging data sample training, the battery safety detection model of the present invention has good robustness because it can mine the charging regularity characteristics of the charging data, and the charging regularity characteristics can clearly distinguish whether the battery has an abnormality. In this way, the accuracy of the final determined battery safety detection result is good.
[0038] To facilitate understanding of this embodiment, a battery safety detection method disclosed in an embodiment of the present invention is first introduced in detail.
[0039] Embodiment 1:
[0040] According to an embodiment of the present invention, an embodiment of a method for battery safety detection is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0041] Figure 1 is a flow chart of a battery safety detection method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0042] Step S102, when DC charging the battery of the vehicle, obtaining current charging data of the battery for a first preset time period;
[0043] In an embodiment of the present invention, the above-mentioned battery safety detection method can be applied to a charging pile. When the charging pile performs DC charging on the battery of a vehicle, it can interact with the battery management system of the vehicle to obtain the current charging data of the battery for the first preset duration.
[0044] The above charging data include: time step, required voltage, required current, actual voltage, actual current, BMS voltage, BMS current, maximum cell voltage, maximum temperature, minimum temperature, charge amount, maximum temperature cell number, minimum temperature cell number, maximum voltage cell number, and maximum voltage cell group number.
[0045] The above-mentioned time step refers to the charging timestamp, and can also be a serial number representing the time. For example, if a message of charging data is obtained in one minute, the above-mentioned time step can be 1, 2, 3, ..., representing the first minute, the second minute, the third minute, ...; the above-mentioned required voltage and required current refer to the required voltage and current when the battery is charged; the actual voltage and actual current refer to the actual voltage and current when the charging pile charges the battery; the BMS voltage and BMS current refer to the charging voltage and current detected by the BMS.
[0046] The first preset time length may be 5 consecutive minutes, and the embodiment of the present invention does not impose any specific limitation on the first preset time length.
[0047] Step S104, using a battery safety detection model to perform battery safety detection on the charging data to obtain a battery safety detection result, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is first trained on the initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data.
[0048] In an embodiment of the present invention, a battery safety detection model includes: a feature extraction module and a battery safety detection module, wherein the initial feature extraction module is first trained by a self-supervised representation learning method and a first charging data sample to obtain an intermediate feature extraction module, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data, and then the intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample to obtain the battery safety detection model of the present invention, wherein the feature extraction module can mine the charging regularity characteristics of the charging data, and the charging regularity characteristics can clearly distinguish whether the battery has an abnormality. In this way, when the battery safety detection module performs battery safety detection again through the mined charging regularity characteristics, the accuracy of the battery safety detection result determined is good.
[0049] In an embodiment of the present invention, a method for battery safety detection is provided, comprising: when DC charging a battery of a vehicle, obtaining charging data of the battery for a first preset time period; performing battery safety detection on the charging data using a battery safety detection model to obtain a battery safety detection result, wherein the battery safety detection model comprises: a feature extraction module and a battery safety detection module, and the battery safety detection model is obtained by first training an initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then training the trained intermediate feature extraction module and the initial battery safety detection module through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data. From the above description, it can be seen that the battery safety detection model of the present invention is first trained by a self-supervised representation learning method and a first charging data sample to train the initial feature extraction module, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample. The feature extraction module of the battery safety detection model can mine the charging regularity characteristics of the charging data, and then when the battery safety detection is performed again through the mined charging regularity characteristics, the safety detection result of the battery detected is more accurate. Compared with the battery safety detection model directly obtained by a supervised training method and charging data sample training, the battery safety detection model of the present invention has good robustness, because it can mine the charging regularity characteristics of the charging data, and the charging regularity characteristics can clearly distinguish whether the battery has an abnormality. In this way, the accuracy of the final determined battery safety detection result is good, which alleviates the technical problem that the battery safety detection model obtained in the prior art has poor robustness and cannot perform accurate safety detection on the battery.
[0050] The above content briefly introduces the battery safety detection method of the present invention, and the specific contents involved are described in detail below.
[0051] In an optional embodiment of the present invention, the training process of the initial feature extraction module includes:
[0052] (1) acquiring a first sub-charging data sample of a second preset time length during a single charging process and a second sub-charging data sample of a first preset time length during two charging processes, wherein the second preset time length is twice the first preset time length;
[0053] Specifically, the second preset time length may be 10 consecutive minutes, and the first preset time length may be 5 consecutive minutes. The embodiment of the present invention does not impose any specific restrictions on the second preset time length and the first preset time length.
[0054] If the second preset time length is 10 consecutive minutes, then the charging data of 10 consecutive minutes of a charging process is obtained as the first sub-charging data sample, and the charging data of 5 consecutive minutes of a charging process (as the charging data of the first 5 minutes) and the charging data of 5 consecutive minutes of another charging process (the same vehicle or a different vehicle) (as the charging data of the last 5 minutes) are obtained as the second sub-charging data sample.
[0055] (2) The initial feature extraction model is trained using the first sub-charging data sample and the second sub-charging data sample to obtain a trained feature extraction model, wherein the initial feature extraction model includes: an initial feature extraction module and an initial comparison prediction module, and the trained feature extraction model includes: an intermediate feature extraction module and a trained comparison prediction module.
[0056] The main function of the initial feature extraction module is to extract 8-dimensional charging regularity features from the 15-dimensional charging data after convolution and full connection.
[0057] After being processed by the initial feature extraction module, the 8-dimensional charging regularity feature z0 is extracted from the charging data of the first 5 minutes, and the 8-dimensional charging regularity feature z1 is extracted from the charging data of the last 5 minutes. After z0 is input into the GRU layer (Gated Recurrent Unit), the predicted value of the 8-dimensional charging regularity feature of the last 5 minutes is predicted. z1 and Input the CPC layer (comparative prediction module), generate a loss function based on the inner product of the two, and train the feature extraction model.
[0058] GRU: Gated Recurrent Unit, also known as gated recurrent unit, is a gated recurrent neural network. GRU can capture dependencies with large intervals in time series data and is used to solve the problem of vanishing and exploding gradients of hidden layer variables in recurrent neural networks.
[0059] CPC: Contrastive Predictive Coding, or contrast prediction module, is an unsupervised representation learning method developed by the Deep Mind team in 2018. It is used to learn data representation so as to more efficiently extract effective feature information in supervised learning such as classification and regression.
[0060] The following is a detailed description of the structure of the feature extraction model and the functions of each layer:
[0061] The network structure of the feature extraction model is as follows Figure 2As shown, input_5: 15-dimensional charging data 5 minutes before the sample is used as input; input_6: 15-dimensional charging data 5 minutes after the sample is used as input; time_distributed_3: The 15-dimensional charging data 5 minutes before the sample is extracted through the initial feature extraction module to extract the 8-dimensional charging regularity feature z0; time_distributed_4: The 15-dimensional charging data 5 minutes after the sample is extracted through the initial feature extraction module to extract the 8-dimensional charging regularity feature z1 (the specific structure of the feature extraction module will be introduced below); ar_context, z_t_0 / 1 / 2 / 3 / 4, lambda_2: Through GRU time series data prediction, the 8-dimensional charging regularity feature z0 of the first 5 minutes is used to predict the 8-dimensional charging regularity feature of the next 5 minutes cpc_layer_2: Compare the prediction modules with CPC, based on z1 and As input, a comparative prediction module is established.
[0062] The specific structure of the feature extraction module is as follows: Figure 3 As shown in the figure, Input Layer: 15-dimensional charging data samples are used as input; Conv1D one-dimensional convolution layer: 32-dimensional basic features are extracted from the 15-dimensional charging data samples through convolution operations; Batch Normalization batch standardization layer: Since data distribution will affect training, the standardization operation is used to allow the values of each layer to be passed down within the effective range to achieve the purpose of optimizing the neural network; LeakyReLU activation layer: Leaky ReLU assigns a non-zero slope to all negative values, and the remaining values remain unchanged; Flatten flattening layer: as a transition from the convolution layer to the fully connected layer, it is used to reduce the number of channels; Dense fully connected layer: 64-dimensional abstract features are further extracted through the fully connected layer; Batch Normalization batch standardization layer: the purpose is the same as above; Leaky ReLU activation layer: the purpose is the same as above; Dense fully connected layer: 8-dimensional charging regularity features are extracted through the fully connected layer as the final output of the feature extraction module.
[0063] The loss function when training the feature extraction model is:
[0064] Among them, j represents a charging data sample in a batch, L represents the loss value calculated on the charging data sample, N represents the total number of charging data samples in the batch, m represents any charging data sample in the batch, m=1,...,N, n represents the known part in the time series of a charging data sample, starting from step 1, and currently proceeding to step n, K represents the length to be predicted in the time series of a charging data sample, k represents a step to be predicted in the time series of a charging data sample, starting from step n+1, and predicting to step n+K, f represents the similarity measurement function, z represents the 8-dimensional feature of a charging data sample at a time step extracted based on the initial feature extraction module, Represents the 8-dimensional features of the charging data sample predicted by the gated recurrent unit of the initial contrast prediction module at a certain time step. -1: For a good network, the similarity of the numerator in the above formula should be very high, and the corresponding f calculation value is large, while the f calculation value of each term in the denominator should be small except when m=j. Therefore, multiply by -1 as the final loss function for optimizing the network.
[0065] During the above training process, the batch number can be selected as 128 and the epoch number can be selected as 10.
[0066] The above process is: using massive charging process data as samples, using self-supervised representation learning methods, learning charging law characteristics from the data, and obtaining an intermediate feature extraction module.
[0067] In an optional embodiment of the present invention, the method further comprises:
[0068] (1) obtaining positive samples of charging data of an accident battery and / or a high-risk battery for a first preset time and negative samples of charging data of a normal battery for a first preset time;
[0069] The label of the positive sample can be 1, and the label of the negative sample can be 0.
[0070] (2) Using positive samples and negative samples to train an initial battery safety detection model to obtain a battery safety detection model, wherein the initial battery safety detection model includes: an intermediate feature extraction module and an initial battery safety detection module.
[0071] Specifically, the above intermediate feature extraction module is used as a pre-training model, and the time series GRU layer and the fully connected layer are expanded as the battery safety detection module to establish a battery safety detection model. That is, based on the intermediate feature extraction module, a classifier is added to establish a battery safety detection model.
[0072] The specific network structure is as follows Figure 4As shown, input_10: takes the positive and negative samples of the 15-dimensional time series charging data of the 5-minute charging process as input; time_distributed_5: extracts the 8-dimensional charging regularity features through the intermediate feature extraction module; ar_context, dense_10: performs battery safety detection based on the 8-dimensional charging regularity features to obtain the battery safety detection results, that is, the abnormal probability value of the 5-minute charging process.
[0073] For the above model training, the batch number can be 128 and the epoch number can be 10.
[0074] In actual application, when the vehicle is DC charged, as long as the charging time exceeds 5 minutes (including 5 minutes), real-time battery safety detection can be carried out. During the detection, take 5 consecutive minutes of charging data (time step, required voltage, required current, actual voltage, actual current, BMS voltage, BMS current, maximum cell voltage, maximum temperature, minimum temperature, charge amount, maximum temperature cell number, minimum temperature cell number, maximum voltage cell number, maximum voltage cell group number), input the trained battery safety detection model, and you can get the battery safety detection result (probability value between 0 and 1, 0 means normal; 1 means abnormal).
[0075] In the embodiment of the present invention, if the charging time of the current charging process is M minutes, the safety detection result of the battery is:
[0076]
[0077] For example, the charging time of the current charging process is 60 minutes, the first preset time is 5 consecutive minutes, and the battery safety test result is: That is, the battery safety test results obtained every 5 minutes during the 60-minute charging time are first summed up, and then the average is calculated to be the battery safety test result of the charging process.
[0078] Embodiment 2:
[0079] The embodiment of the present invention further provides a battery safety detection device, which is mainly used to execute the battery safety detection method provided in the first embodiment of the present invention. The battery safety detection device provided in the embodiment of the present invention is specifically introduced below.
[0080] Figure 5 is a schematic diagram of a battery safety detection device according to an embodiment of the present invention, such as Figure 5 As shown, the device mainly includes: an acquisition unit 10 and a battery safety detection unit 20, wherein:
[0081] An acquisition unit, used for acquiring charging data of a first preset time period of the battery when DC charging is performed on the battery of the vehicle;
[0082] The battery safety detection unit is used to perform battery safety detection on charging data using a battery safety detection model to obtain a battery safety detection result, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is first trained on the initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data.
[0083] In an embodiment of the present invention, a battery safety detection device is provided, comprising: when DC charging a battery of a vehicle, obtaining charging data of the battery for a first preset time period; using a battery safety detection model to perform battery safety detection on the charging data to obtain a battery safety detection result, wherein the battery safety detection model comprises: a feature extraction module and a battery safety detection module, and the battery safety detection model is obtained by first training an initial feature extraction module through a self-supervised representation learning method and a first charging data sample, and then training the trained intermediate feature extraction module and the initial battery safety detection module through a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data. From the above description, it can be seen that the battery safety detection model of the present invention is first trained by a self-supervised representation learning method and a first charging data sample to train the initial feature extraction module, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample. The feature extraction module of the battery safety detection model can mine the charging regularity characteristics of the charging data, and then when the battery safety detection is performed again through the mined charging regularity characteristics, the safety detection result of the battery detected is more accurate. Compared with the battery safety detection model directly obtained by a supervised training method and charging data sample training, the battery safety detection model of the present invention has good robustness, because it can mine the charging regularity characteristics of the charging data, and the charging regularity characteristics can clearly distinguish whether the battery has an abnormality. In this way, the accuracy of the final determined battery safety detection result is good, which alleviates the technical problem that the battery safety detection model obtained in the prior art has poor robustness and cannot perform accurate safety detection on the battery.
[0084] Optionally, the device is also used to: obtain a first sub-charging data sample of a second preset time length of a charging process and a second sub-charging data sample of a first preset time length of two charging processes, wherein the second preset time length is twice the first preset time length; use the first sub-charging data sample and the second sub-charging data sample to train an initial feature extraction model to obtain a trained feature extraction model, wherein the initial feature extraction model includes: an initial feature extraction module and an initial comparative prediction module, and the trained feature extraction model includes: an intermediate feature extraction module and a trained comparative prediction module.
[0085] Optionally, the loss function when training the feature extraction model is: Among them, j represents a charging data sample in a batch, L represents the loss value calculated on the charging data sample, N represents the total number of charging data samples in the batch, m represents any charging data sample in the batch, m=1,...,N, n represents the known part in the time series of a charging data sample, starting from step 1, and currently proceeding to step n, K represents the length to be predicted in the time series of a charging data sample, k represents a step to be predicted in the time series of a charging data sample, starting from step n+1, and predicting to step n+K, f represents the similarity measurement function, z represents the 8-dimensional feature of a charging data sample at a time step extracted based on the initial feature extraction module, Represents the 8-dimensional features of a charging data sample at a certain time step predicted by the gated recurrent unit of the initial contrast prediction module.
[0086] Optionally, the device is also used to: obtain positive samples of charging data of an accident battery and / or a high-risk battery for a first preset time and negative samples of charging data of a normal battery for a first preset time; use the positive samples and the negative samples to train an initial battery safety detection model to obtain a battery safety detection model, wherein the initial battery safety detection model includes: an intermediate feature extraction module and an initial battery safety detection module.
[0087] Optionally, the charging data includes: time step, required voltage, required current, actual voltage, actual current, BMS voltage, BMS current, maximum cell voltage, maximum temperature, minimum temperature, charge amount, maximum temperature cell number, minimum temperature cell number, maximum voltage cell number, and maximum voltage cell group number.
[0088] Optionally, if the charging time of the current charging process is M minutes, the battery safety test result is:
[0089]
[0090] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0091] like Figure 6 As shown, an electronic device 600 provided in an embodiment of the present application includes: a processor 601, a memory 602 and a bus, wherein the memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device is running, the processor 601 communicates with the memory 602 through the bus, and the processor 601 executes the machine-readable instructions to perform the steps of the battery safety detection method as described above.
[0092] Specifically, the memory 602 and the processor 601 can be general-purpose memories and processors, which are not specifically limited here. When the processor 601 runs the computer program stored in the memory 602, the battery safety detection method can be executed.
[0093] The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above processor 601 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 601 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.
[0094] Corresponding to the above-mentioned battery safety detection method, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above-mentioned battery safety detection method.
[0095] The battery safety detection device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. It can be clearly understood by technicians in the relevant field that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0096] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0097] For another example, the flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the device, method and computer program product according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0098] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0099] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0100] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or partly contribute to the prior art or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the vehicle marking method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0101] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0102] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solution of the present application, rather than to limit it. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solution recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiment of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A battery safety detection method, characterized in that: include: When a battery of a vehicle is DC charged, obtaining current charging data of the battery for a first preset time period; A battery safety detection model is used to perform battery safety detection on the charging data to obtain a safety detection result of the battery, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is firstly trained by a self-supervised representation learning method and a first charging data sample on an initial feature extraction module to obtain an intermediate feature extraction module, and then the trained intermediate feature extraction module and the initial battery safety detection module are trained by a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine the charging regularity characteristics of the charging data; The first charging data sample includes: a first sub-charging data sample and a second sub-charging data sample, wherein the first sub-charging data sample comes from one charging process, and the second sub-charging data sample comes from two different charging processes; The second charging data samples include: positive samples of charging data of the first preset time period of the accident battery and / or the high-risk battery and negative samples of charging data of the first preset time period of the normal battery.
2. The method according to claim 1, characterized in that The method further comprises: Acquire the first sub-charging data sample of a second preset time length of a single charging process and the second sub-charging data sample of the first preset time length of two charging processes, wherein the second preset time length is twice the first preset time length; The first sub-charging data sample and the second sub-charging data sample are used to train the initial feature extraction model to obtain a trained feature extraction model, wherein the initial feature extraction model includes: the initial feature extraction module and the initial comparison prediction module, and the trained feature extraction model includes: the intermediate feature extraction module and the trained comparison prediction module.
3. The method according to claim 2, characterized in that The loss function when training the feature extraction model is: Wherein, j represents a charging data sample in a batch, L represents the loss value calculated on the charging data sample, N represents the total number of charging data samples in the batch, m represents any charging data sample in the batch, m=1, ..., N, n represents the known part in the time series of a charging data sample, starting from step 1, and currently proceeding to step n, K represents the length to be predicted in the time series of a charging data sample, k represents a step to be predicted in the time series of a charging data sample, starting from step n+1, and predicting to step n+K, f represents the similarity measurement function, z represents the 8-dimensional feature of a time step of a charging data sample extracted based on the initial feature extraction module, Represents the 8-dimensional features of a charging data sample at a certain time step predicted by the gated recurrent unit of the initial comparison prediction module.
4. The method according to claim 1, characterized in that The method further comprises: Acquire the positive samples of charging data of the accident battery and / or high-risk battery for the first preset time and the negative samples of charging data of the normal battery for the first preset time; The positive samples and the negative samples are used to train an initial battery safety detection model to obtain the battery safety detection model, wherein the initial battery safety detection model includes: the intermediate feature extraction module and the initial battery safety detection module.
5. The method according to claim 1, characterized in that The charging data includes: time step, required voltage, required current, actual voltage, actual current, BMS voltage, BMS current, maximum cell voltage, maximum temperature, minimum temperature, charge amount, maximum temperature cell number, minimum temperature cell number, maximum voltage cell number, and maximum voltage cell group number.
6. The method according to claim 1, characterized in that If the charging time of the current charging process is M minutes, the safety test result of the battery is:
7. A battery safety detection device, characterized in that: include: An acquisition unit, used for acquiring charging data of a first preset time period of the battery when DC charging is performed on the battery of the vehicle; A battery safety detection unit, configured to perform battery safety detection on the charging data using a battery safety detection model to obtain a safety detection result of the battery, wherein the battery safety detection model includes: a feature extraction module and a battery safety detection module, and the battery safety detection model is obtained by first training the initial feature extraction module using a self-supervised representation learning method and a first charging data sample to obtain an intermediate feature extraction module, and then training the trained intermediate feature extraction module and the initial battery safety detection module using a supervised transfer learning method and a second charging data sample, and the intermediate feature extraction module can mine charging regularity features of the charging data; The first charging data sample includes: a first sub-charging data sample and a second sub-charging data sample, wherein the first sub-charging data sample comes from one charging process, and the second sub-charging data sample comes from two different charging processes; The second charging data samples include: positive samples of charging data of the first preset time period of the accident battery and / or the high-risk battery and negative samples of charging data of the first preset time period of the normal battery.
8. The device according to claim 7, characterized in that The device is also used for: Acquire the first sub-charging data sample of a second preset time length of a single charging process and the second sub-charging data sample of the first preset time length of two charging processes, wherein the second preset time length is twice the first preset time length; The first sub-charging data sample and the second sub-charging data sample are used to train the initial feature extraction model to obtain a trained feature extraction model, wherein the initial feature extraction model includes: the initial feature extraction module and the initial comparison prediction module, and the trained feature extraction model includes: the intermediate feature extraction module and the trained comparison prediction module.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Battery anomaly detection method and device, electronic equipment and storage medium
CN112444748A