Federated Continuous Learning Training Methods Based on Memory Replay and Differential Privacy

By constructing a generative adversarial network GAN in the central server to generate task dummy data and mixed training with the client, the client model forgetting problem in federated learning is solved, and privacy is protected through differential privacy noise, achieving efficient federated continuous learning training.

CN115081532BActive Publication Date: 2024-09-06XIDIAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210775381.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2024-09-06
Estimated Expiration
2042-07-01

AI Technical Summary

Technical Problem

Client-side local models with limited computing resources in federated learning are prone to catastrophic forgetting in the task data stream, resulting in the loss of old task knowledge, and data transmission between the server and the client poses privacy security risks.

Method used

Build a generative adversarial network GAN in the central server, generate task pseudo data and send it to the client. The client is trained mixed with the pseudo data to restore old task knowledge, and at the same time, differential privacy noise is added during the communication process to protect privacy.

Benefits of technology

Without increasing the computational burden on the client, the prediction accuracy of the client's local model for old tasks is improved, the risk of privacy leakage during the communication process is reduced, and the privacy protection and communication efficiency of federated learning are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081532B
    Figure CN115081532B
Patent Text Reader

Abstract

A method for federated continuous learning training based on memory replay and differential privacy, the steps of which are: a central server trains a generative adversarial network, generates a set of pseudo images to form a pseudo sample set, sends the pseudo sample set and the federated learning global network to each client, the client uses the memory replay method to mix the sent pseudo sample set with the local sample set for training, and asynchronously uploads the trained federated learning global network and the local sample set with differential privacy noise to the central server, the central server performs weighted aggregation on the uploaded local network parameters and updates the federated learning global network, and ends the training when no new tasks arrive. The method of the present invention reduces the client's forgetting of old task knowledge without increasing the client's computational burden, protects the client's privacy, and improves the training efficiency of the federated learning global model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data processing technology, and further relates to a federated continuous learning training method based on memory replay and differential privacy in the field of machine learning model gradient data processing technology. The present invention can be used for client-side collaborative continuous training of machine learning models. Background Art

[0002] Generally, federated learning uses private data distributed locally on the client to obtain a machine learning model with good predictive ability through interactive communication training between the server and the client. Specifically, the central server obtains a new global model by aggregating the local model gradients obtained by the local client after local training. Then, the central server sends the global model to each client as the initial model for the next global training round, and the client uses the model for local training on the local data set. The global model update process of federated learning is iterative until the determined training termination condition is met. Usually, the intelligent edge device as the client in federated learning faces a large amount of task data stream that is continuously collected. However, the performance of the client local model in federated learning for old tasks usually drops sharply when new tasks arrive, which is called the catastrophic forgetting problem. Therefore, the ability to continuously learn in the task data stream has become the main factor restricting the practical application of federated learning. How to alleviate the catastrophic forgetting problem of the local model of federated learning in the task data stream has become a key issue in the development of federated learning.

[0003] Sun Yat-sen University proposed an online learning method based on federated learning in its patent application "An online learning method, system, computer device and medium based on federated learning" (application number: 202110865716.8, application publication number: CN 113743616 A, publication date 2021.01.15). The steps of implementing this method are: (1) The server initializes the parameters of the global model and uniformly distributes the global model to each user terminal; (2) Each user terminal receives the global model; (3) Each user terminal continuously collects data generated by user behavior and saves it locally in the user terminal; (4) Each user terminal uses the continuously collected data to calculate the loss function F according to the weighted arrival round k , perform online learning and training on the received global model; (5) Each user terminal uploads the trained global model parameters to the server; (6) The server aggregates the parameters and generates a new global model; (7) Determine whether the online learning termination condition is met. If so, the online learning training ends; otherwise, return to step (3). The disadvantage of this method is that the federated online learning weights the new and old data according to the arrival round to calculate the loss function F of each client. k,Although the same task data collected in real time can be processed to update the local model, when new ,task data is collected, the client local model will be overwritten by the new task ,knowledge, and gradually forget the old task knowledge, resulting in a serious ,catastrophic forgetting problem, which causes the federated local model to need to be retrained when ,it encounters old tasks that it has been trained on.

