A Wireless Mesh Opportunistic Network Routing Algorithm Based on Trust Relationships

To solve the problem of low message delivery rate and high network resource consumption when forwarding messages in opportunistic networks, an opportunistic routing algorithm based on trust relationships for wireless mesh networks is proposed. Firstly, the wireless mesh network is analyzed and the opportunistic routing model is constructed; By analyzing the security mechanism and security threat of communication entities, then measuring the trust degree of links and nodes, establishing the trust relationship between nodes, and defining and quantifying a new security measurement method based on the trust model; Finally, according to the security measurement method defined by the model, select the node with high trust value to participate in the message forwarding process. At the same time, give priority to the node with greater trust with the destination node as the relay node, and allocate the message copy according to the trust degree to make the message pass along the direction of increasing trust, to complete the design of opportunistic routing algorithm in wireless mesh networks. Experimental results show that the routing algorithm can effectively improve the message delivery rate, up to about 95%, and reduce the consumption of network resources.


I. INTRODUCTION
Wireless Mesh Networks (wireless Mesh network, referred to as ''WMN,'' wireless Mesh network or wireless Mesh network) can not only form a self-organizing network and multi-hop network but also form a certain hierarchical structure and be compatible with other networks. It has become a kind of Internet access solution for community broadband in the metropolitan area network, It is different from any traditional wired or wireless network and has some unique advantages. Wireless Mesh network greatly improves the coverage of wireless systems and has the advantages of low cost, fast networking, self-organization, high bandwidth, good compatibility and scalability [1], [2]. As wireless Mesh structure can solve the ''last 1 km'' network access bottleneck problem, it has been written into the IEEE802. 16 (WiMax) wireless broadband access network standard, which is now into the IEEE802. 15 Mesh and is working on IEEE802.11 s Mesh has become a research hot spot in recent years, and opportunistic routing is one of the important research directions [7]. Opportunistic routing is a Mobile Ad hoc network with the characteristics of a general delay-tolerant network, based on a ''store-carry-forward'' message transmission mechanism. When a node receives a message, it stores the message in the local cache and then carries the message until it encounters a suitable relay node for forwarding. The opportunistic routing makes full use of the broadcast characteristics of wireless communication and selects multiple potential forwarding nodes to improve the success rate of packet forwarding. Opportunistic routing is required to solve two main problems of the selection and sorting of the forwarding list.
As one of the key technologies of WMN, routing protocol is a hot research topic at home and abroad. Patil et al. [8] proposed a trust -and opportunity-based routing framework in wireless sensor networks using hybrid optimization algorithms, which operates in two key aspects: One is to select the security node, the other is to select the opportunity node from the selected security node, and based on the fitness parameters trust, distance, delay and connectivity, the proposed M-CSO is used to optimize the selection of opportunity node, but this technology has the problem of high packet loss rate. Ziaur et al. [9] proposed a fully opportunistic routing algorithm for underwater wireless sensor networks, and proposed an arbitrary broadcast, geographic and fully opportunistic routing algorithm called TORA for UWSN. The nodes in the network are located recursively by arrival time and range-based equations. The position coordinates and residual energy are then used as a matrix to select the best available transponder. All packets may or may not be acknowledged, depending on the state of the sender and receiver. Therefore, the number of confirmations for a particular packet can jump from 0 to 2. Extensive simulations were performed to evaluate the performance of the proposed scheme for high network traffic loads in very sparse and very dense network scenarios, but the technique has poor message delivery across the network. Chithaluru et al. [10] proposed an improved opportunistic routing based on adaptive sequencing in wireless sensor networks. After analyzing that the sleep state of nodes is an infeasible mechanism, cluster heads and node sets participating in routing are determined. However, this technology has the problem that the throughput decreases greatly when the load increases.
To solve the above problems, a trust-based opportunistic routing algorithm for wireless mesh networks is proposed. By analyzing the wireless mesh network, the routing model is designed according to the characteristics of the network, the risk factors of security mechanism between communication entities are considered, and the trust degree of each node in the network is calculated, and a certain security measurement method is determined. This method is used to diffuse between nodes, enhance the trust relationship between nodes and enhance the routing effect. Compared with the existing methods, the time overhead in the routing process of this method is shorter and the throughput is larger.

