Federal continuous learning system

Through the category divergence information screening and residual sample update mechanism, the problem of noise data and knowledge forgetting in federated learning is solved, and the robustness and generalization capabilities of the model are improved, ensuring that the model maintains high performance in diverse application scenarios.

CN119168020AActive Publication Date: 2024-12-20ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411360544.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-20
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

When federated learning faces noise data and class incremental learning, the generalization ability of the model decreases and knowledge forgetting problems, resulting in poor performance of the model in diverse application scenarios.

Method used

The samples are screened through category divergence information, and the negative impact of noise samples on model training is reduced, and the update mechanism of multiple rounds of sample data sets and residual sample sets is adopted to enhance the robustness and generalization ability of the model in a noisy environment and alleviate the problem of the model. The issue of knowledge forgetting.

Benefits of technology

It effectively improves the robustness and generalization ability of the model in a noisy environment, improves the performance of class incremental learning tasks, ensures that the model maintains high performance when facing new categories, and avoids knowledge forgetting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168020A_ABST
    Figure CN119168020A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a federated continuous learning system. The federated continuous learning system comprises a server and at least one client, each client obtains a first sample data set and a category divergence threshold, determines a first sample pair and a single sample data set, trains a local model, generates local model information and sends the local model information to a server. And the server receives the local model information of each client, acquires a global model based on the local model information, and judges whether a stop condition is met. If not, generating a residual sample generation instruction and sending the residual sample generation instruction to the client; and if yes, determining the global model as a target model. And the client receives a residual sample generation instruction, generates a residual sample, trains a local model in combination with the second sample data set, and generates and sends local model information to the server. Through class divergence screening and residual sample generation, the robustness of the model to noise samples is improved, the generalization ability in class incremental learning is optimized, and knowledge forgetting is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a federated continuous learning system. Background Art

[0002] With the development of machine learning technology, the performance of models in processing different tasks has been significantly improved. Especially with the support of a large amount of labeled data, the models can better learn features and patterns and adapt to diverse application scenarios.

[0003] Currently, federated continuous learning technology provides an effective means for model training under data privacy protection, and solves the model training problem under different client-distributed data. However, the current federated learning still has shortcomings when facing the noise problem of samples provided by the data provider segment and when performing quasi-incremental learning of the model, which will lead to a decrease in the generalization ability of the model and knowledge forgetting. Therefore, in order to solve the above shortcomings, a federated continuous learning system that can effectively deal with noise samples and prevent knowledge forgetting is needed. Summary of the invention

[0004] In view of this, an embodiment of this specification provides a federated continuous learning system. One or more embodiments of this specification also involve a federated continuous learning method applied to a client, a federated continuous learning method applied to a server, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a federated continuous learning system is provided, the system comprising a server and at least one client; Each client is configured to obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; obtain first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information according to the local model, and send the local model information to a server; The server is configured to receive local model information sent by each client, and obtain a global model based on each local model information; determine whether the global model meets the model training stop condition; if not, generate a residual sample generation instruction according to the global model, and send the residual sample generation instruction to each client; if yes, determine that the global model is the target model; Each client is also configured to receive the residual sample generation instruction, and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second category divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set based on each second category divergence information and the category divergence threshold; generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set and the second initial single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information based on the local model parameters of the local model; and send the local model information to the server.

[0006] According to a second aspect of an embodiment of this specification, a federated continuous learning method is provided, which is applied to a client and includes: Acquire a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; Obtaining first category divergence information corresponding to each first sample data, and determining a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold; Training a local model corresponding to the client based on the first sample pair data set and the first single sample data set; Local model information is generated according to the local model, and the local model information is sent to a server.

[0007] According to a third aspect of an embodiment of this specification, a federated continuous learning method is provided, which is applied to a server and includes: Receive local model information sent by each client, and obtain the global model based on each local model information; Determine whether the global model reaches the model training stop condition; If not, generating a residual sample generation instruction according to the global model, and sending the residual sample generation instruction to each client; If so, the global model is determined to be the target model.

[0008] According to a fourth aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned federated continuous learning method applied to the client and the above-mentioned federated continuous learning method applied to the server are implemented.

[0009] According to a fifth aspect of an embodiment of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions. When the instructions are executed by a processor, the steps of the above-mentioned federated continuous learning method applied to a client and the above-mentioned federated continuous learning method applied to a server are implemented.

[0010] According to the sixth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned federated continuous learning method applied to a client and a federated continuous learning method applied to a server.

[0011] An embodiment of the present specification is implemented, including a server and at least one client; each client is configured to obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; obtain first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set based on each first category divergence information and the category divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information based on the local model, and send the local model information to the server; the server is configured to receive the local model information sent by each client, and obtain a global model based on each local model information; determine whether the global model meets the model training stop condition; if not, generate a residual sample generation instruction based on the global model, and send the residual sample generation instruction Send to each client; if yes, determine that the global model is the target model; each client is also configured to receive the residual sample generation instruction, and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second category divergence information corresponding to each second sample data, and determine the second initial sample pair data set and the second initial single sample data set according to each second category divergence information and the category divergence threshold; combine the residual sample set, the second initial sample pair data set and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to the local model parameters of the local model; send the local model information to the server.

[0012] By applying the solution of the embodiment of this specification, samples are screened by category divergence information, the negative impact of noise samples on model training is reduced, and the robustness and generalization ability of the model in a noisy environment are enhanced. At the same time, the update mechanism of multiple rounds of sample data sets and residual sample sets is adopted to gradually improve the performance of the model in class incremental learning tasks, effectively alleviate the problem of knowledge forgetting, and ensure that the model can still maintain high performance when dealing with new categories. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 is an architecture diagram of a federated continuous learning system provided by an embodiment of this specification; Figure 2 is a flowchart of a federated continuous learning method applied to a client provided by an embodiment of this specification; Figure 3is a flow chart of a federated continuous learning method applied to a server provided by an embodiment of this specification; Figure 4 is a processing flow chart of an image processing method provided by an embodiment of this specification; Figure 5 It is a structural diagram of a federated continuous learning device applied to a client provided by an embodiment of this specification; Figure 6 It is a structural diagram of a federated continuous learning device applied to a server provided by an embodiment of this specification; Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0014] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0015] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "one", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0016] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0017] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0018] First, the terms involved in one or more embodiments of this specification are explained.

[0019] Continuous learning: is a machine learning method that aims to allow the model to retain previously learned knowledge while continuously receiving new tasks or new data, rather than completely forgetting it. This method improves the model's adaptability by dynamically adjusting model parameters, storing important feature information, and using existing knowledge to handle new tasks. Continuous learning is very applicable in scenarios where tasks change frequently, helping to reduce the cost of retraining the model and improve the overall efficiency of the system.

