A hierarchical personalized federated learning method integrating device scheduling

By adopting a hierarchical personalized federated learning method that integrates device scheduling in the Internet of Vehicles, the problem that traditional federated learning cannot provide a personalized model for each vehicle device is solved, and more accurate personalized services and higher communication efficiency are achieved. .

CN119026705BActive Publication Date: 2025-01-24XIANGJIANG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411502118.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-01-24
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

Traditional federal learning cannot provide a personalized model for each vehicle device and cannot adapt to different vehicle device task requirements, resulting in low accuracy of personalized services.

Method used

The layered personalized federal learning methods with fusion equipment scheduling are used to create a miniature auxiliary model for local training, divide clusters, screen random scheduling equipment sets, perform model splitting and layered federal learning to obtain local personalized model parameters.

Benefits of technology

Through the final local personalized model parameters, it adapts to different vehicle equipment task requirements, provides more accurate personalized services, reduces communication overhead and energy consumption, and improves the accuracy and communication efficiency of the personalized model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119026705B_ABST
    Figure CN119026705B_ABST
Patent Text Reader

Abstract

The present application relates to a hierarchical personalized federated learning method for integrated device scheduling, which is applied to a cloud server, including creating a micro-assisted model, and all IOT devices in the area simultaneously perform local training on the micro-assisted model to obtain different model parameters; clustering all IOT devices according to the model parameters; selecting IOT devices from the divided clusters to build a random scheduling device set; performing model splitting and hierarchical federated learning on the IOT devices in the random scheduling device set to obtain parameters of some global models and similarities between IOT devices; IOT devices perform local personalized federated learning based on parameters of some global models and similarities between IOT devices to obtain local personalized model parameters; and tasks required by IOT devices are distributed based on local personalized model parameters. This method adapts to the task requirements of different vehicle devices through local personalized model parameters to provide more accurate personalized services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of personalized federated learning technology, and in particular to a hierarchical personalized federated learning method integrating device scheduling. Background Art

[0002] In the Internet of Vehicles, the increasing number of vehicles has led to network congestion, which has increased communication overhead and energy consumption. Therefore, the scheduling and selection of vehicle equipment has become an important issue. At the same time, the global model trained by traditional federated learning is an average model for the entire Internet of Vehicles. However, each vehicle in the Internet of Vehicles generates a large amount of unique data during driving. These data reflect the vehicle's operating mode, driving behavior, road conditions and other environmental factors. Therefore, traditional federated learning cannot provide a personalized model for each vehicle device to adapt to the task requirements of different vehicle devices. Summary of the invention

[0003] Based on this, it is necessary to provide a hierarchical personalized federated learning method integrating device scheduling, which is applied to cloud servers and includes:

[0004] S1: Create a micro-assisted model, and all IoT devices in the area simultaneously perform local training on the micro-assisted model to obtain different model parameters;

[0005] S2: Divide all the IOT devices into clusters according to the model parameters;

[0006] S3: Filter the IOT devices from the divided clusters to build a random scheduling device set;

[0007] S4: performing model splitting and hierarchical federated learning on the IoT devices in the random scheduling device set to obtain parameters of some global models and similarities between IoT devices;

[0008] S5: The IOT device performs local personalized federated learning according to the parameters of the partial global model and the similarity between the IOT devices to obtain local personalized model parameters; and distributes the tasks required by the IOT device according to the local personalized model parameters.

[0009] Beneficial effects: This method adapts to the task requirements of different vehicle equipment through the final local personalized model parameters, providing more accurate personalized services. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 This is a flowchart of a hierarchical personalized federated learning method for fusion device scheduling according to an embodiment of the present application. DETAILED DESCRIPTION

[0012] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.

[0013] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0014] like Figure 1 As shown, this embodiment provides a hierarchical personalized federated learning method integrating device scheduling, which is applied to a cloud server and includes:

[0015] S1: Create a micro-assisted model and send it to the edge server ES. All IoT devices in the area where the edge server is located simultaneously perform local training on the micro-assisted model to obtain different model parameters.

[0016] In this embodiment, the micro auxiliary model includes a convolutional layer and a linear layer.

[0017] Further, local training includes:

[0018] Step 1: Initialize the micro auxiliary model;

