CHAPTER 3 NCCU Trace Data
3.1 The composition of trace data
3.1.3 Trace Data
國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
3.1.3 Trace Data
Movement was recorded by GPS, and the scan period is 5 minutes. Application recorded not only the trajectory but also the encounters. Besides, we also track the application usage in Android devices. With those experiment data, we can analyze the relation between participants and trajectory.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
CHAPTER 4
A Two-Phase Network Coding Design for Mobile Time-valued Group-message Dissemination
4.1 Environment Definition
According to the interest questionnaire from NCCU trace data, there are five group chatrooms in the scenario. Those groups were named sports, reading, social, arts, and services respectively. The destination of message is the group rather than person. Each user can participate in more than one chatroom.
Each chatroom member can forward the different group’s message as figure 6.
Figure 6. Experiment Environment
Furthermore, user can assign the different priority value to new messages. We illustrate this concept in figure 7. The first priority messages represent the most important messages, and so on.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Figure 7. Architecture of Message Buffer
We adopt the broadcast transition to deliver message, and each node will
broadcast the beacon signal to identify the same group member. Before sender want to forward message to receiver, they will exchange the meta-data initially. With the help of meta-data, senders can forward message more efficiently. The meta-data includes the history of encounters, buffer information and environment situation, etc.
Based on broadcast transmission, not only receiver will receive the messages from sender, but also the neighbors of sender will overhear the messages too. The most different form traditional routing scenarios is that neighbor can receive the messages even if they do not belong to the same group chatroom. The concept of overhear is describe in the figure 8.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Figure 8. Transmission Scenario
In order to improve the transmission efficiency and performance, we propose a network coding design method for message transmission. In figure 7, transmission scheme can be divided into two phase, the first phase is warm up phase and the second phase is network coding phase. We will describe each phases in detail, and how to improve the problem of current protocols.
4.2 Time Value
Time value is term of finance [25], which also be called Time value of money or Time value of an option. The time value describes the greater benefit of receiving money now rather than later. It is founded on time preference. In mathematical finance, the Greek: THETA representing the decay sensitivity of the time value in Black-Scholes model [26, 27].
As we mentioned in previous section, we have assigned priority and TTL value
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
to every message. We define time-value of message depends on the receiving time and priority, and then it is subject to exponential decay by formula 1. Derivation of the solution to this equation can be seen below. For example, two messages with the same receiving time (short time) but different priority, the high priority message will get more time value than low priority message. On the contrary, two messages with the same receiving time (long time) but different priority, the high priority message will get less time value than low priority message. The high priority message will get more time value; however, the decay of time value is much fast. In other words, larger decay constants make the time value vanish much more rapidly for high priority message. We can calculate the time value of message by equation 2.
𝑑𝑣(𝑡)
𝑑𝑡 = −𝛼𝑣(𝑡) 𝑣(𝑡)=𝑣0𝑒−𝛼𝑡
(1)
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
𝑑𝑣(𝑡)
𝑑𝑡 = −𝛼𝑣(𝑡) 𝑑𝑣(𝑡)
𝑣(𝑡) = −𝛼 𝑑𝑡 1
𝑣(𝑡)𝑑𝑣(𝑡) = −𝛼 𝑑𝑡
∫ 1
𝑣(𝑡)𝑑𝑣(𝑡) = ∫ −𝛼 𝑑𝑡 𝑙𝑛 𝑣(𝑡)=−𝛼𝑡 + 𝑐
𝑒𝑙𝑛 𝑣(𝑡)=𝑒−𝛼𝑡+𝑐 𝑣(𝑡)=𝑒𝑐𝑒−𝛼𝑡=𝑣0𝑒−𝛼𝑡
(𝑣(0) = 𝑒𝑐 = 𝑣0)
‧
Table 1. Notation for Time Value Calculation
Notation Description
𝑣(𝑡) Time value function
𝑡 Time
α Exponential decay constant
𝑣0 Initial quantity of time value
α Exponential decay constant
𝑇𝑉(𝑚𝑖) Time value of message i
𝑃𝑚𝑖 Priority of message
𝑃𝑒𝑟 Time period constant
𝑇𝑇𝐿 Time to live of message
T Current system time
𝐶𝑇𝑚𝑖 Message create time
‧
In the pure network coding transmission scheme, we analyzed the buffer
utilization and we found that there are seldom coded packets which can be decoded in the beginning. Members need to wait a period of time to receive more packets, so they will have more chance to decode the coded packet. Thus, we take the advantages of flooding routing protocol. We take “Spray and Wait” routing protocol for reference, and we limit the copies of forwarding messages. If messages belong to warm up phase, it only can be transmitted directly. Furthermore, un-coded packet will improve the delay time and probability of decoding message.
In our network coding transmission design, when the forwarded messages reach to the maximum allowable copies. It will stop to be transmitted directly, but it will be transmitted in coded-packet way (i.e. it belongs to network coding phase and it will be encoded with another packet).
4.4 Network Coding Phase
Network coding transmission scheme is a technique which can be used to improve a network's throughput, efficiency and scalability. Message belong to network coding phase, which represents that the messages have been transmitted or overhear a lot of times. If messages still be transmitted directly, it will cause too much overhead and poor utilization in the network. Therefore, messages which belong to network coding phase will be encoded in to coded packet before be transmitted.
‧
4.5 2-Phase: Dynamic Threshold
The simplest way to delivered message is flooding, however it will cause the broadcast storming and energy-consumption, and most importantly it will decrease network's throughput. In the “Spray and Wait” routing protocol, protocol is composed of two phases: the spray phase and the wait phase. When a new message is created, a number L is attached to that message indicating the maximum allowable copies of the message in the network. In other word, the message can be forwarded with L times.
Each of these nodes then transfers half of its copies (Remain of L/2) to the node‘s encounters. When a relay receives the copy which belongs to maximum allowable copies, it enters the wait phase, where the relay simply holds that particular message until the destination is encountered directly.
We take the advantages of network coding and flood routing protocols. Using flooding method will increase the deliver ratio and decoding probability, but it also will cause the overhead issue. Network coding mechanism can improve the efficiency in the network, however, too much coded packets in the buffer which cannot be decode effectively will lead to too much delay time. Thus, we propose 2-phase network coding design for message dissemination. Messages can be classified into two phases by threshold with equation 3. Furthermore, the threshold is not a constant, it will be updated with remaining relay copies and activity ratio of receiver
accordingly by formula 4.
‧
Table 2. Notation for Dynamic ThresholdNotation Description
𝑚𝑖𝑔 Message i of group g
𝛾 Network environment constant
𝐴𝑅𝑔 Activity ratio for group g
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
4.6 Activity Ratio (AR)
Activity ratio is the activity level in specific group, which can be calculated by the formula 5. High activity ratio means nodes have high probability to encounter the group, and vice versa.
𝐴𝑅𝑔=∑ 𝐸𝐶𝑔
∑ 𝐸𝐶𝐺
𝑔 ∈ 𝐺
∀𝑖, 𝑔 ; 𝑚𝑖𝑔 ∈ 𝑀 ; 𝑔 ∈ 𝐺
(5)
Table 3. Notation for Activity Ratio
Notation Description
𝐴𝑅𝑔 Activity ratio for group g
𝐸𝐶𝑔 Encounter Count for group g
𝐸𝐶𝐺 Encounter Count for all group
𝛽 Aging constant
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Activity ratio will be updated periodically and calculated with size w. Moreover, the activity ratio for group are "aged" with flowing equation 6.
(𝐴𝑅𝑔)𝑛𝑒𝑤= (𝐴𝑅𝑔)𝑜𝑙𝑑∗ 𝛽 𝑔 ∈ 𝐺
(6)
Figure 9. Encounter List
4.7 Meta-data
In order to make the precise decision for message forwarding, we need to exchange some meta-data before deliver message. Figure 10 is the meta-data of history table. Data format can be divided into four attribute. Group_ID represents the Identification number of group chatrooms; we create four different interests group in our scenario. AR is the abbreviation of activity ratio. Sender can understand the environment of network through the AR, when the value is high which means node have strong relation with specific chatroom. TS (timestamp) is used to identify the elapse time since last updated. Timestamp will be update periodically, moreover, if
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
elapse time is too long to take for reference. Finally, member of attribute represents that whether nodes belong to chatroom’s member or not.
Un-coded message list (UML) is that messages have been received from warm up phase or decoded by network coding phase recently, shown in figure 11. The size of UML is limited by window size w.
Figure 10. History Table
Table 4. Notation for History Table
Notation Description
Group_ID Identification number for group chatroom
AR Activity Ratio
TS Time Stamp since last update time
Member Belong to group member
Figure 11. Un-coded Message List
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
4.8 Buffer management
We use two buffers to store coded and un-coded packets, besides we will maintain a packet delivery status table, showed in figure 12. In Figure 12, the first row and the first column are the message id, the other attributes record the delivery status. The value-pair is relay times and overhear times in the message state table.
Figure 12. Message State Table
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
4.9 Routing Strategy
The message dissemination flowchart is shown in figure 13.
Figure 13. Flowchart of Routing Strategy
4.9.1 Exchange Meta-data
If two nodes encounter each other, firstly they will exchange meta-data, such as history table (HT) and un-coded message list (UML). Figure 14 is the history table.
The attribute of TS (Time stamp) is calculated by comparing the current system time and activity ration updated time, which is used to remove outdated information. The attribute of Member is used to identify the group member in the chatroom. In figure 15, UML is the un-coded message list; which node have received or decoded recently.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Figure 14. History Table
Figure 15. Un-coded Message List
4.9.2 Generate Message Candidate Set (CS)
Algorithm of Generate Message Candidate Set is shown in Algorithm 1. Sender will choose specific group messages to temperate buffer randomly by analyzing the HT. Take figure 14 as example, we assume that sender is the group member of 1 and 3. Sender will pick the message of group 1 and 3, because Both of them are the member of group 1 and 3. Then, according the history table of receiver, sender will also pick the message of group 2, the reason is that activity ratio of group 2 with the highest value. Next, each message will be classified into different phase by its threshold, and we will get three sets by the following expression 7. Finally, sender will pick messages to forwarding sequence buffer from candidate set buffer randomly.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
𝑆1 = {𝑚𝑖𝑔 | 𝑚𝑖𝑔 ∈ 𝑃ℎ_𝑤𝑎𝑟𝑚}
𝑆2 = {𝑚𝑖𝑔⊕ 𝑚𝑗𝑔 | 𝑚𝑖𝑔 ∈ 𝑃ℎ_𝑤𝑎𝑟𝑚× 𝑚𝑗𝑔 ∈ 𝑃ℎ_𝑛𝑐} 𝑆3 = {𝑚𝑖𝑔⊕ 𝑚𝑗𝑔 | 𝑚𝑖𝑔 ∈ 𝑃ℎ_𝑛𝑐× 𝑚𝑗𝑔 ∈ 𝑃ℎ_𝑛𝑐}
∀𝑖, 𝑗, 𝑔 ; 𝑚𝑖𝑔, 𝑚𝑗𝑔 ∈ 𝑀 ; 𝑔 ∈ 𝐺
CS= 𝑆1∪ 𝑆2∪ 𝑆3
(7)
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
4.9.3 Message Forwarding Sequence
In social opportunistic network, the contact time of two nodes may not be a long time. However, the contact is short and unstable due to the mobility pattern of node.
Therefore, sender node probably does not have enough time to transmit all selected candidate set to receiver node. The features of carry-and-forward is important in social opportunistic network. Thus, the message forwarding sequence will influence the performance of delivery rate and delivery delay significantly. Algorithm of
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Message Forwarding Sequence is shown in Algorithm 4.
If messages belong to warm phase, which means there are few copies in the network, vice versa. Consequently, the messages of warm phase should be transmitted firstly. We illustrate our idea in figure 16. If two messages belong to same phase, the transmission sequence will be scheduled by decode probability and expected time value. The decode probability can be known from history table and the expected time value can be calculated by following equation 8.
Figure 16. Message Forwarding Sequence
TV (𝑚′𝑘) = { TV(𝑚𝑖𝑔) , 𝑖𝑓 𝑚′𝑖 𝑖𝑠 𝑢𝑛𝑐𝑜𝑑𝑒𝑑 , 𝑚′𝑘 = 𝑚𝑖𝑔 𝑀𝐴𝑋 (TV(𝑚𝑖𝑔), TV(𝑚𝑗𝑔)) , 𝑖𝑓 𝑚′𝑖 𝑖𝑠 𝑐𝑜𝑑𝑒𝑑 , 𝑚′𝑘 = 𝑚𝑖𝑔⊕ 𝑚𝑗𝑔
∀𝑖, 𝑗, 𝑘, 𝑔 ; 𝑚′𝑘 ∈ 𝐹𝑆 ; 𝐹𝑆 ⊂ 𝐶𝑆 ; 𝑚𝑖𝑔, 𝑚𝑗𝑔 ∈ 𝑀 ; 𝑔 ∈ 𝐺
(8)
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
4.9.4 Update Meta-data
After nodes finish the transmission process, they will update the meta-data, the meta-data including HST (History table) and MST (Message state table). History table will be updated on the basis of encounters. Message state table will be updated with the message receiving approach (relay directly or by overhearing) for receivers and message forwarding list for senders.
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Chapter 5 Simulation setting
5.1 Simulation environment
We use The ONE (Opportunistic Network Environment simulator) [28] to conduct our simulation and evaluation our research, which is an open source platform of opportunistic network simulator and shown in figure 17. The one simulator doesn’t support network coding by default, so we extend the one simulator and integrate the network coding module manually.
Figure 17. The ONE Simulator
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
5.2 Simulation Setting
Our goal is that networking design for group message dissemination. There are many mobility model such as, MIT reality [10], INFOCOM [12] and Cambridge [11];
nonetheless, they all collected from some specific groups. Finally, we choose the trace data from our previous work [9], NCCU trace data, as our mobility model.
In our scenario, we choose NCCU trace data to be our mobility model.
According to the interest questionnaire form NCCU trace data, all of the pedestrian can be classified into 5 groups (sports, reading, social, arts and services). Each pedestrian can participate more than one chatroom group.
Finally, we define the simulation coverage of NCCU campus, figure 18 shows the main active area of students. The size of map is about 12 square kilometers (3764*3420m). The simulation time is from 12:00 a.m. to the next day of 12:00 p.m., which is equivalent to two days (172800 seconds). The data rate is 250KB/s, and the TTL of message is 1080 minutes (18 hours).
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
Table 5. Simulation Setting
Map NCCU Trace
Area 3764*3420m
Simulation Time 172800 sec
Data Rate 250KBps
Radio Range 30m
Buffer Size 100MB
Number of chatroom 5
Time to Live 1080mins
Figure 18. NCCU Map
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
5.3 Simulation results
It is not suitable for the evaluation with General DTN routing protocols in our scenario, such as Spray and Wait, PRoPHET and MaxProp, etc. First, those routing protocols do not support the network coding method. Second, the distribution of messages does not base on the broadcast transmission in those routing protocols.
Therefore, we evaluated our dissemination on the principle of fair comparison, we only focus on the methods of flooding and network coding.
‧
5.3.1 Delivery ratio
Delivery ratio is calculated by percentage of messages delivered to destination.
Figure 19 shows that 2-phase networking coding design is better than the other routing method. In the networking coding approach, too many codes packets can be decoded in the buffer. Flooding method will have better performance than network coding method; however, it will lead to low buffer utilization and overhead issue.
In our approach, we can improve the delivery ratio by decoded more network coding packet in the buffer. Besides, we increase the decoding probability through the un-coded packet from warm up phase.
Figure 19. Result: Delivery Ratio
0
‧
5.3.2 Delay time
Delay time is critical factor in our scenario. Message delay is calculated by the message created time and message delivered time to all nodes. Because too many coded packets can be decoded in the buffer, the network coding method have the longest wait waiting time. However, if we can use this shortcoming wisely, we can increase the decoding probability by sending un-coded packets directly. As we mentioned above this is the spirit of two phase dissemination approach. In figure 22, it is observed that two phase mechanism greatly out performs flooding in terms of message delivery delay.
Figure 20. Result: Delivery Delay
10000
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
5.3.3Time value
Time value is corresponding to the message priority and delay time. There are two priority messages in the network, and we define messages’ time value decay exponentially. High priority messages with larger decay constants make the time value vanish much more rapidly. Next, we define our time value in the semi-open range [0.0, 1.0). Figure 23 shows that our two phase design is superior to other routing protocols.
Figure 21. Result: Time Value
0 0.2 0.4 0.6 0.8
Time Value
Enhanced-Flooding N.C 2-Phase
‧
5.3.4 Overhead ratio
Overhead ratio is calculated by the following formula 9.
∑ 𝑇𝑟𝑎𝑛𝑠𝑚𝑖𝑡𝑡𝑒𝑑 𝑚𝑒𝑠𝑠𝑎𝑔𝑒 − ∑ 𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑚𝑒𝑠𝑠𝑎𝑔𝑒
∑ 𝑅𝑒𝑐𝑒𝑖𝑣𝑒𝑑 𝑚𝑒𝑠𝑠𝑎𝑔𝑒
(9) In figure 24, we can observe that network coding and two phase network coding design performs closely in terms of transmission overhead. Network coding approach will provide better buffer utilization than flooding approach in limited buffer size.
Figure 22. Result: Overhead Ratio
0
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
5.4 Insight Analysis
5.4.1 Delivery Ratio
We analysis the delivery ratio by phase. Figure 20 shows that most of nodes received messages through the network coding phase in general cases. However, if the average activity ratio is low in the social network, such as day 4-5 and day 11-12, two phase dissemination approach will not provide significant improvement in the
performance of delivery ratio.
Figure 23. Result: Delivery Ratio-Phase
0 0.2 0.4 0.6 0.8
Delivery Ratio-Phase
2-Phase Phase1 Phase2
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
There are two kind of priority messages in the network. The high priority messages will have more probability to be transmitted directly in our dissemination mechanism. As expected, figure 21 shows that high priority message will have more chance to be delivered to the destination.
Figure 24. Result: Delivery Ratio-Priority
0 0.2 0.4 0.6 0.8
Delivery Ratio-Priority
2-Phase Priority1 Priority2
‧ 國
立 政 治 大 學
‧
N a tio na
l C h engchi U ni ve rs it y
5.4.2 Dynamic 2-phase Optimization
According to our formula 4, γis the network environment constant in the equation. We want to know performance issue with different value of γ.
In figure 25, we can find that when value equal to tree with the highest delivery ratio, but value is inverse proportional to delivery ratio when value is getting larger. It is obviously that the performance of delivery ratio is close to flooding routing
protocol when value is greater than ten.
Figure 25. Optimization Result: Delivery Ratio
0 0.2 0.4 0.6 0.8
γ=1 γ=3 γ=5 γ=10
Delivery ratio
‧
Figure 26 shows that increasing the value of γ can improve the performance in the terms of delay time and time value, but if the value increases too much it will result in poor performance.
Figure 26. Optimization Result: Delivery Delay Time
Figure 27. Optimization Result: Time Value
25000
‧
Consequently, after we integrated the simulation results mentioned above, we think that value γ equals three, which is the best case in our simulation environment scenario.
5.4.3 Other method
We have compared many methods in our simulation scenario. However, they do not perform outstanding results. We have tried the implement different number of relay copies for receiver. Each of these nodes transfers half (n/2) of the total number of copies they have encounter, it will decrease the decoding probability significantly.
Thus, we adopt “n-1” in our routing approach.
Also, we have tried random phase for message classification. We can find that the buffer utilization is the worst case in our scenario. The reason is that the buffer size is limited. Classifying messages randomly will decrease the decode probability and increase the redundancy of messages.
Finally, we compared the sender-oriented and receiver-oriented method in our scenario. Sender-oriented method will ignore the situation of node with low activity ratio. Nodes with low activity ratio mean that they seldom meet the group members and they do not have enough packets to decode the packet in the buffer. Thus, if senders transmit the too much coded-packets to receivers, it will cause the overhead issue. In contrast, receiver-oriented method will prevent this situation happening by let forwarded messages with high probability for belonging to warm up phase.
‧
Chapter 6 Conclusion and Future Work
In this thesis, we proposed “A 2-phase Network Coding Design for Mobile Time-valued Group-message Dissemination” in opportunistic mobile social network. Warm Up phase can increase the decode probability in buffer; moreover, network coding technique phase can improve network performance. Simulation result shows that our proposed protocol is effective and superior to flooding based message broadcasting in performance of message delivery ratio, message delivery delay and message time value. Furthermore, we evaluated our dissemination approach with real trace data from campus instead of random trajectory. Therefore, the simulation results are closer to the real environment.
For the further research, the phase decision is worth to study. It is expected that more accurate phase decision leads to better buffer utilization. Maybe phase decision is not only related to receiver-oriented but social relation. Besides, there is a strong relationship between social relation and participants, and the relay node selection is
For the further research, the phase decision is worth to study. It is expected that more accurate phase decision leads to better buffer utilization. Maybe phase decision is not only related to receiver-oriented but social relation. Besides, there is a strong relationship between social relation and participants, and the relay node selection is