# A Hybrid Opportunistic IoT Secure Routing Strategy Based on Node Intimacy and Trust Value

Authors: Lin Yu; Gang Xu; ZhiFei Wang; Na Zhang; FengQi Wei
Journal: Security and Communication Networks
 (2022)

---

## Abstract

Routing strategy is one of the most important researches in Opportunistic Internet of Things (IoT), and it highly influences the efficiency of data transmission. In this paper, a hybrid Opportunistic IoT secure routing strategy based on node intimacy and trust value (HIRouter) is proposed to resolve the problem of unbalanced transmission efficiency and security in the message delivery process. According to the records of node encounter and message forwarding, the strategy proposed in this paper can calculate nodes’ intimacy and trust value. The messages are then forwarded based on the intimacy and trust value between nodes. Experimental results verify that HIRouter algorithm we proposed can improve the message delivery rates and reduce the overhead rate in the Opportunistic IoT with dense nodes and frequent interactions between nodes.


---

## Body

## 1. Introduction

IoT is a network that uses sensing devices to connect objects and networks and enable objects to interact and exchange information, then achieve intelligent identification and management. It is mainly used in fields such as intelligent transportation, intelligent logistics, and smart cities. Opportunistic IoT is a kind of information interactive IoT characterized by temporary, opportunistic, and mobile self-organization. Opportunistic IoT enables intelligent objects to interact with each other by contact opportunity during the node moving [1–3]. Figure 1 shows an application scenario of the opportunistic IoT. An opportunistic network is derived from the delay-tolerant network [4–7]. There are no specific links between nodes in opportunistic networks, and messages are propagated in a “store-carry-forward” manner [8–10]. Research hotspots related to opportunistic networks include routing strategies, congestion control [11–14], energy consumption [15–18], and incentive mechanisms [19–23]. Among these, routing strategies are the key points of opportunistic network research. Currently, several routing algorithms have been proposed. The most prominent routing algorithm is the epidemic algorithm. In the algorithm, nodes can forward their information to every node they encounter in the network before reaching the destination node [24]. The node of the spray and wait (S&W) algorithm produces L message copies for L neighboring nodes; then the L nodes that receive the copies seek the destination node [25–28]. The PROPHET algorithm forwards messages based on the historical information of node encounters 29.Figure 1
IoT application scenario.Messages are forwarded in a “storage-carry-forward” manner in mobile Opportunistic IoT; in other words, messages are placed in intermediate node buffers [30]. Data transmission and distribution are completed through the encounter and contact opportunities created by node movements, and data eventually reach the destination node. The performance related to forwarding basis, such as message delivery success rate, transmission latency, and network resource consumption, determine the efficiency of message transmission in the data transmission process. Using the historical encounter information between nodes, the PROPHET routing algorithm formulates message-forwarding strategies; however, updating the message-forwarding efficiency in real-time with changes in the operating environment is difficult. A trusted routing scheme based on social similarity (TRSS) incorporates social trust into the routing decision process [31]. In the TRSS scheme, nodes move and associate with each other based on their common interests or social similarities and the next-hop forwarding node is assumed to be the node exhibiting common social characteristics with the destination node. This scheme mainly targets untrustworthy nodes, i.e., greedy or malicious nodes. The schema is not universal. In this paper, a hybrid Opportunistic IoT secure routing strategy based on node intimacy and trust value is proposed. The mixed utility value of node intimacy and trust value is determined by the historical data information of nodes and successful message-forwarding records. Moreover, messages are forwarded from nodes with low mixed utility values to nodes with high mixed utility values until the destination node is reached. The probability of messages being forwarded to selfish and malicious nodes is reduced, which laterally improves the security of messages in the network.


## 2. Related Works