[0019] Step 2: The IoT device performs local training on the initialized micro auxiliary model according to its local data set. The training formula is:

[0020] ;

[0021] in, Indicates n IOT devices in i During the global iteration t +1 local iteration model parameters of the micro-auxiliary model at the w-th edge iteration; Indicates n IOT devices in i During the global iteration t The local iteration w Model parameters of the micro-auxiliary model at the sub-edge iteration; represents the model parameters of the micro-assisted model; represents the learning rate; Indicates n IOT devices about parameters The loss function of .

[0022] S2: Divide all the IOT devices into clusters according to the model parameters.

[0023] Specifically, the step includes:

[0024] The score of each IOT device is calculated according to the model parameters and the set category label, and the calculation formula is:

[0025] ;

[0026] in, Indicates n IOT devices in m The score of each class; cly (·) represents the classification function; Indicates t The local iteration n Model parameters trained by IOT devices;

[0027] The class with the highest score of IOT devices is taken as its corresponding category;

[0028] Clusters are divided according to the categories described for each IOT device.

[0029] S3: Filter the IOT devices from the divided clusters to build a random scheduling device set.

[0030] Specifically, the step includes:

[0031] Step 1: Create the first empty set As a record scheduling device, create a second empty set As a random scheduling device, the number of screening rounds is set, and the number of preset IOT devices in each cluster is recorded asp ; M Indicates the number of clusters; i Indicates i Second screening;

[0032] Step 2: Filter IOT devices according to the number of recorded scheduling devices and the number of IOT devices in each cluster;

[0033] when L k + X k ≥ p ,and L k ≥ p When l k Random selection p IOT devices are transferred to the first empty set and the second empty set;

[0034] when L k + X k ≥ p ,and L k < p When l k All IOT devices in the set are transferred to the second empty set, and randomly transferred from the first empty set pL k IOT devices, transfer the remaining IOT devices in the first empty set to the cluster l k , copy the IOT devices in the second empty set to the first empty set;

[0035] when L k + X k < p When l k All IOT devices in the group are transferred to the second empty group;

[0036] in, L k Represents a cluster l k The number of IOT devices in X k Indicates the number of IOT devices in the first empty set;

[0037] Step 3: Add the screened device sets to obtain the randomly scheduled device set;

[0038] Step 4: Determine the random scheduling device set. When , obtain the unscheduled IOT device set, and randomly select from the unscheduled IOT device set IOT devices join the random scheduling device set; represents a set of randomly scheduled devices; p Indicates the number of preset IOT devices in each cluster; M Indicates the number of clusters.

[0039] The set of randomly scheduled devices classified and screened according to this method solves the problem of repeated device scheduling and prioritizes unscheduled IOT devices. At the same time, the distribution of training data is diversified according to the classification of data, which approximates independent and identically distributed data. The target accuracy can be achieved with fewer global iterations, reducing the energy consumption of the device and saving communication resources.

[0040] S4: Perform model splitting and hierarchical federated learning on the IoT devices in the random scheduling device set to obtain parameters of some global models and similarities between IoT devices.

[0041] Specifically, the step includes:

[0042] Step 1: The IOT devices in the random scheduling device set use the gradient descent method to perform the second local training, iterate T times, and minimize the loss function. The calculation formula is:

[0043] ;

[0044] in, represents the first r IOT devices in i During the global iteration t +1 local iteration model parameters of the micro-auxiliary model at the w-th edge iteration; represents the first r IOT devices in i During the global iteration t The local iteration w Model parameters of the micro-auxiliary model at the sub-edge iteration; represents the parameter gradient; represents the learning rate; Indicates r IOT devices about parameters The loss function of

[0045] Step 2: Split the secondary trained micro auxiliary model in the IoT device into the front layer neural network u , back layer neural network v; Front layer neural network u Some model parameters are uploaded to the edge server and cloud server for aggregation, and the back-layer neural network v Personalized federated learning is performed locally. Therefore, each client will have two models, one for the aggregation of the global partial model and the other for the aggregation of the local personalized model.

[0046] Step 3: Put the front layer of the neural network u The model parameters are aggregated on the edge server, and the calculation formula is:

[0047] ;

[0048] in, Represents edge server q In the i During the global iteration w +edge aggregation parameters at 1 edge iteration; Represents the front layer of the neural network u Model parameters of represents the first r The size of some local data sets of IoT devices; Representation and Edge Server q A randomly scheduled set of connected devices;

