A context-aware improved POR protocol for Delay Tolerant networks

ABSTRACT The intermittent network connectivity and unawareness of global network knowledge are remarkable challenges when designing efficient Position-based Opportunistic Routing (POR) for Delay Tolerant Networks (DTNs). The best progress set selection of POR effectively handles the intermittent connectivity issue and improves the reliable performance of DTNs. Hence, the optimal progress set selection and catching capacity decide the routing reliability of DTN-POR. This paper proposes a context-aware DTN-POR protocol STAP to ensure reliable DTN routing with minimum overhead STAP design is divided into three folds: application diversity and network failures, context-aware best progress set selection, and enhanced caching management. The application diversity and network failure switch the nodes in harsh environments to DTN mode for transmitting the data packets successfully to the destination. Selecting context-aware relay nodes ensures highly successful data transmissions in the absence of end-to-end connectivity. The probability estimation maximizes the data reachability by considering unique node and application-level context attributes in the best progressive set. Finally, the enhanced catching management strategy limits the number of data copies with effective catch invalidation, resulting in minimum overhead. The proposed STAP accomplishes better results in different scenarios and improves the packet delivery ratio with a minimum duplication rate.


Introduction
Due to the innovation of 5G networks, numerous internet-based smart handheld devices proliferate daily to modernize human lives. Thus, it motivates the researchers to organize such devices into opportunistic networks to solve the human internet-based communication demands anywhere at anytime [1]. The Delay Tolerant Networks (DTN), also called opportunistic networks, is an intermittently connected networks, and there is no guaranteed end-to-end routing path between a communicating pair of devices [2]. Hence, the DTNs are the main alternatives to cope with network failures during emergency situations. DTN applications include military connections, disaster areas, interplanetary transmissions, and rural communities. Geographic routing protocols create an opportunistic contact between source and destination and suit a highly dynamic intermittent environment such as DTNs due to its simplicity [3]. High endto-end delay, frequent disconnection, and intermittent connection are the characteristics of DTNs [4]. Most of the DTN routing protocols adopt the store-carryand-forward technique in which the received messages are stored and retransmitted by a set of intermediate nodes to ensure successful end-to-end data delivery [5]. Thus, the POR protocol is a suitable routing method for DTNs. Establishing opportunistic connectivity among DTN nodes may result in a long delay, much overhead, and a reduced packet delivery ratio. Hence, it ensures the appropriate quality of services in data delivery with minimum delay and overhead. Additionally, the DTN nodes have to cooperate and contribute their scarce resources to accomplish a certain level of performance efficiency. Therefore, it is crucial to consider numerous context factors in progressive set formation for optimizing the opportunistic router selection and enhancing the DTN performance efficiency.
Caching is often used to maximize the data access performance of application-specific DTNs [6]. The dynamic network topology and constrained contact duration characteristics of DTN make DTN caching significantly challenging. Generally, the DTN necessitates multiple copies of messages at different cache locations to effectively handle the data uncertainty [7]. Thus, it increases the message duplication rate and overhead. Hence, it is crucial to invalidate the caching with appropriate time and message copies. The cache management models invalidate the cache by employing various parameters [8]. Moreover, an optimal contextaware POR strategy with an improved catching model is essential for DTN to offer a better tradeoff between data reachability and overhead.
This work proposes a context-aware DTN-POR protocol named STAP that aims to maximize the opportunistic routing efficiency and reduce the overhead under different DTN applications. The main contributions of the proposed STAP are as follows.
➢ Developing an effective application-specific reliable DTN-POR routing strategy with improved catching to determine a guaranteed node series from the source to the destination optimizes the cache capacity. ➢ The proposed STAP integrates three mechanisms that are application diversity and network failures, context-aware relay selection, and enhanced catching management to accomplish the objectives. ➢ Initially, the application diversity and network failures switch the nodes in a harsh application environment to DTN mode, in which the data is successfully transmitted to the desired destination using the best forwarder nodes. The forwarder node selection depends on the application type. ➢ Secondly, the context-aware probability measurement improves the optimal relay selection efficiency with various node and application-level context attributes and maximizes the POR routing performance under high network partitions scenarios. ➢ Thirdly, the enhanced catching management strategy restricts the number of data copies and minimizes the cache overhead by invalidating the cache messages over a certain time. The cache invalidation time is selected based on the DTN application type. ➢ Finally, the Network Simulator-2 (NS-2) based simulations are performed to analyze the efficiency of the proposed STAP with different performance metrics under diverse network scenarios.
The remaining part of the paper is organized as follows. Section 2 briefly surveys the works related to DTN geographic routing, context-aware model, and caching strategies. Section 3 describes the problem formulation and system model. Section 4 clearly explains the STAP protocol design with appropriate mechanisms. Section 5 shows the performance evaluation and discusses the results of STAP with different metrics. Section 6 concludes this paper.