II. ANALYSIS OF OPPORTUNISTIC ROUTING IN WIRELESS MESH NETWORKS A. WIRELESS MESH NETWORK ANALYSIS
To realize the design of an opportunistic routing algorithm in wireless mesh networks, it is necessary to analyze the characteristics of the wireless network [11].
An air backbone network is a flexible and efficient Mesh network constructed by a large air backbone platform with a large load [12], long space capacity and stable connection through wideband data link in the form of wireless Mesh. User nodes (such as fighter jets) are connected to the air backbone network to realize information transmission and interaction. The air backbone node has mobility, so the air backbone Mesh network has mobility and is not completely stable compared with the access nodes of the ground backbone Mesh network. However, the characteristics of the large air backbone platform with poor tactical mobility and high node stability make the air backbone Mesh network have stronger stability than the aviation self-organizing network. The air backbone Mesh network can ensure that the network structure remains relatively stable within a certain period under the influence of external non-wars destruction factors, and the topology of each backbone access node remains unchanged. Therefore, its network topology can be illustrated in Fig. 1. In the data transmission process of each node in the network topology diagram, it is assumed that only one node can be used as the source node to transmit data, only one node can be used as the destination node to receive data, and the other nodes are used as intermediate nodes to participate in data forwarding.

B. THE CONSTRUCTION OF OPPORTUNISTIC ROUTING MODEL
Based on the characteristics of opportunistic routing and node topology determined above [13], [14], to improve the quality of routing, this chapter designs the trust relationship model of opportunistic routing and determines the nodes in the network through this model. VOLUME 10, 2022 Figure 1 is abstracted to obtain the node model of the air backbone Mesh network, which is transformed into a directed graph G = (R, E, D), where the set R represents all nodes within the network coverage range, including network nodes r i = {r 0 , r 1 , r 2 , · · · , r n , r n+1 }. The set represents the communication link e ij ∈ E formed between any two nodes r i , r j ; The set D represents the successful delivery rate between two nodes when data packets are transmitted in the link. The delivery rate of the link between any two nodes r i and r j is represented by Assuming that in the process of sending data packets from the source node to the destination node, the delivery rate among nodes is constantly participating in data transmission and reception, and the coherence time of single-channel is much longer than the transmission time of data packets in the channel. It can be assumed that the links between the same node and different neighbours remain statistically independent. To realize the high efficiency of data transmission among forwarding nodes in the node cooperative transmission, suppress data re-transmission, and deal with the asymmetry of bidirectional link at the same time, and ensure that the reply sent by forwarding nodes after receiving packets can be received by sending nodes, a trusted response mechanism can be introduced to ensure that the response success rate is close to 100%.

1) THE CONSTRUCTION OF THE ROUTING MODEL
According to the determination of the trust relationship of opportunistic routing, to realize the research of this paper, it is necessary to process the data packets sent by the nodes and build the routing model on this basis. Set s, d ∈ R as any two nodes in the node-set R, which are used to send and receive packets respectively. Variable F: R × R → V represents the forwarding priority of each node in the ordered forwarding node-set V s,d formed from the source node to the destination node. V s,d represents the forwarding list formed from the source node to the destination node, As the subscript increases in the node-set, the priority increases accordingly. Any node r i can forward packets to the destination node. Only the node with the highest priority can forward packets. Among all forwarding nodes that receive the data packet, each node responds in turn according to the forwarding priority order.
Set p r i ,r j denote the probability, which is that a data packet sent by a node r i ∈ V s,d to a destination node is received by a node r i (i < j) with a higher priority than the node r i , but not received by a node r k (j < k) with a higher priority r j . According to the statistical independence of the link transmission data packet, it can be obtained: According to the above definition, the routing and node forwarding model can be shown in Fig. 2.

