US-20260126493-A1 - METHOD AND DEVICE FOR DETECTING BATTERY STATE OF CHARGE, COMPUTER EQUIPMENT, STORAGE MEDIUM, AND COMPUTER PROGRAM PRODUCT
Abstract
Disclosed are a method and a device for detecting a battery state of charge (SOC), and a computer equipment. The method includes: constructing a first battery-SOC detecting model by taking first sample data without battery-SOC label as a first training data set; constructing a second battery-SOC detecting model according to the feature encoder; constructing second sample data carrying battery-SOC label based on historical operation sampling data of the battery extracted from the full historical operation data of the battery, and extracting features from the second sample data through the feature encoder to obtain sample feature data; iteratively optimizing a feature predictor of the second battery-SOC detecting model by taking the sample feature data as a second training data set, and using an iteratively optimized second battery-SOC detecting model as a target battery-SOC detecting model; and detecting the battery SOC of a to-be-detected battery based on the target battery-SOC detecting model.
Inventors
- Baojian CAO
- Junjie JIANG
Assignees
- Zhejiang Jinko Energy Storage Co., Ltd.
Dates
- Publication Date
- 20260507
- Application Date
- 20251015
- Priority Date
- 20241107
Claims (20)
- 1 . A method for detecting a battery state of charge (SOC), comprising: constructing a first battery-state-of-charge (battery-SOC) detecting model which characterizes battery operation characteristic changing over time, by taking first sample data without battery-SOC label as a first training data set, wherein the first sample data is generated based on full historical operation data of the battery, and the full historical operation data of the battery comprise operation data of the battery in a charging stage, in a discharging stage and in an idle stage during historical operation processes, and the first battery-SOC detecting model comprises a feature encoder; constructing a second battery-SOC detecting model according to the feature encoder; constructing second sample data carrying the battery-SOC label based on historical operation sampling data of the battery extracted from the full historical operation data of the battery, and extracting features from the second sample data through the feature encoder to obtain sample feature data; iteratively optimizing a feature predictor of the second battery-SOC detecting model by taking the sample feature data as a second training data set, and using an iteratively optimized second battery-SOC detecting model as a target battery-SOC detecting model, wherein the target battery-SOC detecting model is configured to characterize a correlation between battery SOC and battery operation characteristic; and detecting the battery SOC of a to-be-detected battery based on the target battery-SOC detecting model.
- 2 . The method according to claim 1 , wherein constructing the first battery-SOC detecting model which characterizes the operation characteristics of the battery changing over time, by taking the first sample data without the battery-SOC label as the first training data set comprises: splitting the first training data set into first training data of a first time step and second training data of a second time step, wherein the first time step is less than the second time step; performing a feature reconstruction on the first training data to obtain reconstructed training data; and constructing the first battery-SOC detecting model based on a target training data set composed of the second training data and the reconstructed training data.
- 3 . The method according to claim 2 , wherein constructing the second sample data carrying the battery-SOC label based on the historical operation sampling data of the battery extracted from the full historical operation data of the battery comprises: extracting the historical operation sampling data of the battery from the full historical operation data of the battery according to a plurality of battery operating conditions corresponding to the full historical operation data of the battery; determining historical battery SOCs corresponding to the historical operation sampling data of the battery according to a preset ampere-hour integral ratio; and splicing the historical operation sampling data of the battery and the historical battery SOCs to obtain the second sample data.
- 4 . The method according to claim 3 , wherein extracting the historical operation sampling data of the battery from the full historical operation data of the battery according to the plurality of battery operating conditions corresponding to the full historical operation data of the battery comprises: extracting historical operation-condition data of the battery corresponding to each battery operating condition from the full historical operation data of the battery; sampling multiple operation-condition sample data of the battery from the historical operation-condition data of the battery according to operation-condition-sample weights corresponding to the plurality of battery operating conditions; and integrating the operation-condition sample data of the battery to obtain the historical operation sampling data of the battery.
- 5 . The method according to claim 1 , wherein the feature encoder comprises a plurality of local feature encoders, and each local feature encoder is trained by local sample data of locations of battery cells arranged in a battery module; wherein extracting the features from the second sample data through the feature encoder to obtain the sample feature data comprises: extracting multi-scale features from the second sample data through each local feature encoder according to the locations of the battery cells arranged in the battery module to obtain a plurality of sample spatial scale features, wherein the second sample data comprise operation characteristics of different battery cells, and one spatial scale corresponds to one battery cell; and performing a weighted fusion on the plurality of sample spatial scale features to obtain the sample feature data.
- 6 . The method according to claim 2 , wherein, before constructing the first battery-SOC detecting model which characterizes the battery operation characteristic changing over time, by taking the first sample data without the battery-SOC label as the first training data set, the method further comprises: extracting historical operation currents, historical operation voltages, and historical operation temperatures of each battery cell from the full historical operation data of the battery; generating historical sample operation temperatures of each battery cell based on the historical operation temperatures; splicing the historical operation currents, the historical operation voltages, and the historical sample operation temperatures of each battery cell to obtain single-cell sample data of each battery cell; and integrating the single-cell sample data of battery cells to obtain the first sample data.
- 7 . The method according to claim 6 , wherein generating the historical sample operation temperatures of each battery cell based on the historical operation temperatures comprises: selecting the highest historical operation temperature and the lowest historical operation temperature from the historical operation temperatures of each battery cell, and using an average value of the highest historical operation temperature and the lowest historical operation temperature as the historical sample operation temperature of each battery cell.
- 8 . The method according to claim 1 , wherein constructing the second battery-SOC detecting model according to the feature encoder comprises: composing the second battery-SOC detecting model by the feature encoder and an untrained feature predictor.
- 9 . The method according to claim 1 , wherein iteratively optimizing the feature predictor of the second battery-SOC detecting model by taking the sample feature data as the second training data set, and using the iteratively optimized second battery-SOC detecting model as the target battery-SOC detecting model, comprise: taking the sample feature data as the second training data set, and iteratively optimizing the feature predictor of the second battery-SOC detecting model through the second training data set; determining that an iterative optimization of the second battery-SOC detecting model is completed until a training of the feature predictor of the second battery-SOC detecting model is completed; and using the iteratively optimized second battery-SOC detecting model as the target battery-SOC detecting model, wherein the target battery-SOC detecting model is configured to characterize a correlation between battery SOC and battery operation characteristic.
- 10 . The method according to claim 1 , wherein detecting the battery SOC of the to-be-detected battery based on the target battery-SOC detecting model, comprises: extracting features from real-time operation data of the to-be-detected battery to obtain battery real-time operation characteristics of the to-be-detected battery according to the target battery-SOC detecting model; and detecting the battery SOC of the to-be-detected battery based on the battery real-time operation characteristics.
- 11 . The method according to claim 2 , wherein splitting the first training data set into the first training data of the first time step and the second training data of the second time step, comprises: splitting the first training data set into the first training data of the first time step and the second training data of the second time step according to time identifiers of data in the first training data set, wherein the first time step is less than the second time step.
- 12 . The method according to claim 2 , wherein constructing the first battery-SOC detecting model based on the target training data set composed of the second training data and the reconstructed training data comprises: composing the target training data set by the second training data and the reconstructed training data; iteratively optimizing a preset battery-SOC detecting model based on the target training data set; and using the optimized preset battery-SOC detecting model as the first battery-SOC detecting model.
- 13 . The method according to claim 3 , wherein determining the historical battery SOCs corresponding to the historical operation sampling data of the battery according to the preset ampere-hour integral ratio comprises: defining a battery SOC corresponding to historical operation sampling data of a fully charged highest-node battery cell to be 100%; and deducing backwards the historical operation sampling data of battery cells in different nodes by using an ampere-hour integration method, to obtain the historical battery SOCs corresponding to different historical operation sample data.
- 14 . The method according to claim 3 , wherein the plurality of battery operating conditions comprise a battery charging condition, a battery idle condition, and a battery discharging condition.
- 15 . The method according to claim 1 , wherein the second sample data comprise a single-cell voltage of each battery cell, a current of each battery cell, an average temperature of each battery cell, and the battery-SOC label.
- 16 . The method according to claim 1 , wherein the full historical operation data of the battery comprise a charging start time, a charging end time, a charging current, a charging voltage, a temperature during charging, a discharge start time, a discharge end time, a discharge current, a discharge voltage, a depth of discharge, and a voltage and a current during the idle stage.
- 17 . The method according to claim 1 , wherein a data size of the first training data and a data size of the second training data are the same.
- 18 . A computer equipment, comprising a memory and a processor, wherein the memory has a computer program stored thereon, and the processor, when executing the computer program, implements steps of the method according to claim 1 .
- 19 . A non-transitory computer-readable storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, causes the processor to implement steps of the method according to claim 1 .
- 20 . A computer program product, comprising a computer program, wherein the computer program, when executed by a processor, implements steps of the method according to claim 1 .
Description
CROSS-REFERENCE TO RELATED APPLICATION The present application claims the priority of the Chinese patent application No. 202411587253.3, filed with China National Intellectual Property Administration on November 7, 2024, which is incorporated herein by reference in its entirety. TECHNICAL FIELD The present application relates to the technical field of testing energy storage battery, and in particular to a method and a device for detecting a battery State of Charge (SOC), a computer equipment, a non-transitory computer-readable storage medium, and a computer program product. BACKGROUND The battery State of Charge (SOC), also known as the remaining power, is used to reflect the remaining capacity of the battery. The battery SOC is numerically defined as a ratio of the remaining capacity to the battery capacity and often expressed by a percentage. An accurate detection of the battery SOC is important for ensuring the battery reliability. With the continuous development of science and technology, more and more methods for detecting a battery SOC are emerging. Currently, an ampere-hour integration method, an equivalent circuit method, or a method based on a neural network model is usually used for detecting the battery SOC. However, due to complex operating conditions of the battery during use, the ampere-hour integration method and the equivalent circuit method cannot truly reflect external characteristics of a battery cell under complex operating conditions, and it is also difficult for the number of labelled samples used by the neural network model to cover the data under all operating conditions, thus making it most likely for a detected battery SOC to be inconsistent with a real SOC. Therefore, the current battery-state-of-charge (battery-SOC) detection has low detection accuracy. SUMMARY In view of the technical problems above, it is necessary to provide a method and a device for detecting a battery State of Charge (SOC), a computer equipment, a non-transitory computer readable storage medium, and a computer program product to improve detection accuracy of a battery-SOC detection. In a first aspect, the present application provides a method for detecting a battery SOC, including: constructing a battery-state-of-charge (battery-SOC) detecting model which characterizes battery operation characteristic changing over time, by taking first sample data without battery-SOC label as a first training data set, wherein the first sample data is generated based on full historical operation data of the battery, and the full historical operation data of the battery include operation data of the battery in a charging stage, in a discharging stage and in an idle stage during historical operation processes, and the first battery-SOC detecting model includes a feature encoder; constructing a second battery-SOC detecting model according to the feature encoder; constructing second sample data carrying battery-SOC label based on historical operation sampling data of the battery extracted from the full historical operation data of the battery, and extracting features from the second sample data through the feature encoder to obtain sample feature data; iteratively optimizing a feature predictor of the second battery-SOC detecting model by taking the sample feature data as a second training data set, and using the iteratively optimized second battery-SOC detecting model as the target battery-SOC detecting model, wherein the target battery-SOC detecting model is configured to characterize a correlation between battery SOC and battery operation characteristic; and detecting the battery SOC of a to-be-detected battery based on the target battery-SOC detecting model. In an embodiment, constructing the first battery-SOC detecting model which characterizes the operation characteristics of the battery changing over time, by taking the first sample data without battery-SOC label as the first training data set includes: splitting the first training data set into first training data of a first time step and second training data of a second time step, wherein the first time step is less than the second time step; performing a feature reconstruction on the first training data to obtain reconstructed training data; and constructing the first battery-SOC detecting model based on a target training data set composed of the second training data and the reconstructed training data. In an embodiment, constructing the second sample data carrying battery-SOC label based on the historical operation sampling data of the battery extracted from the full historical operation data of the battery includes: extracting the historical operation sampling data of the battery from the full historical operation data of the battery according to a plurality of battery operating conditions corresponding to the full historical operation data of the battery; determining historical battery States of Charge (SOCs) corresponding to the historical operation sampling data