Personalized federal learning method and system based on edge-end-cloud three-layer architecture

By introducing a personalized federated learning method with an edge-end-cloud three-layer architecture in edge computing, the problem of low update frequency of edge terminal models, massive personal terminal data cannot be utilized, and communication congestion is solved, and more efficient model updates and data utilization is achieved.

CN119761529AActive Publication Date: 2025-04-04ZHONGGUANCUN HEZHONG INNOVATION ECONOMIC RESEARCH INSTITUTE

Patent Information

Application Number
CN202410399086.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2025-04-04
Estimated Expiration
2044-04-03

AI Technical Summary

Technical Problem

The existing edge computing technology has the problems of low update frequency of edge terminal models, inability to effectively utilize massive personal terminal data, and communication congestion, resulting in reduced transmission speed.

Method used

Adopting a personalized federated learning method based on the edge-end-cloud three-layer architecture, edge terminal devices send local models and updates to edge servers. Edge servers aggregate local models to form local models and send local updates to cloud servers. Cloud servers update global models and return them to edge servers.

Benefits of technology

By shortening transmission distance, reducing the amount of transmitted data, and alleviating system heterogeneity and data heterogeneity, improving model update frequency and efficiency, and reducing communication congestion problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761529A_ABST
    Figure CN119761529A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized federal learning method and system based on an edge-end-cloud three-layer architecture in the technical field of edge computing, and the method comprises a plurality of edge terminal devices and at least one cloud server, and a plurality of edge servers are arranged between the edge terminal devices and the cloud server for transfer. Each edge server is connected with edge terminal equipment in a predetermined area, and the cloud server at least comprises a global model used for providing global information for the edge terminal equipment; the edge terminal equipment comprises a plurality of local models, and when the edge terminal equipment updates the local models, the edge terminal equipment is used for automatically determining the round of local training according to local available system resources; and the edge server is used for aggregating the plurality of trained local models to form a local model. According to the invention, the problems of data isomerism and communication congestion can be solved, and the transmission rate is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a personalized federated learning method and system based on an edge-end-cloud three-layer architecture, belonging to the field of edge computing technology. Background Art

[0002] With the emergence of new smart devices such as drones, self-driving cars, and smart cameras, edge computing has become increasingly important. Edge computing moves data processing capabilities down to edge devices, placing computing power and data closer to end users to achieve low latency and real-time performance. For example, in modern urban management, city managers deploy a large number of smart cameras in the city. In order to achieve real-time data analysis and provide decision support, these smart cameras usually process the data directly locally after collecting data, and then transmit the processed results to the city management center.

[0003] However, the above-mentioned edge computing technology is still in the edge reasoning stage, that is, the edge terminal device only has the reasoning function. This technology has the following problems: First, the edge terminal model update frequency is low, and the model training and storage need to rely on the cloud server. The cloud server requires a large amount of data and computing power for training, and then pushes the trained model to the edge terminal, and then the edge terminal uses the deployed model for reasoning operations. Because the training model is completed in the cloud, the update frequency of the deployed model is limited after the edge terminal device is enabled, and high-speed iteration cannot be achieved; secondly, a large number of personal terminals cannot be connected. At present, the number of edge terminals in the edge computing architecture is very limited. For example, the cameras in the city are installed and deployed by the city managers. The data collected by the cameras installed by the masses or the smart cars driven by the masses cannot be obtained and used. Second, these data are very large, and the scenes are richer, which has great value. However, the data collected by the masses contains personal privacy, and they are unwilling to share their own data. If the massive personal terminal data is effectively utilized under the premise of ensuring the privacy of user data, it is of great significance to improve the model effect. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a personalized federated learning method and system based on the edge-end-cloud three-layer architecture to solve the data and system heterogeneity caused by environmental problems or different computing capabilities of edge terminal devices, as well as the problem of reduced transmission speed caused by communication congestion.

[0005] In order to solve the above technical problems, the present invention is implemented by adopting the following technical solutions:

[0006] First, a personalized federated learning method based on the edge-end-cloud three-layer architecture includes:

[0007] The edge terminal device sends the local model and local updates to the edge server;

[0008] The edge server aggregates the local models to form a local model, aggregates the local updates to form a local update, and sends the local update to the cloud server;

[0009] The cloud server updates the global model according to the local update sent by the edge terminal server, obtains the latest global model, and sends the latest global model to the edge server; the edge server sends the latest global model and local model to several edge terminal devices in the area, and starts the next round of iteration until the optimal global model and local model are found, so that the data loss of the edge terminal devices is minimized.

