Prophet_TD Routing Algorithm Based on Historical Throughput and Encounter Duration

: Opportunistic networks are self-organizing networks that do not require a complete path between the source node and the destination node as it uses encounter opportunities brought by nodes movement to achieve network communication. Opportunistic networks routing algorithms are numerous and can be roughly divided into four categories based on different forwarding strategies. The Prophet routing algorithm is an important routing algorithm in opportunistic networks. It forwards messages based on the encounter probability between nodes, and has good innovation significance and optimization potential. However, the Prophet routing algorithm does not consider the impact of the historical throughput of the node on message transmission, nor does it consider the impact of the encounter duration between nodes on message transmission. Therefore, to improve the transmission efficiency of opportunistic networks, this paper based on the Prophet routing algorithm, fuses the impact of the historical throughput of the node and the encounter duration between nodes on message transmission at the same time, and proposes the Prophet_TD routing algorithm based on the historical throughput and the encounter duration. This paper uses the Opportunistic Networks Environment v1.6.0 (the ONE v1.6.0) as the simulation platform, controls the change of running time and the number of nodes respectively, conducts simulation experiments on the Prophet_TD routing algorithm. The simulation results show that compared to the traditional Prophet routing algorithm, on the whole, the Prophet_TD routing algorithm has a higher message delivery rate and a lower network overhead rate, and its average latency is also lower when node density is large.


I Introduction
Opportunistic networks fuse the characteristics of the delay-tolerant network (DTN) [Fall (2003)] and mobile Ad-Hoc network (MANET) [Puneet, Shipra and Vandana (2012)]. In the environment of network communication area fragmentation, opportunistic networks use encounter opportunities created by terminal devices movement to communicate and use the storage-carry-forward routing mechanism to transmit data [Xiong, Sun, Niu et al. (2009)]. With the development of the opportunistic networks technology, it has played an increasingly important role in multiple fields, such as mobile device networks, vehicle network systems, remote areas networks, wartime communication networks and so on [Huang (2019)]. At the same time, fusing opportunistic networks technology and artificial intelligence technology can realize the detection of environment, such as air quality detection [Wang, Kong, Guan et al. (2019)] and so on. Therefore, opportunistic networks have important research significance. Based on different forwarding strategies, the routing algorithms of opportunistic networks are divided into four categories: redundant-based routing algorithms, utilitybased routing algorithms, utility-redundant-hybrid routing algorithms and active-motionbased routing algorithms [Xiong, Sun, Niu et al. (2009)]. In the redundancy-based routing algorithm, each message is replicated or encoded to generate multiple redundant messages spreading across networks and uses the multi-path parallel transmission to improve message transmission performance. The representative routing algorithms include the Epidemic routing algorithm [Vahdat and Becker (2000); Nekovee (2009)], Spray and Wait routing algorithm [Spyropoulos, Psounis and Raghavendra (2005)] and so on. The utility-based routing algorithm is similar to traditional network message transmission, uses a single path and single message replication, and uses network state information to determine the next-hop node. The representative routing algorithms include the Seek and Focus routing algorithm [Spyropoulos, Psounis and Raghavendra (2004)], Context-Aware routing algorithm [Musolesi, Hailes and Mascolo (2005)] and so on. The utility-redundant-hybrid routing algorithm fuses the characteristics of the first two types of algorithms, that is, each message generates multiple redundant messages and each redundant message is forwarded to the destination node according to the utilitybased routing algorithm. The representative routing algorithms include the Prophet routing algorithm [Lindgren, Doria and Schelen (2003)] Spray and Focus routing algorithm [Spyropoulos, Psounis and Raghavendra (2007)] and so on. In the activemotion-based routing algorithm, some nodes communicate with other nodes through active movement in the deployment area. The representative routing algorithms include the Message Ferrying routing algorithm [Zhao, Ammar and Zegura (2004)] and so on.