Related works
For a comprehensive survey, the existing works are divided into three major categories that are DTN geographic routing protocols, context-based DTN routing schemes, and catching-based DTN routing methods.

DTN geographic routing protocols
The works in [9] and [10] survey the geographic routing protocols proposed for DTN. The Delay Tolerant Firework Routing (DTFR) supports routing in disconnected Delay Tolerant Networks with a large number of location-aware mobile nodes [11]. DTFR protocol comprises four phases such as dissemination rule, forwarding rule, priority policy, and buffer policy. The GeoCross prevents the routing loop formed due to the absence of a forwarding node [12]. GeoCross enhances its perimeter mode to detect the crossing links and generates a planar graph. Location-Aided ROuting for DTN (LAROD) [13] exploits a delaytolerant geographic routing protocol. The nodes close to the destination set up the timer after overhearing the transmission based on their location. The node broadcasts a reply announcing to its neighbours that it is the new custodian if it expires. The other nodes discard the packet based on the timer. The work in [14] designs a geographic routing protocol highly suitable for heterogeneous network scenarios. Firstly, the geographic routing protocol selects the best relay node with an optimal number of message copies by utilizing The-Best Geographic-Relay (TBGR) method. Also, it overcomes the local maximum issue by clustering the network nodes. Secondly, the geographic routing mechanism extends the TBGR to heterogeneous networks, named TBGR. The work in [15] introduces an improved opportunistic routing protocol in which two predictable methods are exploited to best forwarder selection in DTN wireless sensor networks. The current and maximum delivery predictability methods diminish the buffer overflow and escalate the packet delivery ratio in DTN-based sensor networks. A new geographic routing method in [16], called GeoDTN-NDN, maximizes routing efficiency by designing a hybrid geographic routing strategy. The hybrid model uses confined greedy, perimeter, and DTN modes for successful data transmission.
A community-based opportunistic routing protocol [17] chooses the best-forwarded node by employing the communication probability and the residual energy level of the nodes. Also, the community-based opportunistic routing protocol restricts the number of message copies and maximizes the algorithm efficiency. A DTN-based Location-aware Communication System using LoRa has been proposed [18]. A Geographic Energy-aware Epidemic Routing (GEER) has been proposed in [19] to disseminate DTN messages. The GEER considers the remaining energy level of nodes and degreeof centrality to choose the forwarder nodes and prevent quick network failures dynamically. Also, it preserves the buffer space by limiting the TTL of sent data to a minimum. The node density estimation according to the geographic area in GEER enhances the message transmission rate, and the buffer data discarding policy effectively handles the network congestion issues. The framework in [20] proposed a controlled mobilitybased opportunistic routing protocol to enable efficient device-to-device communication in post-disaster areas.
It utilizes data mules to collect information over disaster areas when the entire communication system is collapsed. Thus, it effectively handles network disconnections and delay issues.

Context-based DTN routing schemes
A context awareness framework for DTN exploits an adaptation portal through which external context agents affect the internal routing behaviour [21]. The context agent is decoupled from the router to support various forms of context-awareness. The contextawareness framework identifies the appropriate routing parameters that the external context agent can tune. The work in [22] designs an improved opportunistic routing protocol that utilizes context information like average distance and time in the forwarding node selection. Thus, the improved opportunistic protocol increases the message delivery rate in DTN. An improved probability routing protocol using history of encounters and transitivity routing protocol named improved PRoPHET for DTN has been presented [23]. The improved PRoPHET protocol boosts the message dissemination speed by utilizing an epidemic strategy in which the optimal router is selected using a threshold value. Another work in [24] maximizes opportunistic routing performance with minimum delay by using the epidemic and opportunistic forwarder strategies. A context-aware self-adaptive routing protocol in [25] permits the nodes to choose the DTN protocol automatically based on the past network performance. Thus, the DTN protocol can adapt to different scenarios and effectively handle intermittent network failures. The context-aware self-adaptive routing model utilizes the current environmental characteristics of disaster areas to select the routing protocols adaptively and maximizes the performance efficiency.