[0020] Divergence: is a statistic used to measure the difference between two probability distributions, usually used to compare the difference between the predicted distribution and the actual distribution. The smaller the divergence, the more similar the two distributions are, and the higher the prediction accuracy of the model. In machine learning and statistics, divergence can help evaluate the convergence, stability, and generalization ability of the model. By adjusting the learning strategy of the model to reduce the divergence, more accurate prediction results can be achieved.

[0021] Semi-Supervised Learning (SSL): is a machine learning method that combines a small amount of labeled data with a large amount of unlabeled data for model training. In many practical applications, labeled data is expensive to obtain, while unlabeled data is usually easy to obtain. Semi-supervised learning improves the performance of the model by using the supervisory signal provided by a small amount of labeled data to guide the model to learn on unlabeled data. Through techniques such as self-supervision or pseudo-label generation, semi-supervised learning can effectively improve the generalization ability of the model in scenarios where data is scarce, and is suitable for various classification and regression tasks.

[0022] Jensen-Shannon Divergence (JSD): is a symmetric measure of the difference between two probability distributions, often used to compare the similarity between model predictions and actual distributions. JSD evaluates the difference by combining the average distributions of the two distributions and calculating the divergence between them and their respective distributions. JSD ranges from 0 to 1, with values ​​closer to 0 indicating that the two distributions are more similar and values ​​closer to 1 indicating that the two distributions are more different. Because JSD is symmetric and has a limited range of values, it is often used to compare predictions in machine learning models with the true label distribution.

[0023] In this specification, a federated continuous learning method is provided. This specification also involves a federated continuous learning method applied to a client and a federated continuous learning method applied to a server, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.

[0024] With the development of machine learning technology, the performance of models in processing different tasks has been significantly improved. In particular, with the support of a large amount of labeled data, the model can efficiently learn the features and patterns in the data and adapt to a variety of application scenarios. Whether in image classification, natural language processing or other complex tasks, the diversity and quality of data largely determine the performance of the model. Therefore, how to effectively train models in a distributed environment with data privacy protection has become a focus of attention in recent years.

[0025] Federated learning, as a distributed learning technology, allows all parties to train models without sharing original data. This technology solves the problem of data privacy protection by training models locally on each client and aggregating model update parameters to the server for aggregation. At the same time, when dealing with data distribution across devices and organizations, federated learning can effectively utilize the data of each client and improve the training effect of the global model. However, in practical applications, a major challenge facing federated learning is that the data quality of each client varies, especially because there may be noisy data in the samples of different data providers. These noisy data can easily interfere with model training, resulting in a decrease in the accuracy of the model in the inference stage. In addition, there are often large differences in data distribution between different clients, and it is difficult for the model to generate consistent prediction results in this environment, thereby weakening the overall generalization ability of federated learning.

[0026] The introduction of continuous learning technology provides a potential solution to the problem of knowledge forgetting when the model copes with dynamic tasks. Continuous learning allows the model to retain previously learned knowledge when facing new tasks, avoiding the complete forgetting of information about previous tasks due to the introduction of new data. This is particularly critical for scenarios similar to incremental learning. The model must not only adapt to new tasks, but also maintain stable performance in historical tasks. However, continuous learning itself also has certain technical challenges. Especially when faced with long-term, continuous task learning, how to effectively manage the model's knowledge base and reasonably update the model parameters is still a problem that needs to be solved. In addition, when dealing with scenarios where data distribution and tasks are constantly changing, continuous learning is susceptible to "catastrophic forgetting", that is, when the model learns new tasks, the performance of old tasks drops sharply, weakening the model's long-term adaptability.

[0027] When federated learning is combined with continuous learning, in theory, the advantages of both can be brought into play, solving the problem of data privacy protection and enhancing the adaptability of the model in dynamic tasks. However, in actual operation, this combination also brings new technical difficulties. First, the data of each client in federated learning is unevenly distributed and there is noisy data, which limits the generalization ability of the model between different clients. Secondly, in the quasi-incremental learning scenario, the model not only has to face the heterogeneity of the data of each client, but also has to deal with the problem of knowledge forgetting at the same time. In this case, when facing data from multiple clients, the model may not be able to effectively remember the information of historical tasks, resulting in the gradual loss of knowledge. In addition, the presence of noisy data will further increase the learning burden of the model, causing the model to learn new tasks more slowly, while reducing its performance in various tasks.

[0028] See also Figure 1 , Figure 1 An architecture diagram of a federated continuous learning system provided by an embodiment of this specification is shown. The federated continuous learning system may include at least one client 100 and a server 200; Each client 100 is used to obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; obtain first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information according to the local model, and send the local model information to the server 200; The server 200 is used to receive the local model information sent by each client, and obtain the global model based on each local model information; determine whether the global model meets the model training stop condition; if not, generate a residual sample generation instruction according to the global model, and send the residual sample generation instruction to each client 100; if yes, determine that the global model is the target model; Each client 100 is also used to receive the residual sample generation instruction, and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second category divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set based on each second category divergence information and the category divergence threshold; generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set and the second initial single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information based on the local model parameters of the local model; and send the local model information to the server 200.

[0029] In practical applications, the client is each distributed data processing unit, which is responsible for processing its own data set locally and training local models under the premise of ensuring data privacy. In a single client, the first sample data set is the original data set used for the first round of training in model training, and each first sample data is a specific training data item. In order to screen out high-quality training samples, the client first obtains the category divergence threshold for judging data quality. Subsequently, the client calculates the first category divergence information representing the degree of difference between each sample and its category. Afterwards, based on the first category divergence information corresponding to each sample, samples with higher quality are screened out as the first sample pair data set and samples with poorer quality are screened out as the first single sample data set.

[0030] After completing the data screening, the client performs local training on the sample pair set and single sample set segmented based on the screening results to generate a local model. The local model is a model trained by the client based on local data, which can reflect the characteristics of the local data of each client. After the training is completed, the client generates local model information, that is, information related to the local model. The local model information includes the parameters of the local model. It is particularly important to note that when judging whether to continue training in the future, if it is necessary to judge through the information of each local model, the local model information needs to also include the gradient, loss value, weight and other information of the local model, and this information will then be sent to the server for aggregation and update. The server here is responsible for receiving the local model information uploaded by all clients and generating a global model based on it.