[0010] In combination with the first aspect, further, the edge server receives the local model and the local update sent by the edge terminal device, including:

[0011] The edge terminal calculates the training rounds of the local model by using a stochastic gradient descent method; based on the training rounds, determines a new local model;

[0012] The traditional federated learning method FedAvg is used to update the global model at the edge terminal device to obtain the local update ΔF i (w t );

[0013] The local update ΔF i (w t ), the new local model is sent to the edge server.

[0014] In combination with the first aspect, further, the expression for calculating the training round of the local model is as follows:

[0015]

[0016] in, represents the local model generated by edge terminal i after t+1 rounds of training; represents the local model generated by edge terminal i after t rounds of training; α represents the learning rate; τ represents the local computation amount; ΔF i (w t ) represents local update; β represents the strong constraint imposed on the local model; w t Global model.

[0017] In combination with the first aspect, further, the aggregation formula for forming the local model is as follows:

[0018]

[0019] in, represents the local model after aggregation; P i Indicates the ratio of local data of edge terminal device i to all data in its area; n k Indicates the number of local models of edge terminal devices.

[0020] In combination with the first aspect, further, the expression of the local update is as follows:

[0021]

[0022] Where, ΔF k (w t ) indicates a local update.

[0023] In combination with the first aspect, further, the edge server waits for the cloud server to update the global model, including:

[0024] The cloud server waits for and receives the local update ΔF sent by the edge server k (w t );

[0025] Based on the local update ΔF k (w t ), update the global model of the previous round and get the latest global model w t+1 ;

[0026] The cloud server sends the latest global model w t+1 Broadcast to all edge servers.

[0027] In combination with the first aspect, further, the latest global model w t+1 The calculation expression is as follows:

[0028]

[0029] Among them, w t+1 represents the latest global model; k represents a variable from 1 to k; K represents the number of edge servers; λ k It indicates the ratio of local data of all edge terminal devices in the area to which edge server k belongs to the total data.

[0030] In combination with the first aspect, further, the calculation expression for minimizing the data loss of the edge terminal device is as follows:

[0031]

[0032] Where w represents the global model of the cloud server; {v1,v2,…,v k} represents the local model set of the edge server; F i (v k ) represents the local model v k Loss of data distribution at edge terminal device i.

[0033] In a second aspect, a personalized federated learning system based on an edge-end-cloud three-layer architecture is provided, characterized in that it includes:

[0034] Edge terminal devices send local models and local updates to edge servers;

[0035] The edge server aggregates the local models to form a local model, aggregates the local updates to form a local update and sends it to the cloud server, and sends the latest global model returned by the cloud server together with the local model to several edge terminal devices in the corresponding area, starting a new round of iteration until the optimal global model and local model are found, so that the data loss of the edge terminal devices is minimized;

[0036] The cloud server updates the global model according to the local update to obtain the latest global model, and sends the latest global model to the edge server.

[0037] In combination with the second aspect, further, the number of the edge servers is less than the number of edge terminal devices.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention constructs a federated learning architecture of the edge-end-cloud three-layer model. The edge terminal device no longer directly uploads the local model to the cloud server, but uploads it to the edge server, thereby shortening the transmission distance. The edge server aggregates the local models of the edge terminal devices to form a local model, and uploads the local updates to the cloud server, reducing the amount of transmitted data. The cloud server aggregates all local updates to generate a new global model, solving the problem of communication congestion.

[0040] Secondly, in order to alleviate the system heterogeneity, the stochastic gradient descent method is used to calculate the rounds of local training based on the local available system resources to reduce the problem of terminal failure caused by system heterogeneity. In addition, in order to deal with the problem of data heterogeneity, a personalized federated learning algorithm is introduced, that is, the edge terminal device will not use the global model to train the local model update during training, but use the personalized local model maintained by its edge server to replace the local model for a new round of model training, which better guarantees the effect of the personalized local model. At the same time, since the edge terminal device uses the global model to constrain the local model during training, the personalized local model not only retains the local model information of the edge terminal device, but also learns part of the global model information. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic diagram of a personalized federated learning method based on an edge-end-cloud three-layer architecture provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic diagram of a personalized federated learning system based on an edge-end-cloud three-layer architecture provided by an embodiment of the present invention;

