A federated learning model aggregation system and method based on a cloud edge architecture
By adopting the Kubernetes-Kubeedge platform and Sedna plugin in the cloud-edge-device architecture, combined with the Router Manager component, the problems of uneven data distribution and performance imbalance were solved, achieving more efficient and fairer model aggregation and improving the accuracy and applicability of the global model.
Patent Information
- Application Number
- CN202310054523.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-02-03
AI Technical Summary
Existing cloud-edge-device architecture federated learning systems have limited applicability in complex scenarios, insufficient system generalization capabilities, and fail to fully consider the issues of uneven data distribution and uneven performance of participants. This results in insufficient effectiveness and fairness of model fusion algorithms, as well as low global model accuracy.
The Kubernetes-Kubeedge edge computing cloud management platform, combined with the Sedna plugin and Router Manager component, is used to generate a global model by weighted calculations based on the accuracy, data volume, and performance differences of local models through model aggregation methods, thereby optimizing data transmission and management.
It improves the effectiveness and fairness of model aggregation, has a wider range of applicable scenarios, generates more accurate global models, and is suitable for large-scale deployments and complex scenarios.
Smart Images

Figure CN117217334B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a cloud edge architecture-based federated learning model aggregation system and method, belonging to the technical field of model training and model fusion of multiple systems with privacy data based on edge computing, and specifically relates to a cloud edge architecture-based federated learning model aggregation system and method based on an artificial intelligence model and a model fusion method. BACKGROUND
[0002] The federated learning technology solves the problems of data silos and privacy leakage, and has been widely applied to multiple fields of artificial intelligence model training such as target recognition, sentiment analysis, and behavior perception. However, with the increasing complexity of application scenarios, problems such as uneven performance distribution of participants and uneven distribution of privacy data have arisen, which have put forward higher requirements for the effectiveness and fairness of model fusion algorithms.
[0003] Currently, there are some distributed federated learning model training systems and methods based on cloud edge architecture, but when applied to complex scenarios, they have the following shortcomings: first, the application scenarios are single, and the system lacks generalization ability. When the training data and scenarios change, the system becomes unsuitable; second, the uneven distribution of data during training of local models is not fully considered. Privacy data is stored locally on participants, and in actual application scenarios, privacy data among multiple participants is usually not normally distributed and does not have a structured format; third, the problem of uneven performance distribution of participants is ignored. In actual application scenarios, edge devices as participants have uneven performance and often have resource constraints; fourth, the local model uses an average weighted fusion algorithm, which, combined with the second and third points, results in a lack of effectiveness and fairness of the average weighted fusion algorithm, and the global model obtained has low accuracy, bias, and overfitting problems. SUMMARY
[0004] To address the deficiencies of the prior art and solve the above-mentioned needs and defects of the prior art, the present application provides a cloud edge architecture-based federated learning model aggregation system based on a Kubernetes-Kubeedge edge computing cloud management platform, which provides a stable cloud edge architecture. The cloud server not only acts as a task initiator to make task decisions and issue tasks, but also efficiently manages edge devices as participants, supporting large-scale deployment and centralized management.
[0005] The present application also provides a model aggregation system working method, which breaks through the problems of uneven distribution of privacy data in edge devices, limited functions and uneven performance of edge devices, and improves the effectiveness and fairness of model aggregation, making the application scenarios more extensive.
[0006] The technical solutions of the present application are as follows:
[0007] A federated learning model aggregation system based on a cloud edge architecture, comprising a cloud platform layer, a network transmission layer, and an edge layer;
[0008] 1. The cloud platform layer comprises a cloud server, a cloud file storage system, and an image repository; the cloud server is integrated by software such as Kubernetes-Kubeedge edge computing cloud management platform, Docker, Sedna plug-in, and Go environment; the cloud server serves as a task initiator to issue a model training task and an image program to the edge devices of the federated learning participants, and to obtain the local model and parameters uploaded by the edge devices after training, to perform model aggregation and generate a global model; the cloud server carries the Kubernetes-Kubeedge edge computing cloud management platform;
[0009] The cloud file storage system is used to store the model training program issued by the cloud server to the edge layer, the local model and parameters uploaded by the edge layer to the cloud server, the aggregated global model, and test set data;
[0010] The image repository is used to store the images generated by the model training program and the global model, so that the participants of the edge layer can directly pull the images;
[0011] 2. The network transmission layer comprises a wired / wireless communication link between the edge layer and the cloud platform layer and a Router Manager component in Kubeedge;
[0012] The wired / wireless communication link is used to realize the information channel between the cloud platform layer and the edge layer; the Router Manager component is used to realize the information interaction between the cloud and the edge, the uploading of the local model and parameters of the edge, and the downloading of the image;
[0013] 3. The edge layer is a local computing unit and a storage unit of the participants, comprising edge devices and a local file storage system;
[0014] The edge devices are used to carry the image of the model training program, combine the training set data in the local file storage system, perform local model training, and output the model file and parameters; the local file storage system is used to store the image file of the model training program pulled from the cloud platform layer, the training set data composed of privacy data, and the local model and parameters output by the edge devices.
[0015] Preferably, the model aggregation method of the cloud server is used to obtain the amount of privacy data of each participant in the edge layer and the accuracy of the local model trained by each participant using their own privacy data, and the model aggregation method is used to calculate the bias caused by data differences such as uneven data amount and single data feature structure in the generation of the global model, so that the model aggregation is more fair, and the actual accuracy of the generated global model is higher.
[0016] A working method of a federated learning model aggregation system based on a cloud edge architecture, comprising the following steps:
[0017] 1) The working steps of the cloud platform layer are as follows:
[0018] 1.1 Build a Kubernetes-Kubeedge edge computing cloud management platform in the cloud server, and generate a 170-bit Token key and a CA certificate in the management platform;
[0019] 1.2 Deploy the Sedna plug-in with the model aggregation method in the Kubernetes-Kubeedge edge computing cloud management platform;
[0020] 1.3 The cloud server packages the code program for artificial intelligence model training into an image and stores it in an image repository for the edge layer to pull;
[0021] 1.4 The cloud platform layer formulates data transmission rules, model training, image pulling instructions, and specified edge devices in a YAML file, and distributes them to the edge layer through the Router Manager component in the Kubernetes-Kubeedge edge computing cloud management platform. At the same time, the data transmission rules also specify the type and address of data transmission in the Router Manager component;
[0022] 1.5 The edge devices in the edge layer upload the trained local model parameters, loss function, and data amount of training data to the cloud server through the Router Manager;
[0023] 1.6 After the cloud server obtains the uploaded data, it uses the test set data in the cloud file storage system to test each local model and obtain the accuracy of each local model;
[0024] 1.7 The model aggregation method deployed in the Sedna plug-in corrects the aggregation process by extracting the accuracy of each local model and the data amount of the corresponding training set, generates a global model, and finally stores the global model in the cloud file storage system.
[0025] Preferably, the model aggregation method in 1.7 has the following steps:
[0026] 1.7.1 Number each edge device that uploads data: D i =D1,D2…D n n is the number of edge devices;
[0027] 1.7.2 The accuracy of the local model uploaded by each edge device and its corresponding model: A i ∈{A1,A2…A n}; The model parameters are: p i ∈{p1,p2…p n}, p i p consists of u model parameters i = [a, b, ... u]; loss function l i ∈{l1,l2…l n};
[0028] 1.7.3 The size of the private data locally on each edge device is: S i =S1,S2…S n ;
[0029] 1.7.4 Calculate the average accuracy of the local model, where M is the average accuracy of the local model:
[0030]
[0031] 1.7.5 Calculate the overall standard deviation E(A) of the local model accuracy:
[0032]
[0033] 1.7.6 Calculate the deviation x of the accuracy of each local model. i Situation:
[0034] x i =A i -ME(A)(3)
[0035] 1.7.7 The following relationships exist between edge devices and model accuracy, private data size, loss function, model parameters, and data deviation:
[0036]
[0037] 1.7.8 When D i There is x i When the value is less than 0, it indicates that the accuracy is too low, resulting in a high deviation value. Participating in model aggregation will cause deviations in the model's performance. Removing this value will... i The new edge device number is D. k =D1,D2…D mm is the number of edge devices at this time;
[0038] 1.7.9 Calculate the total data amount N of the private data of the edge device local to the participating model aggregation:
[0039]
[0040] The proportion of private data used by each local model in the total data is also the weight of the local model when participating in model aggregation:
[0041]
[0042] 1.7.10 The present edge device has the following relationship with model accuracy, private data amount, loss function, model parameter and data amount deviation value:
[0043]
[0044] 1.7.11 Extract the model parameters for weighted calculation to obtain the global model parameters:
[0045]
[0046] 1.7.12 Extract the loss function for weighted calculation to obtain the global loss function:
[0047]
[0048] Preferably, in step 1.4, the working steps of the network transmission layer are as follows:
[0049] 2.1 Through the data transmission rule in step 1.4, the user creates a rule of source and target information of a custom message in Router Manager, and publishes to mqttbroker using the topic, which is distributed to the address of the specified recipient by mqttbroker.
[0050] Preferably, in step 1.5, the working steps of the edge layer are as follows:
[0051] 3.1 Each participant's local edge device joins the Kubernetes-Kubeedge edge computing cloud management platform in the cloud server through the Token key and CA certificate in step 1.1;
[0052] 3.2 The edge layer establishes information interaction rules with the cloud server through step 2.1, and is specified with the type and address of data transmission; and through step 1.4, the edge device accepts the instruction message, establishes the required Pod, and pulls the model training program image from the image repository in the cloud platform;
[0053] 3.3 The edge device Pod is started and in the Running state, and the Pod information is returned to the cloud server through the Router Manager. The image program in the edge device reads the privacy data in the local file storage system for model training, and outputs the trained parameters and the local model;
[0054] 3.4 The edge device uploads the trained local model parameters and the size of the privacy data used for training to the cloud server in the cloud platform layer, following steps 1.6 and 1.7; and finally obtains the global model in step 1.7.
[0055] The beneficial effects of the present application are:
[0056] 1. Lightweight. The present application adopts a mature, open-source and lightweight edge computing management platform, and preferably uses an intelligent development board Nvidia NX Xavier as the computing unit of the edge layer participant, which has low power consumption, low cost, high floating point calculation, and is easy to deploy on a large scale.
[0057] 2. Systematization. The present application adopts a mature and lightweight Kubernetes-Kubeedge as an edge computing management platform for cloud decision-making, management, task distribution and instruction distribution, which supports large-scale rapid deployment.
[0058] 3. Cloud-edge collaboration. The present application uses Kubernetes-Kubeedge as an edge computing management platform, and uses the Router Manager component to realize fast and automatic transmission of messages, so that the job can run automatically, greatly improving the cloud-edge collaboration capability.
[0059] 4. Model aggregation fairness. The present application proposes a new model aggregation method, which greatly improves the influence of uneven data distribution, single data structure and training overfitting during model aggregation, and makes the judgment of pictures more accurate, so that the model aggregation is more fair and practical.
[0060] 5. Incremental learning. The present application proposes a new model aggregation method, and the global model after aggregation can be iterated again. BRIEF DESCRIPTION OF DRAWINGS
[0061] Figure 1 Fig. 1 is a schematic diagram of the architecture of the federated learning model aggregation system based on the cloud-edge-end architecture of the present application;
[0062] Figure 2 Fig. 3 is a schematic diagram of the image generation, packaging and distribution process;
[0063] Figure 3 Fig. 4 is a schematic diagram of the message transmission and Pod establishment process between the cloud platform and the edge layer;
[0064] Figure 4 Process diagram of training local model for edge device and uploading related data;
[0065] Figure 5 Process diagram of model aggregation method. DETAILED DESCRIPTION
[0066] The application will be further described below by examples and in conjunction with the drawings, but is not limited thereto.
[0067] Example 1:
[0068] The application proposes a federated learning model aggregation system and method based on edge computing and cloud-edge collaboration, as shown in the figure, including a cloud platform layer, a network transmission layer and an edge layer. Figure 1
[0069] 1. The cloud platform layer includes a cloud server, an image warehouse and a cloud file storage system. The steps are as follows:
[0070] 1.1) The cloud server includes an open source Kubernetes-Kubeedge edge computing cloud management platform and a Sedna plug-in. The model aggregation method has been deployed in the Sedna plug-in.
[0071] 1.2) As shown in the figure, the edge device (computing unit) of the participant can join the cluster to accept the management of the cloud server through the Token key and CA certificate provided by the cloud. Figure 1
[0072] 1.3) The cloud server adopts different neural network model training programs according to the scene requirements and different private data of the participants. The training program is packaged and an image is generated through a Dockerfile file, and the image is stored in the image warehouse of the cloud platform and is downloaded to the local file storage system of the edge layer for pulling when establishing a Pod. As shown in the figure. Figure 2
[0073] 1.4) As shown in the figure, the cloud server sets up an mqtt agent through the Route Manage component under Kubeedge to transfer messages between the cloud platform and the edge layer. Figure 3
[0074] 1.4.1) The cloud server defines the source of the message, the data type of the message transmission and the target address through a YAML file rule.
[0075] 1.4.2) The sender sends the message or data to the MqttBroker, and the MqttBroker delivers the message to the receiver.
[0076] 1.5) The cloud server issues the command to establish a Pod and pull the target image to the specified edge node through a YAML file.
[0077] 1.5.1) The command is transmitted to the MqttBroker through the Route Manage and delivered to the specified edge node by the MqttBroker.
[0078] 1.5.2) The edge node receives the command message delivered by the cloud server from the MqttBroker. The Pod container is established, and the required image is pulled from the local file storage system. The Pod is successfully started, and the Pod state message is sent to the MqttBroker and delivered to the cloud server.
[0079] 2、The network transmission layer includes a wired / wireless communication link between the edge layer and the cloud platform layer and a Router Manager component in Kubeedge;
[0080] The wired / wireless communication link is used to realize the information channel between the cloud platform layer and the edge layer, and is the basis and carrier of information interaction. The Router Manager component is used to realize the information interaction between the cloud and the edge, the uploading of local model and parameters, and the downloading of images.
[0081] 3. As shown in Figure 1 , the edge layer includes an edge device and a local file storage system. The edge device is used to carry the image of the model training program, combine the training set data in the local file storage system, and perform local model training and output the model file and parameters. The local file storage system is used to store the image file of the model training program pulled from the cloud platform layer, the training set data composed of privacy data, and the local model and parameters output by the edge device. The steps are as follows:
[0082] 3.1) The edge device joins the Kubernetes-Kubeedge edge computing cloud management platform of the cloud server through certificate and Token key verification, and establishes information data exchange rules with the server through the Route Manage component under the cloud management platform.
[0083] 3.2) After step 1.5.2, the edge device successfully establishes the Pod container for model training. As shown in Figure 1 , the data set required for model training is extracted from the local file storage system for local model training.
[0084] 3.3) After the edge device model training is completed, the local model (parameters, loss function) and the data set size used for training are saved to the local file storage system and uploaded to the cloud server. As shown in Figure 4 .
[0085] 3.4) As shown in the figure, the cloud server receives the local model (parameters, loss function), the data set size used for training, etc. uploaded by the edge node. The cloud server tests each local model using a set of public test sets. The accuracy of each local model is obtained. Figure 5
[0086] 3.5) The local model (parameters, loss function), the accuracy of the local model, and the data set size used for training each local model will be extracted by the Sedna plug-in deployed on the cloud server, and then the model aggregation method is performed. The model aggregation method process is as follows:
[0087] 3.5.1) Number each edge device that uploads data: D i ={D1,D2…D n}; Each edge device uploads a local model corresponding to the model accuracy: A i ∈{A1,A2…A n}; The data size of the private data of each edge device: S i =S1,S2…S n ; Model parameters: p i ∈{p1,p2…p n},p i is composed of u model parameters p i =[a,b,…u]; Loss function l i ∈{l1,l2…l n}。
[0088] 3.5.2) Remove the local model with low accuracy by calculating the average value and the overall standard deviation of the accuracy of each local model. The average value of the accuracy of the local model M:
[0089]
[0090] The overall standard deviation of the accuracy of the local model E(A):
[0091]
[0092] 3.5.3) Calculate the deviation value x i of each local model accuracy:
[0093] x i =A i -M+E(A)(3)
[0094] 3.5.4) The edge device and the model accuracy, the size of the private data, the loss function, the model parameters, and the data deviation value have the following relationship:
[0095]
[0096] 3.5.5) When D i There is x i When the value is less than 0, it indicates that the accuracy is too low, resulting in a high deviation value. Participating in model aggregation will reduce the overall model's performance. i It should be removed. The new edge device number is then D. k =D1, D2…D m .
[0097] 3.5.6) Calculate the proportion of private data used by each local model relative to the total data. This percentage will be used as the weight for each parameter and loss function during model aggregation. The total data size N is:
[0098]
[0099] The proportion of private data used by each local model relative to the total data is also the weight of the local model when participating in model aggregation:
[0100]
[0101] The following relationships exist between edge devices and model accuracy, the size of private data, the loss function, model parameters, and the deviation of data volume:
[0102]
[0103] 3.5.7 Extract the local model parameters participating in the global model aggregation and perform weighted calculations to obtain the global model parameters:
[0104]
[0105] 3.5.8 Extract the local model loss functions participating in global model aggregation and perform weighted calculations to obtain the global loss function:
[0106]
[0107] Experimental Example 1
[0108] The invention will now be described in further detail with reference to the accompanying drawings and examples of cancer pathology detection model training.
[0109] 1. The cloud server has been equipped with the Kubernetes-Kubeedge edge computing cloud management platform, and the edge devices have been verified and added to the cluster. Figure 1 As shown.
[0110] 2. Model aggregation method program is also integrated into the Sedna plug-in and deployed in the cloud server; RouteManage data transmission rules have been established; model training programs are packaged into images and transmitted to the local file storage system of the edge layer, as shown in Figure 2
[0111] 3. Edge device Pod has been established to pull the required image from the local file storage system for model training.
[0112] 3.1 The training process is as follows:
[0113] 3.2 Data acquisition: major hospitals collect statistical esophageal cancer pathological cut private data.
[0114] 3.3 Preprocessing: the risk level of pathological cancer cut pictures is divided into high, low and normal risk three levels. The training set data is uniformly formatted and normalized using the Pytorch library function transforms.Compose([transforms.Resize((420, 420)), transforms.ToTensor()]).
[0115] 3.4 Training purpose: to judge the risk level of the input pathological cancer cut picture belongs to three levels.
[0116] 3.5 Training process: use the data loading DataLoader(dataset=mydataset, batch_size=16, shuffle=True, num_workers=0) in the Pytorch library function to read the preprocessed training set. The training set data is sent to the Resnet34 neural network for training.
[0117] 3.5 Finally output the local model after training (local model parameters, local model loss function).
[0118] 4. As shown in Figure 4 , after training, the edge device will upload the local model (local model parameters, local model loss function), the size of the private data used for training to the cloud server.
[0119] 5. As shown in Figure 5 , after receiving the local model (local model parameters, local model loss function), the size of the private data used for training and other parameters uploaded by the edge device, the cloud server will be extracted by the model aggregation method.
[0120] 5.1 There are 5 edge device participants participating in this model training. D i =D1, D2…D5. The size of the private dataset used for local model training by the 5 edge devices is...
[0121] S i ∈S1=16000, S2=10000, S3=18000, S4=13000, S5=8000.
[0122] 5.2 The accuracy of the local model uploaded by each edge device is tested using the public test set data of the cloud server. A i ∈ (A1=72.886%, A2=65.953%, A3=75.779%, A4=71.267%, A5=62.543%).
[0123] 5.3 Calculate the average accuracy M of the local model and the overall standard deviation E(A) of the local model accuracy:
[0124] The average accuracy M of the local model:
[0125]
[0126] The overall standard deviation E(A) of the local model accuracy:
[0127]
[0128] 5.4 Calculate the deviation x of the accuracy of each local model. i Situation:
[0129] x i =A i -M+E(A)
[0130] The following results were obtained:
[0131] x i ∈(x1=7.992%, x2=1.059%, x3=10.885%, x4=6.373%, x5=-2.351%)
[0132] 5.5 The following relationships exist between edge devices and model accuracy, private data volume, loss function, model parameters, and data volume deviation:
[0133]
[0134] 5.6 Remove local models with excessively low accuracy. When D i There is x i When the value of D is less than 0, it indicates that the accuracy is too low, and participating in model aggregation will reduce the performance of the global model. iThe local model with precision lower than the threshold should be removed. The precision of D5 is lower than the threshold, so D5 is removed. The new edge device numbers are D k = D1, D2, D4. The local model parameters and loss functions in the remaining edge devices are involved in the model aggregation:
[0135]
[0136] 5.7 Calculate the proportion of private data used by each local model in the total data, which will be used as the weight of each parameter and loss function in the model aggregation. The total data size N is:
[0137]
[0138] The proportion of private data used by each local model in the total data:
[0139]
[0140] y i ∈(y1=0.281, y2=0.175, y3=0.316, y4=0.228)
[0141] 5.8 The edge devices have the following relationship with model precision, private data size, loss function, model parameter, and data deviation value:
[0142]
[0143] 5.9 Extract the local model parameters involved in the global model aggregation for weighted calculation to obtain the global model parameters:
[0144]
[0145] 5.10 Extract the local model loss functions involved in the global model aggregation for weighted calculation to obtain the global loss function:
[0146]
[0147] 5.11 Test the final global model (global parameters, global loss function) using the public data set, and finally obtain the precision A = 79.102%.
Claims
1. A federated learning model aggregation system based on a cloud edge architecture, characterized in that, Comprise a cloud platform layer, a network transmission layer, and an edge layer; 1) The cloud platform layer comprises a cloud server, a cloud file storage system, and an image warehouse; the cloud server is integrated with a Kubernetes-Kubeedge edge computing cloud management platform, Docker, a Sedna plug-in, and a Go environment; the cloud server serves as a task initiator to issue a model training task and an image program to an edge device of a federated learning participant, and to obtain a local model and parameters uploaded by the edge device after training, aggregate the local model and parameters to generate a global model, and bear the Kubernetes-Kubeedge edge computing cloud management platform; The cloud file storage system is configured to store a model training program issued by the cloud server to the edge layer, a local model and parameters uploaded by the edge layer to the cloud server, an aggregated global model, and test set data; The image warehouse is configured to store an image generated by the model training program and the global model; The working of the cloud platform layer is implemented through the following steps: 1.1 A Kubernetes-Kubeedge edge computing cloud management platform is constructed in the cloud server, and a 170-bit Token key and a CA certificate are generated in the management platform; 1.2 A Sedna plug-in with a model aggregation method is deployed in the Kubernetes-Kubeedge edge computing cloud management platform; 1.3 The cloud server packages a code program for artificial intelligence model training into an image and stores the image in the image warehouse for the edge layer to pull; 1.4 The cloud platform layer formulates data transmission rules, a model training program, image pulling instructions, and specified edge devices in a YAML file, and issues the same to the edge layer through a Router Manager component in the Kubernetes-Kubeedge edge computing cloud management platform, and the data transmission rules also specify the type and address of data transmission in the Router Manager component; 1.5 An edge device in the edge layer uploads a trained local model parameter, a loss function, and the data volume of training data to the cloud server through the Router Manager; 1.6 After the cloud server obtains the uploaded data, the cloud server tests each local model using test set data in the cloud file storage system to obtain the accuracy of each local model; 1.7 A model aggregation method deployed in the Sedna plug-in corrects a global model generated by extracting the accuracy of each local model and the data volume of a training set corresponding to the local model during the aggregation process, and finally stores the global model in the cloud file storage system; 2) The network transmission layer comprises a wired / wireless communication link between the edge layer and the cloud platform layer and a Router Manager component in Kubeedge. The wired / wireless communication link is used to realize the information passage between the support cloud platform layer and the edge layer; the Router Manager component is used to realize the information interaction between the cloud and the edge, the uploading of the local model and the parameters of the edge, and the downloading of the mirror image; 3) The edge layer is a local computing unit and a storage unit of the participant, including an edge device and a local file storage system; The edge device is used to carry the mirror image of the model training program, combine the training set data in the local file storage system, perform local model training, and output the model file and the parameters; the local file storage system is used to store the mirror image file of the model training program pulled from the cloud platform layer, the training set data composed of private data, and the local model and the parameters output by the edge device.
2. The cloud edge-based architecture federated learning model aggregation system according to claim 1, characterized in that, The model aggregation method of the cloud server is used to obtain the size of the private data of each participant in the edge layer and the accuracy of the local model trained by each participant through its own private data, and to calculate through the model aggregation method.
3. A working method based on the federated learning model aggregation system based on the cloud edge architecture of claim 1, characterized in that, The steps include the following: 1) The working steps of the cloud platform layer are as follows: 1.1 Build a Kubernetes-Kubeedge edge computing cloud management platform in the cloud server, generate a 170-bit Token key and a CA certificate in the management platform; 1.2 Deploy the Sedna plug-in with the model aggregation method in the Kubernetes-Kubeedge edge computing cloud management platform; 1.3 The cloud server packages the code program of the artificial intelligence model training into an image and stores it in the image warehouse for the edge layer to pull; 1.4 The cloud platform layer formulates the data transmission rules, model training, image pulling instructions, and specified edge devices in the YAML file, and issues them to the edge layer through the Router Manager component in the Kubernetes-Kubeedge edge computing cloud management platform, and at the same time, the data transmission rules also specify the type and address of data transmission in the Router Manager component; 1.5 The edge device in the edge layer uploads the trained local model parameters, loss function, and training data volume to the cloud server through the Router Manager; 1.6 After the cloud server obtains the uploaded data, it tests each local model using the test set data in the cloud file storage system to obtain the accuracy of each local model; 1.7 The model aggregation method deployed in the Sedna plug-in corrects the global model by extracting the accuracy of each local model and the data volume of the corresponding training set during the aggregation process, and finally stores the global model in the cloud file storage system.
4. The working method of the cloud edge-end architecture-based federated learning model aggregation system according to claim 3, characterized in that, The steps of the model aggregation method in 1.7 are as follows: 1.7.1 Numbering of each uploaded data of edge device: D i = D1, D2...D n n is the number of edge devices; 1.7.2 The accuracy of the local model uploaded by each edge device and its corresponding model: A i ∈{A1,A2…A n }; The model parameters are: p i ∈{p1,p2…p n }, p i p consists of u model parameters i = [a, b, ... u]; loss function l i ∈{l1,l2…l n }; 1.7.3 The data size of the private data local to each edge device is: S i = S1, S2... S n ; 1.7.4 Calculate the average accuracy of the local model, M is the average accuracy of the local model: 1.7.5 Calculate the overall standard deviation E(A) of the local model accuracy: 1.7.6 Calculate the deviation value x of the precision of each local model i Case: x i = A i -M-E(A)(3) 1.7.7 The edge device and the model accuracy, the size of the private data, the loss function, the model parameters, and the data volume deviation value have the following relationship: 1.7.8 When D i x i is less than 0, it means that the precision is too low to cause the deviation value to be too high, and participating in model aggregation will cause the model effect to deviate. Remove this D i , and the new edge device number is D k = D1, D2…D m , and m is the number of edge devices at this time. 1.7.9 Calculate the total amount of private data N of the edge device participating in the model aggregation: The proportion of private data used by each local model in the total data is also the weight of the local model participating in model aggregation: 1.7.10 The edge device has the following relationship with model accuracy, private data size, loss function, model parameters and data deviation value: 1.7.11 Extract the model parameters for weighted calculation to obtain the global model parameters: 1.7.12 Extract the loss function for weighted calculation to obtain the global loss function:
5. The working method of the cloud edge-end architecture-based federated learning model aggregation system according to claim 3, characterized in that, 2) The working steps of the network transmission layer are as follows: 2.1 Through the data transmission rule in step 1.4, the user creates a custom message source and target information rule in Router Manager, and publishes it to mqttbroker using the topic, which is distributed to the specified recipient's address by mqttbroker.
6. The working method of the cloud edge-end architecture-based federated learning model aggregation system according to claim 5, characterized in that, 3) The working steps of the edge layer are as follows: 3.1 Each participant's local edge device joins the Kubernetes-Kubeedge edge computing cloud management platform in the cloud server through the Token key and CA certificate in step 1.1; 3.2 The edge layer establishes information interaction rules with the cloud server through step 2.1, and is specified to the type and address of data transmission; and through step 1.4, the edge device accepts the instruction message, establishes the required Pod, and pulls the model training program image from the image repository in the cloud platform; 3.3 The edge device Pod is started and is in the Running state, and the Pod information is returned to the cloud server through the Router Manager, and the image program in the edge device reads the private data in the local file storage system for model training, and outputs the trained parameters and local model; 3.4 The edge device uploads the trained local model parameters and the size of the private data used for training to the cloud server in the cloud platform layer, followed by steps 1.6 and 1.7; finally, the global model is obtained by step 1.7.
Citation Information
Patent Citations
Layered federal learning method and system applying differential privacy protection
CN113361694A
Pathology detection system and method based on cloud side-end architecture
CN114093505A