Annular distillation-based cross-working-condition degradation trend hierarchical federation prediction method
By adopting ring distillation technology, common law mining and individual characteristic adaptation parallel model collaboration mechanism in the federated forecasting system, the problem of generalization ability and personalized adaptation in cross-working condition product degradation trend prediction is solved, and the prediction accuracy is improved. and system flexibility.
Patent Information
- Application Number
- CN202311377103.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2043-10-23
AI Technical Summary
When existing federated forecasting systems deal with product degradation trends across working conditions, it is difficult to balance the generalization capabilities of individual products and the personalized adaptation of models, resulting in limited forecast accuracy and efficiency.
A cross-working condition degradation trend hierarchical federated prediction method based on ring distillation is adopted. Through the common law mining stage and the individual characteristic adaptation stage, a model collaboration mechanism for cross-working condition product common degradation law sharing and individual characteristic adaptation parallel model collaboration mechanism is established. Ring distillation is used to The technology transfers degraded knowledge between the server and the client.
It improves the flexibility and scalability of the federated forecasting system, realizes collaborative prediction from similar degradation rules in a single working condition to complex degradation rules in multiple working conditions, and improves the generalization ability of the prediction model and the accuracy of the degradation trend of individual equipment.
Smart Images

Figure BDA0004508377830000031 
Figure BDA0004508377830000032 
Figure BDA0004508377830000033
Abstract
Description
Technical Field
[0001] The present invention relates to the field of federated prediction, and in particular to a hierarchical federated prediction method for cross-operating condition degradation trends based on annular distillation. Background Art
[0002] The core of the federated prediction of group product degradation trends is to design an efficient knowledge transfer system to help each individual in the federated system screen out applicable degradation knowledge from other rich degradation trends, thereby improving the accuracy of individual product degradation trend prediction. Therefore, it is considered to further improve the prediction performance of the federated system with the help of cross-condition product degradation data. However, in addition to the differences in degradation laws caused by the characteristics of individual products themselves, the distribution deviation of degradation laws caused by different product usage conditions is also a practical problem that needs to be solved in group product degradation trend prediction. Although personalized federated learning methods can help clients obtain the required knowledge from similar models, a large number of clients that lack reference value will reduce the learning efficiency of the target client and affect the prediction accuracy of individual products. On the other hand, the model obtained by fully personalized training may fall into the optimization goal of a single product degradation data, and the generalization ability of other individuals is greatly reduced, which is not an ideal state for the federated system. Summary of the invention
[0003] The present invention provides a hierarchical federated prediction method for degradation trends across operating conditions based on annular distillation, so as to solve the technical problem of how to obtain a common model with strong generalization ability and to perform personalized adaptation of the model according to the characteristics of each client data, which will help to improve the ability of the prediction model and the scalability of the federated architecture.
[0004] The embodiment of the present invention provides a hierarchical federated prediction method for cross-operating condition degradation trends based on annular distillation, comprising:
[0005] Before each iteration of the common law mining phase, the server selects a working condition cluster in turn in a circular manner, and uses a cluster sampling method to select multiple clients participating in the current round from all clients of the working condition cluster;
[0006] Each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, and obtains the working condition cluster prediction model parameters after the current round of training;
[0007] The server side uses a federated average algorithm to perform federated aggregation processing on the operating condition cluster prediction model parameters after the current round of training sent by the multiple clients to obtain the operating condition cluster prediction model parameters after the federated aggregation processing;
[0008] Repeat the steps of the common law mining stage above until it is determined that the maximum round has been reached. All clients under each working condition cluster obtain the working condition cluster prediction model parameters after the federated aggregation processing obtained by the maximum round issued by the server, and obtain the working condition cluster prediction model with common knowledge information in different working condition degradation data.
[0009] Before each iteration of each operating condition cluster in the individual characteristic adaptation phase, the server uses a cluster sampling method to select multiple clients participating in the current round from all clients of each operating condition cluster, and generates the personalized prediction model parameters of the current round of the client using the hypernetwork corresponding to each client and sends them to the corresponding client;
[0010] Each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation, performs local training on the personalized prediction model of the current round, obtains the change amount of the personalized prediction model parameter of the current round, and sends the change amount of the personalized prediction model parameter of the current round to the server end;
[0011] The server updates the personalized prediction model parameters and the hypernetwork using the change in the personalized prediction model parameters of each client in the current round to obtain updated personalized prediction model parameters and the hypernetwork;
[0012] Repeat the steps of the above-mentioned individual characteristic adaptation stage until the server side, after determining that the maximum round has been reached, sends the personality prediction model parameters of each client obtained in the maximum round to the client, so that each client can obtain a prediction model suitable for the client to predict the degradation trend of the individual device by loading the personality prediction model parameters obtained in the maximum round.
[0013] Preferably, clients with the same working conditions form a working condition cluster, and in the common law mining stage, the working condition cluster prediction models and working condition cluster prediction model parameters of all clients in the working condition cluster are the same, and in the individual characteristic adaptation stage, the personalized prediction models and personalized prediction model parameters of all clients in the working condition cluster are different.
[0014] Preferably, each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, and the working condition cluster prediction model parameters obtained after the current round of training include:
[0015] Each client participating in the current round receives the working condition cluster prediction model of the previous round sent by the server, and uses the working condition cluster prediction model of the previous round as a teacher model of knowledge distillation, and uses the working condition cluster prediction model of the current round as a student model of knowledge distillation;
[0016] The client calculates the verification loss value of the student model using local training set data;
[0017] When the verification loss value of the student model is less than the set first verification loss threshold, the client uses the first constraint to perform local training on the student model, and adds the constraint of the teacher model on the extracted degradation features during the training process, and uses the trained student model parameters as the operating condition cluster prediction model parameters after the current round of training;
[0018] When the verification loss value of the student model is not less than the set first verification loss threshold, the client uses the second constraint to locally train the teacher model, and uses the trained teacher model parameters as the operating condition cluster prediction model parameters after the current round of training.
[0019] Preferably, the client uses the first constraint to perform local training on the student model, and simultaneously adds the constraint of the teacher model on the extracted degradation features during the training process, including:
[0020] L1=L MSE +λ0L KD
[0021]
[0022] Among them, L1 represents the training loss of the first constraint; L MSE represents the mean square error loss; λ0 represents a constant coefficient, which is used to balance the model's attention to the current data knowledge and the attention to the common knowledge from the teacher model; L KD represents the knowledge distillation loss; f tea / stu (x) represents the degraded features extracted by the teacher / student model encoder when taking x as input.
[0023] Preferably, the client locally training the teacher model using the second constraint comprises:
[0024] L2=L M.SE
[0025] Where L2 represents the training loss of the second constraint.
[0026] Preferably, each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation to perform local training on the personalized prediction model of the current round, and obtains the change amount of the personalized prediction model parameters of the current round, including:
[0027] Each client participating in the current round uses the pre-stored working condition cluster prediction model of the previous working condition cluster sent by the server as the teacher model of knowledge distillation, and uses the personalized prediction model of the current round sent by the server as the student model of knowledge distillation;
[0028] The client uses the local training set data to respectively calculate the validation loss value of the student model and the validation loss value of the teacher model;
[0029] If the verification loss value of the teacher model is less than the set second verification loss threshold or the verification loss value of the student model, the client performs local training on the student model using the third constraint, and adds the constraint of the teacher model on the extracted degradation features during the training process to obtain the change amount of the personalized prediction model parameters of the current round;
[0030] If the verification loss value of the teacher model is not less than the set second verification loss threshold and the verification loss value of the student model, the client uses the second constraint to perform local training on the student model to obtain the change in the parameters of the personalized prediction model in the current round.
[0031] Preferably, the client uses the third constraint to perform local training on the student model, and simultaneously adds the constraint of the teacher model on the extracted degradation features during the training process, including:
[0032] L3=L MSE +λ1L KD
[0033]
[0034]
[0035] Where L3 represents the training loss of the third constraint; λ1 represents the distillation loss coefficient in the third constraint; Represents the validation loss value of the student model; Represents the validation loss value of the teacher model.
[0036] Preferably, the server side generates personalized prediction model parameters of the current round of each client by using the hypernetwork corresponding to each client and sends the parameters to the corresponding client, including:
[0037] The server side equips each client with a super network for generating an aggregate weight for each network layer of the client personalized prediction model, and generates a client aggregate weight matrix using the super network and client embedding vector corresponding to each client;
[0038] The server generates personalized prediction model parameters of the client in the current round by using the client aggregation weight matrix, and sends the generated personalized prediction model parameters of the client in the current round to the client.
[0039] Preferably, the server side generates personalized prediction model parameters of the client in the current round by using the client aggregation weight matrix, including:
[0040]
[0041]
[0042] in, represents the personalized prediction model parameters of client i in the current round, Represents the parameters of the lth layer in the personalized prediction model; represents the parameters of the lth layer in the client k personalized prediction model; represents the weight of the l-th layer network in the personalized prediction model of the k-th client applied to the corresponding layer in the client i; L represents the number of layers of the network in the personalized prediction model; K represents the number of clients in the federated system.
[0043] Preferably, the server updates the personalized prediction model parameters and the hypernetwork using the change amount of the personalized prediction model parameters of each client in the current round, and the updated personalized prediction model parameters and the hypernetwork are obtained, including:
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] Among them, Δω k Indicates the change in the parameters of the client k personalized prediction model in the current round; Indicates the parameters of the personalized prediction model of client k in the current round; represents the personalized prediction model parameters of client k after the current round of update; Ω represents the set of personalized prediction model parameters of all clients before the start of the current round; They represent the embedding vector e in the client k super network respectively. k , model parameter ψ in the hypernetwork k The gradient of Δe k represents the change in the embedding vector in the client k-supernetwork in the current round; represents the embedding vector in the client k-supernetwork after the current round of update; represents the embedding vector in the client k supernetwork of the current round; Δψ k Indicates the change in the personalized model parameters in the client k-supernetwork in the current round; Represents the model parameters in the client k-supernetwork after the current round of update; Represents the model parameters in the client k-supernetwork of the current round.
[0050] The beneficial effect of the present invention is that, based on the circular distillation of degradation knowledge in the common law mining stage and the individual characteristic adaptation stage, a model collaboration mechanism can be established for sharing common degradation laws of products across operating conditions and adapting individual characteristics in parallel, effectively improving the flexibility and scalability of the federated prediction system, and realizing the evolution from collaborative prediction using similar degradation laws of a single operating condition to collaborative prediction using complex degradation laws of multiple operating conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a flow chart of a hierarchical federated prediction method of cross-operating condition degradation trend based on annular distillation provided by the present invention;
[0052] Figure 2 It is a structural diagram of a hierarchical federated prediction system for degradation trends across operating conditions based on annular distillation provided by the present invention;
[0053] Figure 3 It is a detailed flow chart of the hierarchical federated prediction method of cross-operating condition degradation trend based on annular distillation provided by the present invention;
[0054] Figure 4 1 is a schematic diagram of a battery capacity retention rate curve at three test temperatures provided by the present invention;
[0055] Figure 5 It is a schematic diagram of test error of the personalized federal prediction comparison test of battery degradation trend provided by the present invention;
[0056] Figure 6 It is a schematic diagram of test error of the hierarchical federated prediction ablation test of battery degradation trend across working conditions provided by the present invention;
[0057] Figure 7It is a schematic diagram of test error of the hierarchical federal prediction comparative test of battery degradation trends across operating conditions provided by the present invention. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In the subsequent description, the use of suffixes such as "module", "component" or "unit" used to represent elements is only to facilitate the description of the present invention and has no specific meaning in itself. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0059] Figure 1 is a flow chart of a hierarchical federated prediction method for cross-operating condition degradation trend based on annular distillation provided by the present invention, such as Figure 1 As shown, including:
[0060] Step S101: before each iteration of the common law mining phase, the server selects a working condition cluster in turn in a circular manner, and selects multiple clients participating in the current round from all clients of the working condition cluster using a cluster sampling method;
[0061] Step S102: Each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, thereby obtaining the working condition cluster prediction model parameters after the training of the current round;
[0062] Step S103: the server side uses a federated average algorithm to perform a federated aggregation process on the operating condition cluster prediction model parameters after the current round of training sent by the multiple clients to obtain the operating condition cluster prediction model parameters after the federated aggregation process;
[0063] Step S104: repeat the steps of the common law mining stage above until it is determined that the maximum round has been reached, and all clients under each working condition cluster obtain working condition cluster prediction model parameters after federated aggregation processing obtained by the maximum round issued by the server, and obtain the working condition cluster prediction model with common knowledge information in different working condition degradation data;
[0064] Step S105: before each iteration of each operating condition cluster in the individual characteristic adaptation phase, the server side selects multiple clients participating in the current round from all clients of each operating condition cluster using a cluster sampling method, and generates the personalized prediction model parameters of the current round of the client using the hypernetwork corresponding to each client and sends them to the corresponding client;
[0065] Step S106: Each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation, performs local training on the personalized prediction model of the current round, obtains the change amount of the personalized prediction model parameters of the current round, and sends the change amount of the personalized prediction model parameters of the current round to the server end;
[0066] Step S107: the server updates the personalized prediction model parameters and the hypernetwork using the change amount of the personalized prediction model parameters of each client in the current round to obtain updated personalized prediction model parameters and the hypernetwork;
[0067] Step S108: Repeat the steps of the above-mentioned individual characteristic adaptation stage until the server side, after determining that the maximum round has been reached, sends the personality prediction model parameters of each client obtained in the maximum round to the client, so that each client can obtain a prediction model suitable for the client to predict the degradation trend of the individual device by loading the personality prediction model parameters obtained in the maximum round.
[0068] Among them, clients with the same working conditions form a working condition cluster, and in the common law mining stage, the working condition cluster prediction models and working condition cluster prediction model parameters of all clients in the working condition cluster are the same, and in the individual characteristic adaptation stage, the personalized prediction models and personalized prediction model parameters of all clients in the working condition cluster are different.
[0069] Furthermore, each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, and obtains the working condition cluster prediction model parameters after the current round training, including: each client participating in the current round receives the working condition cluster prediction model of the previous round sent by the server, and uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation; the client uses the local training set data The verification loss value of the student model is calculated based on the information; when the verification loss value of the student model is less than the set first verification loss threshold, the client uses the first constraint to locally train the student model, and at the same time adds the constraints of the teacher model on the extracted degradation features during the training process, and uses the trained student model parameters as the operating condition cluster prediction model parameters after the current round of training; when the verification loss value of the student model is not less than the set first verification loss threshold, the client uses the second constraint to locally train the teacher model, and uses the trained teacher model parameters as the operating condition cluster prediction model parameters after the current round of training.
[0070] Specifically, the client uses the first constraint to perform local training on the student model, and at the same time, adds the constraint of the teacher model on the extracted degradation features during the training process, including:
[0071] L1=L MSE +λ0L KD
[0072]
[0073] Among them, L1 represents the training loss of the first constraint; L MSE represents the mean square error loss; λ0 represents a constant coefficient, which is used to balance the model's attention to the current data knowledge and the attention to the common knowledge from the teacher model; L KD represents the knowledge distillation loss; f tea / stu (x) represents the degraded features extracted by the teacher / student model encoder when taking x as input.
[0074] The client locally training the teacher model using the second constraint includes:
[0075] L2=L M.SE
[0076] Where L2 represents the training loss of the second constraint.
[0077] Furthermore, each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation to perform local training on the personalized prediction model of the current round, and obtains the change in the parameters of the personalized prediction model of the current round, including: each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster sent by the pre-stored server as the teacher model of knowledge distillation and the personalized prediction model of the current round sent by the server as the student model of knowledge distillation; the client uses the local training set data to respectively calculate the student model validation loss value and the validation loss value of the teacher model; if the validation loss value of the teacher model is less than the set second validation loss threshold or the validation loss value of the student model, the client uses the third constraint to perform local training on the student model, and at the same time adds the constraint of the teacher model on the extracted degradation features during the training process to obtain the change in the parameters of the personalized prediction model for the current round; if the validation loss value of the teacher model is not less than the set second validation loss threshold and the validation loss value of the student model, the client uses the second constraint to perform local training on the student model to obtain the change in the parameters of the personalized prediction model for the current round.
[0078] Specifically, the client uses the third constraint to perform local training on the student model, and at the same time, adds the constraints of the teacher model on the extracted degradation features during the training process, including:
[0079] L3=L MSE +λ1L KD
[0080]
[0081]
[0082] Where L3 represents the training loss of the third constraint; λ1 represents the distillation loss coefficient in the third constraint; Represents the validation loss value of the student model; Represents the validation loss value of the teacher model.
[0083] Furthermore, the server side uses the super network corresponding to each client to generate personalized prediction model parameters of the client's current round and sends them to the corresponding client, including: the server side equips each client with a super network for generating aggregation weights for each network layer of the client's personalized prediction model, and uses the super network corresponding to each client and the client embedding vector to generate a client aggregation weight matrix; the server side uses the client aggregation weight matrix to generate personalized prediction model parameters of the client's current round, and sends the generated personalized prediction model parameters of the client's current round to the client.
[0084] Specifically, the server uses the client aggregation weight matrix to generate the personalized prediction model parameters of the client in the current round, including:
[0085]
[0086]
[0087] in, represents the personalized prediction model parameters of client i in the current round, Represents the parameters of the lth layer in the personalized prediction model; represents the parameters of the lth layer in the client k personalized prediction model; represents the weight of the l-th layer network in the personalized prediction model of the k-th client applied to the corresponding layer in the client i; L represents the number of layers of the network in the personalized prediction model; K represents the number of clients in the federated system.
[0088] Specifically, the server updates the personalized prediction model parameters and the hypernetwork using the change amount of the personalized prediction model parameters of each client in the current round, and the updated personalized prediction model parameters and the hypernetwork include:
[0089]
[0090]
[0091]
[0092]
[0093]
[0094] Among them, Δω k Indicates the change in the parameters of the client k personalized prediction model in the current round; Indicates the parameters of the personalized prediction model of client k in the current round; represents the personalized prediction model parameters of client k after the current round of update; Ω represents the set of personalized prediction model parameters of all clients before the start of the current round; They represent the embedding vector e in the client k super network respectively. k , model parameter ψ in the hypernetwork k The gradient of Δe k represents the change in the embedding vector in the client k-supernetwork in the current round; represents the embedding vector in the client k-supernetwork after the current round of update; represents the embedding vector in the client k supernetwork of the current round; Δψ k Indicates the change in the personalized model parameters in the client k-supernetwork in the current round; Represents the model parameters in the client k-supernetwork after the current round of update; Represents the model parameters in the client k-supernetwork of the current round.
[0095] The embodiment of the present invention proposes a cyclic distillation based hierarchical federated learning algorithm (CDHFL). Individuals under the same working condition form a client cluster, and clusters under different working conditions further form a cyclic federation system. The prediction model with common degradation knowledge is transferred between the cyclic federations through knowledge distillation, and an accurate prediction model suitable for different individuals is generated within the working condition cluster, such as Figure 2-3As shown. Specifically, CDHFL includes two main stages, the common law mining stage and the individual characteristic adaptation stage. In the first stage, individuals with the same working condition use the same cluster prediction model. In each communication round, one working condition cluster is selected in turn to carry out model aggregation. At the same time, the prediction model formed by the previous working condition cluster will be used as the teacher model of the next working condition cluster. The common degradation law information in the teacher model is efficiently utilized through knowledge distillation. Through multiple rounds of iterations, the common knowledge in the degradation data of different working conditions is solidified into the prediction model, thereby improving the generalization ability of the prediction model of each working condition cluster. In the second stage, a personalized federated learning method based on model hierarchical aggregation is used within each working condition cluster. Based on the cluster prediction model obtained in the first stage, a personalized prediction model is established for each client. At the same time, the teacher model is still used to constrain the training of the local personalized model to prevent the loss of common degradation knowledge. Based on the above two stages of circular distillation of degradation knowledge, a model collaboration mechanism can be established for sharing common degradation laws of products across operating conditions and adapting individual characteristics in parallel, effectively improving the flexibility and scalability of the federated prediction system, and realizing the evolution from collaborative prediction using similar degradation laws of a single operating condition to collaborative prediction using complex degradation laws of multiple operating conditions.
[0096] CDHFL aims to accumulate common product degradation laws among multiple client clusters divided according to working conditions through knowledge distillation and further adapt the individual degradation data of each client. Therefore, the hierarchical federated ring distillation includes two stages: the common law mining stage and the individual feature adaptation stage.
[0097] In the common law mining stage, each working condition cluster is trained in sequence, and the cluster model of the previous training will serve as the teacher of the next cluster. After the common law mining of client degradation data under different working condition clusters is completed, the individual characteristic adaptation stage begins. The individual characteristic adaptation stage is carried out according to working conditions, and the clients under the same working condition are trained. On this basis, in order not to lose the common degradation knowledge, the constraints of the cluster model obtained in the common law mining stage will be added during the model training process.
[0098] Different from the traditional output-oriented knowledge distillation that learns a simplified model by imitating the output of the teacher model on the same data, the above two training stages both adopt feature-oriented knowledge distillation, which guides the training of the student model by measuring the difference in features extracted by the teacher model and the student model. In addition to considering the basic mean square error loss, the knowledge distillation loss is added in the calculation process of the model training loss.
[0099] (1) Common law discovery stage
[0100] The main purpose of the common law mining stage is to deeply explore the underlying logic of the degradation time series data from the seemingly different degradation phenomena across working conditions and individuals, screen the laws of the degradation process in the time dimension, retain the deeper degradation laws suitable for describing group products and model them, thereby improving the prediction model's ability to express the common degradation laws of the group, rather than easily fitting the surface degradation laws of specific objects and losing the generalization ability for group products.
[0101] In the common law mining stage, clients under the same working condition use the same set of prediction model parameters, that is, all client model parameters in the working condition cluster are the same as the cluster model. Different working condition clusters are trained in turn in a cyclic manner, and a batch of clients are selected from the current working condition cluster to participate in this communication round by cluster sampling. The local training process of the client transfers the degradation law learned from the previous working condition cluster to the current working condition cluster through knowledge distillation, retaining useful knowledge and discarding useless knowledge. After this cyclic training, the knowledge applicable to the degradation trends of different individuals in each working condition, that is, the common degradation law, will be retained.
[0102] The traditional client local training process only needs to use local data to train the received model, while the client local training process in the common law mining stage is a knowledge distillation process, which receives the model of the current working condition cluster as the student model and the model of the previous working condition cluster as the teacher model, and verifies the performance of the student model. when When it is better than the set threshold t1, the client will use the student model for training and add the constraints of the teacher model on the extracted degraded features during the training process, namely:
[0103] L=L MSE +λ0L KD (1)
[0104]
[0105] Among them, L MSE represents the mean square error loss; λ0 represents a constant coefficient, which is used to balance the model's attention to the current data knowledge and the attention to the common knowledge from the teacher model; L KD represents the knowledge distillation loss; f tea / stu (x) represents the degraded features extracted by the teacher / student model encoder when taking x as input.
[0106] when When , only the teacher model is used for local training:
[0107] L=L MSE (3)
[0108] (2) Individual characteristics adaptation stage
[0109] The main purpose of the individual feature adaptation stage is to perform personalized adaptation based on the unique degradation laws of different clients on the basis of the cluster model that fully explores the common degradation laws of group products, and to differentiate and train the cluster prediction model with good generalization performance into a batch of accurate prediction models for different individual clients.
[0110] In the individual characteristic adaptation phase, the training of each working condition cluster is independent of each other. A personalized federated learning algorithm with hierarchical model aggregation is used to generate and iterate the client model in the cluster. At the same time, in order to prevent the loss of common knowledge, the client local update process is also carried out in the form of knowledge distillation. The client receives the previous working condition cluster model obtained in the common law mining phase as the teacher model, and receives the client model obtained by hierarchical model aggregation as the student model, and verifies their performance respectively. and For the set threshold t2, when or , it means that the teacher model is still applicable to the current client degradation data. The client model is updated using the same knowledge distillation strategy as in the common law mining stage. At the same time, the coefficient λ1 of the distillation loss is dynamically adjusted according to the applicability of the teacher model:
[0111]
[0112] when and When , only the student model is used for local training.
[0113] Algorithm Implementation
[0114] The overall process of CDHF is as follows Figure 3 As shown in the figure. In the common law mining stage, client clusters under different working conditions participate in each communication round in turn, and clients under the same working condition share model parameters. After reaching the maximum communication round in this stage, the knowledge information suitable for the deep degradation laws of different working conditions is retained in the model of each working condition cluster, which can be used to supervise the update of subsequent personalized models. In the individual characteristic adaptation stage, each working condition cluster generates personalized prediction models for different clients through the hypernetwork, and iterates the model through knowledge distillation, finally realizing accurate prediction of the degradation trend of individual products.
[0115] The implementation of the CDHFL algorithm is shown in Algorithm 7.
[0116]
[0117]
[0118] Case verification
[0119] Data Introduction
[0120] This chapter uses the cycle life test data of soft-pack lithium-ion batteries from a new energy company to verify the effectiveness of the federal prediction method for degradation trends of the above-mentioned group products. The cycle life test requires long-term testing of batteries with different formulations under pre-designed test conditions until their capacity reaches a pre-set failure threshold. It is an important part of the design and development of lithium-ion power batteries.
[0121] The battery capacity degradation data set is obtained by carrying out cycle life tests on 100 soft-pack lithium-ion batteries in eight groups (A1 to H1) under three temperature stresses: 25°C, 45°C and 60°C. Their cathode and separator materials are exactly the same, while the anode materials and electrolyte solutions are different between groups. The specific formula differences and the number of batteries in each group are shown in Table 1.
[0122] Table 1: Lithium-ion battery formula and quantity at different test temperatures
[0123]
[0124] A battery was selected from each of the eight groups at each test temperature, and the capacity retention rate data before the battery capacity decayed to 80% (failure threshold) was normalized to the maximum and minimum to obtain the curve shown in the figure below: Figure 4 As shown, the horizontal axis is the number of sampling points and the vertical axis is the capacity retention rate. It can be seen that the degradation trends of different battery individuals are quite different. As the temperature increases, the battery life is significantly shortened.
[0125] In the subsequent cases, a single battery is used as a client, and the client's local data set is segmented from the normalized capacity retention rate data of the battery and divided into training data set and test data set according to a certain ratio.
[0126] Cross-operating condition degradation trend hierarchical federated prediction case
[0127] (1) Case setting
[0128] The cross-operating condition degradation trend hierarchical federated prediction verification case divides the lithium-ion battery degradation data under three temperatures into three operating condition clusters, such as Figure 5 As shown, each cluster contains all battery individuals under one working condition. The federated learning based on ring distillation can be carried out by the three working condition clusters in a self-organized manner, or it can be carried out under the coordination of the server.
[0129] (2) Ablation test and model setting
[0130] The proposed CDHFL introduces a hierarchical structure based on LLApFL, and uses a circular knowledge distillation method to allow the degradation law information to flow between levels. Therefore, the necessity of the proposed method is verified by the ablation circular distillation method and the model hierarchical aggregation method.
[0131] 1) CluSamLLApFL: A personalized federated learning method is used to directly train the cross-operating condition battery degradation trend prediction model. The super network needs to filter effective knowledge from all prediction models.
[0132] 2) CluSamFedAvg: It neither adopts the circular distillation training strategy nor performs personalized adaptation for individual batteries. It only uses the cluster sampling method to federate the client prediction model.
[0133] The model structure in each algorithm remains consistent, and the detailed model settings are shown in Table 2.
[0134] Table 2: Model settings for cross-operating condition degradation trend hierarchical federated prediction case
[0135]
[0136] 3) Analysis of ablation test results
[0137] The results of the hierarchical federation prediction of battery degradation trends across working conditions are shown in Table 3. By comparing the prediction indicators of CDHFL and CluSamLLApFL, it can be seen that the proposed hierarchical ring distillation method helps each client to efficiently obtain more useful degradation information by mining the common degradation laws across working conditions, avoiding the impact of the introduction of a large amount of useless knowledge on the precise aggregation of the super network, and greatly improving the performance of the personalized model. On the other hand, although CluSamFedAvg achieved the best prediction effect for batteries with more training data at 25°C, the reason is that the battery degradation trend at these two temperatures is relatively slow, the data volume is large, and the global prediction model is completely inclined to the part of the clients with the largest amount of training data. Its performance drops sharply on the 60°C battery individuals with a small amount of data and the clients with only 50% degradation data as training data, and the comprehensive prediction accuracy is much lower than that of CluSamLLApFL and CDHFL.
[0138] Table 3: Comparative test results of the hierarchical federation prediction of battery degradation trends across operating conditions
[0139]
[0140] pass Figure 6The average prediction error of the hierarchical federated prediction ablation test of battery degradation trends across mid-span operating conditions shows that although the convergence process of CluSamFedAvg is relatively smooth, the effect is the worst after the model converges. The convergence speed of CluSamLLApFL is much slower than that of the single operating condition scenario. It takes a longer time for the super network to learn the network layers required by the target client from more heterogeneous clients, and the final prediction accuracy is also reduced. The proposed CDHFL quickly learns the basic degradation laws of batteries from different operating conditions in the common law mining stage, and obtains a teacher model with better generalization ability, which lays a good foundation for the personalized model in the individual characteristic adaptation stage, thereby achieving the most accurate battery degradation trend prediction.
[0141] 4) Comparative test and model setting
[0142] In order to further verify the superiority of the proposed CDHFL, it is also compared with methods such as FedFomo, pFedHN, LG-FedAvg, and LocalOnly.
[0143] 5) Analysis of comparative test results
[0144] The results of the comparative test of hierarchical federated prediction of battery degradation trends across working conditions are shown in Table 4. Similar to the single-condition battery degradation trend prediction test, LocalOnly and LG-FedAvg methods have the worst results. Due to the increase in the number of clients, the training of the super network in pFedHN has become more difficult, and it is impossible to provide effective personalized model parameters for each client, and the performance has been greatly reduced. FedFomo can select models that are more suitable for the target client from more degradation models, and its performance is better than that of single-condition scenarios with fewer clients. CDHFL further reduces the mean square error and mean absolute error to about 1 / 2 based on FedFomo, and the prediction accuracy is significantly improved.
[0145] Table 4: Comparative test results of the hierarchical federation prediction of battery degradation trends across operating conditions
[0146]
[0147] The average prediction error of each method in the cross-operating battery degradation trend hierarchical federation prediction comparison test is further analyzed, such as Figure 7 As shown in the figure, Localonly, LG-FedAvg and pFedHN are unable to enable the prediction model to learn battery degradation knowledge, and CDHFL is ahead of FedFomo in both early convergence speed and later prediction accuracy.
[0148] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present invention.
Claims
1. A hierarchical federated prediction method for cross-operating condition degradation trends based on annular distillation, characterized in that: include: Before each iteration of the common law mining phase, the server selects a working condition cluster in turn in a circular manner, and uses a cluster sampling method to select multiple clients participating in the current round from all clients of the working condition cluster; Each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, and obtains the working condition cluster prediction model parameters after the current round of training; The server side uses a federated average algorithm to perform federated aggregation processing on the operating condition cluster prediction model parameters after the current round of training sent by the multiple clients to obtain the operating condition cluster prediction model parameters after the federated aggregation processing; Repeat the steps of the common law mining stage above until it is determined that the maximum round has been reached. All clients under each working condition cluster obtain the working condition cluster prediction model parameters after the federated aggregation processing obtained by the maximum round issued by the server, and obtain the working condition cluster prediction model with common knowledge information in different working condition degradation data. Before each iteration of each operating condition cluster in the individual characteristic adaptation phase, the server uses a cluster sampling method to select multiple clients participating in the current round from all clients of each operating condition cluster, and generates the personalized prediction model parameters of the current round of the client using the hypernetwork corresponding to each client and sends them to the corresponding client; Each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation, performs local training on the personalized prediction model of the current round, obtains the change amount of the personalized prediction model parameter of the current round, and sends the change amount of the personalized prediction model parameter of the current round to the server end; The server updates the personalized prediction model parameters and the hypernetwork using the change in the personalized prediction model parameters of each client in the current round to obtain updated personalized prediction model parameters and the hypernetwork; Repeat the steps of the above-mentioned individual characteristic adaptation stage until the server side, after determining that the maximum round has been reached, sends the personality prediction model parameters of each client obtained in the maximum round to the client, so that each client can obtain a prediction model suitable for the client to predict the degradation trend of the individual device by loading the personality prediction model parameters obtained in the maximum round.
2. The method according to claim 1, characterized in that Clients with the same working conditions form a working condition cluster, and in the common law mining stage, the working condition cluster prediction models and working condition cluster prediction model parameters of all clients in the working condition cluster are the same, and in the individual characteristic adaptation stage, the personalized prediction models and personalized prediction model parameters of all clients in the working condition cluster are different.
3. The method according to claim 2, characterized in that Each client participating in the current round uses the working condition cluster prediction model of the previous round as the teacher model of knowledge distillation and the working condition cluster prediction model of the current round as the student model of knowledge distillation to perform local training on the working condition cluster prediction model of the current round, and obtains the working condition cluster prediction model parameters after the current round of training, including: Each client participating in the current round receives the working condition cluster prediction model of the previous round sent by the server, and uses the working condition cluster prediction model of the previous round as a teacher model of knowledge distillation, and uses the working condition cluster prediction model of the current round as a student model of knowledge distillation; The client calculates the verification loss value of the student model using local training set data; When the verification loss value of the student model is less than the set first verification loss threshold, the client uses the first constraint to perform local training on the student model, and adds the constraint of the teacher model on the extracted degradation features during the training process, and uses the trained student model parameters as the operating condition cluster prediction model parameters after the current round of training; When the verification loss value of the student model is not less than the set first verification loss threshold, the client uses the second constraint to locally train the teacher model, and uses the trained teacher model parameters as the operating condition cluster prediction model parameters after the current round of training.
4. The method according to claim 3, characterized in that The client uses the first constraint to perform local training on the student model, and adds the constraint of the teacher model on the extracted degradation features during the training process, including: L1=L MSE +λ0L KD Among them, L1 represents the training loss of the first constraint; L MSE represents the mean square error loss; λ0 represents a constant coefficient, which is used to balance the model's attention to the current data knowledge and the attention to the common knowledge from the teacher model; L KD represents the knowledge distillation loss; f tea / stu (x) represents the degraded features extracted by the teacher / student model encoder when taking x as input.
5. The method according to claim 4, characterized in that The client locally trains the teacher model using the second constraint, including: L2=L MSE Where L2 represents the training loss of the second constraint.
6. The method according to claim 5, characterized in that Each client participating in the current round uses the working condition cluster prediction model of the previous working condition cluster as the teacher model of knowledge distillation and the personalized prediction model of the current round as the student model of knowledge distillation to perform local training on the personalized prediction model of the current round, and obtains the change amount of the personalized prediction model parameters of the current round, including: Each client participating in the current round uses the pre-stored working condition cluster prediction model of the previous working condition cluster sent by the server as the teacher model of knowledge distillation, and uses the personalized prediction model of the current round sent by the server as the student model of knowledge distillation; The client uses the local training set data to respectively calculate the validation loss value of the student model and the validation loss value of the teacher model; If the verification loss value of the teacher model is less than the set second verification loss threshold or the verification loss value of the student model, the client performs local training on the student model using the third constraint, and adds the constraint of the teacher model on the extracted degradation features during the training process to obtain the change amount of the personalized prediction model parameters of the current round; If the verification loss value of the teacher model is not less than the set second verification loss threshold and the verification loss value of the student model, the client uses the second constraint to perform local training on the student model to obtain the change in the parameters of the personalized prediction model in the current round.
7. The method according to claim 6, characterized in that The client uses the third constraint to perform local training on the student model, and adds the constraint of the teacher model on the extracted degradation features during the training process, including: <h2 style=";text-align:left;direction:ltr">L3=L<h2 style=";text-align:left;direction:ltr"> MSE <h2 style=";text-align:left;direction:ltr"> +λ1L<h2 style=";text-align:left;direction:ltr"> KD Where L3 represents the training loss of the third constraint; λ1 represents the distillation loss coefficient in the third constraint; Represents the validation loss value of the student model; Represents the validation loss value of the teacher model.
8. The method according to claim 1, characterized in that The server side generates personalized prediction model parameters of the current round of each client by using the hypernetwork corresponding to each client and sends them to the corresponding client, including: The server side equips each client with a super network for generating an aggregate weight for each network layer of the client personalized prediction model, and generates a client aggregate weight matrix using the super network and client embedding vector corresponding to each client; The server generates personalized prediction model parameters of the client in the current round by using the client aggregation weight matrix, and sends the generated personalized prediction model parameters of the client in the current round to the client.
9. The method according to claim 8, characterized in that The server side generates the personalized prediction model parameters of the current round of the client by using the client aggregation weight matrix, including: in, represents the personalized prediction model parameters of client i in the current round, Represents the parameters of the lth layer in the personalized prediction model; represents the parameters of the lth layer in the client k personalized prediction model; represents the weight of the l-th layer network in the personalized prediction model of the k-th client applied to the corresponding layer in the client i; L represents the number of layers of the network in the personalized prediction model; K represents the number of clients in the federated system.
10. The method according to claim 9, characterized in that The server updates the personalized prediction model parameters and the hypernetwork using the change amount of the personalized prediction model parameters of each client in the current round, and obtains the updated personalized prediction model parameters and the hypernetwork, including: Among them, Δω k Indicates the change in the parameters of the client k personalized prediction model in the current round; Indicates the parameters of the personalized prediction model of client k in the current round; represents the personalized prediction model parameters of client k after the current round of update; Ω represents the set of personalized prediction model parameters of all clients before the start of the current round; They represent the embedding vector e in the client k super network respectively. k , model parameter ψ in the hypernetwork k The gradient of Δe k represents the change in the embedding vector in the client k-supernetwork in the current round; represents the embedding vector in the client k-supernetwork after the current round of update; represents the embedding vector in the client k supernetwork of the current round; Δψ k Indicates the change in the personalized model parameters in the client k-supernetwork in the current round; Represents the model parameters in the client k-supernetwork after the current round of update; Represents the model parameters in the client k-supernetwork of the current round.
Citation Information
Patent Citations
Lithium battery long-term degradation trend prediction method
CN112257348A
Target detection method and apparatus based on federated learning, and device and storage medium
WO2021189906A1
Cited By
Personalized federal learning implementation method based on client self-knowledge distillation
CN119578512A
