a deep learning based data forwarding algorithm in mobile...

13
A deep learning based data forwarding algorithm in mobile social networks Qingshan Wang 1 & Haoen Yang 2 & Qi Wang 1 & Wei Huang 1 & Bin Deng 1 Received: 14 December 2018 /Accepted: 12 March 2019 # Springer Science+Business Media, LLC, part of Springer Nature 2019 Abstract The large-scale collection of mobile trajectories in mobile social networks makes it possible for us to use artificial intelligence, including deep learning, to explore the hidden attributes of the data and redesign data forwarding algorithms. In this paper, a data forwarding algorithm based on deep learning is proposed to transform data package communication from opportunistic forwarding to fixed path forwarding. First, by compiling statistics on real traces, we find that the number of connected nodes decreases linearly with the decrease of the sampling period, making it possible to use deep learning to process the node meeting data. Next, we design the recurrent neural network with an LSTM (Long Short-Term Memory) structure a supervised deep learning system to predict the probability of nodes meeting. We further propose a deep learning data forwarding algorithm which makes full use of fixed paths composed of instantaneous high-probability links. Finally, simulation results show that the algorithm proposed in this paper can effectively improve packet delivery ratio while greatly reducing network overhead. Keywords Deep learning . LSTM . Contact probability . Fixed paths . Mobile social networks 1 Introduction Delay tolerant networks (DTN) [13] are a type of wireless network that uses chance connections between nodes to trans- mit information. It can be applied into Internet of Things (IoT) [46]. Due to the low density of network nodes, the instability of link transmission [7, 8], nodeslimited energy, and other factors, there is generally no end-to-end path. Therefore, routing is one of the key problems related to DTN as well as security [911]. Epidemic [12] is the first routing algorithm to adopt the store-carry-forward network paradigm in DTN. A packet car- rier duplicates the packet to every node without the packet. Because of the quick distribution of packets, Epidemic obtains the highest delivery ratio with extremely high number of cop- ies in the network. To overcome the Epidemic drawback of redundant copies, some routing schemes [1318] are pro- posed. Prophet [13] establishes the delivery predictabilities for the other nodes by each node, then the packet carrier only forward the packet to the node with higher delivery predict- ability as it heads to the destination. A family of spray routings [14] first spreads a chosen number of copies to the network, and then forwards each packet copy to the destination directly or to other nodes with higher utility. An adaptive forwarding scheme [18] is for controlling the replication of packets. When a packet carrier meets a node without it, the probability of duplicating a packet is based on the existing packet copies in the network. In mobile social networks, the wireless devices are usually carried by people. Thus, the routing algorithms [1933] recently focus on trying to use the nodessocial char- acteristic, for example, betweenness centrality, community, This article is part of the Topical Collection: Special Issue on Networked Cyber-Physical Systems Guest Editors: Heng Zhang, Mohammed Chadli, Zhiguo Shi, Yanzheng Zhu, and Zhaojian Li * Haoen Yang [email protected] Qingshan Wang [email protected] Qi Wang [email protected] Wei Huang [email protected] Bin Deng [email protected] 1 School of Mathematics, Hefei University of Technology, Hefei, China 2 Guo Chuang Software Company Limited, Hefei, China Peer-to-Peer Networking and Applications https://doi.org/10.1007/s12083-019-00741-3

Upload: others

Post on 03-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

A deep learning based data forwarding algorithm in mobilesocial networks

Qingshan Wang1& Haoen Yang2

& Qi Wang1& Wei Huang1

& Bin Deng1

Received: 14 December 2018 /Accepted: 12 March 2019# Springer Science+Business Media, LLC, part of Springer Nature 2019

AbstractThe large-scale collection of mobile trajectories in mobile social networks makes it possible for us to use artificial intelligence,including deep learning, to explore the hidden attributes of the data and redesign data forwarding algorithms. In this paper, a dataforwarding algorithm based on deep learning is proposed to transform data package communication from opportunisticforwarding to fixed path forwarding. First, by compiling statistics on real traces, we find that the number of connected nodesdecreases linearly with the decrease of the sampling period, making it possible to use deep learning to process the node meetingdata. Next, we design the recurrent neural network with an LSTM (Long Short-Term Memory) structure – a supervised deeplearning system – to predict the probability of nodes meeting. We further propose a deep learning data forwarding algorithmwhich makes full use of fixed paths composed of instantaneous high-probability links. Finally, simulation results show that thealgorithm proposed in this paper can effectively improve packet delivery ratio while greatly reducing network overhead.

Keywords Deep learning . LSTM . Contact probability . Fixed paths .Mobile social networks

1 Introduction

Delay tolerant networks (DTN) [1–3] are a type of wirelessnetwork that uses chance connections between nodes to trans-mit information. It can be applied into Internet of Things (IoT)

[4–6]. Due to the low density of network nodes, the instabilityof link transmission [7, 8], nodes’ limited energy, and otherfactors, there is generally no end-to-end path. Therefore,routing is one of the key problems related to DTN as well assecurity [9–11].