Ma reviewed the research progress on mobile opportunistic network routing and described the main research content of mobile opportunistic networks in detail [9]. Li proposed a trust-based opportunistic routing (TOR) method by exploiting the trust mechanism, which improves the forwarding efficiency and information security of nodes in the opportunistic network [32]. The TOR method is suitable for networks with more malicious and greedy nodes. Although the bundling and carrying mechanism of the method improves security, it also increases the information storage consumption under this mechanism.In order to solve the problem that the selfishness of the node due to the energy consumption of the message transmission leads to the serious degradation of the message transmission process and the increase of the network delay, N. Gupta proposed an incentive design mechanism based on contract theory to reward intermediate nodes appropriately to forward the messages [30]. This mechanism appropriately encourages intermediate nodes to forward messages. According to their ability to forward the message, the mechanism divides nodes into a finite number of types and model the service transaction between the forwarding node and the forwarding node. The necessary and sufficient conditions are further derived to provide incentives for nodes participating in message forwarding so that the nodes are more active in the process of message transmission.Based on the temporal and spatial constraints of node movement in a social-based opportunistic network, Yao proposed an energy-efficient message-forwarding algorithm in community-based opportunistic networks [33]. The algorithm divides the nodes in the network into communities and uses different transmission strategies for intracommunity and intercommunity. The algorithm balances the efficiency of data forwarding on the opportunistic network with the energy consumption of the network. However, high message-forwarding efficiency cannot be achieved using this algorithm.Based on the connection time, Duan proposed a probabilistic routing algorithm named PROPHET-CT, which resolved the problem of heavy network loads when the PROPHET routing algorithm calculated the node encounter probability [34]. The algorithm achieves a high message delivery success rate in the node-intensive scenario, but the delivery success rate is lower in a network with sparse nodes.A trust-based data forwarding algorithm was proposed by Yuan [35]. The node trust value is determined by the three social attributes, and messages are forwarded in the network based on the trust value. However, this algorithm does not consider the influence of the message-forwarding path on the node trust value and the subsequent effect on the forwarding efficiency.Since nodes in opportunistic networks have a large autonomy, there are many nodes that exhibit selfishness or even malicious behavior. For these nodes, Liu proposed an alert system for bins based on opportunistic networks [36]. The system primarily evaluates whether the nodes are trustworthy for information transmission and forwards the message to the trusted nodes. This system is only applicable to networks in which the nodes have greater node autonomy and are not universal.For the problem of inefficient message transmission due to unreliable link quality between nodes in the network, Yang proposed an opportunistic routing algorithm based on node connectivity [37]. The algorithm defines a set of forwarding candidates and the priority of each candidate node ensures efficient data transmission and reduces energy consumption during data transmission. The algorithm determines the reliability between nodes only based on node connectivity, which is always slightly incomplete, and the relationship between nodes should be fully considered.Since the independence maintained by nodes in the process of motion will have a certain impact on data transmission, Zhang proposed an opportunistic network routing algorithm based on node motion for the motion characteristics of nodes [38]. The algorithm’s data forwarding priority evaluation model and differential copy transfer policy guarantee message group delivery and lower delivery latency while limiting system overhead. The algorithm does not achieve a high delivery rate in networks with sparse nodes, so the algorithm is only suitable for networks with a certain node density.A routing strategy for ad hoc networks based on node degree estimation and static game forwarding strategy is proposed for the broadcast storm problem caused by broadcast route grouping in the route discovery process of ad hoc networks [39]. The node degree estimation method and static game forwarding strategy of the strategy greatly reduce the network consumption caused by broadcasting Hello messages to obtain node degree information and also reduce a large amount of redundancy, competition, and conflicts generated during the route request packet broadcasting process, and improve the efficiency of route request packet broadcasting in the route discovery process. The strategy is currently only applicable to scenarios where the number of network nodes is large, and the nodes are evenly distributed in the network.To address unreliable transmission in the network, Prashant Kumar proposed a reliability strategy [40]. In this strategy, the source node can recognize the message status. If an error in message transmission occurs, the source node can respond appropriately to resend the message. The strategy is instrumental because even if a message is lost, the message-forwarding success rate will not decrease.T. Spyropoulos proposed an efficient routing scheme for intermittently connected mobile networks (S&W) [28]. S&W routing is divided into two phases, the node distributes the message to their neighbor nodes during the spraying phase, and the waiting phase carries the message nodes to the destination node. This scheme controls the number of copies of the message to be delivered in the network and solves the disadvantages of contagion routing. In the scheme, the control of the number of copies of messages is a very important issue.In order to solve the problem of how to transmit messages when there is no linking path between the source node and the destination node, A Vahdat proposed epidemic routing for partially connected ad hoc networks (epidemic) [41]. The nodes in this route deliver the messages to all the encounter nodes, so ideally the delivery rate of this algorithm is the highest as long as the cache of the node is large enough. This is an extreme situation. In fact, the size of the node buffer is not enough to receive all the messages from other nodes, so the delivery rate of this route is not high due to the cache problem.Lindgren proposed probabilistic routing in intermittently connected networks (Prophet) [42]. Prophet routing uses the historical encounter information between nodes to dynamically update the predicted value of the node’s delivery. The message is delivered according to the predicted delivery value. If the predicted delivery value of the encountering node is higher than the node currently carrying the message, the message is copied and forwarded. The route is more suitable in areas with high node density and frequent encounters and is not suitable for remote areas where nodes are sparse.To solve the problem of uneven energy consumption of nodes due to excessive calculation of key nodes and the loss of important messages due to limited remaining cache of nodes, Chen proposed an energy balance and cache optimization routing algorithm based on communication willingness (EC_CW) [43]. Based on the PROPHET algorithm, this algorithm forwards messages according to the multicopy mechanism and the willingness to communicate between nodes. In a sparse node network environment, it reduces the average delay and overhead rate, and in a node dense network environment, it improves the delivery rate. Although the delivery rate of the algorithm has been improved, its delivery rate is still at a relatively low level.In summary, the existing opportunistic network routing algorithms do not consider the forwarding efficiency when data security is guaranteed. To this end, a hybrid opportunistic IoT secure routing strategy based on node intimacy and the trust value is proposed. The routing strategy mainly calculates the mixed utility value between nodes based on the encounters between the nodes and the message-forwarding path. The mixed utility value is used as the basis for message forwarding. This strategy considers the encounter situations between the nodes and successful message-forwarding records to ensure that messages are forwarded to the nodes with high intimacy and trust value thereby the strategy balances the efficiency and security of data forwarding.


## 3. Intimacy

In this work, a double hash table is used to simulate the relevant information between nodes in a matrix, which is stored under each node. Then, the nodes update the hash table during moving. Thus, by storing information about all nodes under every single node, the concept of decentralization can be implemented. The contents stored in the double hash table are shown in Figure2.Figure 2
Information storage structure.


### 3.1. Encounter Information