[0004] Yoon et al. proposed a federated continuous learning method based on federated weighted inter-client transfer (FedWeIT) in their paper "Federated Continual Learning with Weighted Inter-client Transfer" (International Conference on Machine Learning 2021). The main steps of this method are: (1) The server initializes the global model and shared parameters B; (2) Randomly sample the knowledge base kb; (3) Send the global model and knowledge base kb to each local client that can communicate; (4) The local client uses the APD continuous learning algorithm for local training, and decomposes the client's model parameter calculation into adaptive task-specific parameters A and global shared parameters B; (5) The client uploads the shared parameters B and adaptive task-specific parameters A obtained after training to the server; (6) The server uses the received shared parameters B to aggregate and update the global model; (7) The server uses the adaptive parameters A to update the knowledge base kb; (8) Determine whether a new task has arrived. If so, proceed to step (3), otherwise the training ends. The shortcomings of this method are: performing model parameter calculation decomposition and training tasks on the local client will bring a heavy computational burden to the client, reducing the model prediction accuracy, and this method does not consider the privacy and security issues that may be caused when transmitting data between the server and the client. Therefore, this method is not suitable for clients with limited computing resources (such as CPU, memory, battery, etc.) in federated learning (such as mobile phones, smart wearable devices, IoT devices, etc.). Summary of the invention

[0005] The purpose of the present invention is to address the deficiencies of the above-mentioned existing technologies and propose a federated continuous learning method based on memory replay and differential privacy, which is used to solve the problem of catastrophic forgetting of client local models with limited computing resources in task data streams in federated learning, resulting in the need to retrain the federated local model when encountering old trained tasks, and to improve the privacy protection of communication data in federated learning.

[0006] The technical idea for achieving the purpose of the present invention is: the present invention maintains a memory generator model composed of a generative adversarial network GAN in a central server, continuously accumulates client task knowledge using data uploaded by the client, and sends the generated task pseudo data to the client. The client mixes the received pseudo data with the current task data according to the importance ratio for training, thereby effectively restoring the old task knowledge without increasing the computational burden on the client. In addition, the present invention reduces the risk of user privacy leakage during communication by adding differential privacy noise to the data information communicated between the server and the client and asynchronously transmitting the sampled data, thereby improving the privacy protection and communication efficiency of communication data in federated learning.

[0007] To achieve the above purpose, the technical solution adopted by the invention includes the following steps:

[0008] Step 1: Generate a local sample set on the client:

[0009] Step 1.1, select at least 55,000 images to form a sample set, and the sample set includes at least five categories;

[0010] Step 1.2, randomly select at least 1400 images from each type of sample set to form a local sample set of the client;

[0011] Step 1.3, using the same method as step 1.2, obtain local sample sets of at least 10 clients. Set the task sample sets of each client to arrive in sequence. When the new task sample set arrives, the old task sample set is immediately discarded.

[0012] Step 2, generating a training set for the generative adversarial network in the server;

[0013] Step 3: Build a global network for federated learning;

[0014] Step 4: Build a generative adversarial network:

[0015] Step 4.1, construct the generator network (Generator) in the generative adversarial network;

[0016] Step 4.2, construct the discriminator network in the generative adversarial network;

[0017] Step 5: Train the Generative Adversarial Network:

[0018] Step 5.1, the generative adversarial network generates a fake image and marks it as a negative sample;

[0019] Step 5.2, use the images in the training set and the pseudo images to train the generative adversarial network;

[0020] Step 5.3, using the gradient descent method, iteratively update the parameters of the generative adversarial network to determine whether the loss function converges. If so, execute step 5.4, otherwise, execute step 5.1;

[0021] Step 5.4, input a set of randomly generated 100-dimensional Gaussian noise vectors into the trained generative adversarial network, and output a set of generated pseudo images as a pseudo sample set;