[0043] Figure 3 This is a comparison chart between the edge-end-cloud three-layer architecture provided by an embodiment of the present invention and the traditional architecture. DETAILED DESCRIPTION

[0044] The technical solution of the present invention is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.

[0045] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0046] Example 1

[0047] Figure 1 This is a flowchart of a personalized federated learning method based on the edge-end-cloud three-layer architecture in the first embodiment of the present invention. This flowchart only shows the logical sequence of the method described in this embodiment. In other possible embodiments of the present invention, different methods may be used without conflict. Figure 1 The steps shown or described are accomplished in the order shown.

[0048] See also Figure 1 The method of this implementation specifically includes the following steps:

[0049] Step S1, the edge terminal device sends the local model and local update to the edge server;

[0050] Step S2: The edge server aggregates the local model to form a local model, aggregates the local update to form a local update, and sends the local update to the cloud server;

[0051] Step S3: the cloud server updates the global model according to the local update sent by the edge terminal server to obtain the latest global model, and sends the latest global model to the edge server;

[0052] Step S4: The edge server sends the latest global model and local model to several edge terminal devices in the corresponding area, and starts a new round of iteration until the optimal global model and local model are found to minimize the data loss of the edge terminal devices.

[0053] Taking the edge terminal device i in the area that the edge server k is responsible for as an example, in order to minimize the data loss of the edge terminal device, it is necessary to find a suitable global model and a local model, that is, a local model after the local model is aggregated. The local loss function expression of the edge terminal i is as follows:

[0054]

[0055] in, represents the local loss function of edge terminal device i; represents the local model generated by edge terminal i after t rounds of training; w t represents the global model; F i (w t ) represents the global model w t The loss of data distribution at edge terminal i; β represents the strong constraint imposed on the local model.

[0056] Furthermore, when edge terminal device i participates in training in round t, it receives the regional model sent by the edge server and the global model w t , edge terminal device i uses regional model To replace your own local model, get the local model of this round, its expression is as follows:

[0057]

[0058] in, represents the gradient update of the local loss function of edge terminal device i; ΔF i (w t ) indicates a local update.

[0059] It should be noted that in formula (2) The global model is used to constrain local model updates so that they do not deviate too far. Edge terminal devices will not deviate too far from the global model when performing multiple local updates, thus reducing client drift.

[0060] Furthermore, in order to adapt to different edge terminal devices and different training rounds and reduce the impact of system heterogeneity of edge terminal devices, the edge terminal device uses the stochastic gradient descent method to calculate the training rounds of the local model, determines the best local model based on the training rounds, and uses the traditional federated learning method FedAvg to update the global model of the edge terminal device to obtain the local update ΔF i (w t ), and update the local i (w t ), the new local model is sent to the edge server.

[0061] It should be noted that not all edge terminal devices will send updates. Due to the different computing capabilities of edge terminals, some low-end terminal devices take a long time to train models. The network environment of edge terminal devices is also heterogeneous. Some edge terminal devices are in a poor network environment, and the transmission rate is limited. It takes longer to upload the model, which leads to model upload delays for some edge terminal devices. In order not to affect the efficiency of federated learning, the edge server k only needs to receive model updates sent by some edge terminal devices for aggregation.

[0062] Furthermore, the expression for calculating the local model training rounds is as follows:

[0063]

[0064] in, represents the local model generated by edge terminal i after t+1 rounds of training; α represents the learning rate; τ represents the local computation amount.

[0065] Taking the edge terminal device after t rounds of model training as an example, the edge server k receives n k local models of edge devices and aggregate them into a local area model And local model It will not be sent to the cloud server, but only transmitted between the edge terminal device and the edge server, and its aggregation forms a local model. The expression is as follows:

[0066]

[0067] in, represents the local model after aggregation; P i Indicates the ratio of local data of edge terminal device i to all data in its area; n k represents the number of local models of the edge terminal device; i represents the number of edge terminal devices.

[0068] At the same time, the edge server k updates the local update ΔF sent by the edge terminal device i (w t ) to aggregate and form a local update ΔF k (w t ) and sent to the cloud server. The aggregated local update expression is as follows:

[0069]

[0070] Where, ΔF k (w t ) indicates a local update.

[0071] Furthermore, based on the local update ΔF after aggregation k (w t ), update the global model of the previous round and get the latest global model w t+1 ;

[0072] The cloud server sends the latest global model w t+1 Broadcast to all edge servers.