2) TRUST MODEL AND SECURITY MEASUREMENT
Based on the historical interaction information between nodes and the recommendation information of trusted neighbour nodes, a trust evaluation model is established to analyze and judge the trusted status of nodes timely and accurately [15], [16]. Selfish nodes can be refused to participate in the process of message forwarding, and cooperative relations with low-trust nodes in the network are avoided to ensure safe and reliable communication between nodes.
The direct trust relationship between nodes is estimated and judged by periodically observing the interaction behaviour between nodes. At the same time, the indirect trust relationship between nodes is estimated and judged according to the recommendation information of trusted neighbour nodes, so the direct trust relationship and indirect trust relationship are considered comprehensively when judging the trust relationship. Communication link and routing node are two key network devices. Whether a node can safely forward packets to its neighbour depends on two aspects: on the one hand, the reliability of the link connected to; on the other hand, the reliability of neighbour nodes. Therefore, a trust relationship between neighbour nodes (trust pair) is proposed to establish secure information storage and forward a trusted path for communication between source and destination by packet. It assumes that links are secure and there are only two trust relationships between nodes, which are trusted or untrusted. Considering the simplicity of the trust theory, the trust model is improved and the concept of trust is used to describe the trust relationship between nodes more accurately.
Definition 1: The concept of Trust Degree (TD) includes the trust degree of communication links and the trust degree of routing node. When TD t e ij is set, it indicates the trust degree of the link e ij connecting r i to the neighbour node r j .
Definition 2: Trust Relation (TR) set, TR {r i →} r j represents the trust relationship r i with the neighbour node r j . The main factor with affecting TR {r i →} r j is TD t e ij and TD t r ij , so TR {r i →} r j at the time t can be formalized as: The weights d 1 , d 2 unrelated to TD indicate the importance of a link TD and a node TD to the establishment of trust relationships between trust pairs. TD is unidirectional, and d 1 dynamically update with network security status changes: Definition 3: Security Metric (SM), For a link e ij ∈ E, the security metric of its concavity is defined as SM e ij or SM r i , r j , indicating the degree of security from r i forwarding data to r j , SM is one-way. In this way, the security metric of the hop path G is: The higher the reliability of neighbour nodes and the communication links between them is, the more reliable the trust relationship between nodes will be and the higher the security of data transmission. The security path is to establish a trust relationship chain along the information transmission path. Therefore, the security metric of the link at the time can be set as: Here, d 1 , d 2 show that the security status of the link to the sensitive degree of links TD and nodes TD. It can be seen that SM is a dynamic variable updated with the changes of network security status and is suitable for route calculation. Security threats and security mechanisms taken by network devices when transmitting and forwarding data are two major factors related to link security measurement [17], so they should be taken into consideration when quantifying links TD and nodes TD.
Several security mechanisms work at the link layer in the OSI model that can give TD e ij with different increased trust values IV e ij . Set the maximum trust degree of the link e ij as TD max e ij = x≥0 IV Label(x) e ij when implementing x (x ≥ 0) kinds of security mechanisms, for example, the TD max e ij = IV C e ij + IV A e ij + IV T e ij that applies C, A, and T security mechanisms. Of course, the link trust degree TD max e ij = 0 without any security mechanism.
And if x x ≥ 0 kinds of link security mechanisms are dynamically increased or decreased, TD max e ij will also increase or decrease with the corresponding trust degree: On the other hand, communication link transmission may face various threats (such as MAC flooding attacks, ARP attacks, etc.), and there are many intrusion/misuse behaviour detection and response technologies to detect the attacks. In the fixed-length period t, if the λ link attacks are detected, TD e ij should decrease exponentially (it is easy to lose trust): TD t e ij = TD t− t e ij − 2 λ−1 DV e ij (λ ≥ 1), until TD t e ij = 0; On the contrary, if there is no link attack at the time t, TD e ij will have lost some trust linearly increased by a change value CV e ij (difficult to gain trust degree), and reset the attack times λ = 0 until TD e ij return to the maximum trust degree before e ij is attacked. r j is not only a neighbour of r i but also be a neighbour of other nodes r k ∈ R k = i = j, e kj ∈ E in the network. Therefore, the quantification of trust degree TD r ij of routing nodes should include two parts: one is the direct trust degree DTD r ij of r j obtained from r i active observation; the other is the indirect trust ITD r ij r j obtained r i from other nodes r k through routing information exchange, namely.
where, the weights w 1 , w 2 show the proportion of DTD and ITD when quantifying TD r ij . To prevent malicious slander by the enemy w 1 > w 2 is generally taken. Direct trust measurement: The measurement of direct trust degree DTD r ij r i r j is also based on the security threats faced by routing structures and the security mechanism of routing protocols. Authentication and confidentiality are the two main routing information security mechanisms, and both of them can provide information level (IL) or package level (PL) security services. D adopts different security mechanisms, which can bring the different added value IV r ij of trust degree to DTD r ij . Set the maximum direct trust degree of a node r j to node r i with implementing x (x ≥ 0) kinds of security mechanisms as: On the other hand, network routing attacks (including external attacks and internal attacks) are common and have serious consequences [18], [19]. Routing attacks can be detected and isolated using IDS. In the fixed-length period t, if the λ attacks to r j are detected, DTD r ij should decrease exponentially: DTD t r ij = DTD t− t r ij − 2 λ−1 DV r ij (λ ≥ 1), until DTD r ij = 0; If there is no routing attack in t, DTD r ij will have lost some trust degree linearly increased by a change value CV r ij , and reset the number of attacks λ = 0 until DTD r ij return to the maximum trust degree: DTD r ij = DTD max r ij before r j is attacked.
The measurement of indirect trust degree: the indirect trust degree ITD r kj of r i to r j is measured by flooding the routing update information. At the time t, r i gets the TD t r kj VOLUME 10, 2022 from r k , then ITD t r kj is updated: where |R| is the number of nodes in G. ITD r kj has the relationship with the trust degree ITD r kj of r i to r k . The higher TD (r ik ) is, the greater the updated degree of ITD r kj is. It indicates that when TD r ij is quantified. The degree of acceptance that r i adopts observations from other nodes depends on the degree of trust of r i these nodes. Through the above measurement of the trust degree of communication link and routing node, the trust relationship between routing nodes is established, and a quantitative trust model and the security metric SM t e ij of link e ij at a time t are obtained.