[0031] The server evaluates the global model to determine whether it meets the preset model training stop condition. If the global model has not yet reached the ideal state, the server will generate a residual sample generation instruction and require each client to generate a residual sample set. The residual sample is a sample corresponding to the knowledge memorized by the model in the previous round of training, including the sample data of the model trained on the corresponding client in the previous round, which is used to avoid the problem of gradual loss of knowledge. After receiving the residual sample instruction, the client generates a residual sample and combines it with the second sample data set for subsequent rounds of model training. The client calculates the second category divergence information for the second batch of data, and screens out the second initial sample pair data set and the second initial single sample data set through the divergence information, and then combines the second initial sample pair data set and the second initial single sample data set with the residual sample set to generate the second initial sample pair data set and the second target single sample data set for this round of model training, which is used for retraining and optimization of the local model.

[0032] Since the residual sample set is generated subsequently, it can also be divided into a single sample set and a sample pair set according to the accuracy of the generated samples (such as category divergence, credibility, etc.), and only a single sample or a sample pair can be generated as the residual sample set. Therefore, according to the form of the data in the residual sample set, it is decided to combine the residual sample set with the second initial sample pair data set to generate a target sample pair data set, and regard the second initial single sample data set as the second target single sample data set; or to combine the residual sample set with the second initial single sample data set to generate a target second single sample data set, and regard the second initial sample pair data set as the second target sample pair data set; or to combine the sample pair data in the residual sample set with the second initial sample pair data set to generate the target sample pair data set, and combine the single sample data in the residual sample set with the second initial single sample data set to generate the target second single sample data set.

[0033] It should be noted that in this scheme, each round of model training can be understood as the client using the data for model training for a round of model parameter adjustment. In this round, considering the size of video memory required for a single model training, the samples for model training in the round can be divided into multiple groups for model training, and the model parameters are adjusted using the sample data in each group one by one. After all groups are adjusted, since this scheme includes multiple clients, after the local model of each client is adjusted, the server obtains the global model based on the local model information sent by each client, which can be regarded as a round of model training completed.

[0034] It should be noted that the category divergence corresponding to the sample data can be measured by calculating the Euclidean distance between the sample and the average vector of the category, which is a commonly used geometric distance method for directly comparing the difference between the sample features and the category center; the sample divergence can also be measured by using the confidence score of the classifier, that is, the probability distribution of the sample being classified into the category to which it belongs. If the confidence score is low, the divergence is large; the density of the sample in the feature space can also be estimated. Samples in low-density areas often have a large divergence, etc. This specification does not impose any restrictions on this. The calculation method of the first category divergence information corresponding to the first sample data and the second category divergence information corresponding to the second sample data is the same, and will not be repeated here and in the subsequent content of the specification.

[0035] It should be noted that the first sample pair data set, the second initial sample pair data set and the second target sample pair data set are sets consisting of data with sample data and their labels, and the first single sample data set, the second initial single sample data set and the second target sample data set are sets with only sample data. Since the SSL (Semi-Supervised Learning) method is used for training in the model training process, unlabeled data can also be effectively utilized, and the model can be helped to learn more features by generating pseudo labels or introducing self-supervisory signals. Furthermore, the sample pair data set and the single sample data set can be determined respectively, and representative samples can be screened out as sample pairs, and samples with weak representativeness (noise samples) can be used as single sample pairs to train the model, so as to improve the performance of the model in a noisy environment.

[0036] The residual sample generation instruction generated according to the global model can be understood as an instruction to guide each client to generate residual samples through the error information of the global model. The specific method can be to calculate the loss value of the global model on the validation set, extract samples with large errors as residual samples to generate instructions; it can also generate instructions based on the deviation of the global model in the data distribution of each client, requiring the client to focus on processing the regional data with large errors; it can also train another deep learning model for generating residual samples through the global model, so that each subsequent client can generate a residual network through the deep learning model, etc. This manual does not impose any restrictions on this.

[0037] By filtering samples based on category divergence information, the negative impact of noise samples on model training is reduced, and the robustness and generalization ability of the model in a noisy environment are enhanced. At the same time, the update mechanism of multiple rounds of sample data sets and residual sample sets is adopted to gradually improve the performance of the model in class incremental learning tasks, effectively alleviate the problem of knowledge forgetting, and ensure that the model can still maintain high performance when dealing with new categories.

[0038] Further, obtaining the first category divergence information corresponding to each first sample data includes: Acquire a data category feature extraction model according to the first sample data set; Process each first sample data according to the data category feature extraction model to obtain first category feature information corresponding to each first sample data; The first category dispersion information corresponding to each first sample data is determined according to the first category feature information corresponding to each first sample data.

[0039] In practical applications, the category feature extraction model is a model for making a preliminary prediction of the category to which the sample data belongs, and the first category feature information is information representing the probability of each category to which the first sample belongs.

[0040] For example, the category feature extraction model can be understood as a model for extracting category-related features from sample data, which is used in machine learning to make preliminary category predictions for sample data. The model can extract important feature information related to the category from the original data, so as to analyze whether the data is prominent in a certain category.

[0041] It should be noted that obtaining a data category feature extraction model based on the first sample data set can be understood as a process of extracting category features by using the initial sample data to train or select a model. Specifically, the category feature extraction model can be obtained by determining that at least one data in the first sample data set and its corresponding sample label are preheated data pairs, and performing preliminary training based on the preheated data pairs; a pretrained model can also be used, such as a neural network model pretrained on a large data set, and fine-tuned on the first sample data to adapt to a specific category; the first sample data can also be preliminarily clustered by a clustering algorithm, and a category feature extraction model can be constructed based on the clustering results, etc. This specification does not impose any restrictions on this.

[0042] Category feature information can be understood as feature information obtained after processing sample data through a category feature extraction model, which is used to describe the probability of association between sample data and each category. This information is embodied in the form of probability distribution, indicating the possibility that the sample belongs to each category. For example, in a multi-classification problem, the first category feature information can be a probability vector, showing that the probability of an image belonging to category A is 0.7, the probability of belonging to category B is 0.2, and the probability of belonging to category C is 0.1. These feature information provide a basis for subsequent category divergence calculations, which helps to further screen and process sample data to optimize model training results.

[0043] It should be noted that determining the first category divergence information corresponding to each first sample data is to determine its own category divergence information based on the category feature information of the first sample data itself. Determining the first category divergence information corresponding to each first sample data can be understood as a process of measuring the difference between the sample data and the category to which it belongs. Specifically, JSD (Jensen-Shannon Divergence, Jensen-Shannon divergence) can be used to calculate the difference between the sample and category distribution to measure their similarity; the Euclidean distance between the sample and the category center can also be calculated to obtain the geometric divergence between the sample and the category; classifier-based confidence scores can also be used, and low-confidence samples correspond to larger divergence information, etc. This manual does not impose any restrictions on this.