Caching based DTN routing methods
An infrastructure-based route caching mechanism in [26] utilizes network infrastructure to connect various DTN regions. The caching mechanism significantly limits the flooding rate of DTN messages during infrastructure-assisted data transmission. Cooperative caching in DTNs supports sharing and coordinating cached data amongst several nodes to reduce data access delay [27]. Cooperative caching uses Network Central Locations (NCLs) to cache the data to offer easy data access in the network. NCL is selected based on the probabilistic selection metric. Furthermore, cooperative caching optimizes the tradeoff between data accessibility and caching overhead. Community DTN node supports a cache-enabling module and caching functionality using fixed infrastructure like the internet. The storage module offers interfaces to perform cache lookups for bundle storage in the queue based on probabilistic selection. The cache module also supports retrieving cached data to respond to the request. Caching in [28] also uses fixed infrastructure like Wi-Fi access points to improve data accessibility. The community-based opportunistic routing protocol [17] adopts intra and inter-community modes for better opportunistic DTN routing. In the first intra mode, effective forwarding conditions are applied for data transmitting with E-PRoPHET. Consequently, the forwarding nodes are selected based on communication probability and node energy level in intercommunication mode. An opportunistic distributed caching model in [29] considers diverse priority requirements of data to manage the caching. Thus, the caching model opportunistically caches the data based on the priority level and enhances the applicationspecific mission-oriented DTN performance.

Problem formulation
In this section, highly partitioned DTN scenarios are described, and a problem statement is provided by clearly analyzing the existing gaps. Also, several related definitions with the system model about STAP are explained.

Definition 1: network partition scenarios of DTN
DTN is a highly partitioned and intermittently connected ad hoc network, and thus, it carries routing between a source-destination pair based on opportunistic contacts [1]. The prime DTN applications comprise disaster recovery management systems, military tactical environment, wildlife monitoring with tracking, interplanetary networks, and vehicular communication system. Hence, the DTN is widely operated in an environment with no communication infrastructures and stable routing paths. For instance, the sensing information of disaster scenarios cannot deliver successfully through the existing communication infrastructure, which is destroyed owing to tsunamis, volcano outbreaks, cyclones, earthquakes, dust devil, and floods. Instead, the DTNs ensure successful data delivery in such scenarios by bridging the partitioned communication infrastructures through opportunistically selected routers like pedestrians, smartphones, trams, and cars. Consider a DTN network at time t, G = (N, t) constructed using a set of nodes N = 1, 2, . . . .i. The node ni is located at any geographical area (xi, yi) of DTN. Initially, nodes N established communication based on the existing communication infrastructure. During harsh activities, the network is highly partitioned, which is defined as a set S = DTN1, DTN2, DTN3 . . . ..DTN n . The partitioned graph network G P is formulated as follows..

Definition 2: context-aware POR to handle network partitions
The context-aware DTN routing methods are suitable solutions for handling the current network situation. It exploits multi-criteria context information like node density, mobility, contact duration, connectivity, and node capacity to decide whether the data is transmitted through the selected routers or not. As the DTN nodes have a short contact time in terms of seconds and efficient opportunistic routing decisions based on context information of myriad sources are essential to optimize the DTN efficiency. Then, this work mainly focuses on designing an efficient context-aware POR routing protocol for intermittently connected DTN applications. The context information related to a particular node n i ∈ N is estimated using a set of context attributes C = (x1, x2, . . . .Xj). The context-aware POR routing problem under a partitioned scenario is formulated using the following equation..
Where the context-aware POR routing R(G p ) mainly depends on the context attributes C(x j )Where j is varied from 1 to j. Each context attribute x j belongs to node N c and application-level context A c , which are referred as N c &A c .

