A training method and related device for lithium battery abnormal sample detection model
Through the incremental training method, the lithium battery abnormal sample detection model can adapt to data domain changes, solve the problem of insufficient model generalization ability, and achieve efficient and reliable detection results, which is suitable for lithium battery health status monitoring.
Patent Information
- Application Number
- CN202411704155.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-11-26
AI Technical Summary
The existing lithium battery abnormal sample detection model has difficulty adapting to data domain offsets when raw materials and equipment fluctuate, resulting in insufficient generalization ability and affecting the reliability and efficiency of detection.
An incremental training method is adopted. By collecting resource data during the lithium battery production process, its distribution is calculated, and the distribution difference value with the initial training sample data is calculated. If the difference is greater than the threshold, the model is incrementally trained and local updates are performed using random non-repetitive sampling and gradient descent to ensure that the model adapts to changes in the data domain.
The generalization ability of the model is improved, the reliability and efficiency of the detection results in the case of data domain offset are guaranteed, and the computing resources and time costs are reduced.
Smart Images

Figure CN119646658B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lithium battery anomaly detection, and in particular relates to a training method and related device for a lithium battery anomaly sample detection model. Background Art
[0002] With the widespread application of lithium batteries in electric vehicles, energy storage systems and other fields, real-time monitoring of their health status has become particularly important.
[0003] At present, in order to improve the efficiency and accuracy of detection, in the production process of lithium batteries, companies generally use lithium battery abnormal sample detection models to monitor the health status of batteries; explanatory, the lithium battery abnormal sample detection model can select a suitable machine learning or deep learning model according to the characteristics of the data and the requirements of the detection task (for example, support vector machines, neural networks, long short-term memory networks and other models can be used for abnormal sample detection), and then use pre-collected sample data to train the model. After reaching the preset convergence conditions and passing the performance test, a trained lithium battery abnormal sample detection model can be obtained.
[0004] The above-trained lithium battery abnormal sample detection model can detect lithium battery abnormal samples during the battery production process with good detection efficiency and accuracy; however, when the raw materials and equipment conditions fluctuate, the data domain of the lithium battery will also shift. In this case, the above-trained lithium battery abnormal sample detection model is difficult to continue to use, and the generalization ability of the model needs to be further strengthened. Summary of the Invention
[0005] The present invention aims to provide a training method and related apparatus for a lithium battery abnormal sample detection model to address one or more of the aforementioned technical problems. The technical solution provided by the present invention is specifically an incremental training scheme for a lithium battery abnormal sample detection model with high generalization capability. When domain shift occurs in battery data, incremental training can be used to iteratively update the model, thereby enhancing the model's generalization capability and ensuring the reliability of the model's detection results.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for training a lithium battery abnormal sample detection model, comprising the following steps:
[0008] Based on the formation equipment in the lithium battery production process, resource data is collected and the distribution of resource data is calculated; wherein the resource data includes voltage data and current data;
[0009] Based on the initially trained lithium battery abnormal sample detection model, obtain training sample data and calculate the distribution of the training sample data;
[0010] The difference value between the distribution of the resource data and the distribution of the training sample data is calculated. If the difference value is greater than or equal to a preset threshold, the initially trained lithium battery abnormal sample detection model is incrementally trained based on the resource data and the training sample data to obtain the final trained lithium battery abnormal sample detection model.
[0011] A further improvement of the training method of the present invention is that:
[0012] In the step of collecting resource data and calculating the distribution of the resource data, the triggering condition for calculating the distribution of the resource data is a change in the raw material batch or a preset production duration.
[0013] A further improvement of the training method of the present invention is that:
[0014] The step of calculating and obtaining the distribution of resource data includes:
[0015] Divide the resource data into short sequences, and establish a window-based statistical probability model for each short sequence. Based on the statistical probability model, the probability distribution law is obtained and used as the distribution of the resource data;
[0016] The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
[0017] A further improvement of the training method of the present invention is that:
[0018] The step of calculating and obtaining the distribution of training sample data includes:
[0019] The training sample data is divided into short sequences, and a window-based statistical probability model is established for each short sequence. The probability distribution law is obtained based on the statistical probability model and used as the distribution of the training sample data;
[0020] The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
[0021] A further improvement of the training method of the present invention is that:
[0022] In the step of calculating the difference between the distribution of resource data and the distribution of training sample data, the difference calculation expression is:
[0023] ;
[0024] In the formula, error represents the difference value; P train Represents the distribution of training sample data; P source represents the distribution of resource data; ||·||1 represents the 1-norm.
[0025] A further improvement of the training method of the present invention is that:
[0026] The step of incrementally training the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data includes:
[0027] Using random non-repetitive sampling, samples are taken from the resource data and training sample data respectively, and the sampling results of the training sample data are replaced with the sampling results of the resource data to obtain new training sample data;
[0028] Based on the new training sample data, the lithium battery abnormal sample detection model is retrained using the gradient descent method;
[0029] Among them, when the difference between the loss during convergence of the retrained lithium battery abnormal sample detection model and the loss during convergence of the initially trained lithium battery abnormal sample detection model is greater than a predetermined threshold, the retraining is invalid training, otherwise it is valid training; when invalid training occurs, the parameters of the lithium battery abnormal sample detection model remain unchanged.
[0030] In a second aspect, the present invention provides a training system for a lithium battery abnormal sample detection model, comprising:
[0031] A first distribution acquisition module is used to collect resource data based on the formation equipment in the lithium battery production process and calculate the distribution of the resource data; wherein the resource data includes voltage data and current data;
[0032] The second distribution acquisition module is used to obtain training sample data and calculate the distribution of the training sample data based on the initially trained lithium battery abnormal sample detection model;
[0033] The discrimination and incremental training module is used to calculate the difference between the distribution of the obtained resource data and the distribution of the training sample data. If the difference is greater than or equal to a preset threshold, the initially trained lithium battery abnormal sample detection model is incrementally trained based on the resource data and the training sample data to obtain the final trained lithium battery abnormal sample detection model.
[0034] A further improvement of the training system of the present invention is that:
[0035] In the step of collecting resource data and calculating the distribution of the resource data executed by the first distribution acquisition module, the triggering condition for calculating the distribution of the resource data is a change in the raw material batch or continuous production for a preset period of time.
[0036] A further improvement of the training system of the present invention is that:
[0037] The step of the first distribution acquisition module performing calculation to obtain the distribution of resource data includes:
[0038] Divide the resource data into short sequences, and establish a window-based statistical probability model for each short sequence. Based on the statistical probability model, the probability distribution law is obtained and used as the distribution of the resource data;
[0039] The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
[0040] A further improvement of the training system of the present invention is that:
[0041] The step of the second distribution acquisition module performing calculation to obtain the distribution of training sample data includes:
[0042] The training sample data is divided into short sequences, and a window-based statistical probability model is established for each short sequence. The probability distribution law is obtained based on the statistical probability model and used as the distribution of the training sample data;
[0043] The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
[0044] A further improvement of the training system of the present invention is that:
[0045] In the step of calculating the difference between the distribution of resource data and the distribution of training sample data in the discrimination and incremental training module, the difference value calculation expression is:
[0046] ;
[0047] In the formula, error represents the difference value; P train Represents the distribution of training sample data; P source represents the distribution of resource data; ||·||1 represents the 1-norm.
[0048] A further improvement of the training system of the present invention is that:
[0049] The step of the discrimination and incremental training module performing incremental training on the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data includes:
[0050] Using random non-repetitive sampling, samples are taken from the resource data and training sample data respectively, and the sampling results of the training sample data are replaced with the sampling results of the resource data to obtain new training sample data;
[0051] Based on the new training sample data, the lithium battery abnormal sample detection model is retrained using the gradient descent method;
[0052] Among them, when the difference between the loss during convergence of the retrained lithium battery abnormal sample detection model and the loss during convergence of the initially trained lithium battery abnormal sample detection model is greater than a predetermined threshold, the retraining is invalid training, otherwise it is valid training; when invalid training occurs, the parameters of the lithium battery abnormal sample detection model remain unchanged.
[0053] In a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the training method for the lithium battery abnormal sample detection model as described in any one of the first aspects of the present invention is implemented.
[0054] In a fourth aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the training method for the lithium battery abnormal sample detection model as described in any one of the first aspects of the present invention is implemented.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present invention discloses a training method for a lithium battery abnormal sample detection model. The method is an incremental training scheme designed to improve the generalization ability of the lithium battery abnormal sample detection model. This scheme not only focuses on the accuracy and efficiency in traditional model training, but also emphasizes solving the problem of model inapplicability caused by battery data domain offset. It can significantly improve the generalization ability of the model and ensure the continued effectiveness and reliability of the model in practical applications.
[0057] In addition, in the preferred technical solution of the present invention, the trigger conditions for calculating the distribution of resource data are given, which ensures the training efficiency and computing power cost.
[0058] Furthermore, in the preferred technical solution of the present invention, the training steps, triggering conditions and judgment conditions of the incremental training are specifically given, which can reasonably complete the incremental training, improve the generalization ability of the model, and ensure the effectiveness and reliability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below; obviously, the drawings described below are some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0060] Figure 1 The figure is a flowchart of a method for training a lithium battery abnormal sample detection model in an embodiment of the present invention.
[0061] Figure 2 The figure is a flowchart of a method for training a lithium battery abnormal sample detection model in a specific embodiment of the present invention.
[0062] Figure 3 yes Figure 2 Schematic diagram of the implementation principle of the illustrated embodiment.
[0063] Figure 4 2 is a schematic diagram of a training system for a lithium battery abnormal sample detection model in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention; it is obvious that the described embodiments and technical solutions are only part of the embodiments of the present invention, not all of the embodiments.
[0065] All other embodiments obtained by persons of ordinary skill in the art based on the technical solutions disclosed in the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatuses.
[0066] See also Figure 1 The present invention discloses a method for training a lithium battery abnormal sample detection model, comprising the following steps:
[0067] Step 1: Based on the formation equipment in the lithium battery production process, resource data is collected and the distribution of the resource data is calculated; wherein the resource data includes voltage data and current data;
[0068] Step 2: Based on the initially trained lithium battery abnormal sample detection model, obtain training sample data and calculate the distribution of the training sample data;
[0069] Step 3: Calculate the difference between the distribution of the resource data and the distribution of the training sample data. If the difference is greater than or equal to a preset threshold, perform incremental training on the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data to obtain the final trained lithium battery abnormal sample detection model.
[0070] The technical solution proposed in the embodiments of the present invention focuses on enhancing the generalization capability of a lithium battery abnormal sample detection model through an incremental training method. This solution not only maintains high standards for model accuracy and efficiency, but also specifically addresses the problem of model failure caused by battery data domain drift (i.e., changes in data distribution over time or under changing conditions). Specifically, existing traditional model training often relies on static datasets. Once trained, it may not effectively recognize newly emerging data patterns. The present invention utilizes incremental learning, allowing the model to continuously receive new data and undergo fine-tuning after initial training, thereby adapting to changes in the data domain and maintaining model timeliness. In summary, by continuously learning and adapting to new data, the model can better generalize to unseen data scenarios and reduce model performance degradation caused by data domain drift. This solution ensures the model's effectiveness over long periods of time, which is particularly important for applications such as lithium battery health management and fault prediction, thereby improving its value and reliability in practical applications. Furthermore, compared to frequently retraining the entire model, incremental training only performs partial updates based on new data, significantly saving computing resources and time costs.
[0071] See also Figure 2 and Figure 3 In a specific embodiment of the present invention, a method for training a lithium battery abnormal sample detection model is provided, comprising:
[0072] Prerequisites: Establish a lithium battery abnormal sample detection model and train it using training sample data to obtain an initially trained lithium battery abnormal sample detection model;
[0073] Explanatoryally, a buffer zone can be divided on the server and named as a training zone; the training sample data in the training zone is used to train the lithium battery abnormal sample detection model; further explanatoryally, the present invention does not involve model construction, and the focus is on incremental model training. The model can be any type of neural network-based anomaly detection model, such as LSTM (long short-term memory network)-based, Transformer (self-attention mechanism)-based, Autoencoder (unsupervised learning)-based model, etc.; the necessary premise is that the model can be trained, and its parameters are not fixed, that is, it can be trained by the gradient descent method in deep learning, and the average loss of the model when the training converges is recorded as L0.
[0074] 1) Data collection, including:
[0075] 1.1) Sensors are deployed on the formation cabinets used in lithium battery production. Edge computers collect data such as voltage and current as resource data, which is then uploaded to a central server.
[0076] 1.2) Set up a buffer zone on the central server, named the resource zone. The resource zone is used to receive resource data uploaded by edge computers. This resource data is used as the data source for incremental training.
[0077] 2) Data distribution calculation, including:
[0078] 2.1) Set up a timer to periodically calculate the distribution of resource data according to trigger conditions. Explanation: Due to the large amount of calculation required, two trigger conditions are set. Condition 1 calculates the distribution of resource data in the buffer when a raw material batch changes; Condition 2 calculates the distribution of resource data in the buffer when production continues for half a month.
[0079] 2.2) Obtain the distribution of training sample data used by the initially trained lithium battery abnormal sample detection model. The calculation method is as follows:
[0080] Long sequences must be divided into short sequences. Specifically, this can be done by calculating the sum of the charge and discharge times (in minutes) based on the charge and discharge duration, dividing it by a preset coefficient m and rounding it up (usually 60). The resulting number is the length of each short sequence. In practice, the entire segment typically lasts 120 minutes, so exceptions are unlikely. Furthermore, if an exception occurs, if the long sequence exceeds 120 minutes, the portion above 120 minutes can be deleted. If it is less than 120 minutes, the sequence can be padded to 120 minutes, and the missing data segment can be supplemented with the end voltage of the discharge process.
[0081] A window-based statistical probability model is established for each short sequence. That is, continuous windows are defined, the number of data in each window is counted, and the probability distribution law is calculated. It must be ensured that the number of windows for each short sequence is consistent, and the number of windows can be expressed as n.
[0082] The obtained probability distribution law is called training distribution, which is expressed as follows:
[0083] ;
[0084] In the formula, each row represents the probability distribution law of a short sequence, for example, p 1 n Represents the distribution law of the first short sequence, where n is the number of windows and m is the number of short sequences, usually 60.
[0085] 3) Data distribution comparison, including:
[0086] The difference between the distributions is calculated using the following formula, which is the 1-norm of the matrix obtained by the difference between the two, expressed as,
[0087] ;
[0088] In the formula, error represents the difference value; P train Represents the distribution of training sample data; P source Indicates the distribution of resource data.
[0089] The steps for obtaining the threshold used in comparison include: recording the distribution of resource data obtained for the first time without changing the raw material batch and on the 30th day of continuous production as P 01 , the distribution of the training sample data used when building the model for the first time is recorded as P 00 , the error calculated according to the above formula is E 0, which is used as the threshold.
[0090] During the comparison process, after the trigger condition is met and the resource data distribution is calculated, the error calculated according to the above formula is E 1, E 1 If more than E If the value is 0, it means that the data distribution in the current resource area is too different from that in the training area and incremental training is required. Otherwise, incremental training is not required.
[0091] In the preferred technical solution of the embodiment of the present invention, the calculation trigger conditions of the distribution of resource data and the trigger conditions of incremental training are specifically given, which can reasonably complete the incremental training and ensure the training efficiency and computing power cost.
[0092] In one embodiment of the present invention, the specific steps of incremental training include:
[0093] Sample the resource data in the resource area and extract 20% of it by random non-repetitive sampling, and this part of the data must not exceed 20% of the number of data samples in the training area;
[0094] The training sample data in the training area are sampled, and the number of samples is equal to the number of samples of the resource data in the resource area, and the sampling is performed according to random non-repetitive sampling;
[0095] The data sampled from the resource data is replaced with the data sampled from the training sample data. This means that part of the data in the training area will be removed, and the sampled data from the resource area will be added in, and the model will be retrained according to the gradient descent method. Furthermore, the loss at the time of convergence of the current model training is recorded as L1. The loss of the model at this time is checked. If L1 exceeds L0 by 20%, the training is invalid, otherwise it is called valid training. When invalid training occurs, the model parameters remain unchanged.
[0096] In the technical solution provided by the embodiment of the present invention, in the face of continuous changes in the data domain, an incremental training mechanism is introduced, which means that the model does not need to be retrained from scratch, but can be locally updated or fine-tuned using newly collected lithium battery data. This training method significantly reduces the training time, while maintaining the model's sensitivity to the latest data distribution and improving generalization capabilities. In order to further enhance the model's resistance to domain shift, the present invention automatically adjusts the model parameters by monitoring changes in data distribution. This dynamic adjustment mechanism ensures that the model can maintain a high-accuracy anomaly detection capability when raw materials, equipment conditions, etc. change. In order to ensure the reliability of the model detection results, the accuracy of the detection results can be further improved by comparing losses during the incremental training process. In summary, the incremental training scheme for the lithium battery abnormal sample detection model provided by the embodiment of the present invention solves the problem of decreased model generalization capability caused by data domain shift, realizes efficient iterative updates and continuous reliability assurance of the model, and provides strong technical support for lithium battery anomaly detection.
[0097] The following are device embodiments of the present invention, which can be used to perform the method embodiments of the present invention. For details not disclosed in the device embodiments, please refer to the method embodiments of the present invention.
[0098] See also Figure 4 In an embodiment of the present invention, a training system for a lithium battery abnormal sample detection model is provided, comprising:
[0099] A first distribution acquisition module is used to collect resource data based on the formation equipment in the lithium battery production process and calculate the distribution of the resource data; wherein the resource data includes voltage data and current data;
[0100] The second distribution acquisition module is used to obtain training sample data and calculate the distribution of the training sample data based on the initially trained lithium battery abnormal sample detection model;
[0101] The discrimination and incremental training module is used to calculate the difference between the distribution of the obtained resource data and the distribution of the training sample data. If the difference is greater than or equal to a preset threshold, the initially trained lithium battery abnormal sample detection model is incrementally trained based on the resource data and the training sample data to obtain the final trained lithium battery abnormal sample detection model.
[0102] In one embodiment of the present invention, a computer device is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, the computer program including program instructions, and the processor is configured to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor is the computing core and control core of the terminal and is suitable for implementing one or more instructions, specifically loading and executing one or more instructions in the computer storage medium to implement a corresponding method flow or corresponding function. The processor described in this embodiment of the present invention can be used to perform operations in a training method for detecting abnormal lithium battery samples.
[0103] In one embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a computer device, used to store programs and data. It is understood that the computer-readable storage medium herein may include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, the storage space also stores one or more instructions suitable for being loaded and executed by a processor. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium herein may be high-speed Random Access Memory (RAM) or non-volatile memory, such as at least one disk drive. The processor may load and execute the one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for training a lithium battery abnormal sample detection model in the above-described embodiment.
[0104] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, optical storage, etc.) containing computer-usable program code.
[0105] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0106] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0107] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0108] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.
Claims
1. A training method for a lithium battery abnormal sample detection model, characterized in that: The following steps are involved: Based on the formation equipment in the lithium battery production process, resource data is collected and the distribution of resource data is calculated; wherein the resource data includes voltage data and current data; Based on the initially trained lithium battery abnormal sample detection model, obtain training sample data and calculate the distribution of the training sample data; Calculating the difference between the distribution of the resource data and the distribution of the training sample data, and if the difference is greater than or equal to a preset threshold, incrementally training the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data to obtain a final trained lithium battery abnormal sample detection model; in, The step of calculating and obtaining the distribution of training sample data includes: The training sample data is divided into short sequences, and a window-based statistical probability model is established for each short sequence. The probability distribution law is obtained based on the statistical probability model and used as the distribution of the training sample data; The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent. In the step of calculating the difference between the distribution of resource data and the distribution of training sample data, the difference calculation expression is: error=||P train -P source ||1; Where error represents the difference value; P train represents the distribution of training sample data; P source represents the distribution of resource data; ||·||1 represents the 1-norm; The step of incrementally training the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data includes: Using random non-repetitive sampling, samples are taken from the resource data and training sample data respectively, and the sampling results of the training sample data are replaced with the sampling results of the resource data to obtain new training sample data; Based on the new training sample data, the lithium battery abnormal sample detection model is retrained using the gradient descent method; Among them, when the difference between the loss during convergence of the retrained lithium battery abnormal sample detection model and the loss during convergence of the initially trained lithium battery abnormal sample detection model is greater than a predetermined threshold, the retraining is invalid training, otherwise it is valid training; when invalid training occurs, the parameters of the lithium battery abnormal sample detection model remain unchanged.
2. The method for training a lithium battery abnormal sample detection model according to claim 1, characterized in that: In the step of collecting resource data and calculating the distribution of the resource data, the triggering condition for calculating the distribution of the resource data is a change in the raw material batch or a preset production duration.
3. The training method for a lithium battery abnormal sample detection model according to claim 1, characterized in that: The step of calculating and obtaining the distribution of resource data includes: Divide the resource data into short sequences, and establish a window-based statistical probability model for each short sequence. Based on the statistical probability model, the probability distribution law is obtained and used as the distribution of the resource data; The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
4. A training system for a lithium battery abnormal sample detection model, characterized in that: include: A first distribution acquisition module is used to collect resource data based on the formation equipment in the lithium battery production process and calculate the distribution of the resource data; wherein the resource data includes voltage data and current data; The second distribution acquisition module is used to obtain training sample data and calculate the distribution of the training sample data based on the initially trained lithium battery abnormal sample detection model; A discrimination and incremental training module, configured to calculate the difference between the distribution of the obtained resource data and the distribution of the training sample data, and if the difference is greater than or equal to a preset threshold, incrementally train the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data to obtain a final trained lithium battery abnormal sample detection model; in, The step of the second distribution acquisition module performing calculation to obtain the distribution of training sample data includes: The training sample data is divided into short sequences, and a window-based statistical probability model is established for each short sequence. The probability distribution law is obtained based on the statistical probability model and used as the distribution of the training sample data; The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent. In the step of calculating the difference between the distribution of resource data and the distribution of training sample data in the discrimination and incremental training module, the difference value calculation expression is: error=||P train -P source ||1; Where error represents the difference value; P train represents the distribution of training sample data; P source represents the distribution of resource data; ||·||1 represents the 1-norm; The step of the discrimination and incremental training module performing incremental training on the initially trained lithium battery abnormal sample detection model based on the resource data and the training sample data includes: Using random non-repetitive sampling, samples are taken from the resource data and training sample data respectively, and the sampling results of the training sample data are replaced with the sampling results of the resource data to obtain new training sample data; Based on the new training sample data, the lithium battery abnormal sample detection model is retrained using the gradient descent method; Among them, when the difference between the loss during convergence of the retrained lithium battery abnormal sample detection model and the loss during convergence of the initially trained lithium battery abnormal sample detection model is greater than a predetermined threshold, the retraining is invalid training, otherwise it is valid training; when invalid training occurs, the parameters of the lithium battery abnormal sample detection model remain unchanged.
5. The training system for a lithium battery abnormal sample detection model according to claim 4, characterized in that: In the step of collecting resource data and calculating the distribution of the resource data executed by the first distribution acquisition module, the triggering condition for calculating the distribution of the resource data is a change in the raw material batch or continuous production for a preset period of time.
6. The training system for a lithium battery abnormal sample detection model according to claim 4, characterized in that: The step of the first distribution acquisition module performing calculation to obtain the distribution of resource data includes: Divide the resource data into short sequences, and establish a window-based statistical probability model for each short sequence. Based on the statistical probability model, the probability distribution law is obtained and used as the distribution of the resource data; The length of the short sequence is calculated by calculating the sum of the charging time and the discharging time, dividing the sum by a preset coefficient, and rounding up. In the statistical probability model, multiple continuous windows are defined, and the probability distribution law is calculated by counting the number of data in each window. The number of windows in each short sequence is consistent.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the training method of the lithium battery abnormal sample detection model according to any one of claims 1 to 3 is implemented.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the training method of the lithium battery abnormal sample detection model according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Decision tree-based model training and classification method
CN116340763A
Battery state detection method, device and system, electronic equipment and storage medium
CN116559710A