## 2 Related Work  
Recently, researchers have conducted extensive studies on using WSNs to monitor railway tunnels [20]. Since the nodes in the network are deployed randomly, network topology discovery before monitoring is necessary. In [21], a cloud-orchestrated physical topology discovery scheme for large-scale IoT systems is proposed. It comprises two stages, logical topology discovery and three-dimensional localization. The scheme improves the efficiency and accuracy of logical topology discovery using the parallel Metropolis-Hastings random walk algorithm. It employs the discovered logical topology and multidimensional scaling method combined with drones for global three-dimensional localization. However, despite the high precision of existing methods, they also involve high costs and complexity. In railway tunnel monitoring, the deployed nodes are often resource-constrained, and this scheme has high computation, communication, and energy consumption requirements. It may not be suitable for such resource-limited environments, especially with the need for cloud coordination and parallel computing. Due to the often unattended or harsh environments of monitoring areas, extending the lifespan of WSNs presents a significant challenge, with energy balance being a key factor determining network lifespan. Extensive research has been conducted on this. In [22], a novel hybrid optimization algorithm, the Cuckoo Insisted-Rider Optimization Algorithm (CI-ROA) is proposed for cluster head selection in WSNs. The CI-ROA combines the advantages of the Rider Optimization Algorithm (ROA) and the Cuckoo Search Algorithm, aiming to significantly extend network lifespan by minimizing node distance, stabilizing energy, and reducing data transmission delay, but it may increase routing overhead. Although this strategy increases the algorithm's complexity, it may also raise the difficulty of implementation and deployment, especially on resource-limited nodes. The algorithm's performance is likely to be highly sensitive to the initial parameter settings. If the parameters are not chosen correctly, it may lead to suboptimal optimization results or even affect the network's overall performance. In [23], an improved Stable Election Protocol-Energy Consider (SEP-EC) is proposed for multilevel heterogeneous WSNs. Building on the original SEP, this version extends its applicability to multilevel heterogeneous networks and introduces optimization based on node residual energy to enhance energy balance. The SEP-EC combines multipath routing with load energy balancing and link prediction mechanisms, effectively balancing network energy, reducing packet loss and delay, and improving routing discovery efficiency. However, it may lead to more difficulty in algorithm implementation and maintenance. Additionally, it overly relies on the optimization of heterogeneity between nodes. If the energy levels of the nodes in the network are relatively similar, the protocol's advantages may be challenging to realize fully. The paper in [24] proposes the Destination Oriented Routing Algorithm (DORA), which uses a mathematical analysis model to calculate the optimal transmission distance between any two nodes to minimize energy consumption and improve network efficiency. DORA selects the farthest forwarding node within the communication range based on this optimal distance. It constructs a multilink routing structure according to the direction toward the sink point, thereby effectively reducing energy loss. Moreover, the algorithm optimizes energy usage and extends network lifespan by employing a short-link strategy and dynamically adjusting the number of clusters and link configurations. However, DORA selects the farthest forwarding node within the communication range, which in some cases may increase the risk of packet transmission failure, especially when the communication environment between nodes is poor, or the channel quality is suboptimal, potentially leading to data loss or increased transmission delay.