Battery fault detection method and device, and storage medium
By acquiring charging parameters to determine the battery charging stage and performing fault detection during the constant voltage and constant current stage, the problem of insufficient adaptability of battery fault detection in scenarios without on-board diagnostic interfaces is solved, achieving efficient and accurate battery fault detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TOWER CO LTD
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-05
Smart Images

Figure CN122150902A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically, to a method, apparatus, and storage medium for detecting battery faults. Background Technology
[0002] Battery fault detection refers to the process of comprehensively assessing the health status, fault type, and safety compliance of a battery during charging. Its core objective is to achieve early identification and proactive intervention of potential risks such as battery aging, overcharging, short circuits, and thermal runaway, thereby protecting the personal and property safety of users.
[0003] However, existing technologies mostly adopt testing solutions for electric vehicles or consumer electronic devices. The accuracy of these solutions depends on on-board diagnostic interfaces, making it difficult to adapt to battery fault detection in scenarios such as two-wheeled vehicles that do not have on-board diagnostic interfaces. Therefore, existing testing methods are not adaptable and have poor suitability for scenarios without on-board diagnostic interfaces.
[0004] There is currently no effective solution to the problem of poor adaptability of battery fault detection in related technologies. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, and storage medium for detecting battery faults, in order to solve the problem of poor adaptability of battery fault detection in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a method for detecting battery faults is provided. The method includes: acquiring charging parameters for a target battery from a target charging pile, wherein the vehicle to which the target battery belongs does not have an on-board diagnostic interface, and the charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity; determining the current battery charging stage of the target battery based on the charging parameters; if the battery charging stage is a constant voltage and constant current stage, determining the charging timing data of the target battery based on the charging parameters; inputting the charging timing data into a battery fault detection model, and outputting a fault detection result for the target battery based on the battery fault detection model.
[0007] Further, determining the current battery charging stage of the target battery based on charging parameters includes: obtaining the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery; if the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is below a preset temperature, the current battery charging stage of the target battery is determined to be a trickle charging stage; if the average charging current is in a second current range or the average battery voltage is in a second voltage range, the current battery charging stage of the target battery is determined to be a constant voltage and constant current stage, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; if the average charging current is in a third current range and the average battery voltage is in a third voltage range, the current battery charging stage of the target battery is determined to be a supplementary charging stage, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0008] Furthermore, determining the charging timing data of the target battery based on the charging parameters includes: extracting battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on the charging parameters, and determining initial timing data based on the battery terminal voltage data, charging current data, charging power data, and battery temperature data; using a preset sliding window to slide within the initial timing data with a preset step size to obtain multiple window timing data; performing local normalization transformation on each window timing data to obtain multiple transformed window timing data, and determining the charging timing data based on the multiple transformed window timing data.
[0009] Further, the charging time-series data is input into the battery fault detection model, and the fault detection results for the target battery are output based on the battery fault detection model, including: inputting the charging time-series data into the first prediction sub-model in the battery fault detection model, and outputting a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; when the risk category is the target category, generating a time-series derived feature set, a working condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters; inputting the time-series derived feature set, the working condition feature set, and the preset fault feature set into the second prediction sub-model in the battery fault detection model, and outputting the fault type voting results of the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and determining the fault detection result based on the fault type voting results.
[0010] Furthermore, the training steps of the first prediction sub-model include: receiving historical battery charging data and generating multiple charging time-series samples based on the historical battery charging data; labeling each charging time-series sample with a capacity decay rate label and a risk label based on the historical battery charging data to obtain a first training dataset; and training a preset neural network model based on the first training dataset using a hybrid loss function to obtain the first prediction sub-model. The hybrid loss function includes a mean squared error function and a binary cross-entropy loss function. The mean squared error function is used to optimize the regression task for capacity decay rate prediction, and the binary cross-entropy loss function is used to optimize the classification task for risk prediction.
[0011] Furthermore, determining the fault detection result based on the fault type voting results includes: identifying the fault type with the most votes from the fault type voting results, and identifying the fault type with the most votes as the candidate fault type; receiving preset classification rules, determining the target fault type based on the candidate fault type and the preset classification rules; and determining the fault detection result based on the target fault type.
[0012] Furthermore, after determining the current battery charging stage of the target battery based on the charging parameters, the method also includes: if the battery charging stage is a trickle charging stage or a supplementary charging stage, generating a risk detection log based on the charging parameters and the battery charging stage, and uploading the risk detection log to the target server.
[0013] To achieve the above objectives, according to another aspect of this application, a battery fault detection device is provided. The device includes: a parameter acquisition unit for acquiring charging parameters of a target charging pile charging a target battery, wherein the vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface, and the charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity; a stage determination unit for determining the current battery charging stage of the target battery based on the charging parameters; a data determination unit for determining the charging timing data of the target battery based on the charging parameters when the battery charging stage is a constant voltage and constant current stage; and a fault detection unit for inputting the charging timing data into a battery fault detection model and outputting fault detection results for the target battery based on the battery fault detection model.
[0014] Further, the stage determination unit includes: a first data acquisition module, used to acquire the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery, based on the charging parameters; a first stage determination module, used to determine the current battery charging stage of the target battery as a trickle charging stage when the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is lower than a preset temperature; a second stage determination module, used to determine the current battery charging stage of the target battery as a constant voltage and constant current stage when the average charging current is in a second current range or the average battery voltage is in a second voltage range, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; and a third stage determination module, used to determine the current battery charging stage of the target battery as a supplementary charging stage when the average charging current is in a third current range and the average battery voltage is in a third voltage range, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0015] Furthermore, the data determination unit includes: an initial data determination module, used to extract battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on charging parameters, and to determine initial time-series data based on the battery terminal voltage data, charging current data, charging power data, and battery temperature data; a window sliding module, used to slide a preset sliding window in the initial time-series data with a preset step size to obtain multiple window time-series data; and a data transformation module, used to perform local normalization transformation on each window time-series data to obtain multiple transformed window time-series data, and to determine charging time-series data based on the multiple transformed window time-series data.
[0016] Furthermore, the fault detection unit includes: a first prediction module, used to input charging time-series data into the first prediction sub-model in the battery fault detection model, and output a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; a feature generation module, used to generate a time-series derived feature set, an operating condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters when the risk category is the target category; a second prediction module, used to input the time-series derived feature set, the operating condition feature set, and the preset fault feature set into the second prediction sub-model in the battery fault detection model, and output the fault type voting result of the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and a result determination module, used to determine the fault detection result based on the fault type voting result.
[0017] Furthermore, the device also includes: a sample generation unit for receiving historical battery charging data and generating multiple charging time-series samples based on the historical battery charging data; a dual-label annotation unit for labeling each charging time-series sample with a capacity decay rate label and a risk label based on the historical battery charging data to obtain a first training dataset; and a model training unit for training a preset neural network model based on the first training dataset using a hybrid loss function to obtain a first prediction sub-model, wherein the hybrid loss function includes a mean squared error function and a binary cross-entropy loss function, the mean squared error function being used to optimize the regression task for capacity decay rate prediction, and the binary cross-entropy loss function being used to optimize the classification task for risk prediction.
[0018] Furthermore, the result determination module includes: a candidate fault type determination submodule, used to determine the fault type with the most votes from the fault type voting results, and to determine the fault type with the most votes as the candidate fault type; a target fault type determination submodule, used to receive preset classification rules, and to determine the target fault type based on the candidate fault type and the preset classification rules; and a fault detection result determination submodule, used to determine the fault detection result based on the target fault type.
[0019] Furthermore, the device also includes a log uploading unit, which, after determining the current battery charging stage of the target battery based on the charging parameters, generates a risk detection log based on the charging parameters and the battery charging stage when the battery charging stage is a trickle charging stage or a supplementary charging stage, and uploads the risk detection log to the target server.
[0020] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform any kind of battery fault detection method.
[0021] According to another aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include a method for performing any type of battery failure detection.
[0022] According to another aspect of this application, a computer program product is provided, including computer instructions, which, when executed by a processor, implement the steps of a battery fault detection method according to any one of the above.
[0023] In this embodiment, charging parameters for charging a target battery using a target charging pile are obtained. The vehicle to which the target battery belongs does not have an on-board diagnostic interface. The charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity. The current charging stage of the target battery is determined based on these parameters. If the battery charging stage is a constant voltage / constant current stage, the charging timing data of the target battery is determined based on the charging parameters. The charging timing data is input into a battery fault detection model, and the model outputs fault detection results for the target battery. This solves the technical problem of poor adaptability in battery fault detection in existing technologies.
[0024] By collecting charging parameters for target batteries in vehicles without on-board diagnostic interfaces and determining the battery charging stage based on these parameters, the system only outputs fault detection results for the target battery during the constant voltage and constant current stage by calling the battery fault detection model. This avoids invalid calculations in other charging stages and concentrates resources on the risk window of the constant voltage and constant current stage, thus achieving efficient and accurate fault detection of the target battery. It does not rely on on-board diagnostic interfaces, reducing hardware dependence on fault detection. Therefore, this solution has cross-vehicle applicability and improves the adaptability of battery fault detection. Attached Figure Description
[0025] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0026] Figure 1 A hardware block diagram of a computer terminal for implementing a battery fault detection method is shown.
[0027] Figure 2 This is a flowchart of a battery fault detection method provided according to an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of a battery fault detection device provided according to an embodiment of this application;
[0029] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0032] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding access points are provided for users to choose to authorize or refuse. For example, interfaces are set up between this system and relevant users or organizations, providing users with corresponding access points to choose to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0033] Example 1
[0034] According to an embodiment of this application, a method embodiment for detecting battery faults is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1A hardware block diagram of a computer terminal (or mobile device) for implementing a battery fault detection method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0036] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0037] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the battery fault detection method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned battery fault detection method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0038] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0039] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0040] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for detecting battery faults is shown. Figure 2 This is a flowchart of a battery fault detection method according to Embodiment 1 of this application.
[0041] Step S201: Obtain the charging parameters for the target charging pile to charge the target battery.
[0042] It should be noted that the vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface, and the charging parameters should include at least the battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity.
[0043] Optionally, the target battery, even if it lacks an on-board diagnostic interface, can be located in a two-wheeled vehicle; that is, the target battery is the battery within the two-wheeled vehicle. Charging parameters can be read through the target vehicle's data platform. Specifically, these parameters can be sensor-based, such as real-time data on battery status and safety features, collected from various sensors deployed on the two-wheeled vehicle battery and charging station. Battery-side sensors include voltage sensors, current sensors, temperature sensors, pressure sensors, and individual cell voltage acquisition modules. Charging station-side sensors include leakage current sensors, insertion / removal force sensors, and ambient temperature and humidity sensors. This data can be transmitted via protocols such as 4G / 5G and MQTT (Message Queuing Telemetry). Furthermore, basic information such as the target battery model and rated parameters (e.g., rated current, rated voltage) can be obtained from a pre-stored database.
[0044] Step S202: Determine the current battery charging stage of the target battery based on the charging parameters.
[0045] Optionally, in this embodiment, the battery charging stage can be a trickle charging stage, a constant voltage and constant current stage, or a supplementary charging stage. The trickle charging stage is used to represent the process of pre-charging with a small current in the initial stage of charging (for example, it can be the first 15 minutes after the start of charging). The constant voltage and constant current stage is used to represent the stage in which the target charging pile replenishes the energy of the target battery through a constant current or constant voltage control strategy. The supplementary charging stage is used to represent the final stage in which the target battery is close to a fully charged state (in this stage, the charging current is further reduced to avoid overcharging).
[0046] Step S203: When the battery charging stage is a constant voltage and constant current stage, determine the charging timing data of the target battery based on the charging parameters.
[0047] Optionally, the battery fault detection model can be used to predict only the constant voltage and constant current stage. That is, this application defines the constant voltage and constant current stage as the core range of battery faults, while for the trickle charging stage or the supplementary charging stage, only the charging parameters can be recorded and stored for long-term health tracking.
[0048] Step S204: Input the charging timing data into the battery fault detection model, and output the fault detection results for the target battery based on the battery fault detection model.
[0049] Optionally, the battery fault detection model can be a model trained based on machine learning algorithms such as random forest and logistic regression, or a model trained based on deep learning models such as long short-term memory neural networks. The battery fault detection model uses charging time series data as a predictor and fault detection results as the prediction results. The fault detection results can be the target fault type of the target battery. For example, the target fault type can be charger fault, battery fault, interface fault, or safety device fault. The fault detection results can also be no fault.
[0050] In summary, by collecting charging parameters for target batteries in vehicles without on-board diagnostic interfaces and determining the battery charging stage based on these parameters, this solution only collects charging timing data for the target battery during the constant voltage and constant current stage and calls the battery fault detection model to output fault detection results for the target battery. This avoids invalid calculations in other charging stages and concentrates resources on the risk window of the constant voltage and constant current stage, thus achieving efficient and accurate fault detection of the target battery. It does not rely on on-board diagnostic interfaces, reducing hardware dependence on fault detection. Therefore, this solution has cross-vehicle applicability and improves the adaptability of battery fault detection.
[0051] To improve the adaptability of battery fault detection, optionally, determining the current battery charging stage of the target battery based on charging parameters includes: obtaining the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery; if the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is below a preset temperature, the current battery charging stage of the target battery is determined to be a trickle charging stage; if the average charging current is in a second current range or the average battery voltage is in a second voltage range, the current battery charging stage of the target battery is determined to be a constant voltage and constant current stage, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; if the average charging current is in a third current range and the average battery voltage is in a third voltage range, the current battery charging stage of the target battery is determined to be a supplementary charging stage, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0052] Optionally, the first preset time period can be 3 minutes, 7 minutes, or other times, which can be flexibly set by those skilled in the art according to their needs. The average charging current, average battery voltage, and average battery temperature can be calculated based on all charging parameters within the first preset time period. The trickle charging stage is the process of pre-charging the battery with a small current in the initial charging stage. For example, in the first 15 minutes after charging begins, the charging current is small and stable, and the first current range can be 10%-20% of the rated current. During the trickle charging stage, the battery voltage rises slowly, and the first voltage range is a lower range, for example, below 20% of the rated voltage. The preset temperature can be the ambient temperature. The constant voltage and constant current stage represents the core charging phase. During this stage, a constant current or constant voltage control strategy is used to rapidly replenish the target battery's charge. This typically occurs 15 minutes after the start of charging, and the charging power is between 60% and 90% of the target battery's rated power. This stage can be either a constant current stage or a constant voltage stage. In the constant current stage, the charging current remains stable, with a second current range of 80%-100% of the rated current, and the battery voltage continuously rises to the rated voltage. In the constant voltage stage, the charging voltage remains stable (the second voltage range is 90%-100% of the rated voltage, i.e., close to the rated voltage), and the charging current gradually decreases. During this stage, the battery temperature gradually increases, typically between 30 and 45 degrees Celsius, and the power curve shows a trend of initial stabilization followed by a slow decline. In the supplementary charging stage, the third current range is 5% to 10% of the rated current, and the third voltage range is 100% to 105% of the rated voltage. The power curve shows a continuous downward trend, eventually approaching zero.
[0053] In summary, by obtaining the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery based on the charging parameters, the current battery charging stage of the target battery can be determined. This avoids invalid calculations of other charging stages, concentrates resources on the risk window of the constant voltage and constant current stage, and thus efficiently and accurately realizes the fault detection of the target battery. It also provides a data foundation for subsequent fault detection and improves the adaptability of battery fault detection.
[0054] To improve the adaptability of battery fault detection, optionally, determining the charging timing data of the target battery based on charging parameters includes: extracting battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on the charging parameters, and determining initial timing data based on the battery terminal voltage data, charging current data, charging power data, and battery temperature data; using a preset sliding window to slide within the initial timing data with a preset step size to obtain multiple window timing data; performing local normalization transformation on each window timing data to obtain multiple transformed window timing data, and determining the charging timing data based on the multiple transformed window timing data.
[0055] Optionally, the second preset time range can be 20 minutes, and the sampling rate can be 1 data point per second. Four types of data within the second preset time range can be determined as initial time-series data based on charging parameters. These include: battery terminal voltage data (unit: V), reflecting the battery's state of charge and internal electrochemical characteristics; charging current data (unit: A), reflecting the charging rate and battery acceptability; charging power data (unit: W), comprehensively reflecting the energy input intensity; and battery temperature data (unit: °C), reflecting the intensity of internal chemical reactions and being a core indicator of safety risk. The preset sliding window length can be 10 minutes (i.e., 600 data points), and the preset sliding step size can be 1 minute to ensure data continuity. Each window corresponds to a window time-series data (size 600 x 4). Local normalization transformation is performed on the window time-series data, which can be Z-score standardization (a data processing method) to eliminate dimensional differences between different batteries, charging piles, and environments. Specifically, the following formula can be used as a reference:
[0056] Y=(xu) / a
[0057] Where Y represents the transformed data, x represents the data before transformation, u represents the mean of x within the window, and a is the standard deviation of x within the window. Local normalization transformation assigns each window of time-series data to a standard distribution centered on its mean, thereby focusing on characterizing trends that deviate from their own mean and significantly improving cross-device adaptability.
[0058] In summary, by extracting battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on charging parameters, and determining initial timing data based on these data, a preset sliding window is used to slide within the initial timing data with a preset step size to obtain multiple window timing data. Local normalization transformation is then performed on each window timing data to obtain multiple transformed window timing data. Finally, charging timing data is determined based on these transformed window timing data, thus improving the adaptability of battery fault detection.
[0059] To improve the adaptability of battery fault detection, optionally, charging time-series data is input into the battery fault detection model, and the fault detection result for the target battery is output based on the battery fault detection model, including: inputting the charging time-series data into the first prediction sub-model of the battery fault detection model, and outputting a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; when the risk category is the target category, generating a time-series derived feature set, a working condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters; inputting the time-series derived feature set, the working condition feature set, and the preset fault feature set into the second prediction sub-model of the battery fault detection model, and outputting the fault type voting result of the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and determining the fault detection result based on the fault type voting result.
[0060] Optionally, specifically, the first prediction sub-model outputs two values: a risk category and a preset capacity decay rate. The risk category can be one of three categories: a first category (low risk), a second category (medium risk), or a third category (high risk). The risk level of the first category is lower than that of the second category, and the risk level of the second category is lower than that of the third category. The target category can be the third category. The second prediction sub-model is only invoked when the first prediction sub-model outputs a high-risk category. If the risk category is any other category, the charging parameters and battery charging stage are stored in a risk detection log, and the risk detection log is uploaded to the target server. Specifically, the input data of the second prediction sub-model includes a time-series derived feature set, a working condition feature set, and a preset fault feature set. The specific features in these three feature sets are shown in Table 1 below.
[0061] Table 1
[0062]
[0063] Optionally, in the above data, the preset capacity decay rate is the output of the first prediction sub-model, while the other 11 specific features can be obtained through calculation using charging parameters. The second prediction sub-model is used for voting prediction classification tasks based on tree models. For example, the second prediction sub-model can be a model trained on a random forest model. The output data of the second prediction sub-model is the voting results of the target battery's fault types, that is, it can output the voting results corresponding to each fault category according to the voting mechanism of the random forest model. For example, if 100 trees are set in the random forest model, the number of votes for a certain type of fault can be 30 trees. Then, the fault detection result can be determined based on the fault type voting results. For example, the fault type with the most votes in the voting results can be directly determined as the target fault type.
[0064] It should be noted that, based on the above description of the input and output data of the first and second prediction sub-models, those skilled in the art can select a suitable model and collect the corresponding training dataset for training to obtain the battery fault detection model. For example, the first prediction sub-model can be a model trained based on a long short-term memory neural network, and the second prediction sub-model can be a model trained based on a random forest.
[0065] In summary, through the two-stage progressive architecture of the first and second prediction sub-models in the battery fault detection model, the first prediction sub-model acts as a risk filter, activating the second prediction sub-model only when the target category is output. This avoids redundant detection of normal data fluctuations, thereby reducing the false alarm rate of fault detection results. Furthermore, the input data for the second prediction sub-model is constructed based on the preset capacity decay rate output by the first prediction sub-model, providing the second prediction sub-model with prediction information on the future capacity decay trend pattern, thus improving the prediction accuracy of the second prediction sub-model. As a result, accurate fault detection is achieved without relying on the on-board diagnostic interface, improving the adaptability of battery fault detection.
[0066] To improve the adaptability of battery fault detection, optionally, the training steps of the first prediction sub-model include: receiving historical battery charging data and generating multiple charging time-series samples based on the historical battery charging data; labeling each charging time-series sample with a capacity decay rate label and a risk label based on the historical battery charging data to obtain a first training dataset; and training a preset neural network model based on the first training dataset using a hybrid loss function to obtain the first prediction sub-model, wherein the hybrid loss function includes a mean squared error function and a binary cross-entropy loss function, the mean squared error function being used to optimize the regression task of capacity decay rate prediction, and the binary cross-entropy loss function being used to optimize the classification task of risk prediction.
[0067] Optionally, the preset neural network includes a Long Short-Term Memory (LSTM) neural network module, a regression branch module, and a classification branch module. That is, after the input data has its features extracted by the LSM module, it will be input to the two branch modules. The regression branch module includes at least one fully connected layer and a linear activation function to output a preset capacity decay rate. The classification branch module includes at least one fully connected layer and a sigmoid activation function to output the risk category. The hybrid loss function can be as follows:
[0068]
[0069] Among them, Loss LTSM Let MSE represent the mean squared error function, and BCE represent the binary cross-entropy loss function. This represents the actual value of the preset capacity decay rate. This represents the preset capacity decay rate prediction value. Indicates the true value of the risk category. This indicates the predicted value for the risk category.
[0070] In summary, by receiving historical battery charging data and generating multiple charging time-series samples based on this data, and labeling each charging time-series sample with a capacity decay rate label and a risk label based on the historical battery charging data, a first training dataset is obtained. Based on the first training dataset, a preset neural network model is trained using a hybrid loss function to obtain a first prediction sub-model. This achieves accurate fault detection without relying on the on-board diagnostic interface, thus improving the adaptability of battery fault detection.
[0071] To improve the adaptability of battery fault detection, optionally, determining the fault detection result based on the fault type voting results includes: determining the fault type with the most votes from the fault type voting results, and determining the fault type with the most votes as the candidate fault type; receiving preset classification rules, determining the target fault type based on the candidate fault type and the preset classification rules; and determining the fault detection result based on the target fault type.
[0072] For example, the preset classification rules can be as follows: if the power fluctuation amplitude is greater than or equal to 30, the number of abnormal power jumps is greater than or equal to 3 and occurs continuously, the voltage fluctuation slope is abnormal (the deviation from historical normal data is greater than 20%), and the charger failure is a candidate fault type with a vote share of more than 80%, then the target fault type is determined to be a charger failure; if the voltage consistency coefficient is greater than or equal to 0.2, the temperature fluctuation coefficient is greater than or equal to 0.5 degrees Celsius per hour, and the battery failure is a candidate fault type with a vote share of more than 75%, then the target fault type is determined to be a battery failure; if the insertion and extraction force fluctuation value is greater than or equal to 15 Newtons and the number of charging interruptions is greater than or equal to 2, and the interface failure is a candidate fault type with a vote share of more than 70%, then the target fault type is determined to be an interface failure; if the number of leakage exceedances is greater than or equal to 1 and the overvoltage duration is greater than or equal to 0.5 seconds, or the temperature rise rate is greater than or equal to 5 degrees Celsius, and in all cases, the safety device failure is a candidate fault type with a vote share of more than 85%, then the target fault type is determined to be a safety device failure. If the above conditions are not met, the charging parameters and battery charging stage will be stored in the risk detection log, and the risk detection log will be uploaded to the target server. The target fault type can be directly identified as the fault detection result.
[0073] Optionally, compliance judgment results can be generated based on the aforementioned data, and the target fault type and compliance judgment results can be jointly determined as the fault detection result. For example, the compliance judgment result can include the following three categories: Level A safety compliance level (fully compliant), the judgment criteria are that the overvoltage duration is 0 seconds, the number of leakage current exceeding the standard is 0 times, and other charging parameters are all within the safety threshold, and the random forest does not output any fault type label (that is, the output is no fault); Level B safety compliance level (minor violation): the overvoltage duration is between 0 and 1 second, or the number of leakage current exceeding the standard is 1 time, and the random forest output interface is faulty; Level C safety compliance level (serious violation): the battery terminal voltage exceeds the rated voltage limit for 1 second or more; the leakage current exceeds the safety threshold (such as 5mA) twice or more.
[0074] In summary, by identifying the fault type with the most votes from the fault type voting results and designating it as a candidate fault type; receiving preset classification rules and determining the target fault type based on the candidate fault type and the preset classification rules; and determining the fault detection result based on the target fault type, the adaptability of battery fault detection is improved.
[0075] To improve the adaptability of battery fault detection, the method may optionally include, after determining the current battery charging stage of the target battery based on the charging parameters, generating a risk detection log based on the charging parameters and the battery charging stage when the battery charging stage is a trickle charging stage or a supplementary charging stage, and uploading the risk detection log to the target server.
[0076] For example, after storing charging parameters and battery charging stages as risk detection logs, an asynchronous upload strategy can be used to upload the risk detection logs to a target server, which can be configured with a distributed database architecture to store the risk detection logs.
[0077] In summary, by generating risk detection logs based on charging parameters and battery charging stage when the battery charging phase is trickle charging or supplementary charging, and uploading these logs to the target server, data support is provided for the full lifecycle management of battery health, and the adaptability of battery fault detection is improved.
[0078] It should be noted that the steps shown in the flowchart in 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 may be executed in a different order than that shown here.
[0079] Example 2
[0080] This application also provides a battery fault detection device. It should be noted that the battery fault detection device of this application can be used to execute the battery fault detection method provided in this application. The following describes the battery fault detection device provided in this application.
[0081] According to an embodiment of this application, an apparatus for implementing the above-described battery fault detection method is also provided, such as... Figure 3 As shown, the device includes:
[0082] The parameter acquisition unit 301 is used to acquire the charging parameters of the target charging pile for charging the target battery. The vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface. The charging parameters include at least the battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature and ambient humidity.
[0083] The stage determination unit 302 is used to determine the current battery charging stage of the target battery based on the charging parameters.
[0084] The data determination unit 303 is used to determine the charging timing data of the target battery based on the charging parameters when the battery charging stage is a constant voltage and constant current stage.
[0085] The fault detection unit 304 is used to input charging timing data into the battery fault detection model and output fault detection results for the target battery based on the battery fault detection model.
[0086] The battery fault detection device provided in this application embodiment acquires charging parameters for the target battery from the target charging pile through a parameter acquisition unit 301. The vehicle to which the target battery belongs does not have an on-board diagnostic interface. The charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity. A stage determination unit 302 determines the current charging stage of the target battery based on the charging parameters. A data determination unit 303, when the battery charging stage is a constant voltage / constant current stage, determines the charging timing data of the target battery based on the charging parameters. A fault detection unit 304 inputs the charging timing data into a battery fault detection model and outputs fault detection results for the target battery based on the battery fault detection model. This solves the problem of poor adaptability in battery fault detection in related technologies, thereby improving the adaptability of battery fault detection.
[0087] Optionally, in the battery fault detection device provided in this application embodiment, the stage determination unit includes: a first data acquisition module, used to acquire the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery, based on charging parameters; a first stage determination module, used to determine the current battery charging stage of the target battery as a trickle charging stage when the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is lower than a preset temperature; a second stage determination module, used to determine the current battery charging stage of the target battery as a constant voltage and constant current stage when the average charging current is in a second current range or the average battery voltage is in a second voltage range, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; and a third stage determination module, used to determine the current battery charging stage of the target battery as a supplementary charging stage when the average charging current is in a third current range and the average battery voltage is in a third voltage range, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0088] Optionally, in the battery fault detection device provided in this application embodiment, the data determination unit includes: an initial data determination module, used to extract battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on charging parameters, and to determine initial time series data based on the battery terminal voltage data, charging current data, charging power data, and battery temperature data; a window sliding module, used to slide a preset sliding window in the initial time series data with a preset step size to obtain multiple window time series data; and a data transformation module, used to perform local normalization transformation on each window time series data to obtain multiple transformed window time series data, and to determine charging time series data based on the multiple transformed window time series data.
[0089] Optionally, in the battery fault detection device provided in this application embodiment, the fault detection unit includes: a first prediction module, used to input charging time-series data into a first prediction sub-model in a battery fault detection model, and output a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; a feature generation module, used to generate a time-series derived feature set, a working condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters when the risk category is the target category; a second prediction module, used to input the time-series derived feature set, the working condition feature set, and the preset fault feature set into a second prediction sub-model in a battery fault detection model, and output the fault type voting result of the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and a result determination module, used to determine the fault detection result based on the fault type voting result.
[0090] Optionally, in the battery fault detection device provided in this application embodiment, the device further includes: a sample generation unit, used to receive battery charging history data and generate multiple charging time-series samples based on the battery charging history data; a dual-label annotation unit, used to annotate the capacity decay rate label and risk label corresponding to each charging time-series sample based on the battery charging history data to obtain a first training dataset; and a model training unit, used to train a preset neural network model based on the first training dataset using a hybrid loss function to obtain a first prediction sub-model, wherein the hybrid loss function includes a mean squared error function and a binary cross-entropy loss function, the mean squared error function is used to optimize the regression task of capacity decay rate prediction, and the binary cross-entropy loss function is used to optimize the classification task of risk prediction.
[0091] Optionally, in the battery fault detection device provided in this application embodiment, the result determination module includes: a candidate fault type determination submodule, used to determine the fault type with the most votes from the fault type voting results, and determine the fault type with the most votes as a candidate fault type; a target fault type determination submodule, used to receive a preset classification rule, and determine the target fault type according to the candidate fault type and the preset classification rule; and a fault detection result determination submodule, used to determine the fault detection result according to the target fault type.
[0092] Optionally, in the battery fault detection device provided in the embodiments of this application, the device further includes: a log uploading unit, used to generate a risk detection log based on the charging parameters and the battery charging stage after determining the current battery charging stage of the target battery according to the charging parameters, and upload the risk detection log to the target server if the battery charging stage is a trickle charging stage or a supplementary charging stage.
[0093] It should be noted that the parameter acquisition unit 301, stage determination unit 302, data determination unit 303, and fault detection unit 304 mentioned above correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above modules can also be part of the device and run in the computer terminal 10 provided in Embodiment 1.
[0094] Example 3
[0095] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0096] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0097] The processor can access information and applications stored in the memory via a transmission device to execute the following steps: acquiring charging parameters for the target battery from the target charging pile, wherein the vehicle to which the target battery belongs does not have an on-board diagnostic interface, and the charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity; determining the current battery charging stage of the target battery based on the charging parameters; if the battery charging stage is a constant voltage and constant current stage, determining the charging timing data of the target battery based on the charging parameters; inputting the charging timing data into the battery fault detection model, and outputting fault detection results for the target battery based on the battery fault detection model.
[0098] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: Based on the charging parameters, obtain the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery; when the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is below a preset temperature, determine the current battery charging stage of the target battery as a trickle charging stage; when the average charging current is in a second current range or the average battery voltage is in a second voltage range, determine the current battery charging stage of the target battery as a constant voltage and constant current stage, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; when the average charging current is in a third current range and the average battery voltage is in a third voltage range, determine the current battery charging stage of the target battery as a supplementary charging stage, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0099] The processor can also call the information and application program stored in the memory through the transmission device to perform the following steps: extract battery terminal voltage data, charging current data, charging power data and battery temperature data within a second preset time range from the current time based on the charging parameters, and determine the initial timing data based on the battery terminal voltage data, charging current data, charging power data and battery temperature data; slide a preset sliding window in the initial timing data with a preset step size to obtain multiple window timing data; perform local normalization transformation on each window timing data to obtain multiple transformed window timing data, and determine the charging timing data based on the multiple transformed window timing data.
[0100] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: inputting charging timing data into the first prediction sub-model in the battery fault detection model, and outputting a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; when the risk category is the target category, generating a time-derived feature set, a working condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters; inputting the time-derived feature set, the working condition feature set, and the preset fault feature set into the second prediction sub-model in the battery fault detection model, and outputting the fault type voting result of the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and determining the fault detection result based on the fault type voting result.
[0101] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: receiving historical battery charging data and generating multiple charging time-series samples based on the historical battery charging data; labeling each charging time-series sample with a capacity decay rate label and a risk label based on the historical battery charging data to obtain a first training dataset; training a preset neural network model based on the first training dataset using a hybrid loss function to obtain a first prediction sub-model, wherein the hybrid loss function includes a mean squared error function and a binary cross-entropy loss function, the mean squared error function being used to optimize the regression task for capacity decay rate prediction, and the binary cross-entropy loss function being used to optimize the classification task for risk prediction.
[0102] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: determine the fault type with the most votes from the fault type voting results, and determine the fault type with the most votes as the candidate fault type; receive the preset classification rules, and determine the target fault type according to the candidate fault type and the preset classification rules; determine the fault detection result according to the target fault type.
[0103] The processor can also access information and applications stored in the memory via a transmission device to perform the following steps: if the battery charging stage is a trickle charging stage or a supplementary charging stage, generate a risk detection log based on the charging parameters and the battery charging stage, and upload the risk detection log to the target server.
[0104] This application provides a battery fault detection scheme. By acquiring charging parameters from a target charging pile for a target battery, wherein the vehicle to which the target battery belongs does not have an on-board diagnostic interface, the charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity. Based on the charging parameters, the current battery charging stage of the target battery is determined. If the battery charging stage is a constant voltage and constant current stage, the charging timing data of the target battery is determined based on the charging parameters. The charging timing data is input into a battery fault detection model, and the model outputs fault detection results for the target battery, thus solving the technical problem of poor adaptability in existing battery fault detection methods.
[0105] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0106] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0107] Example 4
[0108] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the battery fault detection method provided in Embodiment 1.
[0109] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0110] Optionally, in this embodiment, the computer-readable storage medium is configured to store program code for performing the following steps: obtaining charging parameters for charging the target battery by the target charging pile, wherein the vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface, and the charging parameters include at least battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature, and ambient humidity; determining the current battery charging stage of the target battery based on the charging parameters; if the battery charging stage is a constant voltage and constant current stage, determining the charging timing data of the target battery based on the charging parameters; inputting the charging timing data into the battery fault detection model, and outputting fault detection results for the target battery based on the battery fault detection model.
[0111] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: obtaining the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery, based on the charging parameters; determining the current battery charging stage of the target battery as a trickle charging stage when the average charging current is in a first current range, the average battery voltage is in a first voltage range, and the average battery temperature is lower than a preset temperature; determining the current battery charging stage of the target battery as a constant voltage and constant current stage when the average charging current is in a second current range or the average battery voltage is in a second voltage range, wherein the second current range is greater than the first current range, and the second voltage range is greater than the first voltage range; determining the current battery charging stage of the target battery as a supplementary charging stage when the average charging current is in a third current range and the average battery voltage is in a third voltage range, wherein the third current range is less than the first current range, and the third voltage range is greater than the second voltage range.
[0112] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: extracting battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time based on charging parameters, and determining initial timing data based on the battery terminal voltage data, charging current data, charging power data, and battery temperature data; using a preset sliding window to slide within the initial timing data with a preset step size to obtain multiple window timing data; performing local normalization transformation on each window timing data to obtain multiple transformed window timing data, and determining charging timing data based on the multiple transformed window timing data.
[0113] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: inputting charging timing data into a first prediction sub-model in a battery fault detection model, outputting a risk category and a preset capacity decay rate based on the first prediction sub-model, wherein the preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles; when the risk category is the target category, generating a time-derived feature set, a working condition feature set, and a preset fault feature set for the target battery based on the preset capacity decay rate and charging parameters; inputting the time-derived feature set, the working condition feature set, and the preset fault feature set into a second prediction sub-model in a battery fault detection model, outputting a fault type voting result for the target battery based on the second prediction sub-model, wherein the second prediction sub-model is used for a tree-based voting prediction classification task; and determining a fault detection result based on the fault type voting result.
[0114] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: receiving battery charging history data and generating multiple charging time-series samples based on the battery charging history data; labeling each charging time-series sample with a capacity decay rate label and a risk label based on the battery charging history data to obtain a first training dataset; training a preset neural network model based on the first training dataset using a hybrid loss function to obtain a first prediction sub-model, wherein the hybrid loss function includes a mean squared error function and a binary cross-entropy loss function, the mean squared error function being used to optimize the regression task of capacity decay rate prediction, and the binary cross-entropy loss function being used to optimize the classification task of risk prediction.
[0115] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: determining the fault type with the most votes from the fault type voting results, and determining the fault type with the most votes as a candidate fault type; receiving a preset classification rule, and determining a target fault type based on the candidate fault type and the preset classification rule; and determining a fault detection result based on the target fault type.
[0116] Optionally, in this embodiment, the computer-readable storage medium is further configured to store program code for performing the following steps: when the battery charging stage is a trickle charging stage or a supplementary charging stage, generating a risk detection log based on the charging parameters and the battery charging stage, and uploading the risk detection log to the target server.
[0117] This application also provides a computer program product, which, when executed on a data processing device, is suitable for performing steps of a battery failure detection method.
[0118] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0119] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0120] In the several embodiments provided in this application, it should be understood that the disclosed technical content 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. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0121] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0122] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0123] If the integrated unit is implemented as 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 this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, 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 a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0124] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for detecting battery faults, characterized in that, include: Obtain the charging parameters for the target battery to be charged by the target charging pile, wherein the vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface, and the charging parameters include at least the battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature and ambient humidity; The current battery charging stage of the target battery is determined based on the charging parameters. When the battery charging phase is a constant voltage and constant current phase, the charging timing data of the target battery is determined based on the charging parameters; The charging timing data is input into the battery fault detection model, and the fault detection results for the target battery are output based on the battery fault detection model.
2. The method according to claim 1, characterized in that, Determining the current battery charging stage of the target battery based on the charging parameters includes: Based on the charging parameters, obtain the average charging current, average battery voltage, and average battery temperature within a first preset time period from the current time when the target charging pile charges the target battery. When the average charging current is in the first current range, the average battery voltage is in the first voltage range, and the average battery temperature is lower than the preset temperature, the current battery charging stage of the target battery is determined as the trickle charging stage. When the average charging current is in the second current range or the average battery voltage is in the second voltage range, the current battery charging stage of the target battery is determined as a constant voltage and constant current stage, wherein the second current range is greater than the first current range and the second voltage range is greater than the first voltage range. When the average charging current is in the third current range and the average battery voltage is in the third voltage range, the current battery charging stage of the target battery is determined as the supplementary charging stage, wherein the third current range is smaller than the first current range and the third voltage range is larger than the second voltage range.
3. The method according to claim 1, characterized in that, Determining the charging timing data of the target battery based on the charging parameters includes: Based on the charging parameters, extract battery terminal voltage data, charging current data, charging power data, and battery temperature data within a second preset time range from the current time, and determine initial timing data based on the battery terminal voltage data, the charging current data, the charging power data, and the battery temperature data; A preset sliding window is used to slide within the initial time series data at a preset step size to obtain multiple window time series data. Local normalization transformation is performed on each of the window timing data to obtain multiple transformed window timing data, and the charging timing data is determined based on the multiple transformed window timing data.
4. The method according to claim 1, characterized in that, The charging timing data is input into the battery fault detection model, and the fault detection results for the target battery are output based on the battery fault detection model, including: The charging timing data is input into the first prediction sub-model in the battery fault detection model, and the risk category and preset capacity decay rate are output according to the first prediction sub-model. The preset capacity decay rate is the capacity decay rate of the target battery in the future preset number of charging cycles. When the risk category is the target category, a time-derived feature set, a working condition feature set, and a preset fault feature set are generated for the target battery based on the preset capacity decay rate and the charging parameters. The time-series derived feature set, the operating condition feature set, and the preset fault feature set are input into the second prediction sub-model in the battery fault detection model. The second prediction sub-model outputs the fault type voting result of the target battery. The second prediction sub-model is used for voting prediction classification task based on tree model. The fault detection result is determined based on the voting results for the fault type.
5. The method according to claim 4, characterized in that, The training steps for the first prediction sub-model include: Receive battery charging history data and generate multiple charging time sequence samples based on the battery charging history data; Based on the battery charging history data, label the capacity decay rate and risk label corresponding to each charging time sequence sample to obtain the first training dataset; Based on the first training dataset, a preset neural network model is trained according to a hybrid loss function to obtain the first prediction sub-model. The hybrid loss function includes a mean squared error function and a binary cross-entropy loss function. The mean squared error function is used to optimize the regression task of capacity decay rate prediction, and the binary cross-entropy loss function is used to optimize the classification task of risk prediction.
6. The method according to claim 4, characterized in that, The fault detection result is determined based on the voting results for the fault type, including: The fault type with the most votes is determined from the fault type voting results, and the fault type with the most votes is determined as the candidate fault type; Receive preset classification rules, and determine the target fault type based on the candidate fault type and the preset classification rules; The fault detection result is determined based on the target fault type.
7. The method according to claim 1, characterized in that, After determining the current battery charging stage of the target battery based on the charging parameters, the method further includes: If the battery charging phase is a trickle charging phase or a supplementary charging phase, a risk detection log is generated based on the charging parameters and the battery charging phase, and the risk detection log is uploaded to the target server.
8. A battery fault detection device, characterized in that, include: The parameter acquisition unit is used to acquire the charging parameters of the target charging pile for charging the target battery. The vehicle to which the target battery belongs is not equipped with an on-board diagnostic interface. The charging parameters include at least the battery terminal voltage, charging current, charging power, battery temperature, leakage current, ambient temperature and ambient humidity. A stage determination unit is used to determine the current battery charging stage of the target battery based on the charging parameters. The data determination unit is used to determine the charging timing data of the target battery based on the charging parameters when the battery charging stage is a constant voltage and constant current stage. The fault detection unit is used to input the charging timing data into the battery fault detection model and output the fault detection result for the target battery based on the battery fault detection model.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium is located to perform the battery fault detection method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, executes the battery fault detection method according to any one of claims 1 to 7.
11. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the battery fault detection method according to any one of claims 1 to 7.