Definition 3: existing gaps and application specific context parameters
The fundamental geographical POR protocols cannot capture the DTN application-specific characteristics, and they are not performing well in highly partitioned DTN scenarios. Later, some exiting context-aware routing protocols employ standard context parameters to design the POR routing protocol. However, the context set selection is varied based on the DTN application type, as context parameters are closely related to particular application characteristics. Moreover, the existing context-aware geographic POR protocols are simple, and they lack to consider application adaptive multicriteria context information into account, resulting in poor POR performance. Additionally, they lack to manage the cache space effectively, resulting in poor opportunistic contact node selection. To be highly adaptive to the application scenarios and ensure high data delivery, this work proposes a context-aware DTN-POR protocol with an improved caching model. The estimation of the context of the node n i ∈ N, C p (n i ) is formulated using equation (3)..
Where the set of node context is referred as N c (x i ), i is varied from 1 to n., and the set of application context is referred as A c (y j ), j is varied from 1 to a.

Definition 4: core problem handled by STAP
The main problem-focused by the proposed STAP is the design of an efficient context-aware DTN-POR protocol that works well adaptively to multiple DTN scenarios by taking into account the application-specific context parameters. The proposed model effectively manages the current network situations and successfully delivers the packets to the desired destination nodes by adaptively selecting the DTN mode at the right time when the existing communication infrastructure is failed. For instance, the network comprises n number of nodes, and each node has a forwarding opportunistic contact neighbour set Ns = n1,n2 . . . ..nk, where k refers to the number of nodes in the forwarding set. The sender selects the best opportunistic router set from the available sets, and numerous factors affect routing performance. The sender node S selects a maximum forwarding probability node nk from the set, and the problem can be formulated as follows.
In equation (4), the term arg max p (N s {n k }) refers to the maximum forwarding probability node n k from set N s . Further, the term w k refers to the weighting factor of node contexts n k . The probability of node n k is estimated using node and application-level context information. For that, a set of context is defined as N c , A c , where the node context N c = x1,x2, . . . ..xn and the application context A c = y1,y2, . . . ..ya.

Problem statement
The sparse network disconnections and limited node capacity make the DTN routing a complex task. The geographic opportunistic routing protocols are introduced in the DTN environment to handle the intermittent connectivity and reachability issues. Best progressive set selection is a key issue of POR protocols, as the routing efficiency mainly depends on the relays. The context information like mobility, connectivity, and contact duration creates a high influence on the performance of POR. Also, the practical application of DTN is uncertain owing to the environmental diversity. The context-aware methods are appropriate solutions to maximize DTN-POR efficiency. However, they lack to incorporate more application-specific context parameters, resulting in poor POR performance. Also, the multiple copy maintenance at different locations leads to a high duplication rate. Hence, effective cache management is essential. This work proposes a context-aware POR routing with appropriate catching management for highly partitioned DTN. The diagrammatic form of the problem statement is provided in Figure 1.

System model
The wireless DTN network is modelled as a communication graph G (V, E). The term V refers to the number of DTN nodes N = |V|, N = 1, 2 . . . . . . .n. The STAP DTN nodes are pedestrians, smartphones, data mules, and trams. The term E represents the direct communication links between two communicating nodes, n 1 and n 2 . The nodes within the communication range establish direct communication links, and the nodes out of the communication range require relay nodes for successful data transmission. The DTN nodes generally communicate based on geographic opportunistic routing models. Hence, each node is equipped with GPS to know its location information. The geographic location of any two nodes neN is Nx and Ny. In POR routing, there is no need to maintain routes in the table, and it is highly suitable for DTN settings. Instead, the nodes maintain a neighbouring table in which the location information and context values are stored. Each node employs the context information to form a positive progress set (Ps) in STAP.

