Semi-asynchronous power federated learning network and its communication method based on communication efficiency

By adopting a semi-asynchronous communication architecture and dynamic device selection method in the power Internet of Things, the communication efficiency and learning accuracy problems of the federated learning algorithm in heterogeneous power grid scenarios are solved, and efficient neural network model training and data transmission are achieved to meet the needs of Meet the real-time decision-making needs of the power Internet of Things.

CN115766475BActive Publication Date: 2024-08-30STATE GRID HUBEI ELECTRIC POWER INFORMATION & TELECOMMUNICATION COMPANY +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211347949.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2024-08-30
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

Existing federated learning algorithms have low communication efficiency and low learning accuracy in heterogeneous power grid scenarios, especially under resource constraints and delay requirements, which are difficult to meet the needs of the power Internet of Things.

Method used

Using a semi-asynchronous communication architecture, through federated learning training and optimization methods of cloud nodes and heterogeneous terminal devices, we design a terminal device selection method with dynamic data volume and training time, optimize the number of training times of terminal devices, and realize the connection between cloud nodes and terminal devices. Semi-asynchronous communication to improve communication efficiency and learning accuracy.

Benefits of technology

In the case of limited resources, it improves the communication efficiency and learning accuracy of federated learning, maximizes the training potential of heterogeneous terminal devices, reduces calculation and transmission delays, and ensures the data computing efficiency and transmission of power Internet of Things devices. Security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115766475B
    Figure CN115766475B
Patent Text Reader

Abstract

A semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, comprising the following steps: building a semi-asynchronous communication architecture based on the power Internet of Things network, the communication architecture consisting of a power center cloud node and N heterogeneous terminal devices; designing a corresponding federated learning training and optimization method according to the semi-asynchronous communication architecture; building a terminal device update model to calculate the computing time required for the terminal device to complete the local training process; building a data transmission model from the terminal device to the cloud node to calculate the time required for the terminal device to upload the training model to the cloud node; building a terminal device training and computing time update model; building a semi-asynchronous model aggregation model at the cloud node, which will aggregate the trained model of the selected terminal device in the next round of updates; for the unselected terminal devices, aggregation is performed according to the cloud model trained in the previous round. This design not only has high communication efficiency, but also has high learning accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power Internet of Things, and in particular to a semi-asynchronous electric power federated learning network based on communication efficiency and a communication method thereof. Background Art

[0002] In recent years, with the rapid development of the power Internet of Things, network edge devices will generate a large amount of data. By 2021, an industrial company will generate 2.4TB of data per minute, and using deep neural networks (DNNs) to analyze this data can improve the intelligence level of industrial networks. For example, in the power Internet of Things network, deep neural networks can be trained for power grid fault diagnosis. In the power grid scenario, different devices often generate a large amount of data containing important information, such as equipment operating status. Since this information plays a key role in security alerts and fault diagnosis, the data collection process required by the traditional centralized training process has raised concerns about its privacy security. In addition, the centralized processing of data collected by sensors in the power Internet of Things requires data transmission and aggregation to the central end. The transmission of a large amount of data will cause high transmission delay, which is difficult to accept for power Internet of Things devices with real-time decision-making requirements. Finally, since the power communication network needs to bear the transmission load of more power equipment, the traditional centralized computing method is a great test for the load of the power communication network. When the power communication network is heavily loaded, it will affect the communication experience of other users. Therefore, in order to protect device privacy and user latency requirements, data is best processed locally.