[0044] By obtaining the divergence information of each sample through the data category feature extraction model, the difference between each sample and its category can be accurately evaluated, thereby screening out representative samples and improving the effectiveness and robustness of model training. This not only reduces the interference of noise data on model training, but also better selects samples with important information, further improving the generalization ability of the model in complex data distribution. At the same time, by effectively obtaining divergence information, the model can learn more efficiently in scenarios where data is scarce or unbalanced, improving the overall training effect.

[0045] Further, determining the first sample pair data set and the first single sample data set according to each first category divergence information and the category divergence threshold includes: Determine target first sample data, wherein the target first sample data is any one of the first sample data; Determine whether the first category dispersion information corresponding to the first sample data is greater than the category dispersion threshold; If yes, determining that the target first sample data is the first single sample data, and generating a first sample data set according to each first single sample data; If not, the target first sample label data corresponding to the target first sample data is obtained, and the target first sample data and the target first sample label data are determined to be a first sample pair, and a first sample pair data set is generated according to each first sample pair.

[0046] Exemplarily, the category divergence threshold can be understood as a value used to evaluate the degree of difference between a sample and its category, and is used to screen out samples with high representativeness. During the training of the model, data samples may come from different categories, and the category divergence is the difference between each sample and its category. By setting a category divergence threshold, the system can determine which samples have a smaller divergence and are more representative of the overall characteristics of the category; on the contrary, samples with larger divergence may contain more heterogeneous information, and because their characteristics are not obvious, they will mislead the model, so they are determined to be noise data.

[0047] In one embodiment provided in this specification, it is necessary to train an image classification model, the categories are "cat" and "dog", and the samples include pictures of various types of cats and dogs. The category divergence threshold can be used here to screen pictures that are more consistent with typical "cat" or "dog" features. A clear, standard cat picture has a lower category divergence, while a blurry or noisy cat picture has a larger divergence. If the divergence is less than a preset threshold, the picture is regarded as a sample that can better represent the "cat" category. If the divergence exceeds the threshold, it may indicate that the sample is either noise data or has some unique features and is not suitable for direct model training.

[0048] Since SSL (Semi-Supervised Learning) is used in the model training process, unlabeled data can also be effectively utilized. By generating pseudo labels or introducing self-supervisory signals, the model can learn more features. Then, by separately determining the sample pair data set and the single sample data set, representative samples are screened out as sample pairs, and unrepresentative samples (noise samples) are used as single sample pairs to train the model, thereby improving the model's performance in a noisy environment.

[0049] Further, training the local model corresponding to the client based on the first sample pair data set and the first single sample data set includes: Acquire an initial local model, and train the initial local model according to the first sample pair data set to acquire a reference local model; locally processing the first single sample data set according to the reference model to generate a single sample data label corresponding to each single sample data in the first single sample data set; The reference local model is trained according to the single sample data labels corresponding to each single sample data to determine the local model.

[0050] In practical applications, the initial local model is a model that is randomly initialized or pre-trained with other data, the reference local model is a model trained with labeled data from the client, and the single sample data label is the predicted label generated after processing the single sample data with the reference local model.

[0051] Exemplarily, the initial local model can be understood as a model that has not been trained in the semi-supervised learning process and is directly loaded from the global model or pre-trained model. As the starting point of training, this model has not yet been exposed to the local data of the client, so its performance and adaptability are relatively weak. The reference local model can be understood as being obtained after training the data set (i.e., containing labeled sample data) using the first sample, and has begun to adapt to the local data of the client to a certain extent. The role of the reference local model is to provide an optimization basis for subsequent training, for example, it can be used to process unlabeled data, generate pseudo labels, or further adjust single sample data. The performance of the reference local model will be more adaptable to the specific client environment than the initial local model, and can capture the category feature information in the data.

[0052] The single sample data label can be understood as the inference result of the model on the unlabeled data, which is used to continue training the reference local model. This process is a key part of semi-supervised learning because it allows the model to use its own prediction results for further optimization in the absence of labeled data. For example, the single sample data label can be used as a pseudo-label to guide the model on how to perform self-supervised learning on unlabeled data, gradually improving the generalization ability of the model.

[0053] It should be noted that obtaining the initial local model can be understood as the process of the client providing a basic model that has not been trained with any local data. The specific method of obtaining the initial local model can be to directly send the global model through the server; it can also be by loading a pre-trained model on a general data set; it can also be initialized by the client's existing model structure, etc., and this manual does not impose any restrictions on this. Generating a single sample data label can be understood as the process of predicting and generating labels for unlabeled data by referring to a local model. The specific method of generating a single sample data label can be to directly infer the label by referring to the local model; it can also be through a classifier to assign categories to unlabeled data; it can also be through a pseudo-label generation mechanism, combined with the prediction confidence to assign temporary labels to samples, etc., and this manual does not impose any restrictions on this.

[0054] Taking into account the problem that less model training data will lead to poor model effect when training the model, before training the initial local model according to the first sample pair data set to obtain the reference local model, the first sample pair data set and the first single sample data set can also be expanded by data expansion means. Furthermore, considering that the data quality in the first single sample data set is relatively low, the expansion methods for the first single sample data set are fewer than those for the first sample pair data set. For example, the first single sample data set can be expanded by basic enhancement methods such as lightweight rotation and scaling, while more diverse expansion methods can be used for the first sample pair data set, such as random cropping, color transformation, and mirror flipping, so as to ensure that the model can fully learn on high-quality samples and improve its generalization ability.

[0055] It should be noted that the method of training the local model corresponding to the client based on the second target sample pair data set and the second target single sample data set has similar technical features and similar technical effects as the above-mentioned training of the local model corresponding to the client based on the first sample pair data set and the first single sample data set, and this specification will not go into details about it.

[0056] By training the model with noisy data and residual data in an unlabeled form, we can make full use of the model's learning ability on unlabeled data, avoid over-reliance on labeled data, and further improve the model's adaptability to complex scenarios. This training method helps the model maintain high robustness when processing noisy data in the real world. At the same time, through the guidance of residual data, the model can more effectively supplement the features that were not learned in the early training, thereby improving the overall generalization performance and prediction accuracy.

[0057] Further, determining whether the global model has reached a model training stop condition includes: Determining global model state information corresponding to the global model; Determine whether the global model has reached a model training stop condition based on the global model status information.