Definition 1.
EncounterNumber (EN) represents the number of connections between two nodes [44], i.e., the number of times two nodes have reached each other’s communication range.
When two nodes are connected, each node updates its EncounterNumber information in the hash tables.Definition 2.
EncounterDuration (ED) represents the duration of node encounter [44], i.e., the length of time from when the communication link between two nodes is connected to when the communication link is disconnected.
Time Value indicates the connection time. The calculation of node encounter duration is shown as follows:(1)EncounterDuration=CurrrentTime−TimeValue.Definition 3.
AverageEncounterDuration (TI) denotes the average encounter duration of each encounter between nodes [44], i.e., the ratio of the total encounter duration to the number of encounters between two nodes during network operation.
Generally, if the node encounter duration is short, network bandwidth is small, or transmission data are large, then complete data delivery may not be guaranteed. Therefore, forwarding messages to nodes with a longer average encounter duration can more effectively improve the message-forwarding success rate. To avoid forwarding messages to nodes with a short meeting duration, we need to calculate the average encounter durationTIavg,i,j of the node. When two nodes are disconnected, the encounter time and average encounter duration between the two nodes are calculated and stored. The average encounter duration is calculated as shown below:(2)TIavg,i,j=∑k=1nTIkn,k≤n.TIk is the duration of the kth encounter between node i and j, and ∑k=1nTIk represents the sum of n encounter time.


### 3.2. Intimacy Information

Definition 4.
Intimacy Value (I) signifies the frequency of contact between nodes during network operation.
More closely related nodes will meet frequently, while less closely related nodes will meet with a low probability. The node intimacy can be calculated using their meeting information, as follows:(3)Ii,j=ENi,j∗w+TIavg,i,j∗1−w.
LetIi,j denote the intimacy between nodes i and j, let ENi,j denote the number of encountering nodes, and let TIavg,i,j denote the average encounter time between nodes i and j. The variable w represents a weight value, 0<w<1; the w is determined to be 0.57 based on the ratio of the encounter duration and the number of encounters in the experiment.


## 3.1. Encounter Information

Definition 1.
EncounterNumber (EN) represents the number of connections between two nodes [44], i.e., the number of times two nodes have reached each other’s communication range.
When two nodes are connected, each node updates its EncounterNumber information in the hash tables.Definition 2.
EncounterDuration (ED) represents the duration of node encounter [44], i.e., the length of time from when the communication link between two nodes is connected to when the communication link is disconnected.
Time Value indicates the connection time. The calculation of node encounter duration is shown as follows:(1)EncounterDuration=CurrrentTime−TimeValue.Definition 3.
AverageEncounterDuration (TI) denotes the average encounter duration of each encounter between nodes [44], i.e., the ratio of the total encounter duration to the number of encounters between two nodes during network operation.
Generally, if the node encounter duration is short, network bandwidth is small, or transmission data are large, then complete data delivery may not be guaranteed. Therefore, forwarding messages to nodes with a longer average encounter duration can more effectively improve the message-forwarding success rate. To avoid forwarding messages to nodes with a short meeting duration, we need to calculate the average encounter durationTIavg,i,j of the node. When two nodes are disconnected, the encounter time and average encounter duration between the two nodes are calculated and stored. The average encounter duration is calculated as shown below:(2)TIavg,i,j=∑k=1nTIkn,k≤n.TIk is the duration of the kth encounter between node i and j, and ∑k=1nTIk represents the sum of n encounter time.


## 3.2. Intimacy Information

Definition 4.
Intimacy Value (I) signifies the frequency of contact between nodes during network operation.
More closely related nodes will meet frequently, while less closely related nodes will meet with a low probability. The node intimacy can be calculated using their meeting information, as follows:(3)Ii,j=ENi,j∗w+TIavg,i,j∗1−w.
LetIi,j denote the intimacy between nodes i and j, let ENi,j denote the number of encountering nodes, and let TIavg,i,j denote the average encounter time between nodes i and j. The variable w represents a weight value, 0<w<1; the w is determined to be 0.57 based on the ratio of the encounter duration and the number of encounters in the experiment.


## 4. Trust Degree

Definition 5.
Trust degree (T) between the destination and current nodes is defined as the ability of the current node to forward messages to the destination node. Based on successful message-forwarding records, the trust reward of the node forwarding data to the destination node is calculated.
Based on the forwarding path of the node successfully forwarding the message to the destination node, the trust degree of the destination node to other nodes on the successful path is determined.


### 4.1. Forwarding Path

In the simulation experiment, the messages are tracked, and the message-forwarding process is recorded. When the message successfully reaches the destination node, the successful message-forwarding path of this message is obtained.Obtain the message-forwarding path:(4)Path:N0⟶N1⟶N2⟶N3⟶N4⟶…⟶Nj.By obtaining the message-forwarding record, the nodes on the path on which the message is successfully forwarded are obtained, and these nodes are rewarded with trust.To reflect the fairness and incentive of rewards for each node, a trust reward mechanism is established:(1)
The position of the forwarding node inpathNi determines the trust reward value of the forwarding node. If the forwarding node is closer to the destination node, the trust reward value of the forwarding node is higher, and vice versa. The trust reward value represents the trust degree between the destination and forwarding nodes and can be understood as the probability of the node forwarding a message to the destination node again in the future message-forwarding process.(2)
For messages with the same communication link length, a shorter message delay timeΔt (reception time - creation time) signifies a greater trust reward value of the forwarding node. The smaller the Δt, the less time it will require for the forwarding node to transmit the message to the destination node, i.e., smaller delay.


### 4.2. Trust Reward