[0003] Nowadays, a new distributed learning method called federated learning has been proposed. During the federated learning training process, each terminal device in the power Internet of Things can complete model training using the local data set collected by its sensors. The training model is then aggregated into a global model by a unified cloud node and sent to the terminal device for training until the model reaches the expected accuracy and completes the training. This mode allows the participating devices to collaboratively train the shared model to protect personal privacy. This decentralized method will also achieve the expected accuracy, and the resulting neural network model can be used to provide high-precision services. With the help of the federated learning algorithm, the power network model can be efficiently trained on a decentralized data set without uploading the data set, thereby protecting device privacy. However, the classic federated learning algorithm needs to wait for the slowest user to complete the training in each round of communication before uniformly uploading the training model to the cloud node. In the heterogeneous power grid scenario, due to the existence of device heterogeneity and data non-independent and identically distributed phenomena, the data computing capabilities of the terminal devices vary greatly, which will have a certain impact on the aggregation speed and accuracy of federated learning. Therefore, under the condition of resource constraints and latency requirements, a network architecture and update method that can improve the efficiency of federated learning communication are urgently needed for application in the power Internet of Things. Summary of the invention

[0004] The purpose of the present invention is to overcome the defects and problems of low communication efficiency and low learning accuracy in the prior art, and to provide a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof with high communication efficiency and high learning accuracy.

[0005] To achieve the above objectives, the technical solution of the present invention is: a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, the method comprising the following steps:

[0006] S1. Build a semi-asynchronous communication architecture based on the power Internet of Things network. The semi-asynchronous communication architecture consists of a power center cloud node and N heterogeneous terminal devices. The cloud node and the N heterogeneous terminal devices are connected in sequence;

[0007] S2. Design corresponding federated learning training and optimization methods based on the semi-asynchronous communication architecture;

[0008] S3. Build a terminal device update model and calculate the computing time required for the terminal device to complete the local training process;

[0009] S4. Build a data transmission model from the terminal device to the cloud node and calculate the time required for the terminal device to upload the training model to the cloud node;

[0010] S5. Construct a terminal device training and computing time update model. At the same time, construct a semi-asynchronous model aggregation model at the cloud node. For the selected terminal devices, this model will aggregate the trained models in the next round of updates. For the unselected terminal devices, it will aggregate according to the cloud model trained in the previous round.

[0011] Step S2 specifically includes the following steps:

[0012] S21. Construct the loss function model of the neural network in federated learning:

[0013]

[0014] In the formula, F n (w n ) is the loss function of the terminal device n connected to the cloud node, f n (w n , k) is the loss function of the neural network training process of terminal device n, w n is the training model weight value in the neural network of terminal device n, Kn is the total data set stored in the training process of terminal device n, |K n | is the size of the entire data set, and k is a data sample during the training process;

[0015] S22. Use the stochastic gradient descent method to train the terminal device to obtain an optimized training weight model:

[0016]

[0017] Where t is the tth iteration of the terminal device during the federated learning training process, and η is the learning efficiency of the stochastic gradient descent method; is the set of terminal devices connected to the cloud node,

[0018] In step S3, the amount of data arriving from the time when the model is successfully uploaded in round t to the start of round t+1 is for:

[0019]

[0020] In the formula, is the number of terminal devices n that have arrived from the last successful model upload to the start of round t, is the amount of data arriving at terminal device n during the tth round of training; Indicates whether terminal device n is selected to upload its local training model in round t. Indicates that it is selected to upload its local training model. Indicates that you do not choose to upload your locally trained model;

[0021] The amount of data used for the aggregation process by terminal device n in round t+1 for:

[0022]

[0023] In the formula, is the amount of data used for the aggregation process in round t by terminal device n;

[0024] The computing time required for terminal device n to complete the tth round of local training for:

[0025]

[0026] In the formula, G n The number of CPU cycles required to complete a data sample calculation for terminal device n, is the size of the data set participating in local training for the terminal device n in the tth round, f n is the computing capability of terminal device n.

[0027] In step S4, the transmission rate of the terminal device uploading the training model to the cloud node is:

[0028]

[0029] In the formula, is the transmission rate of the training model uploaded by the terminal device n to the cloud node, is the bandwidth allocation rate that terminal device n can allocate to connect to the cloud node, B is the total bandwidth allocated when the cloud node communicates with all terminal devices connected to it, is the transmission power of the terminal device n when transmitting the training model, is the channel gain when the terminal device n transmits the training model, and N0 is the noise energy in the communication channel;