[0058] In practical applications, global model status information is information used to describe various indicators of the current training status and performance of the global model. Global model status information reflects the progress and performance of the global model as data from different clients are aggregated during the training process. Global model status information includes model accuracy, loss value, gradient information, etc., which can help determine whether the model has achieved the expected training effect. For example, in an image classification task, the model's status information may include the classification accuracy and overall error on each client. This information can help the system decide whether to continue training, stop training and use the current model; in the news text classification task, the model's accuracy for sports news is significantly higher than that for technology news. This is part of the global model status information, and the system can use this to decide whether the model needs to be further optimized or adjusted.

[0059] It should be noted that determining the global model status information can be understood as a process of evaluating the performance of the global model through different indicators. The specific method of determining the global model status information can be to evaluate the model performance by calculating the loss value and accuracy of the model on the validation set; it can also be determined by obtaining the local model information sent by each client; it can also be determined by monitoring the gradient update and convergence speed of the model to judge the training progress of the model, etc. This manual does not impose any restrictions on this.

[0060] By determining the global model status information to judge whether the global model has reached the model training stop condition, the model training progress can be tracked and evaluated in real time to ensure that the model is stopped in time when it reaches the expected effect, avoid overtraining, and ensure the adaptability and generalization ability of the model under different client data distributions.

[0061] Further, determining global model state information corresponding to the global model includes: Generate global model state information based on each local model information; or, A global test data set is acquired, and global model state information is generated according to the global test data set.

[0062] In practical applications, the test data set refers to a data set used to evaluate model performance. It does not participate in the model training process, but is used to verify how the model performs on unseen data after training. The test data set should represent the sample distribution in the real environment where the model will be applied, so that the generalization ability of the model can be accurately measured. For example, in a text classification task, the test data set may contain multiple types of text to evaluate whether the model can accurately classify each text into the correct category. By using the test data set, indicators such as the accuracy, precision, and recall of the model can be calculated to help determine the final performance of the model.

[0063] It should be noted that generating global model status information based on each local model information can be understood as a process of obtaining the current state of the global model by aggregating the local model information of multiple clients. The specific method of generating global model status information based on each local model information can be through weighted averaging of the model weights of the clients to generate a new global model; it can also be through analyzing the performance of each local model on the respective client data set and combining these performances to update the global model state; it can also be through monitoring the gradient changes of the local model to infer the convergence of the global model, etc. This manual does not impose any restrictions on this.

[0064] By generating global model status information based on each local model information, the local model performance of different clients can be integrated to fully reflect the training progress and status of the global model under multi-source data distribution. This process can ensure that the global model better adapts to the data characteristics of each client and avoids model deviation or performance imbalance due to differences in data distribution. In addition, by aggregating local model information, it is possible to more efficiently evaluate the convergence of the global model, identify potential optimization directions, and thus improve the accuracy and generalization ability of the global model, ensuring that the model maintains stable and consistent performance in multiple client environments.

[0065] Further, generating a residual sample generation instruction according to the global model includes: Acquire a residual sample generation model according to the global model; A residual sample generation instruction is generated based on the residual sample generation model.

[0066] In practical applications, the residual sample generation model refers to a sample generation model that generates samples for historical rounds of training data based on the performance and error of the global model. Its main purpose is to solve the problem of catastrophic forgetting. In continuous learning or federated learning scenarios, the model tends to forget previously learned knowledge when learning new tasks. The residual sample generation model helps the model maintain its memory of old tasks by generating samples related to historical rounds of training data, thereby avoiding the gradual loss of knowledge. For example, in a multi-task classification scenario, the residual sample generation model can generate training samples related to previous tasks to ensure that the model does not forget the content of old tasks that it has mastered when facing new tasks, and maintain the model's stable performance on all tasks.

[0067] It should be noted that obtaining the residual sample generation model according to the global model can be understood as a process of generating a sample generation model for solving the catastrophic forgetting problem through the performance of the global model. The specific method of obtaining the residual sample generation model according to the global model is to initialize the residual sample generation model to generate simulated historical data samples according to the input noise, use a fixed global model to determine whether these generated samples are close enough to the real historical data, and adjust the parameters of the residual sample generation model according to the degree of closeness of the residual sample generation model generation results; it is also possible to generate residual samples for old tasks by analyzing the performance differences of the global model in new and old tasks; it is also possible to combine the feedback information of the local model and generate residual samples that help retain historical knowledge through interaction with the global model, etc. This manual does not impose any restrictions on this.

[0068] Obtaining residual samples from the global model to generate the model can effectively retain the model's knowledge in historical tasks, reduce the occurrence of catastrophic forgetting, and ensure that the model does not lose its understanding of old tasks when learning new tasks. The generated residual samples can help the model balance the performance of new and old tasks in multiple rounds of training, so that the model can take into account the characteristics of past data during the continuous updating process, and improve the long-term generalization ability and stability of the model. This process can also further optimize the model's ability to process data in a multi-task environment, thereby improving the overall model performance.

[0069] Further, generating a residual sample set based on the residual sample generation instruction includes: Acquire a residual sample generation model according to the residual sample generation instruction; A residual sample set is generated based on the residual sample generation model.

[0070] Exemplarily, the residual sample generation instruction includes model parameters corresponding to the residual sample generation model. Residual sample generation can be understood as an instruction issued by the server based on the state or error of the global model, requiring each client to generate residual samples related to historical data based on its own data. This instruction is used to solve the problem of catastrophic forgetting, and aims to ensure that the client can generate appropriate samples to help the model retain knowledge from past tasks. For example, in federated learning, each client may have a different data distribution. The residual sample generation instruction will guide each client to generate a set of residual samples that best suits its own data characteristics, helping the global model to maintain stability and consistency when facing different clients.

[0071] It should be noted that generating a residual sample set based on a residual sample generation model can be understood as a process in which each client generates samples that help retain historical knowledge through a model obtained based on instructions. The specific method of generating a residual sample set based on a residual sample generation model is that each client generates the same residual sample generation model and combines it with its own historical data or current task data to generate residual samples that best reflect the characteristics of the client data; it can also generate different residual sample sets by analyzing the error between the client's local model and the global model to ensure that the global model can effectively learn for different client data distributions; it can also dynamically adjust the generated residual samples in combination with client data changes to help the model maintain long-term memory and generalization capabilities for different tasks, and this manual does not impose any restrictions on this.

[0072] Generating a residual sample set through the residual sample generation model can help the model effectively deal with the problem of catastrophic forgetting during training, ensuring that the model does not forget previously learned knowledge when learning new tasks. Different clients can generate their own adaptive residual samples based on the same generation instructions and their own local data characteristics, thereby enhancing the diversity and adaptability of the global model. This not only improves the generalization ability of the model under different data distributions, but also makes the global model more robust to the local data differences of each client, thereby optimizing the overall model performance and stability.