Epidemic [12] is the first routing algorithm to adopt thestore-carry-forward network paradigm in DTN. A packet car-rier duplicates the packet to every node without the packet.Because of the quick distribution of packets, Epidemic obtainsthe highest delivery ratio with extremely high number of cop-ies in the network. To overcome the Epidemic drawback ofredundant copies, some routing schemes [13–18] are pro-posed. Prophet [13] establishes the delivery predictabilitiesfor the other nodes by each node, then the packet carrier onlyforward the packet to the node with higher delivery predict-ability as it heads to the destination. A family of spray routings[14] first spreads a chosen number of copies to the network,and then forwards each packet copy to the destination directlyor to other nodes with higher utility. An adaptive forwardingscheme [18] is for controlling the replication of packets.Whena packet carrier meets a node without it, the probability ofduplicating a packet is based on the existing packet copies inthe network. In mobile social networks, the wireless devicesare usually carried by people. Thus, the routing algorithms[19–33] recently focus on trying to use the nodes’ social char-acteristic, for example, betweenness centrality, community,

This article is part of the Topical Collection: Special Issue on NetworkedCyber-Physical SystemsGuest Editors: Heng Zhang, Mohammed Chadli, Zhiguo Shi, YanzhengZhu, and Zhaojian Li

* Haoen [email protected]

Qingshan [email protected]

Qi [email protected]

Wei [email protected]

Bin [email protected]

1 School of Mathematics, Hefei University of Technology,Hefei, China

2 Guo Chuang Software Company Limited, Hefei, China

Peer-to-Peer Networking and Applicationshttps://doi.org/10.1007/s12083-019-00741-3

Page 2: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

and popularity [19]. Bubble rap [20] adopts k-clique [21] anddetects the community structure, it then defines a global cen-trality and a local centrality for each node. To begin with, thepacket carrier forwards it to a node with higher globalcentraliy. And when the packet reaches a node located in thesame community as the destination, then the local centralitywill be used as the forwarding metric instead of global cen-trality. In SMART (A lightweight distributed social map basedrouting algorithm in delay tolerant networks) [24], each nodebuilds a social map to reflect its surrounding social network.To update the social map, when two nodes meet, they onlyneed to exchange the information of the most frequently en-countered nodes. The social map enables the forwarder tomake more accurate decisions. SEBAR (Social-energy-basedrouting) [1] defines the social energy as a novel social metricto quantify the forwarding ability of nodes. When two nodesencounter each other, a certain amount of social energy isgenerated. The energy is distributed to the two nodes, andthe communities which they belong to. A community alsodistributes its energy to its members based on the member’scommunity centrality. SEBAR forwards half of the copies to arelay node with a higher social energy. A space-crossing com-munity detection method [27] is defined in a hybrid underly-ing network with access point as well as based station support,and then a high efficiency data forwarding scheme social at-traction and infrastructure support (SAIS) is proposed.Reference [29] investigates the transient characteristics ofcontact distribution, network connectivity and social commu-nity structure in realistic DTN traces, and proposes effectiveforward metrics based on the above patterns. A contact-burst-based clusteringmethod (CCM) [32] formulates each pairwisecontact process as a regular appearance of contact bursts andfinds the transient communities by clustering the pairs ofnodes with similar contact bursts. And then the temporal com-munities are implied to the data forwarding as a unit.

Unlike previous methods, however, which mainly usechances meetings between nodes for transmission of data pack-ages, this paper selects fixed paths composed of instantaneoushigh-probability links for the source and destination nodes totransmit data packages. Due to themobility of nodes, DTN usesthe opportunistic encountering to propagate the packet. Thus,the instantaneous high-probability links are particularly impor-tant. If we can predict the probability of nodes meeting, then wecan try to take the advantage of the instantaneous high-probability links found within data forwarding. As shown inFig. 1, at time 0, the source node s needs to transmit a datapackage to the destination node d. Figure 1 shows four possiblenode links over the next 40s, and indicates the probability of thelinks. It can be seen in the figure that there are two paths fromnode s to node d, s→ a→ d and s→ b→ d, with respectiveprobabilities of 0.02 and 0.42. It is obvious that the probabilityof success of the latter path is much higher. If we can predict thesituation of node links over the next 40s, we can transmit fixed

path data between the source and destination nodes, significant-ly improving transmission efficiency.

In 2006, GE Hinton et al. [34] made a great leap in deeplearning, which has now become a popular algorithm. Thedeep learning algorithm has strong feature learning abilities,especially in fields such as image recognition, natural lan-guage processing, and speech recognition. In addition, a fewworks begin to use deep learning for Internet routing.Different from the conventional rule-based routing, a super-vised deep learning system [35] computes the paths and canimprove the network throughput as well as average delay perhop. Reference [36] designs a supervised deep neural networksystem to correctly reflect the dynamic nature of network traf-fic. In this paper, responding to the emergence of more andmore large-scale mobile trajectories in mobile social net-works, a recurrent neural network structure with LSTM isused to predict the meeting probability of nodes through deeplearning. Most previous work used chance meeting of nodesto transmit data packages. Here, this pattern is changed, and afixed path is selected to forward the data package between thesource and destination nodes.

The main contributions of this paper are as follows:

& Through statistics involving the number of nodes thatmeet on real traces, we find that the number linearly de-creases as sampling time decreases. This phenomenon al-lows us to use deep learning to process meeting data.

& We design a recurrent neural network structure usingLSTM to predict the probability of nodes meeting. Theprobability of nodes meeting within a given time windowwith several time intervals is taken as input, and the prob-ability of the nodes meeting in the next time window is theoutput. The LSTM network designed in this paper is ex-perimentally verified in order to predict its effectiveness.

& We propose a data forwarding algorithm based on deeplearning. It makes full use of fixed paths composed ofinstantaneous high-probability links and can effectivelytransmit data.