[0030] The transmission time required for the terminal device n to upload the training model to the cloud node for:

[0031]

[0032] In the formula, Z is the size of the neural network model trained in the federated learning architecture, and u is the meaning of uploading the model to the terminal device;

[0033] The total time for terminal device n to complete local training and upload to the cloud node for:

[0034]

[0035] When terminal device n is not selected, the training time of terminal device n in the next round of training is:

[0036]

[0037] In the formula, is the maximum total training time of the terminal device that uploaded the model during the tth round of training, u t It is the set of terminal devices selected by the cloud node in round t to upload the model.

[0038] In step S5, the terminal devices selected in the tth round of training focus on the training time of the slowest terminal device. for:

[0039]

[0040] If a player is not selected in this round of training, he / she will continue to complete the previous round of training in the next round of training. The change of training time is:

[0041]

[0042] The number of training times that terminal device n can complete in round t for:

[0043]

[0044] In step S5, the semi-asynchronous model aggregation model is:

[0045]

[0046] In the formula, w t+1 is the cloud model of the t+1th round in the training process.

[0047] In step S5, the optimization goal of whether the terminal device is selected is:

[0048]

[0049] In the formula, x is the device selection set, α is the set of allocated bandwidth sizes, P is the set of transmit power sizes, and λ is the weight influencing parameter between the amount of data and the training time.

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

[0051] In a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, a semi-asynchronous federated learning method based on cloud nodes and terminal power Internet of Things devices is used to jointly train a shared model, thereby realizing semi-asynchronous communication between cloud nodes and terminal devices to save training time and ensure training accuracy. In the terminal device training process, according to the real-time generation characteristics of power Internet of Things data, it is assumed that the training data of the terminal device arrives in real time and will continue to increase in a random growth manner. Based on this, in semi-asynchronous learning, a terminal device selection method based on the real-time changing dynamic data volume of the device and the training and communication time is designed, and a terminal device training number optimization method is designed during the device training process to ensure that all terminal devices can exert their maximum training potential under limited resources and ensure the learning accuracy of the training network. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of a semi-asynchronous power federated learning network and a communication method thereof based on communication efficiency of the present invention. DETAILED DESCRIPTION

[0053] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0054] See also Figure 1 , a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, the method comprising the following steps:

[0055] S1. Build a semi-asynchronous communication architecture based on the power Internet of Things network. The semi-asynchronous communication architecture consists of a power center cloud node and N heterogeneous terminal devices. The cloud node and the N heterogeneous terminal devices are connected in sequence;

[0056] S2. Design corresponding federated learning training and optimization methods based on the semi-asynchronous communication architecture;

[0057] S3. Build a terminal device update model and calculate the computing time required for the terminal device to complete the local training process;

[0058] S4. Build a data transmission model from the terminal device to the cloud node and calculate the time required for the terminal device to upload the training model to the cloud node;

[0059] S5. Construct a terminal device training and computing time update model. At the same time, construct a semi-asynchronous model aggregation model at the cloud node. For the selected terminal devices, this model will aggregate the trained models in the next round of updates. For the unselected terminal devices, it will aggregate according to the cloud model trained in the previous round.

[0060] Step S2 specifically includes the following steps:

[0061] S21. Construct the loss function model of the neural network in federated learning:

[0062]

[0063] In the formula, F n (w n ) is the loss function of the terminal device n connected to the cloud node, f n (w n , k) is the loss function of the neural network training process of terminal device n, w n is the training model weight value in the neural network of terminal device n, K n is the total data set stored in the training process of terminal device n, |K n | is the size of the entire data set, and k is a data sample during the training process;

[0064] S22. Use the stochastic gradient descent method to train the terminal device to obtain an optimized training weight model:

[0065]

[0066] Where t is the tth iteration of the terminal device during the federated learning training process, and η is the learning efficiency of the stochastic gradient descent method; is the set of terminal devices connected to the cloud node,