[0073] By applying the scheme of the embodiments of this specification, sample data is screened through category divergence information, which effectively reduces the negative impact of noise samples on model training and enhances the robustness and generalization ability of the model. The client performs training locally and collaborates with the server based on the generated local model information to ensure that the global model is continuously optimized in multiple rounds of training. When the global model does not meet the preset training stop condition, the server generates a residual sample generation instruction to guide each client to generate a residual sample set, further improving the expressiveness of the model in a noisy environment, and, combined with the multi-round update mechanism of the residual sample and the second sample data, the client continuously optimizes the local model to improve the model's incremental learning performance and avoid knowledge forgetting, thereby achieving more robust global model training.

[0074] The federated continuous learning system may include multiple clients 100 and a server 200, wherein the client 100 may be referred to as a terminal device and the server 200 may be referred to as a cloud device. Multiple clients 100 may establish a communication connection through the server 200. In the federated continuous learning scenario, the server 200 is used to provide a federated continuous learning service between multiple clients 100. Multiple clients 100 may serve as a sender or a receiver, respectively, and achieve communication through the server 200.

[0075] The user can interact with the server 200 through the client 100 to receive data sent by other clients 100, or send data to other clients 100, etc. In the federated continuous learning scenario, the user can publish a data stream including local model information to the server 200 through the client 100, and the server 200 generates a target model based on the data stream and pushes the target model information to other clients that have established communication.

[0076] The client 100 and the server 200 are connected via a network. The network provides a medium for a communication link between the client 100 and the server 200. The network may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The data transmitted by the client 100 may need to be encoded, transcoded, compressed, etc. before being published to the server 200.

[0077] The client 100 can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language Version 5) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client 100 can be based on the software development kit (SDK, Software Development Kit) of the corresponding service provided by the server 200, such as based on the real-time communication (RTC, Real Time Communication) SDK development and acquisition. The client 100 can be deployed in an electronic device and needs to rely on the device to run or some APPs in the device to run. For example, the electronic device can have a display screen and support information browsing, such as a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications can also be configured in the electronic device, such as human-computer dialogue applications, model training applications, text processing applications, web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0078] The server 200 may include servers that provide various services, such as servers that provide communication services to multiple clients, servers for background training that provide support for models used on the client, and servers that process data sent by the client. It should be noted that the server 200 can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server combined with a blockchain. The server can also be a cloud server for basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDN, Content Delivery Network), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0079] See also Figure 2 , Figure 2 A flowchart of a federated continuous learning method applied to a client provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0080] Step 202: Acquire a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data.

[0081] Step 204: Obtain first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold.

[0082] Step 206: training a local model corresponding to the client based on the first sample pair data set and the first single sample data set.

[0083] Step 208: Generate local model information according to the local model, and send the local model information to the server.

[0084] Further, obtaining the first category divergence information corresponding to each first sample data includes: Acquire a data category feature extraction model according to the first sample data set; Process each first sample data according to the data category feature extraction model to obtain first category feature information corresponding to each first sample data; The first category dispersion information corresponding to each first sample data is determined according to the first category feature information corresponding to each first sample data.

[0085] Considering that the sample data will be updated in the subsequent rounds of model training, after sending the local model information to the server, the method further includes: receiving the residual sample generation instruction, and generating a residual sample set based on the residual sample generation instruction; acquiring a second sample data set, wherein the second sample data set includes at least one second sample data; Determine the second category divergence information corresponding to each second sample data, and determine the second initial sample pair data set and the second initial single sample data set according to each second category divergence information and the category divergence threshold; Generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set and the second initial single sample data set; Training a local model based on the second target sample pair data set and the second target single sample data set, and generating local model information according to local model parameters of the local model; The local model information is sent to a server.

[0086] Further, generating a residual sample set based on the residual sample generation instruction includes: Acquire a residual sample generation model according to the residual sample generation instruction; A residual sample set is generated based on the residual sample generation model.

[0087] The above is an illustrative solution of a federated continuous learning method applied to a client in this embodiment. It should be noted that the technical solution of the federated continuous learning method applied to the client and the technical solution of the above-mentioned federated continuous learning system belong to the same concept, and the details of the technical solution of the federated continuous learning method applied to the client that are not described in detail can be found in the description of the technical solution of the above-mentioned federated continuous learning system.

[0088] By applying the solution of the embodiments of this specification, by combining the category divergence information to filter the sample data, the client can effectively reduce the interference of noise samples on model training and enhance the robustness and generalization ability of the local model. At the same time, when the client generates residual samples and combines the second sample data set for multiple rounds of local model optimization, the performance of the model in class incremental learning is improved, and the problem of knowledge forgetting is gradually alleviated, thereby ensuring that the client model can continuously improve the training effect on local data and adapt to data changes.

[0089] See also Figure 3 , Figure 3 A flowchart of a federated continuous learning method applied to a server provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0090] Step 302: receiving local model information sent by each client, and acquiring a global model based on each local model information.

[0091] Step 304: Determine whether the global model has reached the model training stop condition, if not, execute step 306, if yes, execute step 308.

[0092] Step 306: Generate a residual sample generation instruction according to the global model, and send the residual sample generation instruction to each client.

[0093] Step 308: Determine the global model as the target model.

[0094] Further, generating a residual sample generation instruction according to the global model includes: Acquire a residual sample generation model according to the global model; A residual sample generation instruction is generated based on the residual sample generation model.

[0095] The above is a schematic scheme of a federated continuous learning method applied to a server in this embodiment. It should be noted that the technical scheme of the federated continuous learning method applied to the server and the technical scheme of the above-mentioned federated continuous learning system belong to the same concept, and the details of the technical scheme of the federated continuous learning method applied to the server that are not described in detail can all be referred to the description of the technical scheme of the above-mentioned federated continuous learning system.

[0096] By applying the solution of the embodiments of this specification, the server continuously optimizes the global model by receiving and aggregating the local model information of each client. When the global model does not reach the preset training stop condition, the server generates and issues a residual sample generation instruction to guide the client to generate a residual sample set, further making up for the deficiencies of the model under different client data distributions, improving the robustness and generalization ability of the global model, and ensuring that the global model can continue to learn in a multi-client environment and achieve higher accuracy.

[0097] The following combination Figure 4 Taking the application of the federated continuous learning system provided in this specification in multi-client image processing as an example, the federated continuous learning system is further described. Figure 4 A processing flow chart of a multi-client image processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0098] Step 402: Each client obtains a first image data set including at least one first image data and a category divergence threshold.

[0099] Step 404: The client extracts feature information of each image data from the first image data set, and calculates first category divergence information corresponding to each image data.

