## 4 Methodology
### Route Discovery  
Suppose that the SNs are structured as graphs \(G\), where \(G(D,L)\) represents the graph, \(L\) represents the optimal links between the two closely linked nodes \(n_{1}\) and \(n_{2}\), and \(D\) is the density of the SNs. The MHSEER protocol uses the heuristic method in the first stage to estimate the relative weight for locating the best node as the next hop. The decision to route in the direction of the target node is guided by the heuristic function [34]. The source node validates its route entrance against the BS in a local database to start the discovery process. If it is discovered that the route meets the criteria for a number of hops to the BS  
Figure 3: Design of the proposed method.  
(\(h\)), the degree of integrity of the link (\(dl_{i}\)), and the accumulated energy (\(e_{i}\)), the source node is selected as the next hop, and the packages are transferred directly to it [35]. Additionally, suppose that there is no viable route available that satisfies the routing criteria in the local database of the source node. In that case, each of the neighboring nodes must participate in the process of choosing the next hop. While accessing the affected links, the link integrity degree uses the hash function of cryptography to ascertain if the transmitted number of packets has been altered. Suppose node \(i\) endangers a probe packet with p bits and sends it to node \(j\)[36]. To identify its message code, \(M_{c}\), node \(i\) first delivers the probe packet \(p_{1}\) to the hash function. Second, the received \(M_{c}\) is added as \(p_{1}+M_{c}\) to the real probe packet and sent to node \(j\). Node \(j\) recalculates \(M_{c}\) of the probe packet received by \(p_{1}\) after receiving it along with \(M_{c}\). One is used to denote the high threshold value, and zero is used to denote the low threshold value. The link's high threshold value indicates that it is very trustworthy and has a low fault rate. Residual energy aggregation \(e_{i}\) is estimated in two stages [9]. The residual level \(e_{l}\) is first continuously watched by each node, and then the residual energy's rate \(e_{r}\) is calculated using Equation (1).  
\[\sum me_{n}-ce_{n} \tag{1}\]  
where \(n\) is the neighbour, \(me_{n}\) is the maximal energy, and \(ce_{n}\) is the neighbour's energy consumption.  
The node with the most accumulated residual energy is consequently assigned the highest precedence. Finally, the node examines the equivalent value that represents the hop count to the BS in its local table. The closer the node is to the BS, the less communication is required to transfer data, as indicated by a lower value. The heuristic function \(h_{f}\) is then determined by adding all of the measured values of the accumulated residual energy, the integrity of the link, and the number of hops in a stack, as shown in the Equation (2).  
\[h_{f}=a*(e_{l}+e_{r})+b*\frac{1}{h}+c*dl_{i} \tag{2}\]  
where \(a,b\), and \(c\) are the weighting coefficients and provide the heuristic function with a meaningful effect. Following the computation of \(h_{f}\), every neighbor node communicates its knowledge to the SN to forecast the best course of action to take to reach the BS. The neighbor node with the highest \(h_{f}\) indicates a superior rank for choosing the next hop. The proposed method uses the meta-heuristic protocol, which maximizes the suitable next-hop in a subset, to analyze the linked graph. In order to save memory and preserve the untrusted node while finding the next hop, the protocol creates node databases [37]. The beam meta-heuristics provide the method for choosing the best node as the next hop based on each node's greatest value. If we assume that, using beam heuristics, \(h_{f0},h_{f1},\ldots,h_{fn}\), which have the highest weight value, then the weighted total \(S(f_{n})\) can be denoted as provided in the Equation (3)  
\[S(f_{n})=\sum h_{fi} \tag{3}\]  
where \(i\) = 0,1...,\(n\).