[0049] Step 4: After W edge iterations, edge aggregation parameters are obtained; the edge aggregation parameters are aggregated in the cloud, and the calculation formula is:

[0050] ;

[0051] in, Indicates i +1 global iteration of the partial global model parameters; Q Indicates the number of edge servers; Represents edge server q In the i Edge aggregation parameters after W edge iterations during the global iteration;

[0052] Step 5: Provide a cluster label for each IoT device; classify IoT devices with the same cluster label into the same category in the random scheduling device set;

[0053] Step 6: Calculate the similarity between the same type of IOT devices in the scheduled device set at any time;

[0054] In this embodiment, the Euclidean distance is used to calculate the similarity, and the calculation formula is:

[0055] ;

[0056] in, Indicates similarity; It represents the Euclidean distance of the model parameters of the personalized model between device A and device B, which belong to the same type of IOT devices in the scheduling device set at any time; the similarity value ranges from 0 to 1. The closer the value is to 0, the more dissimilar the two parameters are, and vice versa.

[0057] S5: The IOT device performs local personalized federated learning according to the parameters of the partial global model and the similarity between the IOT devices to obtain local personalized model parameters; and distributes the tasks required by the IOT device according to the local personalized model parameters.

[0058] Specifically, the step includes:

[0059] Sending the similarity between the parameters of the partial global model and the IOT device to the corresponding IOT device;

[0060] The IOT device performs local iterative update according to the parameters of the partial global model, and the update formula includes:

[0061] ;

[0062] in, Indicates i IOT device i +1 round of local iteration to update some global model parameters; Indicates i The parameters of some global models are updated in local iterations; represents the learning rate; represents the parameter gradient; Indicates n IOT devices about parameters The loss function of

[0063] Taking the back layer neural network in IoT devices v As its corresponding personalized model;

[0064] New model parameters are generated according to the combination of the parameters of the partial global model and the parameters of the personalized model, and the combination formula is:

[0065] ;

[0066] in, represents the new model parameters; Represents a cascade function; Indicates i At the global iteration xParameters of the personalized model in each IoT device;

[0067] For each IOT device of the same class in the scheduled device set at any time, based on the similarity between the IOT devices and the back-layer neural network in the IOT device v The parameters are used to aggregate the neighbor models between devices to obtain the aggregated neighbor model. The aggregation formula of the neighbor model between devices is:

[0068] ;

[0069] in, Indicates i The aggregated neighbor model generated at the first global iteration; Indicates x The size of local personalized data sets for each IoT device; Indicates y The size of local personalized data sets for each IoT device; Indicates i At the global iteration x IOT devices and y The maximum similarity between IOT devices; Indicates i At the global iteration y Parameters of the personalization model in each IoT device.

[0070] The parameters of the personalized model are continuously updated according to the new model parameters and the aggregated neighbor model until the parameters of the personalized model converge to obtain the local personalized model parameters; the parameter update formula of the personalized model is:

[0071] ;

[0072] in, Indicates i +1 global iteration x Local personalized model parameters of each IoT device; Indicates i At the global iteration x Parameters of the personalized model in each IoT device; represents the learning rate; represents the parameter gradient; Indicates n IOT devices about parameters The loss function of represents the first hyperparameter; represents the second hyperparameter; represents the new model parameters; Indicates iThe aggregated neighbor model generated at the global iteration.

[0073] In this embodiment, the expression of the loss function of each parameter is as follows:

[0074] ;

[0075] in, e Refers to e IOT devices; g Refers to any of the above parameters; N Indicates the number of IOT devices; represents the number of samples on the i-th IOT device; is the true label of the jth sample on the i-th IoT device; is the predicted value of the jth sample on the i-th IoT device; is the feature of the jth sample on the i-th IoT device; It is a local loss function that can be selected according to specific tasks and models. Common ones include mean square error, cross entropy loss, etc.

[0076] By introducing hyperparameters , , regularization operation is performed, and regularization operation includes global regularization Regularization with local models ,Through these two regularizations, the model parameters can be more in line with the distribution characteristics of ,individual client data, thereby improving the personalization effect.,At the same time, while pursuing personalization, a certain degree of consistency ,with the global model is maintained to prevent the model from overfitting.