[0100] Step 406: The client selects high-quality samples as the first sample pair data set and uses the noise samples as the first single sample data set according to the category divergence information and the category divergence threshold of each image data.

[0101] Step 408: The client performs local model training based on the first sample pair data set and the first single sample data set to generate a local model.

[0102] Step 410: The client extracts model parameters and update information from the local model, and generates model weights and gradients as well as local model information of model parameters.

[0103] Step 412: The client sends the local model information to the server.

[0104] Step 414: The server performs a federated aggregation operation based on the local model information sent by each client, and integrates the model parameters of each client into the global model of this round of training.

[0105] Step 416: The server determines whether the global model reaches the preset training stop condition, if not, execute step 418, if yes, execute step 430.

[0106] Step 418: The server trains a residual sample generation model according to the current global model, generates a residual sample generation instruction according to the residual sample generation model, and sends it to each client.

[0107] Step 420: The client receives the residual sample generation instruction, combines the local image data and the generation instruction, and generates a residual sample set.

[0108] Step 422: The client obtains a second sample data set including at least one second sample data, and generates category divergence information corresponding to each second sample data.

[0109] Step 424: The client selects high-quality samples as the second initial sample pair data set according to the category divergence information and the category divergence threshold of each second sample data, and selects the noise samples as the second single sample data set.

[0110] Step 426: The client combines the second initial sample pair data set and the residual sample set to generate a second target sample pair data set.

[0111] Step 428: The client retrains the local model based on the second target sample pair data set and the second single sample data set, optimizes the local model parameters, and returns to execute step 410.

[0112] Step 430: Determine the global model as the target model, and perform image processing through the target model.

[0113] The solution of the embodiment of this specification can effectively realize federated continuous learning in a multi-client environment. By introducing the category divergence screening mechanism and residual sample generation instructions, the generalization ability of the model is enhanced in the noise sample and class incremental learning scenarios, knowledge forgetting is reduced, and the performance of the global model in image processing tasks is improved. At the same time, the residual sample generation mechanism can correct the error part of the global model to further improve the accuracy and robustness of the model.

[0114] Corresponding to the above method embodiment, this specification also provides a federated continuous learning device embodiment applied to a client. Figure 5 FIG. 1 shows a schematic diagram of a structure of a federated continuous learning device applied to a client provided by an embodiment of the present specification. Figure 5 As shown, the device comprises: A first acquisition module 502 is configured to acquire a first sample data set and a class divergence threshold, wherein the first sample data set includes at least one first sample data; The first screening module 504 is configured to obtain the first category divergence information corresponding to each first sample data, and determine the first sample pair data set and the first single sample data set according to each first category divergence information and the category divergence threshold; A first local training module 506 is configured to train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; The first sending module 508 is configured to generate local model information according to the local model, and send the local model information to the server.

[0115] Optionally, the first screening module 504 is further configured to: Acquire a data category feature extraction model according to the first sample data set; Process each first sample data according to the data category feature extraction model to obtain first category feature information corresponding to each first sample data; The first category dispersion information corresponding to each first sample data is determined according to the first category feature information corresponding to each first sample data.

[0116] Optionally, the federated continuous learning device applied to the client further includes: A second acquisition module is configured to receive the residual sample generation instruction, and generate a residual sample set based on the residual sample generation instruction; acquire a second sample data set, wherein the second sample data set includes at least one second sample data; A second screening module is configured to determine second category divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set according to each second category divergence information and the category divergence threshold; A second combining module is configured to combine the residual sample set, the second initial sample pair data set and the second initial single sample data set to generate a second target sample pair data set and a second target single sample data set; A second local training module is configured to train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information according to local model parameters of the local model; The second sending module is configured to send the local model information to the server.

[0117] Optionally, the second acquisition module is further configured to: Acquire a residual sample generation model according to the residual sample generation instruction; A residual sample set is generated based on the residual sample generation model.

[0118] The above is a schematic scheme of a federated continuous learning device applied to a client in this embodiment. It should be noted that the technical scheme of the federated continuous learning device applied to a client and the technical scheme of the federated continuous learning method applied to a client are of the same concept, and the details not described in detail in the technical scheme of the federated continuous learning device applied to a client can be found in the description of the technical scheme of the federated continuous learning method applied to a client.

[0119] The solution of the embodiment of this specification is applied, and the negative impact of noise samples on local model training is effectively reduced through the screening module for category divergence information, which significantly improves the robustness and generalization ability of the model. The local training module in the device combines the screened high-quality samples to optimize the model, ensuring that the client continues to improve the model performance during multiple rounds of training. At the same time, the residual sample generation module in the device is combined with the second sample data to gradually enhance the performance of the model in the class incremental learning task, alleviate the problem of knowledge forgetting, and enable the client to maintain a high learning ability and accuracy when facing new categories.

[0120] Corresponding to the above method embodiment, this specification also provides a federated continuous learning device embodiment applied to a server, Figure 6 FIG. 1 shows a schematic diagram of a structure of a federated continuous learning device applied to a server provided by an embodiment of the present specification. Figure 6 As shown, the device comprises: The receiving module 602 is configured to receive the local model information sent by each client, and obtain the global model based on each local model information; A judging module 604 is configured to judge whether the global model reaches the model training stop condition, if not, execute sending 606, if yes, execute determining module 608; A sending module 606 is configured to generate a residual sample generation instruction according to the global model, and send the residual sample generation instruction to each client; The determination module 608 is configured to determine the global model as the target model.

[0121] Optionally, the sending module 606 is further configured to: Acquire a residual sample generation model according to the global model; A residual sample generation instruction is generated based on the residual sample generation model.

[0122] The above is a schematic scheme of a federated continuous learning device applied to a server in this embodiment. It should be noted that the technical scheme of the federated continuous learning device applied to a server and the technical scheme of the federated continuous learning method applied to a server are of the same concept, and the details not described in detail in the technical scheme of the federated continuous learning device applied to a server can be found in the description of the technical scheme of the federated continuous learning method applied to a server.

[0123] By applying the solution of the embodiments of this specification, efficient global model aggregation is performed by receiving local model information sent by the client, ensuring the optimization of the global model in a multi-client environment. The judgment module timely evaluates the training status of the global model, and guides each client to generate a residual sample set through a sending module that generates residual sample instructions, further corrects the error of the global model according to the data distribution of different clients, and improves the robustness and generalization ability of the model. The judgment module in the device effectively supports quasi-incremental learning tasks, ensures that the global model is continuously optimized in multiple rounds of learning, avoids knowledge forgetting, and ultimately achieves high-precision and high-adaptability global model training.

[0124] Figure 7 The block diagram of a computing device 700 according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0125] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).