[0022] Step 6: Use the memory replay method to train the federated learning global network:

[0023] Step 6.1: Select up to 5 clients and send the constructed federated learning global network and pseudo sample set to each client participating in this round of training;

[0024] Step 6.2, combining part of the pseudo sample set and part of the local sample set according to the importance ratio of each task;

[0025] Step 6.3: The client uses the mixed local sample set to iteratively train and update the network parameters until the total loss function converges, and asynchronously uploads the trained federated learning global network parameters to the server;

[0026] Step 7, adding local differential privacy noise to the selected local image;

[0027] Step 8: Weighted aggregation of all federated learning global network parameters;

[0028] Step 9, determine whether the next task has arrived, if so, update the importance ratio of the next task and return to step 5, otherwise, execute step 10;

[0029] Step 10: Federated continuous learning training ends.

[0030] Compared with the prior art, the present invention has the following advantages:

[0031] First, the present invention constructs a generative adversarial network (GAN) in the central server, thereby overcoming the defect of the prior art that the client local model with limited computing resources suffers from catastrophic forgetting in the task data stream, resulting in the need to retrain the federated local model when encountering old trained tasks. This improves the prediction accuracy of the client local model for old tasks without increasing the local computing burden on the client.

[0032] Second, the present invention overcomes the privacy and security issues that may be caused when transmitting data between the server and the client in the prior art by adding differential privacy noise to the gradient data information communicated between the server and the client and asynchronously transmitting the sampled data. This reduces the communication cost during the transmission process and improves privacy and security without affecting the training accuracy of federated learning. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0034] The embodiment of the present invention takes digital image recognition as an example, the client is a mobile device distributed in different regions for participating in federated learning, and the server is a cloud server Alibaba Cloud or Huawei Cloud.

[0035] Reference Figure 1 , the implementation steps of the present invention are further described in detail.

[0036] Step 1: Generate a local sample set for each client.

[0037] Step 1.1, the embodiment of the present invention is to form a sample set with all images in the MNIST (Mixed National Institute of Standards and Technology database) data set of handwritten digital grayscale images, which includes 10 categories from 0 to 9. 5500 images are randomly selected from each category of the sample set, and 11000 images of every two categories are used as a sample set of a single task. A total of five task sample sets are obtained. The importance ratios r of the five tasks are set to 0.1, 0.3, 0.5, 0.8, and 0.9 respectively according to the required retention time of the knowledge of each task.

[0038] In step 1.2, 1,400 images are randomly selected from the sample sets of the five tasks each time to form a local sample set of the client.

[0039] In step 1.3, the same method as step 1.2 is used to obtain the local sample sets of 10 clients. The task sample sets of each client are set to arrive in sequence. When the new task sample set arrives, the sample set of the old task is immediately discarded.

[0040] Step 2: Generate a training set for the generative adversarial network in the server.

[0041] 100 images are selected from the first task sample set to form a training set, which includes at least one category, and all selected images are marked as positive samples.

[0042] Step 3: Build the federated learning global network in the server.

[0043] According to the digital image data set in step 1, the present invention builds a seven-layer convolutional neural network in the server as a federated learning global network, and its structure is: the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the third convolutional layer, the first fully connected layer, and the second fully connected layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5, respectively, the number of convolution kernels is set to 32, 64, and 64, respectively, the size of the convolution kernel is set to 3*3, the step size is set to 1, and the activation function uses the Relu function. The pooling window size of the first and second pooling layers is 2*2, and the sliding step size is set to 2. The dimensions of the first and second fully connected layers are set to 64 and 10, respectively. The federated learning global network can complete image classification learning tasks based on image sample sets.

[0044] Step 4: Build the generative adversarial network in the server.