[0077] This method reduces irrelevant information introduced by the global model by splitting the local model, improves communication efficiency, and selects valuable clients with high similarity for personalized federated learning based on small-scale classification, rather than optimizing local personalized model components in isolation.

[0078] Update the parameters of the local personalized model through continuous iteration ,until Until convergence is achieved. Using the final converged local personalized model parameters, the device can solve tasks that are more suitable for its own needs and provide itself with more accurate personalized services.

[0079] The method provided by this embodiment has the following beneficial effects:

[0080] 1. This method adapts to the task requirements of different vehicle equipment through the final local personalized model parameters, providing more accurate personalized services.

[0081] 2. It solves the problems of increased communication overhead and energy consumption in the Internet of Vehicles, the inability of the global model to meet the task requirements of different vehicle equipment, and the low accuracy of personalized models; it solves the personalized tasks of customers and improves the accuracy and communication efficiency of personalized models.

[0082] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0083] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A hierarchical personalized federated learning method integrating device scheduling, applied to cloud servers, characterized in that: include: S1: Create a micro-assisted model, and all IoT devices in the area simultaneously perform local training on the micro-assisted model to obtain different model parameters; S2: Divide all the IOT devices into clusters according to the model parameters; S3: Filter the IOT devices from the divided clusters to build a random scheduling device set; S4: performing model splitting and hierarchical federated learning on the IoT devices in the random scheduling device set to obtain parameters of some global models and similarities between IoT devices, including: Step 1: The IoT devices in the random scheduling device set use the gradient descent method to perform the second local training, iterate T times, and minimize the loss function. The calculation formula is: ; in, represents the first r IOT devices in i During the global iteration t +1 local iteration model parameters of the micro-auxiliary model at the w-th edge iteration; represents the first r IOT devices in i During the global iteration t The local iteration w Model parameters of the micro-auxiliary model at the sub-edge iteration; represents the parameter gradient; represents the learning rate; Indicates r IOT devices about parameters The loss function of Step 2: Split the secondary trained micro auxiliary model in the IoT device into the front layer neural network u , back layer neural network v ; Step 3: Put the front layer of the neural network u The model parameters are aggregated on the edge server, and the calculation formula is: ; in, Represents edge server q In the i During the global iteration w +edge aggregation parameters at 1 edge iteration; Represents the front layer of the neural network u Model parameters of represents the first r The size of some local data sets of IoT devices; Representation and Edge Server q A randomly scheduled set of connected devices; Step 4: After W edge iterations, edge aggregation parameters are obtained; the edge aggregation parameters are aggregated in the cloud, and the calculation formula is: ; in, Indicates i +1 global iteration of the partial global model parameters; Q Indicates the number of edge servers; Represents edge server q In the i Edge aggregation parameters after W edge iterations during the global iteration; Step 5: Provide a cluster label for each IoT device; classify IoT devices with the same cluster label into the same category in the random scheduling device set; Step 6: Calculate the similarity between the same type of IOT devices in the scheduled device set at any time; S5: The IOT device performs local personalized federated learning according to the parameters of the partial global model and the similarity between the IOT devices to obtain local personalized model parameters; and distributes the tasks required by the IOT device according to the local personalized model parameters.

2. The hierarchical personalized federated learning method for integrated device scheduling according to claim 1 is characterized in that: The tiny auxiliary model consists of a convolutional layer and a linear layer.

3. The hierarchical personalized federated learning method for integrated device scheduling according to claim 1 is characterized in that: Local training includes: Step 1: Initialize the micro auxiliary model; Step 2: The IoT device performs local training on the initialized micro auxiliary model according to its local data set. The training formula is: ; in, Indicates n IOT devices in i During the global iteration t +1 local iteration model parameters of the micro-auxiliary model at the w-th edge iteration; Indicates n IOT devices in i During the global iteration t The local iteration w Model parameters of the micro-auxiliary model at the sub-edge iteration; represents the learning rate; Indicates n IOT devices about parameters The loss function of .