The currently rewarded node is provided with a trust value for the first time, as follows [32]:(5)Tijm=12e−λ×Δt/TTL+φ+1−φ×pathNipathm2.Tijm represents the trust reward value of node j to node i, and e−λ×Δt/TTL represents the time reward function. The smaller Δt is (i.e., the less time it takes for the message to be received from the creation to the destination node), the greater the reward obtained. The value of Δt/TTL ranges from 0 to 1, and λ is the message delay reward adjustment factor. φ+1−φ×pathNi/pathm2 is the trust reward value function, which is determined according to the position of the node in the path, φ is the adjustment factor of trust reward value, pathm represents the length of the entire forwarding path, pathNi represents the position of node Ni in the forwarding path, and the value of pathNi is between 1 and pathm, i.e., pathNi/pathm is between 0 and 1. In the trust mechanism, the closer the node position is to the destination node, the larger the pathNi is and the greater the trust reward value is obtained. The message is forwarded from a low-trust-value node to a high-trust-value node.The old trust value of the currently rewarded node is shown in the following:(6)Tijm=old Trust Value+1−old Trust Value×Tijm.The trust value is updated based on the old trust value and the new reward trust value.The node repeatedly forwards the message to the destination node and gradually improves the trust value reward; in this way, an oriented trust is established between the nodes in the network. Therefore, there is a trust-based forwarding mechanism in the network. The mechanism can be expressed as a two-dimensional array. The index of the array is the node address value, and the content of the array is the size of the trust value.Algorithm 1: Trust reward algorithm.
(i)
Input:Path, Trust SetNodedestination(ii)
Output:Tijm(1)
While message −>Nodedestinationdo(2)
Get Emulator Current Time(3)
GetMessage Create Time(4)
Δt=Emulator Current Time−Message Create Time(5)
GetΔt,TTL(6)
CalH=e−λ×Δt/TTL(7)
Get Path, Trust SetNodedestination(8)
Fori∈Path do(8)
IfNodei!=NULL then(9)
Tijm=old Trust Value+1−old Trust Value×Tijm(10)
Else(11)
Tijm=1/2H+φ+1−φ×pathNi/pathm2(12)
End If(13)
End For(13)
End WhileWhen the message reaches the destination node, theΔt of the message is calculated by obtaining message reception time and creation time. Then, the time reward function is calculated using Δt and time-to-live (TTL) of the message. The message transmission path and the trust table of the destination node are obtained, and the path is traversed. If a node does not have a trust record in the trust table of the destination node, the trust calculation using the formula (5) is performed.


## 4.1. Forwarding Path

In the simulation experiment, the messages are tracked, and the message-forwarding process is recorded. When the message successfully reaches the destination node, the successful message-forwarding path of this message is obtained.Obtain the message-forwarding path:(4)Path:N0⟶N1⟶N2⟶N3⟶N4⟶…⟶Nj.By obtaining the message-forwarding record, the nodes on the path on which the message is successfully forwarded are obtained, and these nodes are rewarded with trust.To reflect the fairness and incentive of rewards for each node, a trust reward mechanism is established:(1)
The position of the forwarding node inpathNi determines the trust reward value of the forwarding node. If the forwarding node is closer to the destination node, the trust reward value of the forwarding node is higher, and vice versa. The trust reward value represents the trust degree between the destination and forwarding nodes and can be understood as the probability of the node forwarding a message to the destination node again in the future message-forwarding process.(2)
For messages with the same communication link length, a shorter message delay timeΔt (reception time - creation time) signifies a greater trust reward value of the forwarding node. The smaller the Δt, the less time it will require for the forwarding node to transmit the message to the destination node, i.e., smaller delay.


## 4.2. Trust Reward

The currently rewarded node is provided with a trust value for the first time, as follows [32]:(5)Tijm=12e−λ×Δt/TTL+φ+1−φ×pathNipathm2.Tijm represents the trust reward value of node j to node i, and e−λ×Δt/TTL represents the time reward function. The smaller Δt is (i.e., the less time it takes for the message to be received from the creation to the destination node), the greater the reward obtained. The value of Δt/TTL ranges from 0 to 1, and λ is the message delay reward adjustment factor. φ+1−φ×pathNi/pathm2 is the trust reward value function, which is determined according to the position of the node in the path, φ is the adjustment factor of trust reward value, pathm represents the length of the entire forwarding path, pathNi represents the position of node Ni in the forwarding path, and the value of pathNi is between 1 and pathm, i.e., pathNi/pathm is between 0 and 1. In the trust mechanism, the closer the node position is to the destination node, the larger the pathNi is and the greater the trust reward value is obtained. The message is forwarded from a low-trust-value node to a high-trust-value node.The old trust value of the currently rewarded node is shown in the following:(6)Tijm=old Trust Value+1−old Trust Value×Tijm.The trust value is updated based on the old trust value and the new reward trust value.The node repeatedly forwards the message to the destination node and gradually improves the trust value reward; in this way, an oriented trust is established between the nodes in the network. Therefore, there is a trust-based forwarding mechanism in the network. The mechanism can be expressed as a two-dimensional array. The index of the array is the node address value, and the content of the array is the size of the trust value.Algorithm 1: Trust reward algorithm.
(i)
Input:Path, Trust SetNodedestination(ii)
Output:Tijm(1)
While message −>Nodedestinationdo(2)
Get Emulator Current Time(3)
GetMessage Create Time(4)
Δt=Emulator Current Time−Message Create Time(5)
GetΔt,TTL(6)
CalH=e−λ×Δt/TTL(7)
Get Path, Trust SetNodedestination(8)
Fori∈Path do(8)
IfNodei!=NULL then(9)
Tijm=old Trust Value+1−old Trust Value×Tijm(10)
Else(11)
Tijm=1/2H+φ+1−φ×pathNi/pathm2(12)
End If(13)
End For(13)
End WhileWhen the message reaches the destination node, theΔt of the message is calculated by obtaining message reception time and creation time. Then, the time reward function is calculated using Δt and time-to-live (TTL) of the message. The message transmission path and the trust table of the destination node are obtained, and the path is traversed. If a node does not have a trust record in the trust table of the destination node, the trust calculation using the formula (5) is performed.