[0045] Step 4.1, the present invention constructs a generative adversarial network GAN in the server for accumulating client knowledge and generating old task data. The generative adversarial network consists of a generator and a discriminator, and the generator and the discriminator confront each other to generate a pseudo sample set with the same distribution as the real data. Among them, the generator consists of an encoder, a convolutional long short-term memory network LSTM, and a decoder. The convolutional long short-term memory network LSTM is a five-layer deconvolution neural network, and its structure is: the first deconvolution layer, the second deconvolution layer, the third deconvolution layer, the pooling layer, and the normalization layer; the dimensions of the first to third deconvolution layers are set to 5*5, 13*13, and 28*28, respectively, and the size of the convolution kernel is set to 3*3; the pooling window size of the pooling layer is set to 2*2; the dimension of the normalization layer is set to 10.

[0046] Step 4.2, the discriminator network (Discriminator) in the generative adversarial network is a five-layer convolutional neural network, and its structure is: the first convolutional layer, the second convolutional layer, the third convolutional layer, the pooling layer, and the normalization layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5 respectively, the sizes of the convolution kernels are all set to 3*3, the sizes of the convolution kernels are all set to 3*3, the pooling window size of the pooling layer is set to 2*2, and the dimension of the normalization layer is set to 10.

[0047] Step 5: Train the generative adversarial network when new tasks arrive.

[0048] In step 5.1, a randomly generated 100-dimensional Gaussian noise vector is input into the generative adversarial network, the output image is used as a pseudo image, and the pseudo image is labeled as a negative sample.

[0049] In step 5.2, randomly select an image from the training set, input the selected image and the pseudo image into the generative adversarial network for nonlinear mapping, and output the positive and negative prediction labels and feature vectors corresponding to each sample.

[0050] Step 5.3, using the gradient descent method, iteratively update the parameters of the generative adversarial network with the loss function to determine whether the loss function converges. If it converges, execute step 5.4, otherwise, execute step 5.1.

[0051] Step 5.4: Input a set of randomly generated 100-dimensional Gaussian noise vectors into the trained generative adversarial network. Through the generative network, nonlinear mapping is performed on the Gaussian noise vectors and the category label vectors, and a set of generated pseudo images is output. This set of pseudo images is used as the pseudo sample set D p .

[0052] Step 6: Use the memory replay method to train the federated learning global network.

[0053] Step 6.1: Randomly select 5 clients from all clients as the clients participating in this round of training of the federated learning global network; at the same time, the constructed federated learning global network and the pseudo sample set D p Distributed to each client participating in this round of training.

[0054] Step 6.2: Combine some pseudo sample sets D according to the importance ratio of each task p Combined with part of the local sample set, a mixed local sample set is obtained.

[0055] In step 6.3, all clients participating in this round of training use the mixed local sample set and the local stochastic gradient descent method to iteratively update the parameters of each layer of the federated learning global network until the total loss function of the federated learning global network training converges, and obtain the trained federated learning global network. The federated learning global network retains the prediction ability for the old tasks and asynchronously uploads the trained federated learning global network parameters to the server.

[0056] The total loss function L' is:

[0057]

[0058] Where r represents the importance ratio of each task defined in step 1.2, Indicates using the client's local sample set D k Partial loss function calculated on samples in, Indicates the use of the pseudo sample set D sent by the server p Partial loss function calculated for samples in .

[0059] Among them, the L loss function is calculated by the following formula:

[0060]

[0061] Where N represents the total number of samples in the sample set, ∑ represents the sum operation, log represents the logarithmic operation with the natural constant e as the base, and p n Represents the global network prediction label of the nth sample in the sample set, y n Represents the true label of the nth sample in the sample set.

[0062] Step 7: Add local differential privacy noise that conforms to the Laplace distribution to the selected local image:

[0063] Randomly select at least 100 image samples from the current local task sample set, add local differential privacy noise that conforms to the Laplace distribution with a privacy budget ε≥0 to each selected image, and asynchronously upload the obtained noisy sample images to the server as the training set for the generative adversarial network when the next task arrives.

[0064] Step 8: Using the following aggregation formula, the server performs weighted aggregation on all parameters of the trained federated learning global network to obtain aggregated federated learning global network parameters:

[0065]