The remainder of the paper is structured as follows.Section 2 presents the network model. Then, we introducethe probability of future nodemeetings based on deep learningin Section 3. Section 4 presents the deep learning-based dataforwarding (DLDF) algorithm. Section 5 evaluates the

0 t

s a0.1

s b0.7

10 20 30 40

a d0.2

b d0.6

Fig. 1 Instantaneous network state

Peer-to-Peer Netw. Appl.

Page 3: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

performance of our proposed algorithm, and Section 6 con-cludes the paper.

2 Network model

Assume the existence of a mobile social network with Nnodes. When two nodes are in each other’s communicationradius, they can transmit data packages. Long-term meetingrecords between nodes is regarded as a large data set, and isanalyzed from the perspective of time series data using deeplearning to explore its periodicity and predict the probabilityof future node meetings. This is a modification of previousdesigns, which mainly used data forwarding algorithms ofchance node meetings. Here, we design a more effective dataforwarding algorithm with fixed paths.

This paper uses the one-year GPS traces of communicationmedia recorded by GPS devices installed in communicationmedia such as cars, trucks and aircraft by the Bomberos deAsturias Local Fire Department of Spain in 2016 [37]. A totalof 19,462,339 pieces of location information from 229 deviceswere recorded. Table 1 shows numerical analysis on nodeconnections with a transmission radius of 50 m. When theGPS equipment detects movement, location information wasreported every 30 s, and the administrator can view the tracesof all devices through the Geographic Information System(GIS). In this paper, we assume that the communication radiusof all nodes is equal, and set as 50 m. When the distancebetween two nodes is less than the communication radius, itis regarded as a meeting.

In order to understand the possibilities of processing nodecontact data using deep learning, we select sampling intervals tocompute the number of node pair contacts within the interval.We reduce the sampling interval from 24 h to 1 h, and count thenumber of node pairs that meet. The experimental results for theminimum, maximum and mean number of node pairs that meetwithin the period are shown in Fig. 2. The mean number de-creases linearly with the decrease of the sampling period. Forthe mean, when the sampling interval is reduced from 24 h to1 h, the proportion of node pairs that meet out of all possibilitiesdecreases from 97:9= 229

2

� � ¼ 3:8‰ to 35:5= 2292

� � ¼ 1:4‰.Therefore, a small time interval is selected to deeply explore

the node meeting patterns, and to ensure the complexity andpossibility of computation.

Finally, we introduce our data processing methods. Wedefine the random variable δt, i. j as indicating whether nodesi and j meet at time t, i.e.

δt;i; j ¼ 1 if node i meets node j0 otherwise