4. The hierarchical personalized federated learning method for integrated device scheduling according to claim 1, characterized in that: The clustering of all the IOT devices according to the model parameters comprises: The score of each IOT device is calculated according to the model parameters and the set category label, and the calculation formula is: ; in, Indicates n IOT devices in m The score of each class; cly (·) represents the classification function; Indicates t The local iteration n Model parameters trained by IOT devices; The class with the highest score of IOT devices is taken as its corresponding category; Clusters are divided according to the categories described for each IOT device.

5. The hierarchical personalized federated learning method for integrated device scheduling according to claim 1, characterized in that: The step of selecting the IOT devices from the divided clusters to construct a random scheduling device set includes: Step 1: Create the first empty set As a record scheduling device, create a second empty set As a random scheduling device, the number of screening rounds is set, and the number of preset IOT devices in each cluster is recorded as p ; M Indicates the number of clusters; i Indicates i Second screening; Step 2: Filter IOT devices according to the number of recorded scheduling devices and the number of IOT devices in each cluster; when L k + X k ≥ p ,and L k ≥ p When l k Random selection p IOT devices are transferred to the first empty set and the second empty set; when L k + X k ≥ p ,and L k < p When l k All IOT devices in the set are transferred to the second empty set, and randomly transferred from the first empty set pL k IOT devices, transfer the remaining IOT devices in the first empty set to the cluster l k , copy the IOT devices in the second empty set to the first empty set; when L k + X k < p When l k All IOT devices in the group are transferred to the second empty group; in, L k Represents a cluster l k The number of IOT devices in X k Indicates the number of IOT devices in the first empty set; Step 3: Add the filtered device sets to obtain the randomly scheduled device set.

6. The hierarchical personalized federated learning method for integrated device scheduling according to claim 5, characterized in that: It also includes judging the random scheduling device set. When , obtain the unscheduled IOT device set, and randomly select from the unscheduled IOT device set IOT devices join the random scheduling device set; represents a set of randomly scheduled devices; p Indicates the number of preset IOT devices in each cluster; M Indicates the number of clusters.

7. The hierarchical personalized federated learning method for integrated device scheduling according to claim 1, characterized in that: S5 includes: sending the similarity between the parameters of the partial global model and the IOT device to the corresponding IOT device; The IOT device performs local iterative update according to the parameters of the partial global model, and the update formula includes: ; in, Indicates i IOT device i +1 round of local iteration to update some global model parameters; Indicates i The parameters of some global models are updated in local iterations; represents the learning rate; represents the parameter gradient; Indicates n IOT devices about parameters The loss function of Taking the back layer neural network in IoT devices v As its corresponding personalized model; New model parameters are generated according to the combination of the parameters of the partial global model and the parameters of the personalized model, and the combination formula is: ; in, represents the new model parameters; Represents a cascade function; Indicates i At the global iteration x Parameters of the personalized model in each IoT device; For each IOT device of the same class in the scheduled device set at any time, based on the similarity between the IOT devices and the back-layer neural network in the IOT device v The parameters are used to aggregate neighbor models between devices to obtain an aggregated neighbor model. The parameters of the personalized model are continuously updated according to the new model parameters and the aggregated neighbor model until the parameters of the personalized model converge, thereby obtaining the local personalized model parameters.

8. The hierarchical personalized federated learning method for integrated device scheduling according to claim 7, characterized in that: The neighbor model aggregation formula between devices is: ; in, Indicates i The aggregated neighbor model generated at the first global iteration; Indicates x The size of local personalized data sets for each IoT device; Indicates y The size of local personalized data sets for each IoT device; Indicates i At the global iteration x IOT devices and y The maximum similarity between IOT devices; Indicates i At the global iteration y Parameters of the personalization model in each IoT device.

9. The hierarchical personalized federated learning method for integrated device scheduling according to claim 7, characterized in that: The parameter update formula of the personalized model is: ; in, Indicates i +1 global iteration x Local personalized model parameters of each IoT device; Indicates i At the global iteration x Parameters of the personalized model in each IoT device; represents the learning rate; represents the parameter gradient; Indicates n IOT devices about parameters The loss function of represents the first hyperparameter; represents the second hyperparameter; represents the new model parameters; Indicates i The aggregated neighbor model generated at the global iteration.

Citation Information

Patent Citations

  • Unmanned aerial vehicle small base station cluster RAN slicing method based on hierarchical federated learning

    CN114997737A

  • Hybrid federal learning method based on model splitting

    CN116911408A