STAP protocol design overview
The proposed STAP aims to improve the performance of diverse DTN application scenarios in which the communication infrastructure is destroyed due to sudden environmental changes. The block diagram of the proposed STAP with existing network failures is portrayed in Figure 2. From the figure, the STAP creates opportunistic contacts among the available network entities and external DTN nodes and effectively handles the sudden exiting communication infrastructure failures in environments like disasters, military surveillance, and forest fire detection. The STAP integrates two mechanisms, such as multi-criteria context-based forwarder set selection and improved caching , achieving high POR performance with minimum cache overhead in diverse DTN-based mission-oriented application scenarios. The context-aware relay selection model in STAP selects highly reliable nodes as routers based on the context weights during data forwarding and accomplishes successful data transmissions. The first mechanism uses a context-based probability evaluation in which the efficient progressive set nodes are selected by considering various node and application-level context parameters. The information about the context is always application-dependent. The context-aware POR exploits the highly stable nodes to maintain the context table with a neighbour list and increases the progressive set selection accuracy. Secondly, the enhanced DTN cache management model efficiently invalidates the messages in the cache based on the application-specific time interval. Thus, it minimizes the data duplication rate and cache overhead effectively.

Application diversity and existing network failures
The DTN routing for emergency response operations has to perform communication in harsh environments. The existing infrastructure may be unavailable due to disasters and harsh activities, and the DTN-POR is a promising method to establish connectivity among the nodes in harsh environments. The prime DTN applications are disaster scenarios, military surveillance systems, and wildlife monitoring. In disaster scenarios, the available communication infrastructure may break due to floods, tornados, earthquakes, and hurricanes. Natural disasters create too much destruction in which the particular area becomes harsh, and the communication infrastructures are destroyed or overloaded. As network failure is happening, efficient and less connectivity protocol is needed. Secondly, the existing connectivity of military surveillance systems may fail due to foreign invasion, blasts, gun firing, and infiltration of enemies. In such scenarios, there is a need to inform about the harsh activities of the surveillance centre using an optimal routing technique. Finally, sudden forest fires happen in the wildlife environment, and damage occurs to wildlife monitoring infrastructure. In such a situation, it is crucial to inform them about the harsh environment by creating an opportunistic network. To adaptively support those diverse applications, the DTN-POR has to take into account the node failures, environmental diversity, transmission failure characteristics, and network partitions and handle the sudden network failures in harsh environments.

Context-aware relay selection
The prime motivation of the proposed STAP is application-specific context-aware POR that the efficiency of DTN-POR has a powerful subordination on their forwarder set selection and the optimal set selection has to consider different context information varied for each application scenario. The term context represents any information used to characterize the parameters of the DTN node. In STAP, the context is the information parameters that influence the POR performance. The proposed STAP considers two different context parameters, node level, and application level, to estimate the relay selection accuracy.
Node Level Context = Mobility, Connectivity, Contact duration, Energy Level, and Buffer space Application Level Context = Node density, Application Type, Message Priority Level, Connection time, TTL, and Delay

Node level context
The node-level context parameters of STAP measure the capacity of nodes in terms of mobility, connectivity, contact duration, energy level, and buffer space. The node context level is referred to as (x1, x2, x3, x4, and x5). Thus, the STAP integrates five types of node-level context parameters like x1 = mobility, x2 = connectivity, x3 = contact duration, x4 = energy level, and x5 = buffer space. The mobility context parameter represents the ability of a node to communicate with other nodes due to its mobility. The connectivity context parameter represents the number of neighbouring nodes. The contact duration context parameter represents the communication period with another node. The energy level represents the remaining battery capacity of the corresponding node in the forwarder set. Consequently, the buffer space is the storage space available in the buffer of a particular node. Depending on the application diversity, the STAP may add new context parameters or delete the considered parameters. For instance, the multimedia DTN application necessitates buffer space as a very significant parameter to maximize the routing efficiency level. The selection of context attributes is applicationspecific. In geographic DTN routing, packet delivery ratio and latency are two important factors. This work considers multiple node-level contextual attributes to offer a high packet delivery ratio and low latency.
Where, (5), NC x,y (t) represents the node context value of node x towards node y at a time "t". The term NC x,y CT (t) is estimated based on the context attributes such as mobility, connectivity, contact duration, energy level, and buffer space, as shown in equation (6). The contact duration is estimated based on message size. In equation (6), the terms w1, w2, w3, w4, and w5 are weighting factors, and the summation of weighting factor values are equal to 1, as w1 + w2 + w3 + w4 + w5 = 1. The nodes with high message forwarding probability receive high weight for their context parameters. For instance, the high values of x2, x3, x4, and x5 positively impact the routing performance, whereas the high value of x1 negatively impacts routing efficiency. Therefore, the STAP assigns a high weight value to the stable nodes and minimum weight to the high mobility nodes.