(ð1Þ

Assume that Twin represents the size of a time slot. Time isdivided into time slot sequences 1, 2, ..., each with a size ofTwin. The variable fk, i, j represents the ratio of the meeting timeof nodes i and j and the total time Twin in the kth time slot, i.e.the time in an interval [Twin × (k − 1) + 1, Twin × k]. The value,between 0 and 1, is

f k;i; j ¼∑

Twin� k−1ð Þþ1≤w≤Twin�kδw;i; j

Twinð2Þ

Therefore, based on the data of node movement trajecto-ries, we can derive the probability that any node pair meetswithin any given time slot.

3 Prediction of node meeting based on deeplearning

This paper uses a recurrent neural network with an LSTMstructure to explore the deep expression ability of time seriesinformation in data, and predict the probability of future nodemeetings in mobile social networks.

Recurrent neural networks (RNN) [38] are a kind ofneural network used for processing sequence data. RNNoriginates from the Hopfied network [39] proposed bySaratha Sathasivam in 1982. RNN enables the algorithmto process serialized data by calculating and retaining state

Table 1 Contact duration metrics

Number of links 11,057

Number of contacts 2,440,652

Mean contact length (seconds) 3886

Aggregate contact (hours) 2,398,270

Mean break (seconds) 55,490Fig. 2 Pair of meeting nodes

Peer-to-Peer Netw. Appl.

Page 4: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

variables for a period of time and adding them to the cal-culation for the next moment.

3.1 Input-output design

In practical applications, RNN can easily lead to thevanishing gradient problem [40], leading to memory decay.In order to solve this issue, Hochreiter and Schmidhuber[41] proposed the LSTM algorithm in 1997. LSTM is akind of gated RNN [42], which makes the LSTM networkapplicable for processing and predicting important eventswith relatively long intervals and delay in time series, byadding a forgetting gate, an input gate, and an output gate.RNNs using LSTM are better than standard RNNs formany tasks, and the degree of randomness in mobile socialnetworks is very high, so we use LSTM to predict theprobability of nodes meeting.

The traditional LSTM network is generally divided intothree layers: input, hidden, and output layers, as shown inFig. 3a. Taking nodes i, j(1 ≤ i, j ≤N) as an example, the inputis the probability of them meeting in a sliding time windowcontainingKwin continuous time slots. In Fig. 3b, for example,Kwin = 5. The input is the probability of them meeting duringthe five time slots included in the first sliding time window (f1,i, j, f2i, j, ..., f5, i, j(0 ≤ fk, i, j ≤ 1, k = 1, 2, ..., 5)).

We add a fully connected (FC) layer within the hiddenlayer, as shown in Fig. 3c. The output is the probability ofnodes i and j meeting in the time slot after the current one.

The LSTM network learns from the time series data bykeeping the output variable h and the state variable s corre-sponding to the input variable g.

3.2 Design of the deep learning structure

LSTM is similar to traditional RNN. As shown in Fig. 3d,each cell has the same input and output, but the difference isthat some parameters, and the flow of control information,form its threshold control system. The input gate control unit

g tð Þi (time t, cell i) uses the sigmoid function to get a value

between 0 and 1 for updating.

g tð Þi ¼ σ bgi þ ∑

jUg

i; jxtð Þj þ ∑

jWg

i; jht−1ð Þj

!ð3Þ

Here, b, U andW are the bias of cells, input weight of cells,

loop weight of forget gates in LSTM, respectively, x tð Þj is the

current cell input, and the data vector h t−1ð Þj is the cell output of

the previous moment.If the input gate allows, the input will be added to the cell

state s tð Þi . The state unit has a recurring loop whose weight is

controlled by the forget gate f tð Þi . Like the input gate, it also

uses the sigmoid function to set the weight as a value between0 and 1.

f tð Þi ¼ σ b f

i þ ∑jU f

i; jxtð Þj þ ∑

jW f

i; jht−1ð Þj

!ð4Þ

(a) The relationship between input and output

(b) Input

Cell Cell Cell

(xi,h(t-1))

h(t)h(t) h(t)

FC

(c) Network structure

cellInput Output

Input

Gate

Output

Gate

Forget

Gate

(xi,hi(t-1))

(d) Cell structure

Input

Hidden

Layers

Output

Fig. 3 The LSTM model

Peer-to-Peer Netw. Appl.

Page 5: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

Based on the forget gate unit, we can update the cell state s tð Þi .

s tð Þi ¼ f tð Þ

i s t−1ð Þi þ g tð Þ

i σ bi þ ∑jU i; jx

tð Þj þ ∑

jWi; jh

t−1ð Þj

!ð5Þ

The output h tð Þi of the LSTM cell is controlled by the output

gate q tð Þi :

h tð Þi ¼ tanh s tð Þ

i

� �q tð Þi ð6Þ

in which q tð Þi is

q tð Þi ¼ σ boi þ ∑

jUo

i; jxtð Þj þ ∑

jWo

i; jht−1ð Þj

!ð7Þ

Next, the prediction error will be evaluated experimentally.Assume that the size of the time window is 72 h, Twin is 1 h,there are 256 cells in the LSTM network, and the training timefor node meeting prediction is the 4000 h before the move-ment trajectory. We tally up the node pairs that met more than500 times, as shown in Fig. 4. The average absolute error inFig. 4 is 0.0636, which is relatively small.

4 A data forwarding algorithm based on deeplearning

This section will introduce the deep learning-based dataforwarding (DLDF) algorithm. First, an algorithm for nodepath discovery in the community is given, and then theDLDF algorithm.

4.1 Path discovery within community

Assume that the routing update cycle is time constantT – that is,the fixed path between nodes is calculated within T. Assumethat it is an integer multiple of the data package Time-to-Live(TTL) – here we use 2TTL. At the same time, T is divided intoseveral time slots, each with a length of Twin, as shown in Fig. 5.Community node meetings are regular, and have a high

probability. The probabilities of node meetings in each time slotare predicted using deep learning, and a number of paths areselected for the data package transmission. Therefore, T is usedas an effective time interval to search the paths between nodes.

Let node s be the source node, and pt, s, j represents theprobability of nodes s and i meeting within time slot [t, t +Twin]. Assume that pathi represents the set of path betweennodes s and i. for ∀path = {ni, 0, ni, 1, ni, 2, ..., ni, ∣ path∣} ∈ path-i. Here, ∣path∣ represents the length of path, ni, 0 = s, and ni, ∣path∣ = i. We define the meeting probability on path as

prob pathð Þ ¼¼ ∏jpathj−1

j¼0ptni; j ;ni; jþ1 ;ni; j;ni; jþ1

; ð8Þ

in which tni; j;ni; jþ1 represents the starting point of the time in-

terval where node ni, j and node ni, j + 1 meet.Assume that there arem possible paths between node s and

node i. The variable prob(pathi) represents the probability ofnodes s and i meeting. Then

prob pathið Þ ¼ 1− ∏∀path∈pathi

1−prob pathð Þð Þ; ð9Þ

in which prob(path) represents the probability of meeting onthe path.

In order to make full use of relatively stable node connec-tions in data forwarding, we call links whose node meetingprobability in the time slot is greater than α qualified links.Similarly, paths composed of these links whose meeting prob-ability is greater than η are qualified paths. Next, we find thenumber of paths for nodes s and w, and the result is placed inthe path set, called path, so that the probability of nodes u andwmeeting prob(path) ≥ γ – see Algorithm 1. The basic idea ofthe algorithm is expressed within the time slot contained in T,links whose probability of meeting is greater than α and pathscomposed of these links whose meeting probability is greaterthan η are selected and added into the path set.

Lines 1–3 in Algorithm 1 initialize some variables, whereH represents a set of nodes (excepted node d) which can bedirectly or indirectly reached by node s, initially containingonly node u; t represents the starting point of the time slot. Anindicator variable choseni, j describes whether link (i, j) is

Fig. 4 LSTM prediction

Peer-to-Peer Netw. Appl.

Page 6: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

chosen to construct the paths from node s to node d. It equals 1if the link is chosen. Otherwise, it equals 0. pathi(∀i ≠ s)representing the set of path from node s to node i initializedas an empty set, and paths contains path {s} with the meetingprobability 1. When prob(pathd) is not greater than or equal toγ, and the time does not reach T, some new paths are added topathd in lines 5–27, including (a) lines 5–14: for node i in setH, if there is a qualified link (i, k), if node k is node d andpath ∪ {d}(∀path ∈ pathi) is a qualified path, it is added topathd (see lines 8–13). If node k is not node d, then somenew paths are added to pathk and k is added to E. E is com-posed of the nodes newly met by nodes in H in the currenttime slot, and those not in set H whose probability of meetingis greater than α, initialized as an empty set (see line 5). (ii)lines 15–25: for any node i inE, if there is a qualified link (i, d)and path ∪ {d}(∀path ∈ pathi) is a qualified path, then it isadded to pathd. In line 26, the meeting probability of pathdis calculated based on Eq. (9), and t is updated in the next line.Line 4 is then run with the two updated values again.

The following is a detailed description of the path findingprocess (lines 4–27), as illustrated in Fig. 6. As shown in Fig.6a, in the time slot [0, Twin], the probabilities of nodes s meet-ing nodes d and k are 0.4 and 0.6, respectively. In time slot[Twin, 2Twin], the probability of node k meeting node d is 0.7.Assume thatα = 0.1, η = 0.01, γ = 0.5. In the first time slot, thecode of lines 4–27 is executed. Corresponding to the onlynode s in the set H, links (s, d) and (s, k) are qualified linksand have not been chosen (see line 7). Thus, line 8–14 are run,which leads to link (s, d) and link (s, k) added into pathd andpathk, respectively, as shown in Fig. 6b, and node k added toE. In the first time slot, the code of lines 15–25 is executed.First, E is updated, and nodes belonging to set H within E areremoved. Next, set E is merged into H to obtain E = {k},H = {s, k}. Node k is selected from E, but there is no linkbetween it and node d, so we jump to line 26 to update prob(-pathd) = 0.4, and line 27 to update the time t to the next slot.Lines 4–27 are executed in the second time slot. In the firststage, path {s, k, d} is added to pathd, because vertex k of setH

exists, link (k, d) meets the conditions of line 7, and conditionof line 9 can also be satisfied, as shown in Fig. 6b. E = ϕ,H = {s, k} are updated. Because E is an empty set, the secondstage of the code is not executed, and we jump to lines 26–27and update prob(pathd) and t to the next time slot.

Using the Find_path(s, d) algorithm, we can find the pathset path for nodes s and d. If path is empty, then it appears thatthere is no path between them. The definition of the commu-nity is given as follows:

Definition 1 Community refers to a connected subgraph intime T.

Assume that Cidi represents the community id of node i.Clearly, a node can only belong to one community. If the nodedoesn’t belong to any community, that is, Cidi = ϕ, it is called

(a) (b)

s k0.6

0 Twin 2Twin

s d0.4

k d0.7

s

d k

Fig. 6 Example of Find_path(s, d)

0 Twin T

2Twin

Fig. 5 Division of T

Peer-to-Peer Netw. Appl.

Page 7: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

an isolated node. Thus, a node is belongs to a certain commu-nity or an isolated node.

4.2 A deep learning-based data forwarding algorithm

The data forwarding algorithm is shown in Algorithm 2.The basic idea is to forward data packages according tothe fixed paths constructed between the nodes. It includesfive detailed cases: (1) If there are paths between thesource node and the destination node, the paths are usedto forwarded the package; (2) If there is no path betweenthe source node and the destination node even thoughthey are located in the same community, the source nodesimply forwards the package to the destination node; (3)If the source node and the destination node are both iso-lated nodes, the source node only directly forwards thepackage to the destination node; (4) If the source nodeis an isolated node and the destination node belongs to acommunity, the source node forwards the data package tothe node with a path to the destination; (5) If the sourcenode and the destination node belong to different commu-nities – a flooding method is used to produce a copy.

Lines 1–2 in Algorithm 2 indicate that if the package carriermeets the destination node, the data package is forwardeddirectly, for example cases 2–3. Lines 3–5 indicate case 1,i.e., if there are paths between the source node and the desti-nation node, and node j is the node of the next hop of the datapackage, the data package is copied to it. Lines 6–8 indicatecase 4, i.e., if the source node s is an isolated node and thedestination d is not an isolated node, when the meeting node jhas paths to the destination node d, the data package is copiedto node j. Lines 9–10 indicate case 5, i.e., if the source node sand the destination node d are not isolated, and are in differentcommunities, the flooding method is used. Therefore, thereare four cases to forwarding or copying the data package inAlgorithm 1.

A great deal of calculation is required to predict nodes’meeting probability with deep learning. It can be calculatedby an offline server, with the routing table configured at thesame time. By spreading the routing table regularly to thenetwork or first distributing it to some hot spot regions, itcan be downloaded automatically whenever the nodes passthrough the hot spot.

5 Performance evaluation

We conduct a simulation to compare the performance of pro-posed scheme, DLDF, with the following representative dataforward algorithms.

& Epidemic [12]: The packet carrier duplicates the packet toevery encountering node without it.

& Spray and wait [14]: In the spray phase, L copies are ini-tially generated at the source node, and any node willforward half of copies to the meeting node. In the waitphase, the packet carrier only forwards the packet to thedestination node.

& SEBAR [1]: To overcome the drawback of a large numberof message exchange in SEBAR, Ref [1] proposes a dis-tributed SEBAR and is adopted here. A certain amount ofsocial energy is generated when two nodes meeting, and.The energy is evenly distributed to the two nodes and eachnode will share the energy with its neighboring nodes basedon their corresponding neighbor centrality. A packet carrierforwards half of the copies to the encountering node whichhas higher social energy and without the packet.

The performance metrics include:

& The delivery ratio: the average percentage of packets suc-cessfully delivered from the source node to the destination.

& Delay: the average time duration from a packet’s genera-tion to the time when the packet received by destination.

& Overhead: the average number of forwardings of packetsuccessfully delivered from the source node to the desti-nation node.

& Pair of nodes with path: the pair of nodes reached by apath set.

& Path set cardinality: the average cardinality of route path.& Hop count: the average number of hops path in the path set.

We use the one-year GPS traces of transport recorded byGPS devices installed in transport such as cars, trucks andaircraft by the Bomberos de Asturias Local Fire Department(Spain) in 2016 [37]. The time slot is 1 h. 100 nodes arerandomly selected from the 229. The node movement trajec-tory in the first 4000 h is used as the training data set, and thetrajectory for the next 4760 h is taken as the test set. For

Peer-to-Peer Netw. Appl.

Page 8: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

LSTM, the node pairs with cumulative meeting time greaterthan or equal to 24 h are selected, the learning rate is 0.001,and the number of cells in a single layer is 256. For the links, aprobability threshold of α = 0.1, a path threshold of η = 0.01,and a path set meeting probability threshold of γ = 0.5 is se-lected. The TTL of the data package is 24 h. 1000 node pairsare randomly selected as the source and destination nodes forthe data package.

In the spray-and-wait and SEBAR algorithms, the numberof copies generated at the source node (L) is equal to 5.

5.1 Performance of DLDF, epidemic, spray-and-wait,and SEBAR algorithms

We incrementally adjust the TTL from 4 to 24 h, with simu-lation results shown in Fig. 7a–c. Figure 7a shows that, first,with increasing TTL, the delivery ratio of all algorithms in-creases. Second, the epidemic algorithm has the highest deliv-ery ratio, because it is based on the flooding strategy. Thealgorithm proposed in this paper has a higher delivery ratiothan both spray-and-wait and SEBAR, reaching 5% and12.8% respectively.

From Fig. 7b, we see that the overhead of our algorithm isthe lowest among all algorithms. This is because we try tochoose a path with high-probability connections for the com-munity, effectively forwarding the data packages and savingnetwork resources. The overhead of the proposed algorithm is66.3%, 62.6% and 32.6% lower than those of the epidemic,spray-and-wait, and SEBAR algorithm, respectively.Figure 7c shows that the delay of all algorithms is similar.

5.2 DLDF performance with different α and η values

In order to investigate the impact of α and η on our algo-rithm, we increase α from 0.1 to 0.5, and η from 0.01 to0.1, with TTL = 24 h. Figure 8 depicts the simulation re-sults. Figure 8a shows that the delivery ratio of the algo-rithm in this paper decreases with the increase of α (or η).The reason is that with the increase of α (or η), the algo-rithm will only select links (or paths) with higher meetingprobabilities, so the total number of paths will decline,resulting in lower data package delivery ratios. A similarconclusion can be drawn from Fig. 8b. With an increase ofα (or η), the overhead of the algorithm in this paper willdecline. The reason is that with the increase, the algorithmwill only select links (or paths) with higher meeting prob-abilities, so the total number of paths will decline, resultingin a decrease in the number of times the data packages areforwarded. However, the overhead is more sensitive to thetwo threshold values. When the transmission rate reaches acertain value, the network overhead will be relatively largeif the delivery ratio is increased by reducing α (η).Figure 8c shows that with the increase of α (or η), the delay

(a) Delivery ratio

(b) Overhead

(c) Delay

Fig. 7 Performance of the algorithms under different TTL values

Peer-to-Peer Netw. Appl.

Page 9: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

of our algorithm tends to increase. The reason is that withthe increase of α (or η), the algorithm only selects the links(or paths) with higher meeting probabilities, so the total

number of paths is lower, leading to longer times for thedata package to reach the destination node. There are somesingular points, such as (α = 0.5, η = 0.05), because the

(a) Delivery ratio

(b) Overhead

(c) Delay

Fig. 8 DLDF performance withdifferent α and η values

Peer-to-Peer Netw. Appl.

Page 10: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

delays of data packages are quite different, and the delay ofa small number of data packages may greatly increase theaverage value.

Next, we examine the relationship between the set of pathsbetween a pair of nodes and the parameters α and η. The ex-perimental results are shown in Fig. 9, which demonstrates that

(a) Pairs of nodes with paths

(b) Path set cardinality

(c) Hop count

Fig. 9 Performance of path setswith different α and η values

Peer-to-Peer Netw. Appl.

Page 11: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

number of node pairs with paths decreases with the increase ofα (except when η = 0.1) and η, a negative correlation. This isbecause the links and paths with higher probability are selectedas α and η increase, so the number of links with paths declinesaccordingly. However, when η = 0.1, with the increase of α, anabnormal value appears at point (α = 0.1, η = 0.1), because thenegative correlation of η here is greater than the positive corre-lation of α, covering up the negative correlation of α.

As shown in Fig. 9b, as with the number of node pairsof on the paths, the cardinality of the path sets is similarto the number of node pairs, decreasing with the increaseof α (except for η = 0.1) and η: a negative correlation.Unlike in Fig. 9a, however, the trend of reduction is veryobvious. That is, the path set cardinality is more sensitiveto the values of α and η. Furthermore, similar to Fig. 9a,Fig. 9b also has an abnormal value at point (α = 0.1, η =0.1), because the negative correlation of η here is greaterthan the negative correlation of α, covering up the nega-tive correlation of α.

Figure 9c shows that the number of hops in the path setdecreases with the increase of η. Paths’ meeting probabil-ity decreases with increasing length, and larger η willprevent the number of path hops from increasing. At thesame time, Fig. 9c shows that the number of hops in thepath set increases with increasing α. This is because themeeting probability of links increases with the increase ofα, and the meeting probability of paths (η) remains un-changed, so the number of hops contained in the path canincrease.

6 Conclusion

In order to adapt to the emergence of mobile social net-works with large-scale mobile trajectories, we use thedeep learning to select fixed paths from source nodes todestination nodes. This improves upon the traditionalforwarding mode using the chance node meetings. Thecore idea of the deep learning-based data forwarding al-gorithm proposed in this paper is to explore and make fulluse of network paths composed of instantaneous high-probability links. Experimental results show that the algo-rithm proposed in this paper can improve the deliveryratio of data packages. Compared with the epidemic,spray-and-wait, and SEBAR algorithms, network over-head is greatly reduced. In future work, fixed paths willbe designed to form a data forwarding strategy whichmeets specified delivery ratio and network overheadrequirements.

Acknowledgements Supported by the National Natural ScienceFoundation of China under Grant(No.61571179, No.91538112,No.61401144).

References

1. Li F, Jiang H, Li H, Cheng Y, Wang Y (2017) SEBAR: social-energy-based routing for mobile social delay-tolerant networks.IEEE Trans Veh Technol 66(8):7195–7206

2. Zhou H, Wang H, Chen X, Li X, Xu S (2018) Data offloadingtechniques through vehicular ad hoc networks: a survey. IEEEAccess 6(1):65250–65259

3. Huang C, Chen Y, Xu S, Zhou H (2018) The vehicular socialnetwork (VSN)-based sharin g of downloaded geo data using thecredit-based clustering scheme. IEEE Access 6(1):58254–58271

4. Zhu C, Leung VCM, Rodrigues JJPC, Shu L, Wang L, Zhou H(2018) Social sensor cloud: framework, greenness, issues, and out-look. IEEE Netw 32(5):100–105

5. Yang G, He SB, Shi ZG, Chen JM (2017) Promoting cooperationby social incentive mechanism in mobile crowdsensing. IEEECommun Mag 55(3):86–92

6. Chen J, Hu K, Wang Q, Sun Y, Shi Z, He S (2017) Narrowbandinternet of things: implementations and applications. IEEE InternetThings J 4(6):2309–2314

7. Zhang H, Zheng WX (2018) Denial-of-service power dispatchagainst linear quadratic control via a fading channel. IEEE TransAutomat Control 63(9):3032–3039

8. Zhu Y, Zhong Z, ZhengWX, Zhou D (2018) HMM-based H-infin-ity filtering for discrete-time Markov jump LPV systems over un-reliable communication channels. IEEE Trans on SystMan Cybern,Syst 48(12):2035–2046

9. Li HX, ZhuHJ, Du SG, Liang XH, Shen XM (2018) Privacy leakageof location sharing in mobile social networks: attacks and defense.IEEE Trans Dependable Secure Computing 15(4):646–660

10. ZhangH,MengWC,Qi JJ,WangXY, ZhengWX (2019) Distributedload sharing under false data injection attack in inverter-basedmicrogrid. IEEE Trans Ind Electron 66(2):1543–1551

11. Yang G, He SB, Shi ZG (2017) Leveraging crowdsourcing forefficient malicious users detection in large-scale social networks.IEEE Internet Things J 4(2):330–339

12. Vahdat A, Becker D (2000) Epidemic routing for partially-connectedad hoc networks. Duke University Tech. Rep. CS-200006

13. Lindgren A, Doria A, Scheln O (2003) Probability routing in inter-mittently connected networks. ACM SIGMOBILE MobileComput. Commun Rev 7(3):19–20

14. Spyropoulos T, Psounis K, Raghavendra CS (2008) Efficientrouting in intermittently connected mobile networks: the multiple-copy case. IEEE/ACM Trans Networking 16(1):77–90

15. Erramilli V, Crovella M, Chaintreau A, Diot C (2008) Delegationforwarding. In: ACM MobiHoc, pp 251–260

16. Chen X, Shen J, Groves T, Wu J (2009) Probability delegationforwarding in delay tolerant networks. In: IEEE ICCCN, pp 1–6

17. Wang QS, Wang Q (2015) Restricted epidemic routing in multi-community delay tolerant networks. IEEE Trans Mob Comput14(8):1686–1697

18. Hou F, Shen X (2009) An adaptive forwarding scheme for messagedelivery over delay tolerant networks. In: IEEEGLOBECOM, pp 1–5

19. Sobin CC, Raychoudhury V,Marfia G, Singla A (2016)A survey ofrouting and data dissemination in delay tolerant networks. J NetwComput Appl 67:128–146

20. Hui P, Crowcroft J, Yoneki E (2011) Bubble rap: social-basedforwarding in delay tolerant networks. IEEE Trans Mob Comput10(11):1576–1589

21. Palla G, Derenyi I, Farkas I, Vicsek T (2005) Uncovering the over-lapping community structure of complex networks in nature andsociety. Nature 435(7043):814–818

22. Hui P, Crowcroft J (2007) How small labels create big improve-ments. In: IEEE Percom Workshops, pp 65–70

Peer-to-Peer Netw. Appl.

Page 12: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

23. Bulut E, Szymanski BK (2010) Friendship based routing in delaytolerant mobile social networks. In: IEEE GLOBECOM, pp 1–5

24. Chen K, Shen H (2012) SMART: lightweight distributed socialmap based routing in delay tolerant networks. In: IEEE ICNP, pp1–10

25. Wu J, Wang Y (2014) Hypercube-based multipath social featurerouting in human contact networks. IEEE Trans Comput 63(2):383–396

26. Zheng H, Wu J (2017) Up-and-down routing through nested cor-periphery hierarchy in mobile opportunistic social networks. IEEETrans Veh Technol 66(5):4300–4314

27. Li Z, Wang C, Yang S, Jiang C, Stojmenovic I (2015) Space-cross-ing: community-based data forwarding in mobile social networksunder the hybrid communication architecture. IEEE Trans WirelCommun 14(9):4720–4727

28. Wu J, Xiao M, Huang L (2013) Homing spread: community home-based multi-copy routing in mobile social networks. In: IEEEINFOCOM, pp 2319–2327

29. Gao W, Cao G, Porta TL, Han J (2013) On exploiting transientsocial contact patterns for data forwarding in delay-tolerant net-works. IEEE Trans on Mob comput 12(1):151–165

30. Zhou H, Leung VCM, Zhu C, Xu S, Fan J (2017) Predicting tem-poral social contact patterns for data forwarding in opportunisticmobile networks. IEEE Trans Veh Technol 66(11):10372–10383

31. Pietiläinen AK, Diot C (2012) Dissemination in opportunistic socialnetworks: the role of temporal communities. In: ACMMobiHoc, pp165–174

32. Zhang X, Cao G (2017) Transient community detection and itsapplication to data forwarding in delay tolerant networks. IEEE/ACM Trans Networking 25(5):2829–2843

33. Ruan M, Chen X, Zhou H (2019) Centrality prediction based on k-order Markov chain in mobile social networks. Peer Peer NetwAppl PP(99):1–1

34. Hinton GE, Osindero S, Teh YW (2006) A fast learning algorithmfor deep belief nets. Neural Comput 18(7):1527–1554

35. Mao B, Fadlullah ZM, Tang F, Kato N, Akashi O, Inoue T,Mizutani K (2017) Routing or computing? The paradigm shift to-wards intelligent computer network packet transmission based ondeep learning. IEEE Trans Comput 66(11):1946–1960

36. Kato N, Fadlullah ZM, Mao B, Tang F, Akashi O, Inoue T,Mizutani K (2016) The deep learning vision for heterogeneousnetwork traffic control: proposal, challenges, and future perspec-tive. IEEE Wirel Commun 24(3):146–153

37. Cabrero S, Garcia R, Paneda XG (2015) Understanding opportu-nistic networking for emergency services: analysis of one year ofGPS traces. In: Proc. of the 10th ACM MobiCom workshop onchallenged networks (CHANTS), pp 31–36

38. Menggüç EC, Aci N (2018) Kurtosis-based CRTRL algorithms forfully connected recurrent neural networks. IEEE Trans Neural NetwLearn Syst 29(12):6123–6131

39. Sathasivam S, Abdullah W (2008) Logic learning in Hopfield net-works. Mod Appl Sci 2(3):57–63

40. Pascanu R, Mikolov T, Bengio Y (2013) On the difficulty of train-ing recurrent neural networks. In: ICML, pp 1310–1318

41. Hochreiter S, Schmidhuber J (1997) Long short-term memory.Neural Comput 9(8):1735–1780

42. Singh MD, Lee M (2017) Temporal hierarchies in multilayer gatedrecurrent neural networks for languagemodels. In: IEEE IJCNN, pp2152–2157

Publisher’s note Springer Nature remains neutral with regard tojurisdictional claims in published maps and institutional affiliations.

Qingshan Wang received hisPh.D. degree in Computer Sciencefrom University of Science andTechnology of China (USTC) in2007. He was a visiting scholar atCornell University between 2009and 2010. He is a professor withthe School of Mathematics atHefei University of Technology.His research interests include de-lay tolerant networks & ad hocnetworks protocol design, andnetwork coding.

Haoen Yang received the B.S.degree in Information andComputing Science from HefeiUniversity of Technology, Hefeiof China in 2018. His research in-terests include deep learning andartificial intelligence.

Qi Wang received the Ph.D. de-grees in Computer Science, fromHefei University of Technology,Hefei of China in 2010. She wasa visiting scholar at TempleUniversity between 2014 and2015. She is an associate profes-s o r w i t h t h e S c h o o l o fMathematics at Hefei Universityof Technology. Her research inter-ests include delay tolerant net-works, scheduling algorithm, andnetwork coding.

Peer-to-Peer Netw. Appl.

Page 13: A deep learning based data forwarding algorithm in mobile ...maths.hfut.edu.cn/_upload/article/files/d4/b6/25f6cb8d...A deep learning based data forwarding algorithm in mobile social

Wei Huang received the Ph.D.degree in Applied Mathematicsfrom Beihang University, Beijingof China in 2011. He is currently aresearcher with the School ofMathematics at Hefei Universityof Technology. His current re-search interests include wavelettheory, signal processing, com-pressed sensing, and some topicsrelated to data science.

Bin Deng received his doubledoctorate in Mathématiquesappliqués from École NormaleSupérieure de Cachan and inComputational Mathematics fromEast China Normal University in2008. He is an associate professorwith the School ofMathematics atHefei University of Technology.His research interests include al-gorithm analysis, and numericalalgebra.

Peer-to-Peer Netw. Appl.