[0067] In step S3, the amount of data arriving from the time when the model is successfully uploaded in round t to the start of round t+1 is for:

[0068]

[0069] In the formula, is the number of terminal devices n that have arrived from the last successful model upload to the start of round t, is the amount of data arriving at terminal device n during the tth round of training; Indicates whether terminal device n is selected to upload its local training model in round t. Indicates that it is selected to upload its local training model. Indicates that you do not choose to upload your locally trained model;

[0070] The amount of data used for the aggregation process by terminal device n in round t+1 for:

[0071]

[0072] In the formula, is the amount of data used for the aggregation process in round t by terminal device n;

[0073] The computing time required for terminal device n to complete the tth round of local training for:

[0074]

[0075] In the formula, G n The number of CPU cycles required to complete a data sample calculation for terminal device n, is the size of the data set participating in the local training of the terminal device nn in the tth round, f n is the computing capability of terminal device n.

[0076] In step S4, the transmission rate of the terminal device uploading the training model to the cloud node is:

[0077]

[0078] In the formula, is the transmission rate of the training model uploaded by the terminal device n to the cloud node, is the bandwidth allocation rate that terminal device n can allocate to connect to the cloud node, B is the total bandwidth allocated when the cloud node communicates with all terminal devices connected to it, is the transmission power of the terminal device n when transmitting the training model, is the channel gain when the terminal device n transmits the training model, and N0 is the noise energy in the communication channel;

[0079] The transmission time required for the terminal device n to upload the training model to the cloud node for:

[0080]

[0081] In the formula, Z is the size of the neural network model trained in the federated learning architecture, and u is the meaning of uploading the model to the terminal device;

[0082] The total time for terminal device n to complete local training and upload to the cloud node for:

[0083]

[0084] When terminal device n is not selected, the training time of terminal device n in the next round of training is:

[0085]

[0086] In the formula, is the maximum total training time of the terminal device that uploaded the model during the tth round of training, u t It is the set of terminal devices selected by the cloud node in round t to upload the model.

[0087] In step S5, the terminal devices selected in the tth round of training focus on the training time of the slowest terminal device. for:

[0088]

[0089] If a player is not selected in this round of training, he / she will continue to complete the previous round of training in the next round of training. The change of training time is:

[0090]

[0091] The number of training times that terminal device n can complete in round t for:

[0092]

[0093] In step S5, the semi-asynchronous model aggregation model is:

[0094]

[0095] In the formula, w t+1 is the cloud model of the t+1th round in the training process.

[0096] In step S5, the optimization goal of whether the terminal device is selected is:

[0097]

[0098] In the formula, x is the device selection set, α is the set of allocated bandwidth sizes, P is the set of transmit power sizes, and λ is the weight influencing parameter between the amount of data and the training time.

[0099] The principle of the present invention is described as follows:

[0100] The present invention optimizes whether a device is selected, the bandwidth allocation size and the power transmission size according to the data volume, training times and training time of the device; the data volume is considered to be real-time arrival of device data in real scenarios, and the effect of the device on the model is greatly related to the size of the data volume that arrives. The more effective data a device has, the more helpful it will be to the model. However, since the increase in the device data volume will also increase the device training time, the optimization goal proposed by the present invention is to comprehensively consider the device data volume and training time, and achieve the optimization of the communication architecture under comprehensive consideration; and comprehensively consider the real-time arrival characteristics of device data in the power network scenario and the waste of computing resources caused by the device during idle time, so as to achieve full utilization of sensors connected to heterogeneous terminal devices in the power Internet of Things network and the corresponding real-time dynamic data.

[0101] Since a lot of data will be generated in the power Internet of Things, the use of this data cannot be separated from the help of neural networks. For example, the corresponding fault prediction model can be trained according to the operation data of the equipment. Based on the fault prediction model, the abnormal operation of the equipment can be discovered in time, thereby improving the security of the power Internet of Things. Therefore, in response to different user needs, the present invention will first construct a loss function model of the neural network in federated learning, and use the stochastic gradient descent method to train the data of the terminal equipment, thereby optimizing the network model.