Application level context
Applications of DTNs incorporate data transmissions in the disaster area, military surveillance, wildlife monitoring, and interplanetary networks. Each application requires a different quality of services and delay constraints in real-time. Considering such applicationlevel context information in POR is very prominent to maximize the routing efficiency and to save the creatures from harsh environments. The proposed STAP includes the application context information like node density, application type, connection time, TTL, and delay. The application context level of the node is represented as (y1, y2, y3, y4, and y5). Where y1 = node density, y2 = application type, y3 = message priority level, y4 = connection time, y5 = TTL, and y6 = delay. Further, the STAP calculates the application context value using the following equation. Where, (w 10 * y 5 )(w 11 * y 5 ) (8) In (7), the term AC x,y (t) refers to the application context value of node x towards node y under a particular application scenario at time t. The term AC x,y ACT (t) is estimated based on the application context parameters such as node density, application type, message priority level, connection time, TTL, and delay using equation (8). In equation (8), w6 + w7 + w8 + w9 + w10 + w11 = 1. The high values of y1, y2, y3, and y4 have a positive impact, whereas the high values of y5 and y6 hurt the DTN-POR routing performance. Each node stores the context information in its table.

Forwarding probability estimation
One of the major challenges faced by a multi-attribute context-aware routing protocol is how to combine them efficiently. The additive combination of the weighted criteria is a commonly used method to combine the multiple context values during decision making. Further, the STAP estimates a Crucial Factor (CF) for each node in the forwarding set using node and applicationlevel context information using the following equation.
In equation (9), the terms α and β are weighting factors, and their summation value equals 1. The symbol ⊗ represents the tuning function of the node and application-level context parameters of nodes in the forwarding set Ns. The context values of nodes are tuned based on the importance of context parameters. Further, each node in the network broadcasts its context information to all one-hop neighbours. CF is a fraction of numerical value, ranging from 0 to 1. The nodes with high CF values are selected as the next forwarder node of the forwarder probability set. Likewise, efficient next-hop routers are selected to deliver the packets successfully to the destination.
Each node has different properties in terms of context attributes. The context attributes are crucial or negligible based on the application requirements. For instance, if the application or user requires high contact duration to ensure the status of the relationship between the nodes, the contact duration context attribute is considered crucial and tunes the node context value NC x,y NCT (t) of the node as in (10); otherwise, it tunes the NC x,y NCT (t) of the node as in (11). Similarly, the application context is also tuned using equations (10) and (11)..
Tuning function for crucial context: ) Tuning function for negligible context: Each source node in the network tunes the value of the node and application-level context for all nodes in the positive progress set and calculates the value of CF. Further, each source node selects the data forwarding node from the positive progress set with a comparatively high CF value during routing.

Enhanced catching management strategy
In DTN networks, the catching space is constrained. Traditional caching techniques are not suitable for DTN due to its highly dynamic topology. The receiver node cache space is inefficient when large data is stored in its cache. Therefore, it is crucial to delete the replicated or unwanted data items in the node cache. The STAP deletes the cache messages based on time to live, contact duration information, and the data size. Also, the STAP selects the DTN nodes with high potential as catching nodes to maximize the caching efficiency. Apart from maintaining the neighbouring table in its cache, the nodes cache the context value of the nodes in the neighbour list. Each DTN node in the network caches the context value of its neighbours. The node with high connectivity caches the context value of the forwarder node in addition to all one-hop neighbours. Though the DTN nodes have high cache capacity, their interaction with other nodes is limited. The existing works perform caching by assuming that entire data can be retrieved if the requestor meets the caching node. This assumption does not hold good for DTN. The proposed STAP initially caches only the context value instead of caching the entire data due to its limited interaction duration and offers a successful DTN routing. Further, the STAP caches the data items of the nodes with high context values in its memory to assure high data delivery.

