# Node Screening Method Based on Federated Learning with IoT in Opportunistic Social Networks
###### Abstract
With the advent of edge intelligence, more and more intelligent applications will be trained and executed on the edge side, and node selection algorithms based on edge computing have become a hot topic in research. However, previous researchers did not notice that the size of the data set on the terminal is often different [11], and the data may not meet the independent distribution characteristics, which makes the training quality of the local model different [12]. At the same time, not all terminal devices tested at the edge are perfect, and some malicious nodes may tamper with the training results, which will cause data loss and poor data reliability. Therefore, how to reasonably select equipment to participate in the calculation to complete node selection is an urgent problem to be solved [8; 9; 10; 11]. Many materials use deep learning algorithms such as Q learning, deep Q learning, etc., but these algorithms still have the problems of difficulty in determining the learning rate and low convergence rate [12]. To solve the problems of low data transmission efficiency, unstable transmission, and user privacy leakage in opportunistic social networks, combined with the relevant characteristics of the nodes in the opportunistic social network, this paper decided to adopt a distributed model training architecture based on federated learning (FL) to deal with the problem of node selection during message transmission. This paper proposes a FABD, FL node selection algorithm based on Distributed Proximal Policy Optimization in IoT algorithm based on federated learning. Under the FL-based distributed training architecture, edge-tested terminal devices can use the data collected by themselves to perform training tasks locally, and then upload the trained local model parameters to the cloud server for model aggregation. After completing the aggregation, evaluate the heterogeneous data quality and training capabilities of the terminal equipment, and select nodes based on the training data. In the opportunistic social network environment, our FABD algorithm can also obtain the optimal set of nodes more efficiently. The main work of this paper is as follows:  
1. In order to achieve high-quality data transmission, it is necessary to evaluate nodes. Therefore, this paper establishes a community model in opportunistic social networks, divides nodes into different communities according to their evaluation results and node properties, and studies nodes within the community. Select relevant content to improve the efficiency of data transfer. 2. To realize the screening of malicious nodes and the selection of heterogeneous device nodes, this paper establishes the FL distributed training system architecture based on deep reinforcement learning. Then, a node selection-oriented accuracy optimization problem model is constructed, which aims at minimizing the overall loss function of the participating equipment during each FL iteration process and satisfies the constraints including transmission and calculation delays. 3. A node selection algorithm based on distributed near-end strategy optimization is designed, and the device node selection problem in federated learning is constructed as Markov decision optimization (MDP), and actions, state spaces, and reward functions are defined. Based on the thread and PPO algorithm, a DPPO-based node selection algorithm is designed to optimize the problem and solve it. 4. Based on a variety of data sets and diversified simulation training, the proposed algorithm and other routing algorithms are simulated experimentally to verify the performance. The experimental results show that the model and data transmission method proposed in this paper has a higher delivery rate, better delay performance, so it can improve data transmission reliability than other algorithms in different environments. At the same time, the algorithm has good convergence and robustness.