## 5. A Hybrid Opportunistic IoT Routing Algorithm Based on Node Intimacy and Trust Value

In the message-forwarding routing process, the node considers the encounter information with other nodes and the trust value of the two encountering nodes under the destination node. When determining whether the message should be forwarded to the meeting node, the routing mechanism will assign weights to the two forwarding bases to calculate the final forwarding probability.Because the storage structure uses a hash table, the node address value corresponds to the key value of the hash table, and the relevant information about the node corresponds to the value of the hash table. The algorithm directly obtains the value of the hash table based on the key value of the hash table; hence, the time complexity of the algorithm isO1.Forwarding probability is the mixed utility value.Definition 6.
The mixed utility value (denoted by FB) is obtained by the weighted summation of the intimacy and trust value of the nodes. It is used to describe the reliability relationship between nodes. This value is calculated using formula equation (6):(7)FB=Tilm×α+ENi,lENi,l+ENj,l×β+TIavg,i,lTIavg,i,l+TIavg,j,l×γ.ENi,l is the number of encounters between the meeting node i and destination node l, ENj,l is the number of encounters between the current node j and destination node l, TIavg,i,l is the average encounter duration between the meeting node i and destination node l, and TIavg,j,l is the average encounter duration of the current node j and destination node l.
The forwarding probability calculation of the encounter node phase forwarding the message to the destination node consists of three parts: the trust degree of this encounter node under the destination node; the ratio of the number of encounters between the encountered node and the destination node and the number of encounters between the two nodes and the destination node respectively; the ratio of the encounter duration between the encountered node and the destination node and the sum of the encounter duration between the two nodes respectively and the destination node. These three components are weighted and summed separately to obtain the forwarding probability of the encountered node. Similarly, the forwarding probability of the node currently carrying the message is also calculated in this way.α,β, and γ are the weights of the trust, the number of encounters, and the average duration of the encounters, respectively. The values of α,β, and γ are experimentally determined to be 0.1, 0.7, and 0.2, respectively. As shown in Figure 3, x,y, and z represent α,β, and γ, respectively. A more intense red color signifies a higher delivery success rate.Algorithm 2: Message-forwarding algorithm.
(i)
Input:Trust SetNodedestination(ii)
Output:message forwarding(1)
While (connectionNodeA,NodeB)(2)
IfNodeB==Nodedestination(3)
message−>NodeB(4)
Else(5)
Get Trust SetNodedestination(6)
IfKeyNodeA≠NULLthen(7)
Get ValueNodeA(8)
End If(9)
IfKeyNodeB≠NULL then(10)
Get ValueNodeB(11)
End If(12)
CalFBA,destination,FBB,destination(13)
If (FBB,destination>FBA,destination) then(14)
message−>NodeB(15)
Else(16)
message−>NodeA(17)
End If(18)
End If(19)
End WhileFigure 3
Success rates under differentα, β, and γ.Step 1.
indicates that the message-forwarding node meets the other nodes and establishes a connection. Steps 2–17 signify whether the currently established node performs message transmission. Steps 2–3 mean that if the message-forwarding node meets the destination node, the message is directly forwarded to the destination node. Steps 4–12 reflect that if the message-forwarding node does not meet the destination node, the node information is first obtained, and then the mixed utility value is calculated. Steps 13–16 indicate that if the mixed utility value of the message-forwarding node is less than that of the meeting node, the message is forwarded to the meeting node; otherwise, it is not forwarded.


## 6. Experimental Environment and Configuration

The algorithm we proposed was experimentally verified, and performance analysis is conducted on the simulation tool ONE [45]. The simulation tool version 1.4.1 is used in the work. Table 1 shows the design of simulation experiment parameters.Table 1
The settings of simulation experiment parameters.
ParameterValueExperimental mapHelsinki mapExperimental area size4.5 × 3.4 km (width × height)Intra-area node movement modelMap-based shortest path movement modelExperimental simulation time12 h (43200 s)Number of nodes36/66/96/126/156Communication radius10 mTransfer speed250 KB/sNode moving speedThe first group: 0.5 ～ 1.5 m/s the second group: 2.7 ～ 13.9 m/s the third group: 0.5 ～ 1.5 m/s the fourth group: 7 ～ 10 m/s the fifth group: 7 ～ 10 m/s the sixth group: 7 ～ 10 m/sNode cache sizePerson: 5 M tram: 50 MTransfer methodPerson: Bluetooth interface tram: Bluetooth/high-speed interfaceMessage generation interval25～35 sMessage size500 kb–1 MBMessage life cycle5 h


### 6.1. Performance