[0066] Among them, w g represents the aggregated federated learning global network parameters, ∑ represents the summation operation, K represents the total number of clients participating in this round of training of the federated learning global network, and n k represents the number of sample sets of the kth client among the clients participating in this round of training of the federated learning global network, N represents the total number of samples in the training set, and w k Represents the parameters of the federated learning global network trained by the kth client.

[0067] Since the uneven distribution of local user sample sizes will greatly affect the accuracy of the global model of federated learning, the local model gradient with a small sample size has a lower weight and has less impact on the global network of federated learning; the local model gradient with a large sample size has a higher weight and has a greater impact on the global network of federated learning. Therefore, this weighted aggregation method eliminates the impact of the local user sample size imbalance on the accuracy of the global network to a certain extent by integrating the local model gradients obtained through training of each local user, which is conducive to the optimization of the global network of federated learning.

[0068] Step 9, determine whether the next task has arrived, if so, update the importance ratio of the next task and return to step 5, otherwise, execute step 10;

[0069] Step 10: Federated continuous learning training ends.

[0070] The effect of the present invention is further described below in conjunction with simulation experiments.

[0071] 1. Simulation experiment conditions:

[0072] The hardware platform of the simulation experiment of the present invention is: the processor is Intel (R) Xeon (R) CPU E5-2650 v4, the main frequency is 2.20GHz, and the memory is 256GB.

[0073] The software platform for the simulation experiment of the present invention is: Ubuntu 18.04 operating system and python 3.8.

[0074] The data set used in the simulation experiment of the present invention is the MNIST handwriting recognition image data set from the National Institute of Standards and Technology of the United States. The data set is generated by the National Institute of Standards and Technology of the United States by processing the handwritten digital content of 250 people. Half of the participants are from high school students and the other half are from census workers. The MNIST data set has a total of 70,000 data, including 60,000 training set data and 10,000 test set data. Each sample is a 28*28 pixel grayscale handwritten digital picture.

[0075] 2. Simulation content and results analysis:

[0076] The simulation experiment of the present invention uses the present invention and three existing related technologies (FedAVG training method, Fed-EWC training method, FedWeIT training method) to perform global model training on the MNIST-FIVE task flow dataset to obtain training results. The scenario simulated by the simulation experiment is that 10 local clients holding private data face five different tasks that arrive one after another, and they jointly train a federated learning global model. Among them, the private data uses the dataset set in this simulation experiment.

[0077] In the simulation experiment, the four existing technologies used are:

[0078] The prior art FedAVG training method refers to the federated average aggregation training method proposed by Mcmahan et al. in “Communication-Efficient Learning of Deep Networks from Decentralized Data, 2016”, referred to as the FedAVG training method.

[0079] The prior art Fed-EWC training method refers to the continuous learning training method proposed by Kirkpatrick et al. in "Overcoming Catastrophic Forgetting in Neural Networks. Proceedings of the national academy of sciences, 2017" for federated learning, referred to as the Fed-EWC federated continuous learning training method.

[0080] The prior art FedWeIT training method refers to the federated continuous learning training method proposed by Yoon et al. in “Federated Continual Learning with Weighted Inter-client Transfer, PMLR, 2021”, referred to as the FedWeIT federated continuous learning training method.

[0081] In order to verify the effect of the simulation experiment of the present invention, the prediction accuracy of the client local model for task 1 when the five tasks arrive is used as the evaluation index to evaluate the federated continuous learning training results of the four methods. All the results are plotted in Table 1.

[0082] Table 1. Quantitative analysis of the training results of the present invention and the prior art in the simulation experiment

[0083]

[0084]

[0085] It can be seen from Table 1 that the classification accuracy of the federated learning global network for task 1 in the present invention remains at 88.6% after 5 task trainings, without a significant decrease, and the accuracy is higher than that of the other three prior art methods, proving that the present invention prevents the federated learning global network from forgetting old task knowledge in the task flow by using the old task memory replay and local differential privacy method. The present invention combines the characteristics of the generative adversarial network GAN and continuous learning, so that the finally trained federated learning global network can reduce the client's forgetting of old task knowledge without increasing the client's computing burden, protect the client's privacy, and improve the training efficiency of the federated learning global model.

