# Cluster Head Selection Method for Edge Computing WSN Based on Improved Sparrow Search Algorithm
## 2 Related Works  
Edge computing and WSNs have spread throughout people's daily lives, such as environmental monitoring, smart grid, smart transportation, and intelligent agriculture [15; 16]. The energy consumption of the WSN system can be effectively reduced through edge computing technology, and the network's life can be extended. Just as [17] constructed an edge computing IoT architecture, the efficiency of calculation and the accuracy of calculation results are guaranteed through an adaptive hierarchical sampling method. Similarly, Ref. [18] proposes a task model in edge computing and a cluster-based heterogeneous WSN model and uses a task allocation algorithm that combines genetic algorithms and ant colony optimization algorithms to balance loads and reduce system energy consumption. The work in [19] aims at the problem that the traditional data cleaning method relying on sensor nodes affects cloud processing and proposes a data cleaning method based on mobile edge nodes, which can improve data cleaning efficiency while maintaining data reliability and integrity and effectively reduce energy consumption. The work in [20] designs an IoT-based cluster-based routing protocol and optimized cluster head selection, improving energy efficiency and network life. Similarly, Ref. [21] uses UAVs to assist the auxiliary wireless sensor network to complete the data collection work efficiently. The work uses drones as edge servers to effectively improve the efficiency of data collection. However, the energy of drones is limited and cannot complete data collection for a long time. Our edge servers mainly rely on base stations, which can assist in data collection for a long time.  
Intelligent optimization algorithms have been widely used in the optimization of wireless routing protocols and the optimization of cluster head nodes [22; 23; 24; 25]. The work in [13] uses a gray wolf optimization algorithm to select the best cluster head in WSN, saving energy and prolonging the network's life. The work in [26] proposes a new ant colony WSN optimization strategy and designs a corresponding routing algorithm to extend the entire network's life cycle by balancing each sensor node's energy consumption. The work in [27] proposed an energy-saving cluster head selection algorithm based on particle swarm optimization, which considers the distance and remaining energy of nodes in the cluster and designs an efficient fitness function, which saves the energy of sensor nodes and extends the WSN lifetime. The fitness function described in [28] takes into account factors such as residual energy, distance to the sink, and node density to improve the selection of cluster heads. An improved genetic algorithm is proposed to select the best cluster head node, effectively improving network lifespan. The work in [29] proposes a WSN clustering routing algorithm based on a hybrid genetic tabu search. The cluster head selection process introduces node residual energy and node distance, effectively improving routing efficiency. The work in [30] proposed an energy-aware cluster routing protocol based on a seagull optimization algorithm for animal husbandry WSN, which can prolong the life of the network and reduce the end-to-end delay. The work in [31] initializes the population by selecting nodes in the monitoring area to increase the diversity of the population and uses the proposed optimization algorithm to choose a better cluster head set, which balances the energy consumption of sensor nodes, thereby prolonging the life cycle of the network.  
Unlike the above studies, we propose a two-layer WSN system based on edge computing. The edge server can monitor the underlying WSN nodes and assist in the selection of cluster head nodes. Finally, the improved sparrow search algorithm (ICSSA-CHS) optimizes the selection of cluster heads, balances the energy of sensor nodes, and improves the life cycle of the network.