Several indicators are often used to determine the performance of the network.Herein, the five indicators used for network performance evaluation and the importance of the five indicators are listed below.The delivery rate is undoubtedly the most important in Opportunistic IoT. The higher the delivery rate, the more messages successfully forwarded to the destination node. The second is the average delay and overhead rate. The less time the message is delivered in the network and the smaller the cache overhead of the nodes in the network, the better the performance of the network. Finally, the number of relay nodes and the average number of relay nodes. The smaller the number of relay nodes means that the fewer times the message is forwarded by the node in the network, the less the total energy consumed by the node to forward the message, and the more the network performance can be improved.(1)
Success rate is the ratio of the number of messages successfully forwarded to the destination node to the total number of messages. The indicator is denoted as equation (7).(8)Ssuccess_rate=NdeliveredNcreated.(2)
Average hops are the average number of hops required for a message to be successfully forwarded to the destination node. The indicator is denoted as equation (8).(9)Naverage_hops=Ntotal_hopsNdelivered.(3)
Number of relay nodes is the number of intermediate nodes required for the successful forwarding of a message to the destination node. The indicator is denoted as equation (9).(10)Nrelay_nodes=Nintermediate_delivery_nodes.(4)
Average delay is the average time required for a message to be forwarded from the forwarding node to the destination node. The indicator is denoted as equation (10).(11)Naverage_delay=Ntotal_intermediate_delivery_nodesNdelivered.(5)
Routing overhead is the ratio of the difference between the number of delayed messages and the number of successfully forwarded messages to the number of successfully forwarded messages. The indicator is denoted as equation (11).(12)Roverhead_rate=Nrelayed−NdeliveredNdelivered.


### 6.2. Experiment Analysis

In the experiment, by increasing the number of nodes in the network, the performance of HIRouter is compared with the performance of the epidemic [41], PROPHET [42], EC_CW [43], and S&W algorithms [28].


#### 6.2.1. Success Rate

In Figure4, when the number of nodes is small, the success rates of the four algorithms do not differ considerably. As the number of nodes increases, the success rate of HIRouter significantly increases. Moreover, as the number of nodes increases, the transmission success rate of the epidemic algorithm increases, and the prediction accuracy of the propagation probability of the PROPHET and EC_CW algorithms also improve. Therefore, the success rates of the epidemic and PROPHET algorithms are slightly improved. The success rates of S&W and HIRouter algorithms are higher than those of the other two algorithms. Owing to an increase in the number of nodes in the S&W algorithm, the copy of spray’s neighbor nodes significantly increases and the success rate also considerably increases. Compared with other routing algorithms, the HIRouter algorithm achieves the best success rate. As the number of mobile nodes increases, more accurate node relationships are estimated to provide a better forwarding strategy for opportunistic networks.Figure 4
Success rate under the different number of nodes.


#### 6.2.2. Average Hops

In Figure5, as the number of nodes increases, the number of average hops of the epidemic algorithm increases, owing to the infection mechanism of the algorithm. Nodes will copy their message to forward it to the encountered nodes. The number of average hops of the PROPHET and EC_CW algorithms increases with the number of nodes; however, the increase is lower than that in the epidemic algorithm. The number of average hops of S&W and HIRouter algorithms slightly increases when the nodes are increased; however, the number of average hops of the HIRouter algorithm is relatively few. This finding demonstrates that the HIRouter algorithm selects the optimal relay nodes during message transmission, reduces the number of relay nodes, and ensures that the message reaches the destination node in as few hops as possible.Figure 5
Average hops under the different number of nodes.


#### 6.2.3. Number of Relay Nodes

In Figure6, due to the contagion mechanism of the epidemic algorithm, the number of relay nodes increases with the number of nodes when the epidemic algorithm is used to transmit information. The PROPHET and EC_CW algorithms show an increased number of relay nodes when the number of nodes increases; however, the number of relay nodes is less than that in the epidemic algorithm. When the number of nodes is small, the number of relay nodes of S&W and HIRouter algorithms is one. However, with an increasing number of nodes, the number of relay nodes of the HIRouter algorithm is minimal. This finding indicates that the HIRouter algorithm selects the optimal relay node during message transmission, thereby reducing the number of relay nodes; i.e., the number of message transmissions is reduced and the message loss rate is reduced.Figure 6
Number of relay nodes under different numbers of nodes.


#### 6.2.4. Average Delay

In Figure7, the average delay of the HIRouter algorithm is high. During message transmission, the nodes only forward messages to the nodes with a higher probability of transmission. In the procedure, the nodes may encounter many nodes that are not qualified for forwarding and wait for the relay nodes with a higher possibility of transmitting the message to the destination node or the destination node itself. Therefore, the average delay of the HIRouter algorithm is high.Figure 7
Average delay under the different number of nodes.


#### 6.2.5. Overhead Rate

In Figure8, as the number of nodes increases, the overhead rate of the epidemic and PROPHET algorithm significantly increases. This is attributed to the infection mechanism of the epidemic algorithm. Messages are copied between the nodes that meet, and the memory overhead is large. For the PROPHET and EC_CW algorithms, the recording of the forwarding probability and the calculation of the forwarding probability increase with an increasing number of nodes. Thus, the memory overhead increase. When the S&W algorithm is in the waiting phase, messages are forwarded only when nodes encounter the destination node, and there is no need for excess information recording and calculation. Therefore, as the number of nodes increases, the spray efficiency of the S&W algorithm shows no significant changes. As the number of nodes increases, although the overhead rate also increases, the HIRouter algorithm still maintains a low overhead. This is because the HIRouter algorithm selects better relay nodes when the message is forwarded, optimizing the delivery process and reducing overhead.Figure 8
Overhead rate under the different number of nodes.


## 6.1. Performance