[0086] The above simulation experiments show that the method of the present invention utilizes the memory replay of old tasks and the local differential privacy method to perform federated continuous learning training, which solves the problems of catastrophic forgetting of old task knowledge and privacy leakage in the prior art methods. It is a privacy-preserving, efficient and practical federated continuous learning training method.

Claims

1. A federated continuous learning training method based on memory replay and differential privacy, characterized in that: The memory replay method is used to train the federated learning global network, and local differential privacy noise is added to the selected local images. The specific steps of the training method include the following: Step 1: Generate a local sample set on the client: Step 1.1, select at least 55,000 images to form a sample set, which includes at least five categories, and each category contains at least 11,000 image samples to form a task sample set; Step 1.2: randomly select at least 1,400 images from each task sample set to form a local sample set of the client; Step 1.3: Use the same method as step 1.2 to obtain local sample sets of at least 10 clients, and set the task sample sets of each client to arrive in order. When the new task sample set arrives, the sample set of the old task is immediately discarded. Step 2: Generate a training set for the generated adversarial network in the server: Select at least 100 images from the first task sample set to form a training set, which includes at least one category; mark all images as positive samples; Step 3: Build a global network for federated learning: A seven-layer convolutional neural network is built in the server as the global network of federated learning. Its structure is as follows: the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the third convolutional layer, the first fully connected layer, and the second fully connected layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5 respectively, and the size of the convolution kernel is set to 3*3. The pooling window size of the first and second pooling layers is set to 2*2, and the dimensions of the first and second fully connected layers are set to 64 and 10 respectively. Step 4: Build a generative adversarial network: Step 4.1, the generative network in the generative adversarial network consists of an encoder, a convolutional long short-term memory network LSTM, and a decoder. The convolutional long short-term memory network LSTM is a five-layer deconvolution neural network, and its structure is: the first deconvolution layer, the second deconvolution layer, the third deconvolution layer, the pooling layer, and the normalization layer; the dimensions of the first to third deconvolution layers are set to 5*5, 13*13, and 28*28 respectively, and the size of the convolution kernel is set to 3*3; the pooling window size of the pooling layer is set to 2*2; the dimension of the normalization layer is set to 10; Step 4.2, the discriminant network in the generative adversarial network is a five-layer convolutional neural network, and its structure is: the first convolutional layer, the second convolutional layer, the third convolutional layer, the pooling layer, the normalization layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5 respectively, the sizes of the convolution kernels are all set to 3*3, the sizes of the convolution kernels are all set to 3*3, the pooling window size of the pooling layer is set to 2*2, and the dimension of the normalization layer is set to 10; Step 5: Train the Generative Adversarial Network: Step 5.1, input a randomly generated 100-dimensional Gaussian noise vector into the generative adversarial network, use the output image as a pseudo image, and mark the pseudo image as a negative sample; Step 5.2, randomly select an image from the training set, input the selected image and the pseudo image into the generative adversarial network for nonlinear mapping, and output the positive and negative prediction labels and feature vectors corresponding to each sample; Step 5.3, using the gradient descent method, iteratively update the parameters of the generative adversarial network with the loss function, and determine whether the loss function converges. If it converges, execute step 5.4, otherwise, execute step 5.1; Step 5.4, input a set of randomly generated 100-dimensional Gaussian noise vectors into the trained generative adversarial network, and perform nonlinear mapping on the Gaussian noise vector and the category label vector through the generative network, and output a set of generated pseudo images, which are used as the pseudo sample set; Step 6: Use the memory replay method to train the federated learning global network: Step 6.1: Randomly select up to 5 clients from all clients as the clients participating in this round of training of the federated learning global network; at the same time, send the constructed federated learning global network and pseudo sample set to each client participating in this round of training; Step 6.2, combining part of the pseudo sample set and part of the local sample set according to the importance ratio of each task to obtain a mixed local sample set; Step 6.3: All clients participating in this round of training use the mixed local sample set and the local stochastic gradient descent method to iteratively update the network parameters until the total loss function of the federated learning global network training converges, and obtain the trained federated learning global network. The federated learning global network retains the prediction ability for the old tasks, and the trained federated learning global network parameters are asynchronously uploaded to the server; Step 7: Add local differential privacy noise to the selected local image: Randomly select at least 100 image samples from the current local task sample set, add local differential privacy noise that conforms to the Laplace distribution with a privacy budget of ε ≥ 0 to each selected image, and asynchronously upload the obtained sample images with added noise to the server as the training set for the generative adversarial network when the next task arrives; Step 8: Weighted aggregation of all federated learning global network parameters: Using the following aggregation formula, the server performs weighted aggregation on the received trained federated learning global network parameters to obtain the aggregated federated learning global network parameters: Among them, w g represents the aggregated federated learning global network parameters, ∑ represents the summation operation, K represents the total number of clients participating in this round of training of the federated learning global network, and n k represents the number of sample sets of the kth client among the clients participating in this round of training of the federated learning global network, N represents the total number of samples in the training set, and w k represents the parameters of the federated learning global network trained by the kth client; Step 9, determine whether the next task has arrived, if so, update the importance ratio of the next task and return to step 5, otherwise, execute step 10; Step 10: Federated continuous learning training ends.