[0102] Aiming at the needs of the power Internet of Things network, the present invention proposes a semi-asynchronous federated learning update method to ensure the efficiency of equipment data calculation and transmission security. Aiming at the shortcomings of the existing synchronous and asynchronous algorithms of federated learning, a federated learning method based on a semi-asynchronous update method is proposed to achieve efficient communication. In addition, the present invention also proposes a method for optimizing the number of training times to fully utilize the computing power of the equipment. Compared with the existing federated learning methods, the semi-asynchronous power federated learning communication network architecture based on communication efficiency and its update method proposed by the present invention can effectively improve the communication performance of the power Internet of Things network and provide an efficient and timely neural network model training method.

[0103] After completing a model training of the terminal device, the trained model needs to be uploaded to the cloud node. In addition, considering that the training data of the power Internet of Things network devices arrives in real time, a terminal device data update method is defined to calculate the computing time required for the terminal device to complete the local training process. Due to the heterogeneity of the power Internet of Things terminal devices, although selecting some devices to upload will shorten the waiting time, the selected devices will also waste computing resources. Therefore, a novel training number optimization method is designed to maximize the utilization of device computing resources. Define the data transmission model from the terminal device to the cloud node, calculate the transmission time required for the terminal device to upload the training model to the cloud node, and construct the terminal device training and computing time update method, and construct a semi-asynchronous model aggregation model at the cloud node.

[0104] Example:

[0105] See also Figure 1 , a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, the method comprising the following steps:

[0106] S1. Build a semi-asynchronous communication architecture based on the power Internet of Things network. The semi-asynchronous communication architecture consists of a power center cloud node and N heterogeneous terminal devices connected to sensors and other data collection methods. The cloud node is connected to the N heterogeneous terminal devices in sequence;

[0107] S2. Design corresponding federated learning training and optimization methods based on the semi-asynchronous communication architecture; specifically, the following steps are included:

[0108] S21. Construct the loss function model of the neural network in federated learning:

[0109]

[0110] In the formula, F n (w n ) is the loss function of the terminal device n connected to the cloud node; f n (w n , k) is the loss function in the neural network training process of the terminal device n. In the traditional neural network, the loss function can be replaced by a linear regression formula, a logistic regression formula or a support vector machine formula to implement the neural network training process; w n is the training model weight value in the neural network of terminal device n, K n is the total data set stored in the training process of terminal device n, |K n | is the size of the entire data set, and k is a data sample during the training process;

[0111] S22. Use the stochastic gradient descent method to train the terminal device to obtain an optimized training weight model:

[0112]

[0113] Where t is the tth iteration of the terminal device during the federated learning training process, and η is the learning efficiency of the stochastic gradient descent method; is the set of terminal devices connected to the cloud node,

[0114] After a certain number of training iterations, the terminal device of the power Internet of Things that uses the stochastic gradient descent method to implement neural network model training will obtain an optimized training weight model;

[0115] S3. Build a terminal device update model and calculate the computing time required for the terminal device to complete the local training process;

[0116] The amount of data arriving at the terminal device from the time when the model is successfully uploaded in round t to the start of round t+1 for:

[0117]

[0118] In the formula, is the number of terminal devices n that have arrived from the last successful model upload to the start of round t, is the amount of data arriving at terminal device n during the tth round of training; Indicates whether terminal device n is selected to upload its local training model in round t. Indicates that it is selected to upload its local training model. Indicates that you do not choose to upload your locally trained model;

[0119] The amount of data used for the aggregation process by terminal device n in round t+1 for:

[0120]

[0121] In the formula, is the amount of data used for the aggregation process in round t by terminal device n;