Several indicators are often used to determine the performance of the network.Herein, the five indicators used for network performance evaluation and the importance of the five indicators are listed below.The delivery rate is undoubtedly the most important in Opportunistic IoT. The higher the delivery rate, the more messages successfully forwarded to the destination node. The second is the average delay and overhead rate. The less time the message is delivered in the network and the smaller the cache overhead of the nodes in the network, the better the performance of the network. Finally, the number of relay nodes and the average number of relay nodes. The smaller the number of relay nodes means that the fewer times the message is forwarded by the node in the network, the less the total energy consumed by the node to forward the message, and the more the network performance can be improved.(1)
Success rate is the ratio of the number of messages successfully forwarded to the destination node to the total number of messages. The indicator is denoted as equation (7).(8)Ssuccess_rate=NdeliveredNcreated.(2)
Average hops are the average number of hops required for a message to be successfully forwarded to the destination node. The indicator is denoted as equation (8).(9)Naverage_hops=Ntotal_hopsNdelivered.(3)
Number of relay nodes is the number of intermediate nodes required for the successful forwarding of a message to the destination node. The indicator is denoted as equation (9).(10)Nrelay_nodes=Nintermediate_delivery_nodes.(4)
Average delay is the average time required for a message to be forwarded from the forwarding node to the destination node. The indicator is denoted as equation (10).(11)Naverage_delay=Ntotal_intermediate_delivery_nodesNdelivered.(5)
Routing overhead is the ratio of the difference between the number of delayed messages and the number of successfully forwarded messages to the number of successfully forwarded messages. The indicator is denoted as equation (11).(12)Roverhead_rate=Nrelayed−NdeliveredNdelivered.


## 6.2. Experiment Analysis

In the experiment, by increasing the number of nodes in the network, the performance of HIRouter is compared with the performance of the epidemic [41], PROPHET [42], EC_CW [43], and S&W algorithms [28].


### 6.2.1. Success Rate

In Figure4, when the number of nodes is small, the success rates of the four algorithms do not differ considerably. As the number of nodes increases, the success rate of HIRouter significantly increases. Moreover, as the number of nodes increases, the transmission success rate of the epidemic algorithm increases, and the prediction accuracy of the propagation probability of the PROPHET and EC_CW algorithms also improve. Therefore, the success rates of the epidemic and PROPHET algorithms are slightly improved. The success rates of S&W and HIRouter algorithms are higher than those of the other two algorithms. Owing to an increase in the number of nodes in the S&W algorithm, the copy of spray’s neighbor nodes significantly increases and the success rate also considerably increases. Compared with other routing algorithms, the HIRouter algorithm achieves the best success rate. As the number of mobile nodes increases, more accurate node relationships are estimated to provide a better forwarding strategy for opportunistic networks.Figure 4
Success rate under the different number of nodes.


### 6.2.2. Average Hops

In Figure5, as the number of nodes increases, the number of average hops of the epidemic algorithm increases, owing to the infection mechanism of the algorithm. Nodes will copy their message to forward it to the encountered nodes. The number of average hops of the PROPHET and EC_CW algorithms increases with the number of nodes; however, the increase is lower than that in the epidemic algorithm. The number of average hops of S&W and HIRouter algorithms slightly increases when the nodes are increased; however, the number of average hops of the HIRouter algorithm is relatively few. This finding demonstrates that the HIRouter algorithm selects the optimal relay nodes during message transmission, reduces the number of relay nodes, and ensures that the message reaches the destination node in as few hops as possible.Figure 5
Average hops under the different number of nodes.


### 6.2.3. Number of Relay Nodes

In Figure6, due to the contagion mechanism of the epidemic algorithm, the number of relay nodes increases with the number of nodes when the epidemic algorithm is used to transmit information. The PROPHET and EC_CW algorithms show an increased number of relay nodes when the number of nodes increases; however, the number of relay nodes is less than that in the epidemic algorithm. When the number of nodes is small, the number of relay nodes of S&W and HIRouter algorithms is one. However, with an increasing number of nodes, the number of relay nodes of the HIRouter algorithm is minimal. This finding indicates that the HIRouter algorithm selects the optimal relay node during message transmission, thereby reducing the number of relay nodes; i.e., the number of message transmissions is reduced and the message loss rate is reduced.Figure 6
Number of relay nodes under different numbers of nodes.


### 6.2.4. Average Delay

In Figure7, the average delay of the HIRouter algorithm is high. During message transmission, the nodes only forward messages to the nodes with a higher probability of transmission. In the procedure, the nodes may encounter many nodes that are not qualified for forwarding and wait for the relay nodes with a higher possibility of transmitting the message to the destination node or the destination node itself. Therefore, the average delay of the HIRouter algorithm is high.Figure 7
Average delay under the different number of nodes.


### 6.2.5. Overhead Rate

In Figure8, as the number of nodes increases, the overhead rate of the epidemic and PROPHET algorithm significantly increases. This is attributed to the infection mechanism of the epidemic algorithm. Messages are copied between the nodes that meet, and the memory overhead is large. For the PROPHET and EC_CW algorithms, the recording of the forwarding probability and the calculation of the forwarding probability increase with an increasing number of nodes. Thus, the memory overhead increase. When the S&W algorithm is in the waiting phase, messages are forwarded only when nodes encounter the destination node, and there is no need for excess information recording and calculation. Therefore, as the number of nodes increases, the spray efficiency of the S&W algorithm shows no significant changes. As the number of nodes increases, although the overhead rate also increases, the HIRouter algorithm still maintains a low overhead. This is because the HIRouter algorithm selects better relay nodes when the message is forwarded, optimizing the delivery process and reducing overhead.Figure 8
Overhead rate under the different number of nodes.


## 6.2.1. Success Rate