2. The method for federated continuous learning and training based on memory replay and differential privacy according to claim 1, characterized in that: The federated learning global network described in step 3 is a seven-layer convolutional neural network with a structure of the first convolutional layer, the first pooling layer, the second convolutional layer, the second pooling layer, the third convolutional layer, the first fully connected layer, and the second fully connected layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5, respectively, and the sizes of the convolution kernels are set to 3*3. The pooling window sizes of the first and second pooling layers are set to 2*2, and the dimensions of the first and second fully connected layers are set to 64 and 10, respectively.

3. The federated continuous learning training method based on memory replay and differential privacy according to claim 1 is characterized by: The generative adversarial network described in step 4 is composed of a generative network and a discriminative network, wherein the generative network is composed of an encoder, a convolutional long short-term memory network LSTM, and a decoder. The convolutional long short-term memory network LSTM is a five-layer deconvolutional neural network, and its structure is: the first deconvolution layer, the second deconvolution layer, the third deconvolution layer, the pooling layer, and the normalization layer; wherein the discriminative network is a five-layer convolutional neural network, and its structure is: the first convolutional layer, the second convolutional layer, the third convolutional layer, the pooling layer, and the normalization layer. The dimensions of the first to third convolutional layers are set to 28*28, 13*13, and 5*5, respectively, and the sizes of the convolution kernels are all set to 3*3, the sizes of the convolution kernels are all set to 3*3, the pooling window size of the pooling layer is set to 2*2, and the dimension of the normalization layer is set to 10.

4. The method for federated continuous learning and training based on memory replay and differential privacy according to claim 1, characterized in that: The total loss function for the federated learning global network training described in step 6.3 is as follows: Among them, L' represents the total loss function, r represents the importance ratio of each task, Indicates using the client's local sample set D k Partial loss function calculated on samples in, represents the partial loss function calculated using the samples in the pseudo sample set Dp sent by the server; Among them, the L loss function is calculated by the following formula: Where N represents the total number of samples in the sample set, ∑ represents the sum operation, log represents the logarithmic operation with the natural constant e as the base, and p n Represents the global network prediction label of the nth sample in the sample set, y n Represents the true label of the nth sample in the sample set.

5. The method for federated continuous learning and training based on memory replay and differential privacy according to claim 1, characterized in that: The method for adding local differential privacy noise described in step 7 is as follows: randomly select a portion of images from the current local task sample set, and add local differential privacy noise that conforms to the Laplace distribution and has a privacy budget ε ≥ 0 to each selected image.