[0126] In one embodiment of the present specification, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0127] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.

[0128] The processor 720 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned federated continuous learning method applied to the client and the above-mentioned federated continuous learning method applied to the server.

[0129] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server.

[0130] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned federated continuous learning method applied to a client and the above-mentioned federated continuous learning method applied to a server.

[0131] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server.

[0132] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned federated continuous learning method applied to a client and the above-mentioned federated continuous learning method applied to a server.

[0133] The above is a schematic scheme of a computer program of this embodiment. It should be noted that the technical scheme of the computer program and the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server belong to the same concept, and the details not described in detail in the technical scheme of the computer program can be referred to the description of the technical scheme of the above-mentioned federated continuous learning method applied to the client and the technical scheme of the above-mentioned federated continuous learning method applied to the server.

[0134] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0135] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0136] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A federated continuous learning system, characterized in that: The system comprises a server and at least one client; Each client is configured to obtain a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; obtain first category divergence information corresponding to each first sample data, and determine a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold; train a local model corresponding to the client based on the first sample pair data set and the first single sample data set; generate local model information according to the local model, and send the local model information to a server; The server is configured to receive local model information sent by each client, and obtain a global model based on each local model information; determine whether the global model meets the model training stop condition; if not, generate a residual sample generation instruction according to the global model, and send the residual sample generation instruction to each client; if yes, determine that the global model is the target model; Each client is also configured to receive the residual sample generation instruction, and generate a residual sample set based on the residual sample generation instruction; obtain a second sample data set, wherein the second sample data set includes at least one second sample data; determine the second category divergence information corresponding to each second sample data, and determine a second initial sample pair data set and a second initial single sample data set based on each second category divergence information and the category divergence threshold; generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set and the second initial single sample data set; train a local model based on the second target sample pair data set and the second target single sample data set, and generate local model information based on the local model parameters of the local model; and send the local model information to the server.

2. The system according to claim 1, characterized in that Obtaining first category divergence information corresponding to each first sample data includes: Acquire a data category feature extraction model according to the first sample data set; Process each first sample data according to the data category feature extraction model to obtain first category feature information corresponding to each first sample data; The first category dispersion information corresponding to each first sample data is determined according to the first category feature information corresponding to each first sample data.

3. The system according to claim 1, characterized in that Determining a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold includes: Determine target first sample data, wherein the target first sample data is any one of the first sample data; Determine whether the first category dispersion information corresponding to the first sample data is greater than the category dispersion threshold; If yes, determining that the target first sample data is the first single sample data, and generating a first sample data set according to each first single sample data; If not, the target first sample label data corresponding to the target first sample data is obtained, and the target first sample data and the target first sample label data are determined to be a first sample pair, and a first sample pair data set is generated according to each first sample pair.

4. The system according to claim 1, characterized in that Training the local model corresponding to the client based on the first sample pair data set and the first single sample data set includes: Acquire an initial local model, and train the initial local model according to the first sample pair data set to acquire a reference local model; locally processing the first single sample data set according to the reference model to generate a single sample data label corresponding to each single sample data in the first single sample data set; The reference local model is trained according to the single sample data labels corresponding to each single sample data to determine the local model.

5. The system according to claim 1, wherein: Determining whether the global model has reached a model training stop condition includes: Determining global model state information corresponding to the global model; Determine whether the global model has reached a model training stop condition based on the global model status information.

6. The system according to claim 5, characterized in that Determining global model state information corresponding to the global model includes: Generate global model state information based on each local model information; or, A global test data set is acquired, and global model state information is generated according to the global test data set.

7. The system according to claim 1, characterized in that Generating a residual sample generation instruction according to the global model includes: Acquire a residual sample generation model according to the global model; A residual sample generation instruction is generated based on the residual sample generation model.

8. The system of claim 1, wherein: Generating a residual sample set based on the residual sample generation instruction includes: Acquire a residual sample generation model according to the residual sample generation instruction; A residual sample set is generated based on the residual sample generation model.

9. A federated continuous learning method, characterized in that: Applied to the client, including: Acquire a first sample data set and a category divergence threshold, wherein the first sample data set includes at least one first sample data; Obtaining first category divergence information corresponding to each first sample data, and determining a first sample pair data set and a first single sample data set according to each first category divergence information and the category divergence threshold; Training a local model corresponding to the client based on the first sample pair data set and the first single sample data set; Local model information is generated according to the local model, and the local model information is sent to a server.

10. The method according to claim 9, characterized in that Obtaining first category divergence information corresponding to each first sample data includes: Acquire a data category feature extraction model according to the first sample data set; Process each first sample data according to the data category feature extraction model to obtain first category feature information corresponding to each first sample data; The first category dispersion information corresponding to each first sample data is determined according to the first category feature information corresponding to each first sample data.

11. The method according to claim 9, characterized in that After sending the local model information to the server, the method further includes: receiving the residual sample generation instruction, and generating a residual sample set based on the residual sample generation instruction; acquiring a second sample data set, wherein the second sample data set includes at least one second sample data; Determine the second category divergence information corresponding to each second sample data, and determine the second initial sample pair data set and the second initial single sample data set according to each second category divergence information and the category divergence threshold; Generate a second target sample pair data set and a second target single sample data set by combining the residual sample set, the second initial sample pair data set and the second initial single sample data set; Training a local model based on the second target sample pair data set and the second target single sample data set, and generating local model information according to local model parameters of the local model; The local model information is sent to a server.

12. The method according to claim 11, characterized in that Generating a residual sample set based on the residual sample generation instruction includes: Acquire a residual sample generation model according to the residual sample generation instruction; A residual sample set is generated based on the residual sample generation model.

13. A federated continuous learning method, characterized in that: Applicable to servers, including: Receive local model information sent by each client, and obtain the global model based on each local model information; Determine whether the global model reaches the model training stop condition; If not, generating a residual sample generation instruction according to the global model, and sending the residual sample generation instruction to each client; If so, the global model is determined to be the target model.

14. The method according to claim 13, characterized in that Generating a residual sample generation instruction according to the global model includes: Acquire a residual sample generation model according to the global model; A residual sample generation instruction is generated based on the residual sample generation model.

15. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 9 to 14 are implemented.

16. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 9 to 14 are implemented.

17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 9 to 14 are implemented.

Citation Information

Patent Citations

  • Federal learning method based on generative model and deep transfer learning

    CN115860116A

  • Lightweight trusted federal learning method in edge scene

    CN116187482A

  • Label noise robust federated learning method based on self-paced learning and adjacent matrix

    CN116911379A

  • Systems and methods for distributed learning for wireless edge dynamics

    US20230068386A1