In Figure4, when the number of nodes is small, the success rates of the four algorithms do not differ considerably. As the number of nodes increases, the success rate of HIRouter significantly increases. Moreover, as the number of nodes increases, the transmission success rate of the epidemic algorithm increases, and the prediction accuracy of the propagation probability of the PROPHET and EC_CW algorithms also improve. Therefore, the success rates of the epidemic and PROPHET algorithms are slightly improved. The success rates of S&W and HIRouter algorithms are higher than those of the other two algorithms. Owing to an increase in the number of nodes in the S&W algorithm, the copy of spray’s neighbor nodes significantly increases and the success rate also considerably increases. Compared with other routing algorithms, the HIRouter algorithm achieves the best success rate. As the number of mobile nodes increases, more accurate node relationships are estimated to provide a better forwarding strategy for opportunistic networks.Figure 4
Success rate under the different number of nodes.


## 6.2.2. Average Hops

In Figure5, as the number of nodes increases, the number of average hops of the epidemic algorithm increases, owing to the infection mechanism of the algorithm. Nodes will copy their message to forward it to the encountered nodes. The number of average hops of the PROPHET and EC_CW algorithms increases with the number of nodes; however, the increase is lower than that in the epidemic algorithm. The number of average hops of S&W and HIRouter algorithms slightly increases when the nodes are increased; however, the number of average hops of the HIRouter algorithm is relatively few. This finding demonstrates that the HIRouter algorithm selects the optimal relay nodes during message transmission, reduces the number of relay nodes, and ensures that the message reaches the destination node in as few hops as possible.Figure 5
Average hops under the different number of nodes.


## 6.2.3. Number of Relay Nodes

In Figure6, due to the contagion mechanism of the epidemic algorithm, the number of relay nodes increases with the number of nodes when the epidemic algorithm is used to transmit information. The PROPHET and EC_CW algorithms show an increased number of relay nodes when the number of nodes increases; however, the number of relay nodes is less than that in the epidemic algorithm. When the number of nodes is small, the number of relay nodes of S&W and HIRouter algorithms is one. However, with an increasing number of nodes, the number of relay nodes of the HIRouter algorithm is minimal. This finding indicates that the HIRouter algorithm selects the optimal relay node during message transmission, thereby reducing the number of relay nodes; i.e., the number of message transmissions is reduced and the message loss rate is reduced.Figure 6
Number of relay nodes under different numbers of nodes.


## 6.2.4. Average Delay

In Figure7, the average delay of the HIRouter algorithm is high. During message transmission, the nodes only forward messages to the nodes with a higher probability of transmission. In the procedure, the nodes may encounter many nodes that are not qualified for forwarding and wait for the relay nodes with a higher possibility of transmitting the message to the destination node or the destination node itself. Therefore, the average delay of the HIRouter algorithm is high.Figure 7
Average delay under the different number of nodes.


## 6.2.5. Overhead Rate

In Figure8, as the number of nodes increases, the overhead rate of the epidemic and PROPHET algorithm significantly increases. This is attributed to the infection mechanism of the epidemic algorithm. Messages are copied between the nodes that meet, and the memory overhead is large. For the PROPHET and EC_CW algorithms, the recording of the forwarding probability and the calculation of the forwarding probability increase with an increasing number of nodes. Thus, the memory overhead increase. When the S&W algorithm is in the waiting phase, messages are forwarded only when nodes encounter the destination node, and there is no need for excess information recording and calculation. Therefore, as the number of nodes increases, the spray efficiency of the S&W algorithm shows no significant changes. As the number of nodes increases, although the overhead rate also increases, the HIRouter algorithm still maintains a low overhead. This is because the HIRouter algorithm selects better relay nodes when the message is forwarded, optimizing the delivery process and reducing overhead.Figure 8
Overhead rate under the different number of nodes.


## 7. Conclusion

In this work, a hybrid Opportunistic IoT Secure routing strategy based on node intimacy and trust value is proposed. This strategy fully utilized the movement encounter information and successful message-forwarding information of the nodes in the network to determine the mixed utility value of nodes and identify the optimal relay nodes for message transmission.From the experimental results, the HIRouter algorithm we proposed achieved a better success rate, a number of relay nodes, the average number of hops, and an overhead rate than the epidemic, PROPHET, EC_CW, and S&W algorithms. The routing algorithm improved the message delivery success rate and decreased the number of relay nodes and the average number of hops required for message transmission in the Opportunistic IoT with dense nodes and frequent interactions between nodes. At the same time, the routing algorithm reduces the information loss rate and the probability of malicious node damage from the side and improves the security of the network. Moreover, the routing algorithm decreases network congestion and resource consumption.In summary, the HIRouter algorithm we proposed can effectively accomplish data transmission in Opportunistic IoT with high efficiency and quality. Although the HIRouter proposed in this paper has achieved certain results in terms of success rate and overhead rate, the routing algorithm has a high average delay, which has an impact on the network performance of opportunistic IoT. The algorithm determines the forwarding utility value through the encounter between nodes and the successful forwarding record of the message. Therefore, the algorithm is suitable for the Opportunistic IoT with dense nodes and frequent interactions between nodes. For the Opportunistic IoT with sparse nodes and less interaction between nodes, this algorithm does not have a better delivery efficiency. In future research, certain replica strategies and incentive mechanisms will be used to promote message forwarding to reduce the average delay and improve network performance and propose an algorithm for the Opportunistic IoT with sparse nodes and less interaction between nodes.



---

*Source: 6343764-2022-02-09.xml*