C. IMPLEMENTATION OF THE OPPORTUNISTIC ROUTING ALGORITHM IN WIRELESS MESH NETWORKS
The opportunistic routing of wireless mesh networks adopts the SRTR algorithm. Through the research of this algorithm, more nodes are deleted, and the trust degree of the remaining nodes is considered to realize the design of an opportunistic routing algorithm.
SRTR algorithm uses the limited copy message forwarding strategy, based on the interaction information between nodes and the recommendation information of the trusted neighbour to build the trust matrix. A local trust list is established according to the trust matrix, which is used to store trusted neighbour nodes, and then the forwarding decision is realized, and the number of message copies is divided according to the trust degree of the destination node to the relay node [20]. If the current node r i has a message set M that needs to be forwarded, the specific steps of the algorithm are as follows: 1) In the current cycle, according to the trust matrix T , the node r i stores the row vector T i = (T i1 , T i2 , · · · , T in ) in the trust matrix. The threshold of trust degree T th is set according to the system environment, and the trust degree of the node r i to other nodes is obtained by row vectors respectively. The nodes that meet the threshold conditions of trust degree are added to the local trust list of nodes T list (i). Similarly, the nodes that do not meet the threshold conditions are deleted from the local trust list. 2) For the message m ∈ M carried by the node r i , get the destination node r d of the message m. When a node r i encounters a node r j , if r j = r d , the node r j sends the message directly to the destination node. If the node r j ∈ T list (i), go to step 3; otherwise, the node r i continues to carry the message until it encounters the destination node or a node in the local trust list T list (i). 3) According to the trust vector of the node, calculate the social similarity sim (r i , r d ) and sim r j , r d of the current node r i , the encountered node r j and the destination node respectively. If sim r j , r d > sim (r i , r d ), the node r i is required to split the number of copies r c j of the message m, and forward the message m with the number of copies r c j to r j , update the number of message copies r c i ← r c i − r c j of the node r i . And the partition calculation of the number of copies of the message is as follows: 4) Otherwise, when sim r j , r d ≤ sim (r i , r d ), the node r i continues to carry messages until it encounters the destination node or node in the local trust list T list (i).

