Edge end participating in cloud-edge federated learning, control method and cloud-edge federated learning system
By selectively performing model updates or data cleanup operations on edge devices, the problems of edge storage pressure and data forgetting are solved, improving the model performance and data selection efficiency of cloud-edge federated learning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-28
- Publication Date
- 2026-03-10
AI Technical Summary
In a cloud-edge converged architecture, edge devices have limited storage space, making it difficult to store large amounts of streaming data, which leads to data forgetting issues, and traditional methods may delete important historical data.
The operation mode is selected based on whether federated learning is involved, by performing model update operations or data cleanup operations on edge devices. Model update operations include acquiring the global model and gradients for training, and uploading the updated model and gradients; data cleanup operations include filtering and deleting low-quality samples, retaining high-quality samples, and evaluating sample importance through gradient projection and similarity.
It effectively alleviates storage pressure at the edge, prevents data loss, improves model performance, optimizes data selection under limited storage space, and enhances the overall performance of cloud-edge federated learning.
Smart Images

Figure CN121644601A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field related to edge computing, and more particularly, relates to an edge terminal participating in cloud-edge federated learning and a control method, and a cloud-edge federated learning system. BACKGROUND
[0002] With the rapid development of the Internet of Things and 5G technology, the real-time processing demand of a large amount of data is increasing, and traditional cloud computing is difficult to meet the optimization of data processing efficiency and the reduction of delay. The cloud-edge fusion system pushes data processing to edge devices to realize dynamic scheduling and collaborative optimization of resources, and meets the requirements of low delay, bandwidth optimization and privacy security protection.
[0003] In the storage and computing architecture of cloud-edge fusion, for the federated learning scene of stream data, such as Internet of Vehicles, financial data, video monitoring and other clients, the local data is constantly increasing, and the storage space of the edge device is limited, so it is difficult to realize the storage of stream data with large data volume. In order to alleviate the storage pressure of the edge device, the historical data is usually deleted, but in the application scenarios such as intelligent driving, robot control and human-computer interaction which require long-term accumulation of model knowledge, deleting historical data will significantly forget the learned task knowledge, causing the problem of data forgetting.
[0004] Therefore, in the cloud-edge fusion architecture, how to alleviate the storage pressure of the edge terminal device and at the same time avoid data forgetting is a technical problem to be solved at present. SUMMARY
[0005] In view of the above defects or improvement needs of the prior art, the present application provides an edge terminal participating in cloud-edge federated learning and a control method, and a cloud-edge federated learning system, which aims to alleviate the storage pressure of the edge terminal device and at the same time avoid data forgetting in the cloud-edge fusion architecture.
[0006] To achieve the above purpose, the following technical solutions are proposed.
[0007] According to a first aspect of the present application, a control processing method of an edge terminal participating in cloud-edge federated learning is provided, comprising: selecting to perform corresponding operation according to whether the edge terminal participates in this round of federated learning; If the edge terminal participates in this round of federated learning, a model updating operation is performed, comprising: obtaining a global model and a global estimated gradient , using old samples to update the global model Training is performed to obtain an updated local model g and the gradient of each old sample is updated to the gradient of each old sample on the updated local model g, the updated local model g and the updated local estimated gradient are uploaded to the center server for aggregation, and the local estimated gradient is reset to the initial gradient; wherein the old sample is a sample in the local data set; If the edge end does not participate in the current round of federated learning, a data sorting operation is performed, including: periodically screening the samples to be recycled based on a screening mechanism, the screening mechanism including: periodically adding new samples to the data set, and calculating the gradient of each new sample The gradient on the latest obtained local model g Based on the gradient Update the local estimated gradient n is the new sample index, The nth new sample after updating the local estimated gradient is reset, n=1, When n>1, Compare the gradient projection of each sample gradient in the data set on the latest obtained global estimated gradient The sample with the smallest gradient projection is removed from the data set and placed in the recycling area; when the sample data in the recycling area reaches the preset upper limit, compare the data importance of each recycling sample and delete the sample with the lowest importance from the local, if the data importance of the recycling sample increases, it is removed from the recycling area and re-placed in the data set, and the data importance of each sample is the weighted sum of the gradient projection of the sample and the similarity between the sample gradient and the global estimated gradient .
[0008] According to the second aspect of the application, an edge end device participating in cloud edge federated learning is provided, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0009] According to the third aspect of the application, a cloud edge federated learning system is provided, comprising a center server and an edge end device; the center server is used to aggregate the local model uploaded by each edge end participating in the federated learning in the last round to obtain a global model and aggregate the local estimated gradient uploaded by each edge end participating in the federated learning in the last round to obtain a global estimated gradient , and the global model and the global estimated gradient are sent to the edge end participating in the federated learning in the current round; The edge device is the edge device described above, used to select and execute corresponding operations based on whether the edge device participates in this round of federated learning. If the edge device participates in this round of federated learning, a model update operation is performed; if the edge device does not participate in this round of federated learning, a data processing operation is performed.
[0010] In summary, compared with the prior art, the technical solutions conceived in this invention have the following main advantages: The method provided by this invention selects and executes corresponding operations at the edge based on whether it participates in the current round of federated learning. If the edge participates, a model update operation is performed; if it does not participate, a data preparation operation is performed. During data preparation, the gradient projection of the sample gradient onto the global estimated gradient is used as an evaluation metric to filter out samples to be recycled. This allows for the selection of high-quality data samples that are more conducive to model training and retain them in the local training dataset. Low-quality samples with small projection values (i.e., a large difference between the sample gradient direction and the model update direction), or samples that have already been sufficiently trained, are placed in the recycling region. For samples in the recycling region, the gradient projection of the sample and the sample gradient versus the global estimated gradient are compared. The weighted sum of similarities is used as an evaluation metric for sample importance. This allows for a reasonable assessment of the impact of each data sample in the recycling region on the current model update. Data samples whose gradient direction aligns with the current model update direction—that is, those more beneficial to model training—are retained, while samples with low contribution to model training are deleted to alleviate storage pressure at the edge. Furthermore, by reintegrating data with increased importance into the local training dataset, these forgotten data samples can be reintegrated into the model's training. This allows the model to continue training on previously trained but now forgotten high-quality samples, thus mitigating the problem of data forgetting in the model. In summary, the method provided by this invention can perform online data selection and solve the data forgetting problem in streaming data federated learning scenarios under cloud-edge fusion systems, under the premise of limited storage space on edge clients. This effectively improves the model performance of cloud-edge federated learning and reduces the storage burden at the edge. Attached Figure Description
[0011] Figure 1 This is a flowchart of the steps of the edge manipulation processing method participating in cloud-edge federated learning in one embodiment of the present invention; Figure 2 This is an architecture diagram of a cloud-edge federated learning system according to an embodiment of the present invention. Detailed Implementation
[0012] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. In addition, the technical features involved in the various embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0013] In a first aspect, the present application claims a method for edge-side operation and processing in cloud-edge federated learning.
[0014] As shown in the method for edge-side operation and processing in cloud-edge federated learning, the following will be described in detail. Figure 1 The steps of the method for edge-side operation and processing in cloud-edge federated learning in an embodiment of the present application are shown in the flowchart below, and the method will be described in detail below. Figure 1
[0015] According to whether the edge side participates in this round of federated learning, the corresponding operation is selected to be executed. If the edge side participates in this round of federated learning, the model updating operation is executed. If the edge side does not participate in this round of federated learning, the data arrangement operation is executed.
[0016] Specifically, since federated learning requires the participation of multiple edge sides, considering that the edge side may not be able to participate in each training due to its own reasons, two operation modes are designed, corresponding to the two cases of participating in training and not participating in training. When participating in training is selected, the model updating operation is executed. When not participating in training is selected, the data arrangement operation is executed.
[0017] The model updating operation includes: obtaining the global model and the global estimated gradient issued by the center server, training the global model using old samples to obtain an updated local model g and updating the gradient of each old sample to the gradient of each old sample on the updated local model g, uploading the updated local model g and the updated local estimated gradient to the center server for aggregation, and resetting the local estimated gradient to 0; wherein the old sample is a sample in the local data set. The sample may be, for example, streaming data such as video frames.
[0018] Specifically, the global model issued by the center server is obtained by the center server aggregating the local model g uploaded by each edge side participating in the training in the last round of training, and the global estimated gradient issued by the center server is obtained by the center server aggregating the local estimated gradient uploaded by each edge side participating in the training in the last round of training.
[0019] Specifically, since the edge end will continuously collect new samples, when the edge end needs to participate in training, the newly collected samples (new samples) are temporarily not used to train the model during this period, and only the samples that have already performed data arrangement and are placed in the local dataset are used to train the model. The new samples are temporarily stored and wait until the edge end does not participate in training to perform the data arrangement operation.
[0020] Specifically, after obtaining the global model , the local old samples can be used to train it to obtain an updated local model g, and the specific training method is not limited here. During the training of the updated local model g using the old samples, the gradient of each old sample on the updated local model g can be obtained simultaneously. The gradient of the sample on the model refers to the partial derivative of the model parameter to the loss function of a single sample, which is used to guide the parameter update to minimize the loss. Therefore, the gradient of each old sample can be updated simultaneously during the training.
[0021] Subsequently, the updated local model g and the updated local estimated gradient are uploaded to the center server for aggregation, and the local estimated gradient is reset to 0. Among them, the updated local estimated gradient is the local estimated gradient updated by the edge end during the last time when it does not participate in training , which needs to be uploaded to the center server when the edge end participates in training, and the local estimated gradient is reset to the initial gradient immediately, as the initial value for updating the local estimated gradient next time. In specific embodiments, the local estimated gradient is reset to the initial gradient, specifically: the local estimated gradient is reset to 0.
[0022] Performing a data arrangement operation, including: periodically screening the samples to be recycled based on a screening mechanism, the screening mechanism including: periodically adding new samples to the dataset, and calculating the gradient of each new sample on the latest obtained local model g , updating the local estimated gradient based on the gradient , n is the new sample index, , the nth new sample after the local estimated gradient is reset, n = 1, , when n > 1, , comparing the gradient of each sample in the dataset on the local latest obtained global estimated gradient The gradient projection is used to select the sample with the smallest gradient projection as the sample to be recycled and remove it from the dataset and place it in the recycling area. When the sample data in the recycling area reaches a preset upper limit, the data importance of each sample to be recycled is compared and the sample with the lowest importance is deleted from the local dataset. If the data importance of a sample to be recycled increases, it is removed from the recycling area and put back into the dataset. The data importance of each sample is the gradient projection of the sample, the sample gradient, and the globally estimated gradient. The result is obtained by weighted summation of the similarities.
[0023] Specifically, considering the limited storage space at the edge, and the continuous collection of new samples at the edge, making it difficult to store all samples, the purpose of data cleanup is to delete less important samples.
[0024] First, a periodic screening mechanism is used to select samples for reclaiming. This mechanism involves adding new samples to the local dataset and then filtering out those to be reclaimed. Specifically, this periodic screening can be performed at regular intervals or after a certain number of new samples have been acquired.
[0025] 1) Determine the gradient of each sample in the dataset on the latest local model g.
[0026] For old samples, the gradient of the old samples has been updated synchronously when the latest local model g was obtained in the most recent training. Therefore, when performing data cleanup, it is not necessary to recalculate the gradient of the old samples. It is only necessary to calculate the gradient of the new samples on the latest local model g. The new samples are those that did not participate in the local model training.
[0027] For the nth new sample Calculate its gradient on the latest obtained local model g. Based on gradient Update the local estimated gradient When n=1, When n > 1, Therefore, during the data preparation phase, the local estimated gradient is continuously updated based on new samples until the edge needs to participate in federated learning, at which point the update ends, yielding the updated local estimated gradient. During the federated learning phase, the data is uploaded to the central server for aggregation, and the local estimated gradient is reset to 0, which will serve as the initial value for updating the local estimated gradient when the next data processing operation is performed.
[0028] 2) After obtaining the gradients of each sample in the local dataset on the latest local model g, compare the gradients of each sample with the latest globally estimated gradient obtained locally. Gradient projection on For example, sort each sample in the data set based on the size of its gradient projection, mark the sample with the smallest gradient projection in the local data set as the sample to be recycled and remove it from the local data set and move it to the recycling area. Wherein, the latest global estimated gradient is the global estimated gradient issued by the center server when the training is performed last time. The gradient projection of the sample gradient on the global estimated gradient is used as an evaluation index to screen the sample to be recycled. Since the larger the projection value, the more consistent the gradient direction of the data sample with the model update direction, and the larger the gradient value, the more beneficial the sample is to the model update, so high-quality data samples that are more beneficial to the model training can be screened out and left in the local training data set, and low-quality samples with small projection values, that is, samples with large differences between the sample gradient direction and the model update direction, or samples that have been fully trained, are put into the recycling area.
[0029] In an embodiment, the sample with the smallest gradient projection is removed from the data set and put into the recycling area. The number of samples to be recycled each time can be flexibly adjusted, and one or more samples can be selected each time.
[0030] Secondly, it is judged whether the sample data in the recycling area reaches the preset upper limit. If the upper limit is reached, a deletion operation is performed to relieve the local storage pressure.
[0031] 1) Determine the data importance of each sample in the recycling area.
[0032] The data importance of each sample is the weighted sum of the gradient projection of the sample and the similarity between the sample gradient of the sample and the global estimated gradient In the present application, the result of the weighted sum of the gradient projection of the sample and the similarity between the sample gradient of the sample and the global estimated gradient is used as an evaluation index of the sample importance. Since in the process of step-by-step training, the projection value of the data that is once beneficial to the model update will gradually decrease, if the projection value is still used as a single evaluation standard for the data sample at this time, the data sample with small projection value will be deleted in the recycling area, which may cause the problem of data forgetting, that is, the model will forget the data that has been fully trained. The weighted sum of the similarity between the sample gradient and the global gradient estimator can consider the update direction of the old sample, so that the importance of the sample consistent with the model update direction is higher, and thus the influence of each data sample in the recycling area on the current model update can be reasonably evaluated, the data sample with the gradient direction consistent with the current model update direction, that is, the data sample more beneficial to the model training, is retained, and the sample with low contribution to the model training is deleted.
[0033] In an embodiment, the data importance of the sample x is calculated as follows: wherein represents the gradient of the sample x on the latest obtained local model g, is the latest obtained global estimation gradient , represents the projection of the gradient on the gradient , represents the cosine similarity of the calculated gradient and the gradient , is a set weight coefficient.
[0034] For the samples in the recycling area that have already calculated the latest data importance, there is no need to repeat the calculation.
[0035] For the samples in the recycling area that have not calculated the latest data importance, it is necessary to recalculate. The samples that have not calculated the latest data importance are divided into two categories: One category is newly added samples. This category of samples has never calculated the data importance. For this category of samples, the data importance needs to be calculated according to the gradient projection and the latest global estimation gradient ; The other category is samples that have calculated the data importance based on the projection gradient and the old global estimation gradient . Since the projection gradient and the global estimation gradient of the sample in this round are updated, the data importance of the sample may also change, so it is necessary to recalculate the data importance. For example, the edge end does not participate in federated learning in the third round, participates in federated learning in the fourth round, and does not participate in federated learning in the fifth round. In the third round, a recycling sample has calculated the importance. Since the local model g of the edge end and the global estimation gradient are updated in the fourth round, the data importance of the sample will change in the fifth round, so it is necessary to recalculate the importance of the sample.
[0036] 2) Based on the data importance, delete unimportant recycling samples.
[0037] After obtaining the latest data importance of each sample in the recycling area, identify unimportant samples based on the data importance and delete them completely from the local, for example, sort each recycling sample in the recycling area based on the importance of the sample, and delete one or more recycling samples with the lowest importance from the local completely to relieve the local storage pressure.
[0038] 3) Based on the change of data importance, the sample with increased importance is removed from the recycling area and added to the local data set.
[0039] For the old sample in the recycling area, if its data importance is improved compared with its last data importance, it is removed from the recycling area and added to the local data set as a training sample for the next local model training. In the present application, since the importance is the weighted sum of the gradient projection of the sample and the similarity of the sample gradient of the sample and the global estimated gradient When the importance of the sample increases, it indicates that the latest update direction of the model is different from the gradient direction of the sample, and at this time, the data forgetting problem occurs. Putting the data with increased importance back into the local training data set can make the forgotten data samples participate in the model training again, so that the model can continue to train the high-quality samples that have been trained but forgotten, thereby alleviating the model data forgetting problem.
[0040] In a second aspect, the present application also relates to an edge device participating in cloud-edge federated learning.
[0041] The device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0042] The device can be a desktop computer, a notebook, a palm computer, etc. The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The memory can be used to store computer programs and / or modules, and the processor realizes various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory.
[0043] In a third aspect, the present application also relates to a cloud-edge federated learning system.
[0044] As Figure 2 shown is an architecture diagram of the cloud-edge federated learning system in an embodiment of the present application, which includes a center server and an edge device.
[0045] The central server is used to aggregate the local models uploaded by each edge device that participated in the previous round of federated learning to obtain a global model in each round of federated learning. The global estimated gradient is obtained by aggregating the local estimated gradients uploaded by each edge node participating in the previous round of federated learning. and the global model and global gradient estimation It will be distributed to the edge devices participating in the current round of federated learning.
[0046] Specifically, at the beginning of each training round, the central server aggregates all local gradients and local gradient estimators collected in the previous training round to obtain the global gradient G and the global gradient estimator. Distribute to edge clients participating in training.
[0047] Specifically, the aggregation formula used by the central server for aggregation is as follows: ; ; In the formula, This refers to the set of edge devices participating in federated learning in the current round. For set The local model uploaded by the i-th edge device. For set The locally estimated gradient uploaded from the i-th edge.
[0048] The edge device mentioned above is used to select and execute corresponding operations based on whether the edge device participates in this round of federated learning. If the edge device participates in this round of federated learning, a model update operation is performed; if the edge device does not participate in this round of federated learning, a data processing operation is performed.
[0049] In this invention, under a cloud-edge collaborative architecture, the contribution of each data sample to the global model update is evaluated by utilizing the projection values of local data samples onto the global gradient direction, thereby providing real-time data storage decision support for edge devices with limited storage resources. This method not only accelerates the convergence process of federated learning models in a cloud-edge fusion environment but also improves the accuracy of the final model. Furthermore, this invention introduces gradient direction information during the data selection process, prioritizing the retention of data samples that provide broad gradient direction coverage. This ensures that the data stored in local memory effectively represents discarded samples, thereby correcting the model update direction and mitigating the data forgetting problem in streaming data scenarios within cloud-edge collaboration. In summary, this invention can achieve a collaborative solution to online data selection and data forgetting problems in a streaming data federated learning environment under a cloud-edge fusion system, combined with the limited storage space of edge clients, significantly improving the overall performance of federated learning models while reducing storage pressure on the edge.
[0050] The technical features of the embodiments described above can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. It should be noted that the terms "in one embodiment," "for example," and "again" in this invention are intended to illustrate the invention and are not intended to limit the invention.
[0051] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. An edge-side manipulation processing method for participating in cloud-edge federated learning, characterized in that, Comprise: According to whether the edge end participates in this round of federated learning, select to perform the corresponding operation; If the edge end participates in this round of federated learning, a model updating operation is performed, including: obtaining a global model issued by the center server and a global estimated gradient , training the global model using old samples to obtain an updated local model g and updating the gradient of each old sample to the gradient of each old sample on the updated local model g, uploading the updated local model g and the updated local estimated gradient to the center server for aggregation, and resetting the local estimated gradient to the initial gradient; wherein the old samples are samples in the local data set; If the edge end does not participate in the current round of federated learning, a data cleaning operation is performed, including: periodically screening samples to be recycled based on a screening mechanism, the screening mechanism including: periodically adding new samples to the data set, and calculating the gradient projection of each new sample put into the data set the gradient on the latest obtained local model g updating the local estimated gradient updating the local estimated gradient n is a new sample index, represents the n th new sample after updating the local estimated gradient, n = 1, when n > 1, comparing the gradient projection of each sample gradient in the data set on the latest obtained global estimated gradient the sample with the smallest gradient projection is removed from the data set and put into the recycling area; when the sample data in the recycling area reaches the preset upper limit, the data importance of each recycling sample is compared and the sample with the lowest importance is deleted from the local, if the data importance of the recycling sample increases, it is removed from the recycling area and re-put into the data set, the data importance of each sample is the weighted sum of the gradient projection of the sample and the similarity of the sample gradient and the global estimated gradient .
2. The edge-end manipulation processing method of claim 1, wherein, Data importance of a sample x The calculation formula is: ; wherein, denotes the gradient of the sample x on the latest obtained local model g, is the latest obtained global estimation gradient , denotes the gradient on the projection length of the gradient , denotes the cosine similarity of the gradient and the gradient , is a set weight coefficient.
3. The edge-end manipulation processing method of claim 1, wherein, Reset the local estimated gradient to the initial gradient, specifically: reset the local estimated gradient to 0.
4. The edge-end manipulation processing method of claim 1, wherein, Compare the gradients of each sample in the dataset with the latest globally estimated gradient obtained locally. The gradient projection on the dataset is used to select the sample with the smallest gradient projection as the sample to be recycled. Specifically, the samples in the dataset are sorted according to the size of their gradient projections, and one or more samples with the smallest gradient projections are selected as the samples to be recycled.
5. The edge-end manipulation processing method of claim 1, wherein, Compare the data importance of each to-be-recycled sample and delete the sample with the lowest importance from the local, specifically: sort each to-be-recycled sample in the to-be-recycled area based on the importance, and delete one or more to-be-recycled samples with the lowest importance from the local completely.
6. An edge device participating in cloud-edge federated learning, comprising a memory and a processor, the memory storing a computer program, characterized in that, The processor implements the steps of the method of any one of claims 1-5 when executing the computer program.
7. A cloud-edge federated learning system, comprising: Comprise a center server and an edge end device; The central server is configured to aggregate the local models uploaded by the edge ends participating in the federated learning in the last round to obtain a global model in each round of federated learning and aggregate the local estimated gradients uploaded by the edge ends participating in the federated learning in the last round to obtain a global estimated gradient and deliver the global model and the global estimated gradient to the edge ends participating in the federated learning in the current round The edge end device is the edge end device of claim 6, for selecting to perform the corresponding operation according to whether the edge end participates in this round of federated learning, if the edge end participates in this round of federated learning, performing a model update operation, if the edge end does not participate in this round of federated learning, performing a data arrangement operation.
8. The cloud-edge federated learning system of claim 7, wherein, The aggregation formula used by the center server for aggregation is: ; ; In the formula, is the set of edge terminals participating in federated learning in the current round, is the set of edge terminals is the local model uploaded by the i-th edge terminal in the set is the set of edge terminals is the local estimated gradient uploaded by the i-th edge terminal in the set
Citation Information
Patent Citations
Federal learning aggregation method based on MD sampling and model credibility
CN115859113A
Medical data sharing system and method based on federated learning
CN115985439A
Federal forgetting method and system based on projection gradient rise
CN120996143A
Federated machine learning using locality sensitive hashing
US20220076169A1
System and method for DNN-based cyber-security using federated learning-based generative adversarial network
US20230308465A1