[0122] The amount of data on the terminal device continues to grow over time, and the training will also continue to grow, so the data needs to be cleared before a certain time to ensure the acceptability of the training time. Therefore, in actual scenarios, outdated data will be deleted (for example, the data of the previous two days will be deleted every five days).

[0123] After completing the training data update process before the terminal device training process, the computing time for one round of terminal device training will be defined. The computing time required for terminal device n to complete the tth round of local training for:

[0124]

[0125] In the formula, G n The number of CPU cycles required to complete a data sample calculation for terminal device n, is the size of the data set participating in local training for the terminal device n in the tth round, f n is the computing capability of the terminal device n, and c is the computing significance of the terminal device;

[0126] S4. Build a data transmission model from the terminal device to the cloud node and calculate the time required for the terminal device to upload the training model to the cloud node;

[0127] After the terminal device completes the training, it needs to upload the training model to the cloud node. Therefore, during the tth round of training, the transmission rate of the terminal device uploading the training model to the cloud node is:

[0128]

[0129] In the formula, The transmission rate of the training model uploaded by the terminal device n to the cloud node; The bandwidth allocation rate that terminal device n can be allocated to connect to the cloud node. The bandwidth allocation method will be optimized according to whether the terminal device is selected as the optimization target, so as to allocate the corresponding bandwidth according to the channel conditions of the terminal device, dynamically adjust the user transmission rate, and improve the communication efficiency of the system. B is the total bandwidth allocated to the cloud node when communicating with all the terminal devices connected to it. is the transmission power of the terminal device n when transmitting the training model, is the channel gain when the terminal device n transmits the training model, and N0 is the noise energy in the communication channel;

[0130] The transmission time required for the terminal device n to upload the training model to the cloud node for:

[0131]

[0132] Where Z is the size of the neural network model trained in the federated learning architecture, and is the meaning of uploading the model to the terminal device;

[0133] Based on the optimized training results, after the terminal device that is to upload the training model in each round of training completes its model upload process, the cloud node will use the collected training models of the terminal device to complete the model aggregation process; due to the strong computing power of the cloud node, the model aggregation time of the cloud node can be ignored; in addition, since the cloud node transmits the aggregated model in the form of broadcast, the model broadcast time can also be ignored;

[0134] The total time for terminal device n to complete local training and upload to the cloud node for:

[0135]

[0136] In the electric power Internet of Things network, the models and computing capabilities of terminal devices are very different. Therefore, due to the heterogeneity of terminal devices, the training time of some devices will be very long. Based on this, the device selection process is designed. However, the devices that are not selected in this round of training will continue to complete their training tasks to ensure the efficiency of the entire electric power federation network.

[0137] When terminal device n is not selected, the training time of terminal device n in the next round of training is:

[0138]

[0139] In the formula, is the maximum total training time of the terminal device that uploaded the model during the tth round of training, u t The set of terminal devices selected by the cloud node in round t to upload the model;

[0140] S5. Construct a terminal device training and computing time update model; at the same time, construct a semi-asynchronous model aggregation model at the cloud node, which will aggregate the trained model for the selected terminal device in the next round of updates; for the unselected terminal devices, aggregate according to the cloud model trained in the previous round;

[0141] Due to the existence of device heterogeneity, after completing the device selection, in each round of training, it is necessary to wait for the slowest user in the selected terminal device to complete the model training task before cloud node aggregation can be performed. Therefore, the present invention proposes a method in which a terminal device can complete multiple local training times within one round of training time. In addition, a semi-asynchronous model aggregation model is also designed;

[0142] For the device set selected for model upload, it is still necessary to wait for the slowest user in the selected data set to complete training before uploading the training model; the existence of device heterogeneity causes some users to complete local training very quickly, resulting in a large amount of device idle time for these devices, which will lead to insufficient utilization of device resources; therefore, for devices that can quickly complete a round of training, the following method will be used to allow them to train several times, so as to fully utilize the device computing resources;

[0143] The training time of the slowest terminal device selected for centralized training during the tth round of training for:

[0144]

[0145] If a terminal device is not selected in this round of training, it will continue to complete the previous round of training in the next round of training. However, its training time will change in the next round of training, which will affect the number of training times of the terminal device in the next round. The change in training time is:

[0146]

[0147] The number of training times that terminal device n can complete in round t for:

[0148]

[0149] During the communication process between cloud nodes and terminal devices, due to the heterogeneous nature of terminal devices, their device types and data sets are very different between terminal devices, resulting in different times for model updates to be completed. The synchronous aggregation method in traditional federated learning algorithms requires waiting for the slowest user to complete training before uploading the model. For users with latency requirements, the waiting time is unacceptable. On the contrary, if an asynchronous update method is used, although the model can be uploaded as long as one user completes training in each round of communication, thereby achieving a shorter latency requirement, the asynchronous update method requires more training rounds to achieve the same training accuracy as the synchronous update. Therefore, a semi-asynchronous communication method that combines the advantages of the synchronous update method and the asynchronous update method can be proposed to solve the problem of device resource waste in traditional federated learning algorithms;

[0150] In each round of training, the cloud node selects some terminal devices to upload models and participate in the model aggregation task. Therefore, the semi-asynchronous model aggregation model is:

[0151]

[0152] In the formula, w t+1 is the cloud model of the t+1th round in the training process;

[0153] The semi-asynchronous model aggregation model will be aggregated accordingly based on whether the device is selected. For the selected devices, their trained models will be aggregated in the t+1th round of updates. For the unselected devices, they will be aggregated according to the cloud model trained in the previous round. This aggregation method will ensure that the aggregated model will not be aggregated into a global model that is helpful to only a few devices because only a few devices are selected. Instead, it will take the training model status of all devices into consideration, thereby ensuring that the trained global model is effective for all devices.

[0154] The optimization goal of whether the terminal device is selected is:

[0155]

[0156] In the formula, x is the device selection set, α is the set of allocated bandwidth sizes, P is the set of transmit power sizes, and λ is the weight influencing parameter between the amount of data and the training time.

[0157] The optimization process is optimized using a reinforcement learning algorithm, which takes the amount of device data, number of trainings, and training time as inputs to the reinforcement learning algorithm, and takes the desired optimization goals such as device selection, bandwidth allocation law, and transmission power as outputs to obtain optimization results; the reward in reinforcement learning is to maximize the optimization goal of the present invention.

[0158] By optimizing this problem, the amount of data and training time can be comprehensively considered in each round of communication to select the terminal device that is most beneficial to the semi-asynchronous power federation network to participate in the cloud model aggregation process. After the cloud model is aggregated, the selected terminal device will receive the aggregated cloud model for the next round of local training.

[0159] The present invention provides a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, which includes a semi-asynchronous federated learning architecture for solving the data training sharing of heterogeneous devices to reduce the calculation and transmission delays in the federated learning scenario, and designs a training number optimization method to maximize the computing power of the device; secondly, a joint terminal device selection and resource allocation algorithm is formulated under the semi-asynchronous federated learning framework to achieve the rational use of resources for computing and communication of heterogeneous devices and ensure the reliability of the federated learning network; finally, a deep deterministic policy gradient algorithm is used to verify the efficiency of the proposed semi-asynchronous power federated learning network. Compared with the existing federated learning methods, the semi-asynchronous power federated learning network based on communication efficiency proposed by the present invention can better improve the communication and computing performance of heterogeneous power networks, and provide a more intelligent distributed learning method for future power interconnected networks.

Claims