III. RESULTS
To verify that the trust relation-based opportunistic routing algorithm proposed in this paper, the application effect of actual opportunistic routing in wireless mesh networks is tested in the MATLAB simulation environment. The router of the routing node selected in this experiment is WNDR3800, which is used to construct the wireless mesh network. The router has five Gigabit ports, including LAN and WAN ports. The router complies with the IEEE 802.11n standard and is compatible with the 802.11/b standard. The maximum wireless transmission rate can reach 300mbit/s. The wireless transmission rate is fast. The coverage capacity of wireless signals uses 5GHz. The mobile node adopts random waypoint and CBR(Constant bit rate) as the transmission traffic model. The data sending rate is 6 packet/s, the data receiving rate is 3.4 packet/s, and the packet size is 50 bytes. The number of nodes is 30 * 150, the transmission range is 30m, and the data is randomly distributed in a space of 100 * 100m2. Each data can be randomly transmitted from one source node to another random target node, and the moving speed is between 0m/s and 20 m/s. After reaching the destination node, a pause time (0∼100 s) is passed before starting a new transmission process. The simulation verification times are 5000 times. The transmission structure of network nodes is shown in Figure 3: At the same time, to further show the application performance of the method in this paper, the algorithm of literature [8] and the algorithm of literature [9] are taken as comparison algorithms to compare the indexes in the application of this algorithm and different comparison algorithms. The specific experimental results are as follows.

A. THE DELIVERY RATE OF MESSAGE
The message delivery rate is defined as the ratio of the number of messages successfully delivered to the destination node in the network to the total number of messages generated by the source node.
According to Fig. 4, with the increase of the ratio of selfish nodes, the delivery rates of the three routing algorithms all show a decreasing trend. Because there is no selfish node detection mechanism, the delivery rate of the algorithm in  the literature decreases faster than that of the algorithm in this paper. This is because the algorithm in this paper can ensure that nodes with a higher level of trust participate in the process of message forwarding, and relay nodes are selected according to social relationships. Therefore, the application performance of the proposed algorithm is generally superior to the two comparison algorithms.

B. THE ROUTING COST
The routing cost is the ratio of the total number of message copies in the network to the number of messages that are successfully transmitted to the destination node. The routing costs of the proposed algorithm and the two competitive algorithms under the different ratios of selfish nodes are shown in Fig. 5.
According to the analysis of Fig. 5, as more normal nodes in the network become selfish nodes, the propagation cost of the algorithm in literature [8] is on the rise. and the routing cost of this algorithm is the largest. When the ratio of selfish nodes is less than 40%, more copies of the message are discarded with the increase in the number of selfish nodes, and therefore the routing cost of the algorithm in literature [9] shows an upward trend, the algorithm chooses relay nodes  according to the social relationship. When the ratio of selfish nodes exceeds 40%, the number of selected relay nodes reduces gradually, so that the ratio of the discarded message decreases. The transmission cost shows a decreasing trend, therefore, the performance of the algorithm in reference [9] is better than that in reference [8]. The routing cost of the algorithm in this paper shows a downward trend because the algorithm can detect selfish nodes.

C. THE NUMBER OF LOST PACKETS
The total number of messages discarded by selfish nodes in the network is called the number of lost packets. Fig. 6 shows the number of lost packets between the algorithm in this paper and the two competitive algorithms under different selfish node ratios.
As can be seen from the analysis of Fig. 6, compared with the literature algorithm, the algorithm in this paper has a smaller number of lost packets, because the literature algorithm does not consider the trust degree of nodes in the process of data transmission. In the actual operation process, the algorithm in this paper selects the next-hop transmission node based on the trust degree of the node, so the algorithm VOLUME 10, 2022 in this paper has less packet loss compared with the two algorithms. Compared with the algorithm in literature [8], the algorithm in literature [9] selects the next-hop nodes based on the social relationship, so the performance of this algorithm is better than that of the algorithm in literature [8].

