| Federated learning is a new distributed machine learning technology,which enables distributed machine learning in the Internet of Things to ensure efficiency and protect user privacy to a certain extent.In each iteration,the devices participating in federated learning each train the local model with their own local data set,and then upload the local model(rather than user data)to a central server for aggregation,which synthesizes a global model.While federal learning has shown great promise,several key challenges remain to existing efforts.First of all,federated learning has security issues,Malicious devices can poison the local data set or tamper with the local model to make the training effect of the global model worse,and the central server also has the risk of poisoning or crashing.Secondly,there are efficiency problems in synchronous federated learning.Each device will upload the model at the same time in each round of global iteration,leading to the failure of devices with strong computing power to upload the local model in time,resulting in a waste of local training time.Finally,federated learning is also used in some wireless scenarios with limited bandwidth and energy consumption.How to rationally allocate the local training and upload time of each device so as to maximize the utilization of resources is an area less covered by existing researchs.In view of the deficiencies existing in the current federated learning framework,this paper carries out the following research:(1)An asynchronous federated learning algorithm based on blockchain is proposed.The decentralization and immutability of blockchain guarantee the security of federated learning,while asynchronous federated learning improves the efficiency of federated learning.Under this framework,a new entropy-weight method is proposed to measure the proportion of devices in the global aggregation.Then,the energy consumption and update efficiency of each device are balanced by reasonably adjusting the time delay in local training and model uploading.In terms of blockchain layer,this paper proposes a method to optimize the delay of blockchain.Extensive simulation results show that the proposed framework has higher efficiency and performance in preventing poisoning attacks than other distributed machine learning methods.At the same time,the proposed framework has obvious advantages over the original algorithm in efficiency.(2)In wireless scenarios with limited bandwidth and energy consumption,this paper considers the device scheduling method in asynchronous federated learning,and proposes a scheduling algorithm combining algebraic solution and DQN algorithm.The algorithm takes into account the energy consumption,time delay,upload times and data set quality of each device,and uses Lyapunov algorithm to optimize the energy consumption of the device.Finally,extensive simulation results show that compared with other algorithms,the proposed device scheduling method in wireless scenarios has obvious optimization in terms of time delay and energy consumption. |