## 4 Optimization of Cluster Head Selection
### Node Sleep Scheduling Algorithm  
The network lifetime is divided into different time periods, and each time section is divided into a node self-organizing scheduling stage and a working stage. Node selection is responsible for monitoring the target object in the scheduling phase, and the cluster head nodes target data acquisition at the cluster for forwarding to the sink node, while other nodes enter a sleep state. First, they perform as a neighbor node and broadcast a Protocol Independent Multicast (PIM) message. Inorder to avoid multiple nodes and sending the PIM message leading to channel conflict and message loss, in sending the PIM message we wait for a random time. The PIM message contains a node ID, node residual energy, location and other members in the cluster node ID and other information. A redundant coverage judgment needs to consider the coverage of all neighbor nodes. In order for this stage to have a minimum energy overhead, it just makes sure of the transmission distance to its one-hop neighbor nodes when sending a PIM message. In this way, each node can only receive data from one-hop neighbor nodes which send the PIM message. After collecting all the infor timeafter mation of neighbors, if we judge there is redundant coverage nodes, each node before dormancy waits for a period of time in order to avoid also being judged themselves as redundant nodes and the emergence of coverage blind spots. This waiting rule is implemented by setting the timer for a certain period of time after the end of the transition to a dormant state. Therefore, this paper introduces a node residual energy balance priority scheduling mechanism. For the cover-relevant nodes \(\mathbf{s}\) and \(\mathbf{V}\), if the initial energies are \(E_{u}\) and \(E_{v}\), then the corresponding residual energies are \(E_{res}(u)\) and \(E_{res}(v)\). We set the timer as follows:  
\[T_{off}(u)=\mu(1-\left|E_{u}-E_{res}(u)\right|/E_{res}(u))t_{u}\text{ and }T_{ off}(v)=\mu(1-\left|E_{v}-E_{res}(v)\right|/E_{res}(u))t_{v} \tag{23}\]  
where \(t_{i}\) is the current time of node \(i\), \(i=s,v\), and \(\mu\) is the adjust parameters of system. The specific node sleep scheduling mechanism is given as follows:  
1. if \(T_{off}(v)\
eq T_{off}(u)\), the timer is as a node sleep standard. 2. if \(T_{off}(v)=T_{off}(u)\), node ID is as priority dormancy mechanism. In order to realize the activation of residual energy balance between nodes, reduce the activation of the nodes in a cycle exhausted energy probability, the value of \(T_{off}(i)\) should be set. If \(T_{off}(v)\) is equal to \(T_{off}(u)\), then according to their ID number they will decide whether to sleep to not destroy the residual energy discussed in the above equilibrium principle. Judging whether a node has redundant coverage, the average residual energy of the related node residual energy is closer, while its dormant waiting time is longer, and the probability of dormancy is smaller. Each redundant node must send a source-specific multicast (SSM) message to the cover before the related nodes sleep. If it receives the SSM message of other nodes before the end of timing, the node will workas an active node, and mark the sending node dormancy. Finally, the node is removed from active neighbor list. In order to further improve the network coverage quality, the node cannot immediately fall into hibernation, so as to continue to wait for the preparation period of time known as the dormancy. If the node receives the SSM message in the dormant preparation period, it should judge whether it can sleep, otherwise, it immediately turns into an active node. In order to save energy, all nodes should fall into the sleep preparation period regardless of the final conversion to whatever state. Each node determines its state in the finish node self-scheduling, and will maintain a period of time until the system satisfies the preset coverage quality. Then, the sleep nodes are wakening up, and a new round of neighbor discovery and state scheduling is started.