D. THE PERFORMANCE TEST UNDER DIFFERENT LOAD CONDITIONS 1) THE THROUGHPUT TEST
The throughput of the algorithm in this paper is tested under different load conditions, and the result is shown in Fig.7. Fig. 7 shows the relationship between the throughput of the proposed algorithm and the amount of data under different load conditions. It can be obtained from the analysis that, as the number of data increases, the throughput of the algorithm starts decreasing by 1%. When the load rate is 0.2, the throughput of the algorithm in this paper starts to decline when the amount of transmitted data is 0.5GB. This is because when the network load is low and the amount of transmitted data is small, the node cache capacity has little influence on the data transmission, so the throughput of the algorithm in this paper can remain relatively high. With the increase of load intensity, the effect of node cache capacity on the performance of throughput becomes very significant. When the load rate is 0.8 and the amount of transmitted data is low, the throughput of the proposed algorithm starts to decline, but the decline is slow. This is because the algorithm in this paper takes the transmission performance of links and nodes into consideration in the path selection so that the link can maintain relatively high transmission efficiency and relatively high throughput in the case of heavy load and large data business transmission [21]- [23].

2) THE PERFORMANCE TEST OF COST
The cost performance of the algorithm in this paper is tested under different load conditions, and the result is shown in Fig. 8.
In the analysis of Fig. 8, the algorithm in this paper selects the comprehensive optimal link to transmit information of different types of services and different amounts of data. The algorithm in this paper carries out quantitative data transmission, and the running time can be used to compare the cost performance of different routing protocols during the whole data transmission process. The running time is used to represent the total time of the opportunistic routing protocol from the detection packet to the packet, which carries data that is fully received.
As can be seen from Fig. 8, when L = 0.2, the amount of data is less than 0.5, when L = 0.5, the amount of data is less than 0.3 when L = 0.8, and the amount of data is less than 0.3, so the fluctuation of running time of the algorithm in this paper is not significant. This is because under the above conditions, nodes have little restriction on packet transmission and there is no congestion in the network. Therefore, the algorithm in this paper costs more resources to obtain more state information. At the same time, the running time of the algorithm in this paper is less than 30ms under different loads and different amounts of data, which indicates that the algorithm has faster operation efficiency.

IV. CONCLUSION
To improve the performance of network opportunistic routing, a trust-based opportunistic routing algorithm for wireless mesh networks is proposed. The algorithm comprehensively considers the direct trust and indirect trust and establishes the trust matrix between nodes according to the overall trust. Especially when obtaining recommendation information, the neighbour nodes are evaluated by establishing a trust similarity relationship, and the trust similarity is used as a constraint to avoid the possibility of false recommendation information of selfish nodes. Establish a local trust list of nodes to ensure that nodes with high trust levels participate in the secure forwarding process of messages. On the premise of ensuring the reliability of the relay node, making the message pass along the direction of increasing social similarity can avoid the occurrence of selfish behaviour between nodes, ensure the best path for the message to reach the destination node, improve the message delivery rate of the whole network, reduce the message forwarding delay in the network, and make the message copy transmit efficiently and reliably. The experimental results show that: (1) The highest delivery rate of messages using this method is about 95%, and the decline speed is slow; (2) When using this method for network routing, the delay of message forwarding can be reduced. (3) This method can reduce the overhead of network routing, and has certain feasibility. Although this method has achieved some results at this stage and has a good effect in improving opportunistic routing in wireless mesh networks, there are still many disadvantages in the research. In the future, the energy consumption of opportunistic routing in wireless mesh networks and the key nodes affecting its selection of the best path will be studied to improve the effectiveness of this research method. He taught for three years with the Department of Computer Science, University of Victoria, where he was regarded as one of the top undergraduate professors in the Computer Science Course Instruction at the University. Since 2014, he has been holding a tenure-track position at Brandon University, Brandon, MB, Canada, where he is currently active in various professional and scholarly activities. He was promoted to the rank as an Associate Professor, in January 2018. He is active in research in the field of data mining and big data. In his eight year academic career, he has published a total of 43 papers in high-impact conferences and high-status journals (SCI, SCIE) and has also delivered invited guest lectures on big data, cloud computing, the Internet of Things, and cryptography at many Taiwanese and Czech universities.
Dr. Srivastava is also an Editor of several international scientific research journals. He currently has active research projects with other academics in Taiwan, Singapore, Canada, Czech Republic, Poland, and USA. He received Best Oral Presenter Award in FSDM 2017 which was held at the National Dong Hwa University (NDHU), Shoufeng, Hualien County, Taiwan, in November 2017. VOLUME 10, 2022