[0073] Furthermore, the latest global model w t+1 The calculation expression is as follows:

[0074]

[0075] Among them, w t+1 represents the latest global model; k represents a variable from 1 to k; K represents the number of edge servers; λ k It indicates the ratio of local data of all edge terminal devices in the area to which edge server k belongs to the total data.

[0076] It should be noted that the edge server receives the latest global model w t+1 In order to achieve personalization, the global model will not be used to replace the local model, but the personalized local model will continue to be maintained. The edge terminal device also uses the local model as the new round of model for update training, which better guarantees the personalized local model. At the same time, when the edge terminal device updates the local model, it uses the global model to constrain the local model, which not only retains the information of the local model of the edge terminal, but also learns part of the global model information to balance generalization and personalization, thereby solving the problem of data heterogeneity.

[0077] Furthermore, by alternately updating the global model and the personalized local model, a global model w of the cloud server and k personalized local models v1, v2, …, v k , which minimizes the data loss of the terminal device. The calculation expression is as follows:

[0078]

[0079] Where w represents the global model of the cloud server; {v1,v2,…,v k} represents the local model set of the edge server; F i (v k ) represents the local model w t The loss of data distribution at edge terminal i.

[0080] It should be noted that due to the soft constraint ||v imposed in Formula 7 k -w|| 2 , which makes the gap between the local model and the global model smaller, and the local model can learn global information while maintaining personalization; β is used to control the constraint strength imposed on the local model. When β = 0, the local model can completely ignore the global information. The larger β is, the closer the distance between the local model and the global model is. At the same time, we should also consider that the increase of β affects the update speed of the model, resulting in the problem of slow convergence.

[0081] Example 2

[0082] See also Figure 2 The personalized federated learning system implemented in this embodiment includes multiple edge terminal devices and at least one cloud server. Different from the traditional federated learning technology, this application constructs a personalized federated learning technology HierPerFed based on the edge-end-cloud three-layer architecture. Multiple edge servers are set between the edge terminal device and the cloud server. Each edge server is responsible for the edge terminal devices in a certain area and is connected to the cloud server. Among them, the edge terminal device sends the local model and local update to the edge server; the edge server aggregates the local model to form a local model, and aggregates the local update to form a local update and sends it to the cloud server, and according to the latest global model returned by the cloud server, it is sent together with the local model to several edge terminal devices in the corresponding area, starting a new round of iteration until the optimal global model and local model are found, so that the data loss of the edge terminal device is minimized; the cloud server updates the global model according to the local update to obtain the latest global model, and sends the latest global model to the edge server.

[0083] Furthermore, the edge server has a transfer function. After receiving the local update submitted by the edge terminal device, it performs preliminary aggregation and sends it to the cloud server, and keeps the aggregated local model in the edge server, waiting for the exchange with the local model; then, after receiving the global model sent by the cloud server, the edge server forwards it to the edge terminal device in the corresponding area together with the local model, uses the local model to update the local model, and uses the global model to constrain the local model, which not only retains the information of the local model of the edge terminal, but also learns part of the global model information. And because the edge server is placed around the edge terminal device, the transmission distance is short, which improves the transmission rate.

[0084] In addition, edge servers are deployed in different geographical locations and are physically dispersed. The number of edge servers is far smaller than the number of edge terminal devices, which reduces the bandwidth occupied by cloud servers and further solves the problem of network congestion caused by a large number of edge terminal devices uploading local models to cloud servers at the same time.

[0085] Example 3

[0086] See also Figure 3 In the traditional federated learning technology FedAvg, the edge terminal uses the global model to replace the local model in each global iteration. Its personalization effect is equivalent to the result of fine-tuning the global model on local data, and the personalization effect is poor. In the personalized federated learning technology HierperFed based on the edge-end-cloud architecture, the edge server is introduced. The edge server does not use the global model to replace the local model, but uses the local model of the edge server as a new round of model for update training. The edge server maintains several personalized local models, which better guarantees the effect of the personalized local model.

[0087] from Figure 3 It can be seen that the traditional federated learning technology FedAvg directly replaces a large number of local models with the global model, while the remote server of the personalized federated learning technology HierperFed in the edge-end-cloud architecture only contacts the edge server, and the local model on the edge server replaces the global model and continuously replaces the local model, which alleviates the computing power of the cloud server and improves the efficiency of federated learning.

