Training method, device and electronic device for battery failure prediction model
By using historical battery failure data for model pre-training, combined with MAML meta-learning method and parameter fine-tuning, the problem of weak generalization ability of battery failure warning models in the existing technology is solved, and the accuracy and performance of battery failure prediction are improved.
Patent Information
- Application Number
- CN202410294753.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-15
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-03-15
AI Technical Summary
In the prior art, battery failure warning relies on machine learning models trained in fault data of the same type of battery, and there are problems such as high data acquisition cost and weak model generalization ability.
By obtaining fault data of different battery types in historical energy storage projects as the initial training sample set, model pre-training is performed, and the battery failure prediction model is gradually optimized.
It improves the prediction accuracy and performance of the battery failure prediction model, and reduces data acquisition costs and computing power consumption.
Smart Images

Figure CN117892842B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of energy storage technology, and in particular to a training method, device and electronic equipment for a battery fault prediction model. Background Art
[0002] At present, the battery fault warning in the energy storage system usually adopts the data-driven energy storage container fault warning implementation scheme, and most of them use the same type of battery fault data to train the machine learning model. This method has the following problems: 1. The acquisition cost of the same type of battery fault data is high; 2. The generalization ability of the machine learning model trained with the same type of battery fault data is weak. Each type of battery must train the corresponding algorithm model, which consumes too much computing power. Summary of the invention
[0003] The purpose of this application is to provide a training method, device and electronic device for a battery fault prediction model. The model training process is implemented through a series of continuous operations such as model pre-training, meta-learning method and parameter fine-tuning, which can improve the prediction accuracy and performance of the model.
[0004] In a first aspect, the present application provides a method for training a battery fault prediction model, the method comprising: obtaining fault data of different battery types corresponding to historical energy storage projects as an initial training sample set; based on the initial training sample set, obtaining a query set and a support set corresponding to the batteries used in the newly built energy storage project; applying the initial training sample set to perform model pre-training to obtain a pre-trained model; based on the query set and the support set corresponding to the batteries used in the newly built energy storage project, iteratively updating the model parameters of the pre-trained model using the MAML meta-learning method, after the iterative update is completed, using the pre-trained model with updated model parameters as a target model corresponding to the batteries used in the newly built energy storage project; as the newly built energy storage project is running, fine-tuning the parameters of the target model according to the latest collected battery fault data to obtain a battery fault prediction model for the batteries used in the newly built energy storage project.
[0005] Furthermore, the above-mentioned step of obtaining a query set and a support set corresponding to the batteries used in the newly built energy storage project based on the initial training sample set includes: dividing the battery failure data corresponding to different battery types in the initial training sample set into sample data of different source domains; using the historical battery failure data corresponding to the batteries used in the newly built energy storage project as the target domain sample data; respectively calculating the distribution correlation degree of the sample data of different source domains and the target domain sample data; determining a specified number of target source domain sample data with a higher data distribution correlation among multiple target source domain sample data as the query set, and determining the other remaining target source domain sample data as the support set.
[0006] Furthermore, the above-mentioned steps of respectively calculating the distribution correlation degree of different source domain sample data and target domain sample data include: for each source domain, calculating the maximum mean difference MMD between the source domain and the target domain based on the source domain sample data and the target domain sample data; determining the target segment number corresponding to the initial voltage difference between the source domain and the target domain; taking the sum of the maximum mean difference and the target segment number as the data distribution difference evaluation value between the source domain and the target domain; the data distribution difference evaluation value is inversely correlated with the distribution correlation degree.
[0007] Furthermore, the above step of determining the segment number corresponding to the initial voltage difference between the source domain and the target domain includes: calculating the initial voltage difference between each source domain and the target domain; sorting the initial voltage difference between each source domain and the target domain from small to large, dividing the sorting result into multiple segments, and constructing a piecewise function; the segments of the piecewise function correspond to the initial voltage difference; the function value corresponding to the segment is the segment number; based on the piecewise function, determining the target segment number corresponding to the initial voltage difference between the source domain and the target domain.
[0008] Furthermore, the above-mentioned step of iteratively updating the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and support set corresponding to the batteries used in the newly built energy storage project includes: taking the initial model parameters of the pre-trained model as the current model parameters, and executing the following parameter update process: applying the query set and the support set to train the pre-trained model; determining the optimal parameters corresponding to each task based on the current model parameters and the gradients corresponding to the current model parameters; updating the current model parameters based on the optimal parameters corresponding to each task; taking the updated model parameters as the new current model parameters, and continuing the parameter update process until the latest current model parameters converge to obtain the target model.
[0009] Furthermore, the step of determining the optimal parameters corresponding to each task according to the current model parameters and the gradients corresponding to the current model parameters includes: calculating the optimal parameters corresponding to each task according to the following first specified formula:
[0010] ;
[0011] in, Indicates the task The corresponding optimal parameters; Represents the current model parameters; Represents the gradient of the current model parameters; Indicates the task The corresponding loss function; Represents the specified function containing the current model parameters; Represents the first coefficient.
[0012] Furthermore, the step of updating the current model parameters based on the optimal parameters corresponding to each task includes: calculating the updated model parameters according to the following second specified formula:
[0013] ;
[0014] in, Represents the updated model parameters; represents the second coefficient; Indicates that tasks are included The specified function of the corresponding optimal parameters; Indicates that it obeys the data distribution Mission , Represents the data distribution of all tasks.
[0015] In a second aspect, the present application also provides a training device for a battery fault prediction model, the device comprising: a training data acquisition module, used to obtain fault data of different battery types corresponding to historical energy storage projects as an initial training sample set; based on the initial training sample set, obtaining a query set and a support set corresponding to the batteries used in the newly built energy storage project; a pre-training module, used to apply the initial training sample set to perform model pre-training to obtain a pre-trained model; a meta-learning module, used to iteratively update the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and the support set corresponding to the batteries used in the newly built energy storage project, and after the iterative update is completed, the pre-trained model with the updated model parameters is used as the target model corresponding to the batteries used in the newly built energy storage project; a parameter fine-tuning module, used to fine-tune the parameters of the target model according to the latest battery fault data collected as the newly built energy storage project runs, to obtain a battery fault prediction model for the batteries used in the newly built energy storage project.
[0016] In a third aspect, the present application further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method described in the first aspect above.
[0017] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method described in the first aspect above.
[0018] In the training method, device and electronic device of the battery fault prediction model provided in the present application, firstly, the fault data of different battery types corresponding to the historical energy storage project are obtained as the initial training sample set; based on the initial training sample set, the query set and support set corresponding to the battery used in the newly built energy storage project are obtained; then the initial training sample set is applied to pre-train the model to obtain the pre-trained model; then, based on the query set and support set corresponding to the battery used in the newly built energy storage project, the model parameters of the pre-trained model are iteratively updated using the MAML meta-learning method, and after the iterative update is completed, the pre-trained model with the updated model parameters is used as the target model corresponding to the battery used in the newly built energy storage project; as the newly built energy storage project is running, the parameters of the target model are fine-tuned according to the latest battery fault data collected to obtain the battery fault prediction model of the battery used in the newly built energy storage project. In this model training method, the model training process realized by a series of continuous operations including model pre-training, meta-learning method and parameter fine-tuning can improve the prediction accuracy and performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of voltage and temperature curves when overcharging the same type of batteries from different manufacturers provided in an embodiment of the present application;
[0021] Figure 2 A flowchart of a method for training a battery fault prediction model provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of each module in a training method for a battery fault prediction model provided in an embodiment of the present application;
[0023] Figure 4 A code schematic diagram of a parameter determination process in a meta-learning process provided in an embodiment of the present application;
[0024] Figure 5 A structural block diagram of a battery fault prediction model training device provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The technical solution of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0027] For the same fault type, the data distribution of different battery types (lithium iron phosphate / ternary lithium) is different, and the data distribution of the same type of batteries produced by different manufacturers is also different. Figure 1 Figures (a) and (b) are the voltage and temperature curves of a 280Ah lithium iron phosphate battery when it is overcharged. The data in (a) corresponds to the product produced by manufacturer A, and the data in (b) corresponds to the product produced by manufacturer B. Figure 1 It can be found that during the battery overcharge process, the voltage distribution is significantly different. The battery voltage data of manufacturer A is mostly distributed between 4.4v and 4.8v, while the battery voltage data of manufacturer B is mostly distributed between 3.4v and 3.6v. Traditional machine learning requires data to be in the same distribution. However, the data of the same fault type from the same battery manufacturer is relatively small.
[0028] Based on this, the embodiments of the present application provide a method, device and electronic device for training a battery fault prediction model, which utilizes fault data with different data distributions under a variety of different battery types, and implements a model training process through a series of continuous operations including model pre-training, meta-learning methods and parameter fine-tuning, thereby improving the prediction accuracy and performance of the model.
[0029] To facilitate understanding of this embodiment, a training method for a battery fault prediction model disclosed in an embodiment of the present application is first introduced in detail.
[0030] Figure 2 A flowchart of a method for training a battery fault prediction model provided in an embodiment of the present application, the method comprising the following steps:
[0031] Step S202, obtaining fault data of different battery types corresponding to historical energy storage projects as an initial training sample set; based on the initial training sample set, obtaining a query set and a support set corresponding to the batteries used in the newly built energy storage project;
[0032] In specific implementation, collecting battery failure data mainly includes obtaining public battery failure data, collecting battery failure data under laboratory test conditions or in real production environments, and the collected relevant battery data may belong to different battery types or produced by different battery manufacturers.
[0033] Since the query set and support set are needed in the subsequent meta-learning process, we first analyze the initial training sample set to obtain the query set and support set.
[0034] Step S204, applying the initial training sample set to perform model pre-training to obtain a pre-trained model;
[0035] The model is pre-trained using multiple types of battery failure data. Since the pre-training uses multiple types or multiple manufacturers' battery failure data, the pre-trained model can learn some common features and the model generalization ability is higher. Therefore, compared with randomly initializing model parameters, this method can obtain better initial parameters.
[0036] Step S206, based on the query set and support set corresponding to the batteries used in the newly built energy storage project, the model parameters of the pre-trained model are iteratively updated using the MAML (Meta Learning) meta-learning method. After the iterative update is completed, the pre-trained model with updated model parameters is used as the target model corresponding to the batteries used in the newly built energy storage project;
[0037] When the data distribution of battery failure data of multiple types or multiple manufacturers is very different, the model performance will be relatively low. Since the MAML meta-learning method can obtain common model parameters from multiple tasks, in this step, using MAML meta-learning on the basis of pre-training can obtain model parameters that are more relevant to new energy storage projects.
[0038] Step S208: As the newly built energy storage project is running, the parameters of the target model are fine-tuned according to the latest collected battery failure data to obtain a battery failure prediction model for the batteries used in the newly built energy storage project.
[0039] In order to make the algorithm model better adapt to new tasks in newly built energy storage projects, it is necessary to use the latest battery failure data during the project operation to fine-tune the model (similar to incremental update), so as to quickly adjust the model with fewer battery failure samples and improve the accuracy of battery failure warning.
[0040] A method for training a battery fault prediction model provided in an embodiment of the present application can utilize fault data with different data distributions under a variety of different battery types. The model training process is implemented through a series of continuous operations including model pre-training, meta-learning methods, and parameter fine-tuning, thereby improving the prediction accuracy and performance of the model.
[0041] The embodiment of the present application also provides another method for training a battery fault prediction model. The method is implemented on the basis of the previous embodiment. This embodiment focuses on describing the meta-learning process.
[0042] See also Figure 3As shown, three modules are set in the embodiment of the present application, namely, a pre-training module, a meta-learning module and a Fine-tuning module; the pre-training module uses fault data of various battery types to pre-train the model; the meta-learning module is used to adopt the MAML algorithm to obtain model parameters that are more relevant to the target domain; the Fine-tuning module (fine-tuning module) fine-tunes the algorithm according to the target domain.
[0043] Various types of battery failure data are used for model pre-training. Compared with randomly initializing model parameters, the pre-trained model uses various types of battery data related to battery failures. Therefore, better initial model parameters can be obtained.
[0044] In order to solve the problem of data distribution differences, in this embodiment, the model parameters that are more relevant to the target domain are obtained based on the MAML meta-learning method. By initializing the parameters in this way, the model can be applied to new tasks through a small number of gradient descent steps. Therefore, when a new task starts, this embodiment does not use a random parameter for initialization, but instead migrates the optimal parameters of other related tasks as the initialization parameters of the new task, which can reduce the steps of gradient descent and reduce the data requirements of the training process.
[0045] When the meta-learning module works, it needs to first obtain the corresponding query set and support set. Only by training the model with these two sets can the model parameters that are more relevant to the target domain be obtained. The following is a detailed description of the query set and support set acquisition process:
[0046] (1) The battery failure data corresponding to different battery types in the initial training sample set are divided into sample data of different source domains; the historical battery failure data corresponding to the newly built energy storage project is used as the sample data of the target domain;
[0047] (2) Calculate the distribution correlation between different source domain sample data and target domain sample data respectively;
[0048] The specific implementation is achieved through the following steps:
[0049] Step A: For each source domain, the maximum mean discrepancy (MMD) between the source domain and the target domain is calculated based on the source domain sample data and the target domain sample data.
[0050] In this embodiment, the maximum mean difference (MMD) is used to measure the data distribution difference between the source domain and the target domain.
[0051] Step B: determining a target segment number corresponding to an initial voltage difference between a source domain and a target domain;
[0052] Specifically, the initial voltage difference between each source domain and the target domain is calculated; the initial voltage difference between each source domain and the target domain is sorted from small to large, the sorting result is divided into multiple segments, and a piecewise function is constructed; the segments of the piecewise function correspond to the initial voltage difference; the function value corresponding to the segment is the segment number; based on the piecewise function, the target segment number corresponding to the initial voltage difference between the source domain and the target domain is determined.
[0053] For example, different segment numbers are divided according to the initial voltage difference between different source domains, and the order between the segments is ensured first. Each segment represents a different battery type, so that the source domain with the same battery type as the current source domain is ranked first. As shown in formula (1), Represents the initial voltage difference between source domain i and target domain j (the initial voltage refers to the normal working voltage before thermal runaway occurs. The reason for dividing the segment number by "initial voltage difference" is that the working voltages of batteries of different specifications are generally different). For example, the voltage difference is divided into 3 segments through a piecewise function (the specific number of segments is set according to the data distribution in the data source).
[0054] (1)
[0055] Step C: The sum of the maximum mean difference and the target segment number is used as the data distribution difference evaluation value between the source domain and the target domain; the data distribution difference evaluation value is inversely correlated with the distribution correlation degree; the larger the data distribution difference evaluation value, the smaller the distribution correlation degree.
[0056] The entire data distribution difference measurement value, that is, the data distribution difference evaluation value , is the segment number and The sum of , as shown in formula (2), represents the feature map, m and n represent the number of data in the two domains.
[0057] (2)
[0058] (3) Among the multiple target source domain sample data, a designated number of target source domain sample data with a higher degree of data distribution correlation are determined as the query set, and the remaining target source domain sample data are determined as the support set.
[0059] After obtaining the support set and query set, the loss function can reach the convergence condition by setting and adjusting the number of iterations and learning rate.
[0060] In the embodiment of the present application, the data difference is evaluated by MMD, which can speed up the training of subsequent models. The data distribution difference calculation method under the segmented pressure difference can effectively measure the data distribution difference between multiple sources.
[0061] The above-mentioned steps of iteratively updating the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and support set corresponding to the batteries used in the newly built energy storage project include:
[0062] Use the initial model parameters of the pre-trained model as the current model parameters and perform the following parameter update process:
[0063] (1) Use the query set and support set to train the pre-trained model;
[0064] (2) Determine the optimal parameters for each task based on the current model parameters and the gradients corresponding to the current model parameters;
[0065] Calculate the optimal parameters for each task according to the following first specified formula:
[0066] ;
[0067] in, Indicates the task The corresponding optimal parameters; Represents the current model parameters; Represents the gradient of the current model parameters; Indicates the task The corresponding loss function; Represents the specified function containing the current model parameters; Represents the first coefficient.
[0068] (3) Update the current model parameters based on the optimal parameters corresponding to each task;
[0069] According to the following second specified formula, the updated model parameters are calculated:
[0070] ;
[0071] in, Represents the updated model parameters; represents the second coefficient; Indicates that tasks are included The specified function of the corresponding optimal parameters; Indicates that it obeys the data distribution Mission , Represents the data distribution of all tasks.
[0072] (4) The updated model parameters are used as the new current model parameters, and the parameter updating process is continued until the latest current model parameters converge to obtain the target model.
[0073] The code corresponding to the above process can be found in Figure 4As shown in Algorithm 1, the MAML algorithm can be divided into two loops, one of which is used to determine the optimal parameters corresponding to each task in the current task set. ; The outer loop is used to update the initial random parameters through the gradient corresponding to the optimal parameters calculated by the inner loop .
[0074] parameter The update of is shown in formula (3): Indicates that it contains parameters The whole formula means: when the adaptation task When become ,at the same time Update in the direction of gradient descent.
[0075] (3)
[0076] parameter The update of is shown in formula (4): Indicates that it contains parameters The whole formula represents Update according to the direction of gradient descent for all tasks:
[0077] (4)
[0078] As the energy storage project operates, the target model is fine-tuned based on the latest data collected, so that the model can be quickly adjusted with fewer battery failure samples to improve the accuracy of battery failure warnings.
[0079] In the training method of the battery fault prediction model provided in the embodiment of the present application, a battery fault warning scheme based on pre-training, meta-learning and Fine-tuning model fine-tuning is designed. Different types of battery fault data are obtained to reduce the cost of data collection; the machine learning model trained with different types of battery fault data improves the generalization ability of the model and reduces computing power consumption. First, a variety of types of battery data are used to pre-train the model so that the model can obtain relatively good initial parameters. Then, based on the pre-trained model, the model parameters that are more relevant to the target domain are obtained based on the MAML meta-learning method. Finally, Fine-tuning the model is performed on the new task to continuously improve the model performance. In this embodiment, a continuous variety of processing methods and algorithm models are used to make full use of a variety of battery fault data and improve the accuracy of battery fault warning.
[0080] Based on the above method embodiment, the present application embodiment also provides a training device for a battery failure prediction model, see Figure 5As shown, the device includes: a training data acquisition module 52, which is used to obtain fault data of different battery types corresponding to historical energy storage projects as an initial training sample set; based on the initial training sample set, a query set and a support set corresponding to the battery used in the newly built energy storage project are obtained; a pre-training module 54, which is used to apply the initial training sample set to perform model pre-training to obtain a pre-trained model; a meta-learning module 56, which is used to iteratively update the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and the support set corresponding to the battery used in the newly built energy storage project. After the iterative update is completed, the pre-trained model with the updated model parameters is used as the target model corresponding to the battery used in the newly built energy storage project; a parameter fine-tuning module 58, which is used to fine-tune the parameters of the target model according to the latest battery fault data collected as the newly built energy storage project runs, so as to obtain a battery fault prediction model for the battery used in the newly built energy storage project.
[0081] Furthermore, the training data acquisition module 52 is used to divide the battery failure data corresponding to different battery types in the initial training sample set into sample data of different source domains; use the historical battery failure data corresponding to the newly built energy storage project as the target domain sample data; calculate the distribution correlation between the sample data of different source domains and the sample data of the target domain respectively; determine a specified number of target source domain sample data with a higher data distribution correlation among multiple target source domain sample data as the query set, and determine the remaining target source domain sample data as the support set.
[0082] Furthermore, the above-mentioned training data acquisition module 52 is used to: for each source domain, calculate the maximum mean difference MMD between the source domain and the target domain based on the source domain sample data and the target domain sample data; determine the target segment number corresponding to the initial voltage difference between the source domain and the target domain; use the sum of the maximum mean difference and the target segment number as the data distribution difference evaluation value between the source domain and the target domain; the data distribution difference evaluation value is inversely correlated with the distribution correlation degree.
[0083] Furthermore, the above-mentioned training data acquisition module 52 is used to: calculate the initial voltage difference between each source domain and the target domain; sort the initial voltage difference between each source domain and the target domain from small to large, divide the sorting result into multiple segments, and construct a piecewise function; the segment of the piecewise function corresponds to the initial voltage difference; the function value corresponding to the segment is the segment number; based on the piecewise function, determine the target segment number corresponding to the initial voltage difference between the source domain and the target domain.
[0084] Furthermore, the meta-learning module 56 is used to: use the initial model parameters of the pre-trained model as the current model parameters, and perform the following parameter updating process: apply the query set and the support set to train the pre-trained model; determine the optimal parameters corresponding to each task based on the current model parameters and the gradients corresponding to the current model parameters; update the current model parameters based on the optimal parameters corresponding to each task; use the updated model parameters as the new current model parameters, and continue to perform the parameter updating process until the latest current model parameters converge to obtain the target model.
[0085] Furthermore, the meta-learning module 56 is used to calculate the optimal parameters corresponding to each task according to the following first specified formula:
[0086] ;
[0087] in, Representation Task The corresponding optimal parameters; Represents the current model parameters; Represents the gradient of the current model parameters; Representation Task The corresponding loss function; Represents the specified function containing the current model parameters; Represents the first coefficient.
[0088] Furthermore, the meta-learning module 56 is used to calculate the updated model parameters according to the following second specified formula:
[0089] ;
[0090] in, Represents the updated model parameters; represents the second coefficient; Indicates that tasks are included The specified function of the corresponding optimal parameters; Indicates that it obeys the data distribution Mission , Represents the data distribution of all tasks.
[0091] The device provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0092] The present application also provides an electronic device, such as Figure 6As shown, it is a schematic diagram of the structure of the electronic device, wherein the electronic device includes a processor 61 and a memory 60, the memory 60 stores computer executable instructions that can be executed by the processor 61, and the processor 61 executes the computer executable instructions to implement the above method.
[0093] exist Figure 6 In the illustrated embodiment, the electronic device further includes a bus 62 and a communication interface 63 , wherein the processor 61 , the communication interface 63 and the memory 60 are connected via the bus 62 .
[0094] Among them, the memory 60 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 63 (which can be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. can be used. The bus 62 can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 62 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0095] The processor 61 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 61. The above processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor 61 reads the information in the memory and completes the steps of the method of the above embodiment in combination with its hardware.
[0096] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.
[0097] The computer program products of the methods, devices, and electronic devices provided in the embodiments of the present application include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0098] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0099] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0100] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0101] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for training a battery failure prediction model, characterized in that: The method comprises: Obtaining fault data of different battery types corresponding to historical energy storage projects as an initial training sample set; based on the initial training sample set, obtaining a query set and a support set corresponding to the batteries used in the newly built energy storage project, including: The battery failure data corresponding to different battery types in the initial training sample set are divided into sample data of different source domains; the historical battery failure data corresponding to the batteries used in the newly built energy storage project are used as sample data of the target domain; for each source domain, the maximum mean difference MMD between the source domain and the target domain is calculated based on the source domain sample data and the target domain sample data; the initial voltage difference between each source domain and the target domain is calculated; the initial voltage difference between each source domain and the target domain is sorted from small to large, the sorting result is divided into multiple segments, and a piecewise function is constructed; the piecewise function The segment of the function corresponds to the initial voltage difference; the function value corresponding to the segment is the segment number; based on the piecewise function, the target segment number corresponding to the initial voltage difference between the source domain and the target domain is determined, and the sum of the maximum mean difference and the target segment number is used as the data distribution difference evaluation value between the source domain and the target domain; the data distribution difference evaluation value is inversely correlated with the distribution correlation degree; among multiple target source domain sample data, a specified number of target source domain sample data with a higher data distribution correlation degree is determined as a query set, and the remaining target source domain sample data is determined as a support set; Applying the initial training sample set to perform model pre-training to obtain a pre-trained model; Based on the query set and support set corresponding to the batteries used in the newly built energy storage project, the model parameters of the pre-trained model are iteratively updated using the MAML meta-learning method. After the iterative update is completed, the pre-trained model with the updated model parameters is used as the target model corresponding to the batteries used in the newly built energy storage project; As the newly built energy storage project is put into operation, the parameters of the target model are fine-tuned according to the latest collected battery failure data to obtain a battery failure prediction model for the batteries used in the newly built energy storage project.
2. The method according to claim 1, characterized in that The step of iteratively updating the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and support set corresponding to the batteries used in the newly built energy storage project includes: The initial model parameters of the pre-trained model are used as the current model parameters, and the following parameter update process is performed: Using the query set and the support set to train the pre-trained model; Determine the optimal parameters corresponding to each task according to the current model parameters and the gradients corresponding to the current model parameters; The current model parameters are updated based on the optimal parameters corresponding to each task; the updated model parameters are used as new current model parameters, and the parameter updating process is continued until the latest current model parameters converge to obtain the target model.
3. The method according to claim 2, characterized in that The step of determining the optimal parameters corresponding to each task according to the current model parameters and the gradients corresponding to the current model parameters comprises: Calculate the optimal parameters for each task according to the following first specified formula: ; in, Representation Task The corresponding optimal parameters; Represents the current model parameters; Represents the gradient of the current model parameters; Representation Task The corresponding loss function; Represents the specified function containing the current model parameters; Represents the first coefficient.
4. The method according to claim 2, characterized in that: The step of updating the current model parameters based on the optimal parameters corresponding to each task includes: According to the following second specified formula, the updated model parameters are calculated: ; in, Represents the updated model parameters; represents the second coefficient; Indicates that tasks are included The specified function of the corresponding optimal parameters; Indicates that it obeys the data distribution Mission , Represents the data distribution of all tasks.
5. A training device for a battery failure prediction model, characterized in that: The device comprises: The training data acquisition module is used to obtain the fault data of different battery types corresponding to the historical energy storage project as the initial training sample set; based on the initial training sample set, the query set and support set corresponding to the battery used in the new energy storage project are obtained, including: dividing the battery fault data corresponding to different battery types in the initial training sample set into sample data of different source domains; using the historical battery fault data corresponding to the battery used in the new energy storage project as the target domain sample data; for each source domain, according to the source domain sample data and the target domain sample data, calculating the maximum mean difference MMD between the source domain and the target domain; calculating the initial voltage difference between each source domain and the target domain; and comparing each source domain with the target domain. The initial voltage difference is sorted from small to large, and the sorting result is divided into multiple sections to construct a piecewise function; the section of the piecewise function corresponds to the initial voltage difference; the function value corresponding to the section is the section number; based on the piecewise function, the target section number corresponding to the initial voltage difference between the source domain and the target domain is determined; the sum of the maximum mean difference and the target section number is used as the data distribution difference evaluation value between the source domain and the target domain; the data distribution difference evaluation value is inversely correlated with the distribution correlation degree; among multiple target source domain sample data, a specified number of target source domain sample data with a higher data distribution correlation degree is determined as a query set, and the remaining target source domain sample data is determined as a support set; A pre-training module, used to apply the initial training sample set to perform model pre-training to obtain a pre-trained model; A meta-learning module, for iteratively updating the model parameters of the pre-trained model using the MAML meta-learning method based on the query set and support set corresponding to the batteries used in the newly built energy storage project, and after the iterative update is completed, using the pre-trained model after the model parameters are updated as the target model corresponding to the batteries used in the newly built energy storage project; The parameter fine-tuning module is used to fine-tune the parameters of the target model according to the latest collected battery failure data as the newly built energy storage project is running, so as to obtain a battery failure prediction model for the batteries used in the newly built energy storage project.
6. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Wind turbine generator fault prediction model training and fault prediction method and device
CN117370796A