1. A semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, characterized in that: The method comprises the following steps: S1. Build a semi-asynchronous communication architecture based on the power Internet of Things network. The semi-asynchronous communication architecture consists of a power center cloud node and N heterogeneous terminal devices. The cloud node and the N heterogeneous terminal devices are connected in sequence; S2. Design corresponding federated learning training and optimization methods based on the semi-asynchronous communication architecture; specifically, the following steps are included: S21. Construct the loss function model of the neural network in federated learning: In the formula, F n (w n ) is the loss function of the terminal device n connected to the cloud node, f n (w n , k) is the loss function of the neural network training process of terminal device n, w n is the training model weight value in the neural network of terminal device n, K n is the total data set stored in the training process of terminal device n, |K n | is the size of the entire data set, and k is a data sample during the training process; S22. Use the stochastic gradient descent method to train the terminal device to obtain an optimized training weight model: Where t is the tth iteration of the terminal device during the federated learning training process, and η is the learning efficiency of the stochastic gradient descent method; is the set of terminal devices connected to the cloud node, S3. Build a terminal device update model and calculate the computing time required for the terminal device to complete the local training process; The amount of data arriving at the terminal device from the time when the model is successfully uploaded in round t to the start of round t+1 for: In the formula, is the number of terminal devices n that have arrived from the last successful model upload to the start of round t, is the amount of data arriving at terminal device n during the tth round of training; Indicates whether terminal device n is selected to upload its local training model in round t. Indicates that it is selected to upload its local training model. Indicates that you do not choose to upload your locally trained model; The amount of data used for the aggregation process by terminal device n in round t+1 for: In the formula, is the amount of data used for the aggregation process in round t by terminal device n; The computing time required for terminal device n to complete the tth round of local training for: In the formula, G n The number of CPU cycles required to complete a data sample calculation for terminal device n, is the size of the data set participating in local training for the terminal device n in the tth round, f n is the computing capability of the terminal device n; S4. Build a data transmission model from the terminal device to the cloud node and calculate the time required for the terminal device to upload the training model to the cloud node; The transmission rate of the terminal device uploading the training model to the cloud node is: In the formula, is the transmission rate of the training model uploaded by the terminal device n to the cloud node, is the bandwidth allocation rate that terminal device n can allocate to connect to the cloud node, B is the total bandwidth allocated when the cloud node communicates with all terminal devices connected to it, is the transmission power of the terminal device n when transmitting the training model, is the channel gain when the terminal device n transmits the training model, and N0 is the noise energy in the communication channel; The transmission time required for the terminal device n to upload the training model to the cloud node for: In the formula, Z is the size of the neural network model trained in the federated learning architecture, and u is the meaning of uploading the model to the terminal device; The total time for terminal device n to complete local training and upload to the cloud node for: When terminal device n is not selected, the training time of terminal device n in the next round of training is: In the formula, is the maximum total training time of the terminal device that uploaded the model during the tth round of training, The set of terminal devices selected by the cloud node in round t to upload the model; S5. Construct a terminal device training and computing time update model; at the same time, construct a semi-asynchronous model aggregation model at the cloud node, which will aggregate the trained model for the selected terminal device in the next round of updates; for the unselected terminal devices, aggregate according to the cloud model trained in the previous round; The training time of the slowest terminal device selected for centralized training during the tth round of training for: If a player is not selected in this round of training, he / she will continue to complete the previous round of training in the next round of training. The change of training time is: The number of training times that terminal device n can complete in round t for: The semi-asynchronous model aggregation model is: In the formula, w t+1 is the cloud model of the t+1th round in the training process.

2. According to claim 1, a semi-asynchronous power federated learning network based on communication efficiency and a communication method thereof, characterized in that: In step S5, the optimization goal of whether the terminal device is selected is: In the formula, x is the device selection set, α is the set of allocated bandwidth sizes, P is the set of transmit power sizes, and λ is the weight influencing parameter between the amount of data and the training time.

Citation Information

Patent Citations

  • Semi-asynchronous hierarchical federated learning updating method based on timeliness

    CN113988160A

  • Efficiency optimization method for federated learning in mobile edge network

    CN114154646A

  • Federal learning resource management method for battery-powered Internet of Things equipment

    CN114423085A

  • Wireless service traffic prediction method based on weighted federated learning

    WO2021169577A1