## 4 Slp-macgt Model Design
### Relay Node Selection Strategy  
In order to further protect the location privacy of the source node and make the actual location of the source node more difficult to observe or trace externally, the selection of relay nodes is very important. Once panda data are monitored, the source node periodically generates packets and transmits them to the sink node via multiple hops. The strategy proposed in this paper is divided into four distinct stages and is shown in Algorithm 1. 1. Limited Flooding: The source node uses limited Flooding to transmit messages within the monitoring range, and the number of hops is limited to \(H\) to achieve directional routing. Once the target enters the monitoring range, the source node sets a timer and broadcasts the message \(\textit{{Smessage}}=\{\textit{{1D}},\textit{{Stime}}\}\) to the nodes within the range of \(H\) hops, and the \(\textit{{1D}}\) of the sensor node is used as a unique identifier. _Stime_ is set to the maximum transmission time \(H\), which decreases with the transmission time until it reaches zero, when the receiving node stops forwarding messages. A node \(\textit{{1D}}\_v\) receiving message _Smessage_ is marked as visible if its \(\textit{{Hop}}_{count}\) is less than \(R\) (communication radius < eavesdropping distance). During the Flooding process, each node receiving message _Smessage_ can obtain the minimum hop count from the source node to the node itself;
2. H-hop-directed routing: According to the minimum number of hops from neighboring nodes to the source node, the next-hop node is selected for H-hop-directed routing to participate in packet forwarding. The forwarding time starts at zero and is increased by one for each execution until \(H\) is reached. The farthest H-hop neighbor node acts as participant M and is responsible for forwarding the packet from the source node;  
Figure 2: Setting virtual coordinates. 3. Greedy quantitative routing: The length of greedy quantitative routing is defined as \(L\), and the relay node N forwards the data packet to the sink node with a transmission time of \(L\). In this process, care should be taken to randomly select a relay node N from the unseen region;
4. Multi-path forwarding routing based on relay nodes: Node N generates angle \(\tau\), where \(\tau\in[0,\pi]\), and randomly completes a variable length equal-hop path \(H_{m}\) in the counterclockwise or clockwise direction to reach the next relay node O. Node O randomly selects an \(I\)-step equal-hop route to reach the sink node. ```
Input: Source Node, Communication Radius, Monitoring Range Output: Selected Relay Nodes
```  
Limited Flooding:  
1: Set the maximum transmission time \(Stime\) to a predefined value;
2: Initialize the hop count \(H\) to limit the number of hops for directional routing;
3: Broadcast a message within the monitoring range;
4: Nodes receiving the message mark themselves as visible if their distance is less than the communication radius \(R\);
5: Calculate the minimum hop count from the source node to each visible node;
6: Relay Node Selection:  
6: Identify relay nodes based on the minimum hop count and visibility;
7: The farthest neighbor node of the \(H\) hop acts as participant M and forwards the data packet away from the source node;
8: The node that forwards the packet to the Sink node by forwarding time \(L\) is selected as the next relay node N;
9: The relay node N generates angle \(\tau\) and randomly completes a variable length equal-hop path to reach the next relay node O;
10: Node O randomly selects an \(I\)-step equal-hop route to reach the sink node;
11: Ensure the relay node is positioned to obscure the actual location of the source node; Path Establishment:  
12: Establish secure transmission paths through selected relay nodes;
13: Ensure data packets are forwarded through relay nodes to reach the sink node;
14: Maintain the integrity and confidentiality of data transmission;  
End of Transmission:  
15: Stop the transmission process once data packets reach the sink node.