Related work
The Prophet routing algorithm [Lindgren, Doria and Schelen (2003)] is a message transmission algorithm based on the encounter probability. In this algorithm, each node in networks calculates the probability value of itself reaching the destination node. When two nodes encounter, the message is delivered to the node which has a higher probability value, until the message reaches the destination node. But the algorithm only considers a part of influencing factors when calculating the encounter probability between nodes. To this end, researchers have considered the node energy, network bandwidth, physical cache, encounter duration and other influencing factors, and have improved the algorithm to varying degrees. Ahmed et al. [Ahmed, Mohamed, Mohammed et al. (2013)] proposed a new forwarding strategy based on the predictability control, retransmission times threshold and battery energy consumption of the Prophet routing algorithm, improves the network throughput.
Shi et al. [Shi, Mu, Shen et al. (2014)] calculated the message forwarding degree of the node by using the encounter probability between the node and the destination node, it is used to determine the number of copies of the forwarded message. Then the P-DFM routing algorithm is proposed, reduces the number of copies in networks by half. Han et al. [Han and Chung (2015)] proposed an improved Prophet routing algorithm by using the Epidemic routing algorithm to transmit messages when the forwarding counter and the hop counter were less than or equal to the threshold value, comprehensively optimizes the delivery rate, network overhead rate and average latency. Vang et al. [Vang, Saavedra and Yang (2015)] proposed a new routing algorithm that helps alleviate the amount of unnecessary message duplicates by introducing ferry nodes that have the capability of deleting messages that have already been delivered to destination nodes in networks. This routing algorithm cuts down the amount of copies within the network by half, thereby reduces the overhead rate and improves the delivery rate. Zhou [Zhou (2015)] evaluated the node reliability based on the history of message replacement in the cache and proposed the R-Prophet routing algorithm, ensures that the message is transmitted between reliable nodes. Ahmad et al. [Ahmad, Fathima, Jain et al. (2017)] proposed the Fuzzy-Prophet routing algorithm by fusing the Prophet routing algorithm and the Fuzzy model, solves the information fuzzy problem of the node in opportunistic networks to a certain extent. Bista et al. [Bista and Rawat (2017)] proposed the EA-Prophet routing algorithm by fusing the residual energy of the node and the utility value of the physical buffer used to store and forward messages, reduces the consumption of network resources. Mezouary et al. [Mezouary, Houmz, Jalil et al. (2017)] proposed a Prophet-RAIP5 routing algorithm based on the RAID5 technology and the multipath routing, increases the security of message transmission in opportunistic networks. Du et al. [Du, Wu, Yoshinaga et al. (2018)] proposed the vehicular delay tolerant network (VDTN) routing algorithm which combines the message deliver strategy of Prophet routing algorithm with the message copy control strategy of Spray and Wait routing algorithm, outperforms other well-known DTN routing algorithms in terms of the delivery ratio, average latency and overhead rate. Kumar et al. [Kumar, Tripathy, Dwivedi et al. (2018)] deduced a new initialization constant and a new aging constant based on genetic algorithm. These two new constants optimize the calculation model of the encounter probability, thereby improving the accuracy of the encounter probability. Ren et al. [Ren, Liu, Ji et al. (2018)] proposed the first incentive mechanism of nodes based on data storage by using the blockchain technology, greatly reduces the computing power and greatly saves the storage space of nodes. Singh et al. [Singh, Bera and Pamula (2018)] proposed the Prophet routing algorithm based on packet replication control by using the incentive mechanism based on replication control and the forwarding mechanism based on community, reduces the selfish behavior of nodes. Geetha et al. [Geetha and Sankar (2018)] proposed an energy efficient routing algorithm based on multi criterion fuzzy, its node throughput, network lifetime, delivery rate, routing overhead rate and bandwidth utilization have all been improved to varying degrees. Ramadan et al. [Ramadan, Tawfik and Riad (2018)] find a route satisfying minimum energy consumption and other QoS requirements such as minimum delay and maximum packet delivery ratio by using linear programming technique. Qin et al. [Qin, Wang, Wang et al. (2019)] proposed the Probabilistic Routing scheme based on Game Theory (PRGT) to stimulate cooperation among selfish nodes, effectively improves the delivery rate and reduces the average latency. Shabalala et al. [Shabalala, Shibeshi and Khalid (2019)] proposed the energyaware Prophet routing algorithm by endowing the Prophet routing algorithm with a new energy sensing mechanism, reduces the energy consumption of the node. Wang et al. [Wang, Gao, Liu et al. (2019)] proposed a distributed routing schema with data fusion by using neural networks, which has better performance in terms of energy consumption and network lifetime. Wang et al. [Wang, Kong, Li et al. (2019)] proposed a dual-chaining watermark scheme for data integrity protection, which ensures that the data integrity without any distortion. And compared with existing single chaining watermark methods, it improves the data accuracy, data security and network lifetime. Although the above-mentioned algorithms improve the performance of opportunistic networks to a certain extent, they do not fuse the impact of the historical throughput of the node and the encounter duration between nodes on message transmission at the same time. The historical throughput of the node reflects the performance of the node in terms of the energy, bandwidth and cache [Ma and Li (2018)]. The performance of the node and the encounter duration between nodes have an important impact on the stability of opportunity communication link and the quality of message transmission [Zhang, Wang and Zhang (2015); Wang, Tao, Zhang et al. (2017) P(a,b)old is the last encounter probability of two nodes, Pinit is the initialization constant and generally 0.75. If node A and node B do not encounter in a period, they will update the encounter probability respectively, as shown in Eq. (2): α is the reduction factor, reflects the impact level of time change on the encounter probability, k is the number of time slices since the last encounter of two nodes. If node A and node B often encounter, node B and node C also often encounter, the three nodes are transitive and they will update the encounter probability respectively, as shown in Eq. (3): β is the transmit factor, reflects the impact level of transitive between nodes on the encounter probability. Definition 2. Historical throughput of the node. The ratio of the total amount of the node received and transmitted messages to the total amount of the node created messages, which is the historical throughput of the node. Calculating the historical throughput of the node requires calculating the total amount of received and transmitted messages by this node as a relay node, also requires calculating the total amount of created messages by this node as a source node. The total number of received messages by this node as a relay node is as shown in Eq. (4) (4) ri represents the size of a received message, nr represents the total number of received messages. The total number of transmitted messages by this node as a relay node is as shown in Eq. (5): (6) ci represents the size of a created message, nc represents the total number of created messages. To sum up, the historical throughput of the node [Ma and Li (2018)] is as shown in Eq. (7): The calculation factor of the encounter probability including the historical throughput is as shown in Eq. (8): In opportunistic networks, if node A and node B encounter n times, the encounter duration between nodes [Zhou (2015)] is as shown in Eq. (9): Ti represents the duration of i-th encounter between nodes. The calculation factor of the encounter probability including the encounter duration between nodes is as shown in Eq. (10): Fusing the historical throughput and the encounter duration, Eq. (11) is obtained from Eqs. (1), (8) and (10): γ represents the historical throughput of the node, λ represents the encounter duration between nodes.
The pseudo-code of the algorithm is as follows: Algorithm 1. Forward (G, S, n, k). Require: G is the forwarded messages set, S is the relay nodes set, n is the receiver's ID, k is the limit of message copies in networks. Ensure: Forward messages in G to node n. The text description of the algorithm is as follows: For transmitting messages, the source node which carrying the messages set G encounters the relay nodes set S. Each of these relay nodes has different historical throughput and the different encounter duration with the destination node with ID n. The message in G has at most k copies.
Step 1: For the message in G that can be directly transmitted to the destination node, it is transmitted to the destination node directly. After successful transmission, delete the message. This step corresponds to lines 2 to 11 in the algorithm.
Step 2: For the message in G that cannot be directly transmitted to the destination node, it is transmitted to the relay node s which has the largest encounter probability. In this way, the relay node S becomes the new source node which carrying the message. While transmitting a message, add a copy of the message. If the number of message copies reaches k, delete the message. This step corresponds to lines 12 to 23 in the algorithm.
Step 3: Repeat the above process until the end of the operation.

Environment settings
This paper uses the ONE v1.6.0 as the simulation platform to compare the Prophet_TD routing algorithm with three classic routing algorithms: the Epidemic routing algorithm, FirstContact routing algorithm and Prophet routing algorithm to evaluate the performance of the Prophet_TD routing algorithm. The ONE v1.6.0 is a DTN network simulator based on Java, which is supported by the Nokia Research Center in Finland, it can simulate the performance of opportunistic networks under different routing algorithms [Wang, Wang and Sui (2012)]. The simulation experiment is divided into two groups: the first group controls the change of simulation time and keeps other parameters unchanged, the second group controls the change of the number of nodes and keeps other parameters unchanged. The specific environment parameter settings see Tab. 1:

Performance index
At the end of the simulation, the ONE v1.6.0 will generate some indicators in the report file to measure the performance of different routing algorithms in opportunity networks. In this paper, the delivery rate, overhead rate and average latency are selected to evaluate the performance of four routing algorithms. Definition 3. Delivery rate. The ratio of the total number of all transmitted successfully messages to the total number of all delivered messages. Definition 4. Overhead rate. The ratio of the total number of all transmitted unsuccessfully messages to the total number of all transmitted successfully messages. Definition 5. Average latency. The average of elapsed time from the source node to the destination node for all transmitted successfully messages.

Result analysis
Based on the environment settings of the first set of simulations, the Prophet_TD routing algorithm is compared with three classic routing algorithms. Their change trend of the delivery rate, overhead rate and average latency is shown in Figs. 1-3. It can be seen from Fig. 1, in the simulation time interval of 35000 s-45000 s, the FirstContact routing algorithm has the highest delivery rate. Outside this simulation time interval, the Prophet_TD routing algorithm has the highest transmission success rate and its change trend is also the most stable. This is because the Prophet_TD routing algorithm considers the impact of the historical throughput of the node on message transmission, also considers the impact of the encounter duration between nodes on message transmission. The historical throughput of the node is related to node performances such as the node energy, network bandwidth and physical cache, reflects the pros and cons of the node performance to a certain extent. Therefore, considering the impact of the historical throughput of the node on message transmission, the relay node with better performance can be selected, thereby the delivery rate could be improved. The communication link between two nodes with a longer encounter duration is not easy to be interrupted, ensures the stability of message transmission to a certain extent.

Figure 2:
The changing trend of overhead rate of four routing algorithms with increasing time It can be seen from Fig. 2, in general, in addition to the FirstContact routing algorithm, the Prophet_TD routing algorithm has the lowest overhead rate. This is because the Prophet_TD routing algorithm constructs the throughput factor γ and the transmit factor λ based on the historical throughput of the node and the encounter duration between nodes. They improve the accuracy of the encounter probability, thereby improving the rationality of the selection of relay nodes and further reduces the overhead rate of the entire network. It can be seen from Fig. 3, in general, in addition to the FirstContact routing algorithm, the Prophet_TD routing algorithm has the highest average latency. This is because the Prophet_TD routing algorithm takes some time to calculate the historical throughput of the node and the encounter duration between nodes, leads to an increase in the average latency.
Based on the environment settings of the second set of simulations, the Prophet_TD routing algorithm is compared with three classic routing algorithms. Their change trend of the delivery rate, overhead rate and average latency is shown in Figs. 4-6.

Figure 4:
The changing trend of delivery rate of four routing algorithms with increasing nodes number It can be seen from Fig. 4 that when the node density is low, the Prophet routing algorithm and the Epidemic routing algorithm have a higher delivery rate; and when the node density is high, the Prophet_TD routing algorithm has a higher delivery rate. This is because when the number of nodes is small, the historical throughput of the node and the encounter duration between nodes does not have a significant impact on message transmission, at this time, adding the two as the calculation factors into the encounter probability formula may reduce the accuracy to a certain extent, results in delivery rate is low. With the number of nodes increases, the impact of the two on message transmission gradually increases, increases the accuracy of the encounter probability and further improves the delivery rate. It can be seen from Fig. 5 that in general when the node density is low, the overhead rate of the Prophet_TD routing algorithm is high; and when the node density is high, the overhead rate of the Prophet routing algorithm is high. This is because when the number of nodes is small, the historical throughput of the node and the encounter duration between nodes does not have a significant impact on message transmission, and calculating the two consumes some resources, results in overhead rate is high. With the number of nodes increases, the impact of the two on message transmission gradually increases, reduces the selection range of relay nodes and further reduces the overhead rate of the entire network. The changing trend of the Prophet_TD routing algorithm is the most stable. It can be seen from Fig. 6 that when the node density is low and high, the average latency of the Prophet_TD routing algorithm is lower than the Prophet routing algorithm. This is because when the number of nodes is small, fusing the impact of the historical throughput of the node and the encounter duration between nodes on message transmission can make messages transmitted to relay nodes which have better performance, while calculating the two takes less time, so the average delay is relatively lower. When the number of nodes is large, it takes more time to calculate the historical throughput of the node and the encounter duration between nodes, however, more relay nodes that have better performance are selected, improves the efficiency of message transmission as a whole and further reduces the average delay. When the node density is low, although the average latency of the Epidemic routing algorithm is low, the changing trend of the Epidemic routing algorithm is not stable. And it can be predicted that when the node density is higher the average latency of the Epidemic routing algorithm is not necessarily lower than that of the Prophet_TD routing algorithm. In SPMBM mobile model, the encounter distribution between nodes fluctuates violently in the time dimension and the quantity dimension, leads to three performance indexes fluctuate in varying degrees.

Conclusion
First, this paper analyzes the advantages and disadvantages of the Prophet routing algorithm and several related routing algorithms. Then, on the basis of the Prophet routing algorithm, fuses the impact of the historical throughput of the node and the encounter duration between nodes on message transmission at the same time, improves the calculation model of the encounter probability and proposes the Prophet_TD routing algorithm based on the historical throughput and the encounter duration. The simulation results show that to compare the Prophet routing algorithm, when the node density is high, the Prophet_TD routing algorithm effectively improves the delivery rate, reduces the network overhead rate and the average delay; but when the node density is low, the efficiency of message transmission is not good. Therefore, the next research work is to continue to improve the encounter probability calculation model, so that the efficiency of message transmission can also be improved when the node density is low.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.