## 3 Proposed Method
### Link Detection and Repair Strategy  
The improved geographic routing protocol and tree-based routing protocol fully balance the network energy consumption and prolong the network lifetime. However, in some communication environments with more complex node distribution, the reliability of the network cannot be fully guaranteed. Figure 4 demonstrates this situation, when node A transmits data, nodes B and C are both hopeful nodes, but node A will choose node C as the next hop because it is closer to sink, which leads to an infinite loop. It can be seen that selecting the hopeful node as the next hop does not ensure that the data can be transmitted back to the sink successfully. Figure 4: The schematic of link detection and repair process. Figure 3: The schematic of the tree-based routing protocol. In this regard, we propose a novel link detection and repair scheme, we propose valid node, invalid node, and break node in this scheme based on the concepts of hopeful node and hopeless node. We define a valid node as a node whose data can be transmitted back to the sink successfully through single hop or multiple hops, while the data of a node that cannot be transmitted back to the sink is an invalid node, and a break node is a node whose next hop is about to fall into an infinite loop or a node whose next hop is missing. This link detection and repair scheme has three stages. * First stage: Link detection Each node periodically sends a link detection command, which is transmitted along only a selected next hop and does not require a flooding approach. At the beginning, all nodes are defaulted as valid nodes, and the node detects along the next hop, once the break node is detected, the break node will send a feedback message to go back along the original route and mark all the nodes on the route as invalid nodes. The node whose data arrive at the sink normally does not need a feedback message, marking it as a valid node by default, so that the detection is energy-efficient. * Second stage: Link repair After nodes are marked as invalid nodes, each invalid node sends a \"is it a valid node\" command to the neighboring nodes, and if there are valid nodes in the neighboring nodes, they will send residual energy information to the invalid node, the invalid node picks the node with the largest remaining energy as the next hop based on the remaining energy information it receives and marks the status of the invalid node as a valid node. The invalid nodes that have not found a valid neighbor node go to the third stage. * Third stage: Link examination All invalid nodes send inquiry commands along the next hop, and the node that receives the inquiry command starts to judge if it is a valid node, then it replies the \"node is valid\" message to the corresponding node along the previous hops. If it is not a valid node, it continues to send the inquiry command to the next hop. If a valid node appears in the path to the original break node, the node continues to transmit data and marks its status as a valid node. On the contrary, the invalid node enters into energy-saving mode and stops data transmission to conserve energy and waits for the next path detection. Algorithm 2 shows the pseudocode of the link detection and repair process. This link detection and repair scheme effectively solves the blindness as well as unreliability problem of the data transmission in the improved geographic routing protocol, which is a further optimization and modification of the improved geographic routing protocol, and greatly improves the inaccuracy problem of data transmission due to the complex distribution of nodes as well as the routing hole problem that occurs with the death of nodes. In Figure 4, after the data sent by node A encounter break node C, the link repair strategy is enabled and successfully connects to the valid node B, and the network resumes normal communication.