[0088] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A personalized federated learning method based on edge-end-cloud three-layer architecture, characterized in that: include: The edge terminal device sends the local model and local updates to the edge server; The edge server aggregates the local models to form a local model, aggregates the local updates to form a local update, and sends the local update to the cloud server; The cloud server updates the global model according to the local update sent by the edge terminal server to obtain the latest global model, and sends the latest global model to the edge server; The edge server sends the latest global model and local model to several edge terminal devices in the corresponding area, and starts a new round of iteration until the optimal global model and local model are found, so that the data loss of the edge terminal devices is minimized.

2. According to claim 1, the personalized federated learning method based on the edge-end-cloud three-layer architecture is characterized in that: The edge server receives the local model and local update sent by the edge terminal device, including: The edge terminal calculates the training rounds of the local model by using a stochastic gradient descent method; based on the training rounds, determines a new local model; The traditional federated learning method FedAvg is used to update the global model on the edge terminal device to obtain the local update ΔF i (w t ); The local update ΔF i (w t ), the new local model is sent to the edge server.

3. According to claim 2, the personalized federated learning method based on the edge-end-cloud three-layer architecture is characterized in that: The expression for calculating the training round of the local model is as follows: in, represents the local model generated by edge terminal i after t+1 rounds of training; represents the local model generated by edge terminal i after t rounds of training; α represents the learning rate; τ represents the local computation amount; ΔF i (w t ) represents local update; β represents the strong constraint imposed on the local model; w t Global model.

4. According to claim 1, the personalized federated learning method based on the edge-end-cloud three-layer architecture is characterized in that: The aggregation formula for forming the local model is as follows: in, represents the local model after aggregation; P i Indicates the ratio of local data of edge terminal device i to all data in its area; n k Indicates the number of local models of edge terminal devices.

5. According to claim 1, the personalized federated learning method based on the edge-end-cloud three-layer architecture is characterized in that: The expression of the local update formed by aggregation of the local updates is as follows: Where, ΔF k (w t ) indicates a local update.

6. The personalized federated learning method based on the edge-end-cloud three-layer architecture according to claim 5 is characterized in that: The edge server waits for the cloud server to update the global model, including: The cloud server waits for and receives the local update ΔF sent by the edge server k (w t ); Based on the local update ΔF k (w t ), update the global model of the previous round and get the latest global model w t+1 ; The cloud server sends the latest global model w t+1 Broadcast to all edge servers.

7. The personalized federated learning method based on the edge-end-cloud three-layer architecture according to claim 6 is characterized in that: The latest global model w t+1 The calculation expression is as follows: Among them, w t+1 represents the latest global model; k represents a variable from 1 to k; K represents the number of edge servers; λ k It indicates the ratio of local data of all edge terminal devices in the area to which edge server k belongs to the total data.

8. The personalized federated learning method based on the edge-end-cloud three-layer architecture according to claim 1 is characterized in that: The calculation expression for minimizing the data loss of the edge terminal device is as follows: Where w represents the global model of the cloud server; {v1,v2,…,v k } represents the local model set of the edge server; F i (v k ) represents the local model v k Loss of data distribution at edge terminal device i.

9. A personalized federated learning system based on edge-end-cloud three-layer architecture, characterized in that: include: Edge terminal devices send local models and local updates to edge servers; The edge server aggregates the local models to form a local model, aggregates the local updates to form a local update and sends it to the cloud server, and sends the latest global model returned by the cloud server together with the local model to several edge terminal devices in the corresponding area, starting a new round of iteration until the optimal global model and local model are found, so that the data loss of the edge terminal devices is minimized; The cloud server updates the global model according to the local update to obtain the latest global model, and sends the latest global model to the edge server.

10. The personalized federated learning system based on the edge-end-cloud three-layer architecture according to claim 9 is characterized in that: The number of the edge servers is less than the number of edge terminal devices.

Citation Information

Patent Citations

  • End-edge collaborative federation learning optimization method based on edge calculation

    CN112565331A

  • Federal learning computing unloading computing system and method based on cloud side end

    CN112817653A

  • Asynchronous federated learning method, system, device and terminal for mobile vehicle

    CN114116198A

  • Decentralized federated learning system and method, storage medium and computing device

    CN116341691A

  • Self-adaptive federal learning method suitable for artificial intelligence Internet of Things heterogeneous system

    CN116361639A

Cited By

  • Distributed model training method and system based on training and compression layering

    CN121031719A