Cache invalidation
To manage the cache space efficiently, it is necessary to invalidate the cached items. The cache data items are invalidated or deleted based on the following parameters: a time to live value, contact duration, and message size. For cache message limitation, the message significance is measured using the following equation (12). The term α m denotes the degree of importance of the message sender node.
Further, the context value in the cache is invalidated by frequent verification. A node (i) frequently checks the neighbours' list (NL i ) in the neighbours' table. Node "i" waits for a particular cache timeout (T') if any neighbouring node, j ∈NL i moves away from "i". After T', i invalidate the cached context value of j. The forwarder node also invalidates the context values of its caches in the same manner. If the forwarder node does not contact a node after T', it invalidates the cached value of that particular node.

Performance Evaluation
This section evaluates the performance of the proposed work through Network-Simulator (NS-2). The proposed STAP performance is compared with the Improved Opportunistic Routing (IOR) protocol [21] and Improve PRoPHET (I-PRoPHET) protocol [24].

Simulation scenario
Nodes are deployed such that they create network partitions. Obstacles are also deployed to ensure network partitions. 100 nodes are distributed in the area of 1000 X 4000 m 2, and each node has a transmission range of 100 m. The nodes move with a speed of 1-40 ms −1 and use IEEE 802.11 MAC layer. The communication model uses Constant Bit Rate (CBR) and User Datagram Protocol (UDP) as application and transport agents. CBR generates the data in the fixed interval in the network, and UDP configures the transport layer. The simulation uses the Two-Ray-Ground model as a propagation model. The interaction period with another node in DTN follows a Zipf-like distribution. The POR-based DTN network is simulated for 1000 s. This work runs the context-based trust framework ten times and considers the average as the final trust value to improve the accuracy of the simulation results. The performance is evaluated for packet delivery ratio, cache overhead, and average delay.
Packet Delivery Ratio (PDR): The percentage of successful data delivery at the destination.
Overhead: The average number of trust copies and data packets is cached in cache space.
Latency: It is the average time taken by STAP to deliver the data packets to the destination.

Simulation results
For effective analysis of STAP, the simulation results are obtained under different scenarios. In the first scenario, the numbers of nodes are varied from 20 to 100. The second scenario varies the data size from 2000 Mbytes to 10000 Mbytes to evaluate the STAP efficiency in the presence of large-sized data packets. Finally, the Cache Space (CS) is varied from 50 Mbytes to 250 Mbytes. Figure 3 portrays the comparative results of the PDR of STAP, IOR, and I-PRoPHET protocols under different node density scenarios. All protocols escalate the PDR when varying the number of nodes from 20 to 80. The reason is that the high number of nodes offers high connectivity in the network. For instance, the STAP attains 93.1% and 99% for 20 and 80 node density scenarios, respectively. After point 80, the STAP suddenly decreases the PDR, as there is a chance for packet loss due to congestion. However, the PDR of STAP is higher than IOR and I-PRoPHET under all node density scenarios. Unlike existing protocols, the STAP employs three different modes for successful opportunistic forwarding, resulting in high PDR. For example, the STAP improves the PDR by 12.2% and 10.8%, respectively, when 100 nodes are presented in the network.

Number of nodes scenario
The latency results of STAP, IOR, and I-PRoPHET are shown in Figure 4 as plotted under various node density scenarios. The STAP decreases the latency by increasing the number of nodes from 20 to 60. The reason is that the packets are quickly delivered to the destination under a high-density scenario. For example, STAP latency is 4.2 and 1.4 s for 20 and 60 node density scenarios, respectively. After point 60, the STAP increases the delay in packet delivery. The reason is that some packets are loosed owing to the congestion, and many retransmissions have occurred, resulting in increased latency. In Figure 4, all three protocols attain  nearly equal performance under the high node density scenario of 100. For example, the STAP, IoR, and I-PRoPHET accomplish 2.6, 2.5, and 2.6 s of latency values when 100 nodes are present in the network. Figure 5 depicts the overhead results of STAP, IOR, and PRoPHET Protocols evaluated by varying the number of nodes from 20 to 100. All protocols slightly increase the overhead by adjusting the node density from low to high. It is caused due to the utilization of a high number of context data copies of numerous nodes under a high-density scenario in STAP. Similarly, the IOR evaluates the average distance and time to a large number of nodes, resulting in higher overhead. However, the latency performance of STAP is better than the existing IOR and PRoPHET due to the selection of appropriate modes. For example, the STAP, IOR, and I-PRoPHET achieve 0.4, 0.45, and 0.42 overhead values when 100 nodes are presented in the network. Figure 6 shows the PDR results of STAP by varying the number of nodes and cache space values. The PDR increases when varying the number of nodes from 20 to 100. The reason is that the high number of nodes offers a high opportunity for router selection and increases  the PDR value. For example, the STAP increases the PDR by 1.9% when varying the number of nodes from low to high under 150 Mbytes of CS. However, the STAP reduces the PDR under low CS, as there is a chance of losing some packets due to poor cache memory. For instance, the STAP achieves a PDR of 95.3% and 97.9% for CS 50 and 150 Mbytes, respectively, when 100 nodes are present in the network. Figure 7 comparatively evaluates the PDR of STAP, IOR, and PRoPHET under various data size scenarios. The STAP decreases the PDR when varying the data size from 2000 Mbytes to 10000 Mbytes, as there is a chance of loss of packets due to the constrained cache capacity of DTN nodes. For example, the STAP accomplish 98.9% and 92% of PDR values for 2000 and 10000 data size scenarios. However, the STAP attains superior PDR performance than the existing IOR and I-PRoPHET under all data size scenarios. For instance, the STAP maximizes the PDR by 18% and 5.5% more than the existing IOR and I-PRopHET, respectively, when the data size is 10000 Mbytes. In Figure 8, the PDR results of STAP are comparatively evaluated using two different scenarios, such as data size and node density (ND). The PDR value of STAP decreases when varying the data size from low to high. However, the PDR rate of STAP is better due to selecting high-capacity relay nodes based on the node and application-level context information. However, the limited cache capacity of DTN nodes leads to packet loss in the network. Therefore, the PDR is decreased for the low ND scenario. For example, the STAP attains 94%, 94.8%, and 96.3% of PDR values for 40, 60, and 80 node density scenarios, respectively, when the data size is 10000 Mbytes. Figure 9 shows the PDR comparative results of STAP, IOR, and I-PRoPHET obtained by varying the cache space from low to high. The STAP increases the PDR under a high cache scenario, as the packets are successfully forwarded to the destination using the store and carry forward strategy without any packet loss. Additionally, the application and node-level context information in opportunistic router selection maintain the PDR of STAP even if the network is partitioned. Moreover, the STAP increases the PDR significantly than the existing IOR and I-PRoPHET under all cache scenarios. For instance, the STAP improves the PDR by 13% and 0.9% than IOR and I-PRoPHET, respectively, when the cache space is 250Mbytes. Figure 10 portrays the overhead results of STAP, IOR, and I-PRoPHET evaluated by varying the cache space from 50 Mbytes to 250 Mbytes. All protocols decrease the overhead by varying the cache space from low to high, as the packet retransmission rate is low due to high cache space. Additionally, the STAP utilizes an improved cache invalidation scheme which invalidates the message copies using some applicationspecific parameters and maximizes the cache efficiency even if the cache space is minimum. For example, the overhead of STAP, IOR, and I-PRoPHET are 0.35, 0.43,  and 0.36, respectively, when node cache space is 50 Mbytes.

Conclusion
In this paper, a secure context-aware trust-based routing protocol named STAP has been proposed. The main intention of STAP is to maximize the POR performance and optimize the cache efficiency under partitioned DTN. The STAP utilizes a context-aware relay selection strategy and improved cache management strategy. The selection of context information based on highly efficient relay nodes efficiently improves the successful data delivery rate and maximizes the DTN-POR. Consequently, the invalidation of message copies and context values with optimal parameters like time to live and contact duration in improved cache management significantly minimizes the message duplication and cache overhead in the network. Finally, the adoption of different routing modes with application-specific data mules also enhances the efficiency of the DTN. Moreover, the STAP is validated using performance metrics such as PDR, overhead, and latency under different network scenarios.