# A Data Transmission Algorithm Based on Triangle Link Structure Prediction in Opportunistic Social Networks

^{*}

## Abstract

**:**

## 1. Introduction

- An effective link prediction model was proposed for routing and forwarding. The link is scored based on the frequency, and the optimal relay node is selected according to the score. This algorithm avoids the unnecessary data transmission, reduces the data transmission overhead in opportunistic networks, and improves the tracking target nodes’ efficiency and accuracy.
- In the link prediction algorithm, the graph structure is introduced, and the sub-community is reconstructed according to the special sub-graph. According to the new link obtained from the prediction of the subgraph’s evolution, the subcommunity is selected for the data transmission.
- According to the simulation experimental results, compared with the three routing algorithms of the Spray and Wait algorithm, EIMCT, and ICMT, the model proposed in this paper shows good performance in improving the data transmission efficiency and reducing the overhead. It also has stable performance in different environments.

## 2. Related Work

## 3. System Model

#### 3.1. Link Prediction Model Design

#### 3.1.1. Modeling Steps

_{ij}is the weight of the corresponding path, c

_{ij}is the cost of moving from node i to node j, N

_{i}is the set of critical points of node i, and the coefficients α and β are the basic parameters of the model. This model assumes that all edges in the social network graph have initial weights.

^{k}is the path traversed by the person/mobile device k from the starting point to the information source, the length is c

^{k}, and t is the total number of existing people, which indicates the search for the shortest path from the starting point to the information source. Assuming that each edge’s weight will gradually decrease, and the more the path is traversed, the greater the weight.

#### 3.1.2. Overall Design of LPMBT Model

#### 3.1.3. Positioning of the Triangle Relationship

- In the beginning, all people are scattered at the nodes in the opportunity social network.
- Unlike algorithms in traditional opportunistic networks, people here prefer to choose paths with lower weights, that is, to explore more paths that have never been routed before in opportunistic social networks. Here, the probability of a person moving from node i to node j is shown in Equation (5).$${P}_{ij}^{k}=\frac{{\left(\frac{1}{{w}_{ij}}\right)}^{\alpha}}{{\displaystyle \sum _{n\in {N}_{i}^{k}}{\left(\frac{1}{{w}_{ij}}\right)}^{\alpha}}}$$
_{ij}is the weight of the corresponding path, and the coefficient α is the basic parameter of the model, which is set to 1. Comparing formula (1), we can see that β = 0, and it is inversely proportional to the weight value.**Algorithm 1**LPMBT, Link prediction model based on triangulation**Input**: Triangles (G)Output: Predict path: Result ← Result + Link Require: G = (V, E) 1: Load(G) 2: Triangles = Find Triangles (G) // See algorithm 2 3: Result = null 4: n = size (Triangles) 5: i = 1 6: **While**i ≤ n do7: NewLinks = Predict (Triangles) [i] 8: **For**All Links ∈ NewLinks do9: **If**Results contains Link Then10: Result [Link]++ 11: **Else**12: Result = Result + Link 13: **End If**14: **End For**15: i = i + 1 16: **End While**17: Result = Sort Descending Result 18: Return result 19: **End** - Information is expressed as a triangular relationship, so people must find the triangular relationship if they want to obtain information. As the triangle relationship is composed of three nodes, in order to store node information, we define people as having memory modules, as shown in Figure 3, to store the passed node information (0, 1, and 2 represent the serial numbers of the three modules, and the arrow represents the order of coverage). If the current memory module is filled, it will be covered one by one according to the order of the arrow’s direction on the way. In addition, each time we obtain three new nodes, the correctness of each node is verified. If the data to be written already exist in one of the memory modules, it is considered that a triangular relationship has been found.
- The initial weight a of all paths is 1. Each time a new triangle relationship is found, the weight of each path is increased by 1. If the current path belongs to an existing triangle relationship, the edge’s weight is increased by 1.
- The weight of each path will not fade away over time.
- People have the attribute of death, so they will not detect the visited nodes in the opportunistic social network. People will die in the following situations: they have visited all paths; they are always are in between two nodes or edge nodes.
**Algorithm 2**Find Triangles**Input**: Unit Weignt (E)**Output**: Triange (G)Require: G = (V, E) 1: Unit Weignt (E) 2: People = Init People (V) 3: (Triangles) = null 4: PeopleNum = Numberof (People) 5: iteration = 1 6: **While**0 < iteration ≤ Max do7: **For**All People ∈ People do8: Next = ChooseNextNode() // Base on formula (5) 9: **If**Privious Node in Memory() == next Then10: Triangles = Save Triangle() 11: Increase Weignt of (Triangles) 12: Triangles = Triangles + Triangle 13: **Else**14: Put into Memory (Next) 15: **End If**16: **If**Health (People) == False Then17: Delete (People) 18: **End If**19: **End For**20: PeopleNum = Numberof (People) 21: Iteration ++ 22: **End While**23: Return Triangles 24: **End**

^{3}), and the space complexity is O(n

^{2}). According to the research of Gong et al. [32], the lowest time complexity for finding the triangle relationship is O(n

^{2.376}), and the space complexity is O(n

^{2}). For sparse graphs and low-weight graphs, the time and space complexities of current commonly used algorithms are not high, but for large nonsparse graphs, the required overhead is relatively large.

#### 3.1.4. Link Prediction Based on Triangle Relationship

Algorithm 3 Predict | |

1: | Neighbors = Neighbors(Triangle) |

2: | NewLinks = Null |

3: | For All Neighbor ∈ Neighbors do |

4: | If Neighbor ∈ SubGraph (b) Then |

5: | Link = Get Non-Existed Link(b) |

6: | Calculate Score(Link) |

7: | NewLinks = NewLinks + Link |

8: | Else if Neighbor ∈ SubGraph(a) Then |

9: | Links = Get Non-Existed Link(a) |

10: | Calculate Score (Link) |

11: | NewLinks = NewLinks + Link |

12: | End If |

13: | End For |

14: | Return NewLinks |

15: | End |

#### 3.2. Community Model

_{t}represents the community’s modularization degree at time t, ſ

_{x}shows the total weights of all edges in the community x, F represents the total weight with edges, and λ

_{s}represents the total degree of node S in the community.

**Theorem**

**1.**

**Proof**

**of**

**Theorem**

**1.**

_{t}to:

_{t+1}− Q

_{t}> 0, we only need to prove (2F

^{2}− 2Fλ

_{s}− λ

_{s}Δſ × (2F − λ

_{s}) > 0.

**Theorem**

**2.**

**Proof**

**of**

**Theorem**

**2.**

_{i}and x

_{j}, the total weight in the community is reduced, and there is

_{i}and x

_{j}in the community satisfy $\frac{{\lambda}_{i}{\lambda}_{j}}{2F}<{f}_{ij}<\Delta f+\frac{{\lambda}_{i}{\lambda}_{j}+{\lambda}_{s}\Delta f+\Delta {f}^{2}}{2(F+\Delta f)}$, and the community is separated. □

**Theorem**

**3.**

_{i}and n

_{j}in the opportunistic network are connected by edge e

_{ij}, and edge e

_{ij}is the only edge of node n

_{i}. Then, if the weight of edge e

_{ij}changes, n

_{i}will not be separated from the community.

**Proof**

**of**

**Theorem**

**3.**

## 4. Simulation

- Spray and Wait algorithm [24]: This algorithm first sprays a certain amount of copies into the network and then waits for a node that obtains a copy to achieve its goal. It overcomes the shortcomings of the traditional Epidemic algorithm based on the flooding mechanism.
- EIMCT [8]: The algorithm selects the time to forward the message based on the defined stop time h. When t < h, the node forwards the message with the most significant probability, and when t > h, the node stops sending the message. It effectively reduces the time complexity and overhead and improves network communication performance to a certain extent.
- ICMT [36]: This algorithm evaluates the transmission probability by identifying neighbor nodes, thereby adjusting the cache. Besides, the cooperation between nodes shares the node’s cache task for effective data transmission, which can avoid accidental deletion of the cache.

## 5. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Internet World Stats. Available online: https://www.internetworldstats.com/stats.htm (accessed on 2 March 2021).
- Cyberspace Administration of China. Available online: http://www.cac.gov.cn/2021-02/03/c_1613923423079314.htm (accessed on 2 March 2021).
- Global Mobile Suppliers Association (GSA). Available online: https://gsacom.com/ (accessed on 28 April 2021).
- Gong, W.; Qi, L.; Xu, Y. Privacy-aware multidimensional mobile service quality prediction and recommendation in distributed fog environment. Wirel. Commun. Mob. Comput.
**2018**, 2018, 3075849. [Google Scholar] - Dou, W.; Tang, W.; Li, S.; Yu, S.; Choo, K.-K.R. A heuristic line piloting method to disclose malicious taxicab driver’s privacy over GPS big data. Inf. Sci.
**2019**, 483, 247–261. [Google Scholar] - Conti, M.; Giordano, S.; May, M.; Passarella, A. From opportunistic networks to opportunistic computing. IEEE Commun. Mag.
**2010**, 48, 126–139. [Google Scholar] - Marin, R.-C.; Ciobanu, R.-I.; Dobre, C.; Mavromoustakis, C.X.; Mastorakis, G. A context-aware collaborative model for smartphone energy efficiency over 5 g wireless networks. Comput. Netw.
**2017**, 129, 352–362. [Google Scholar] - Koumaras, H.; Makropoulos, G.; Batistatos, M.; Kolometsos, S.; Gogos, A.; Xilouris, G.; Sarlas, A.; Kourtis, M.A. 5G-Enabled UAVs with Command and Control Software Component at the Edge for Supporting Energy Efficient Opportunistic Networks. Energies
**2021**, 14, 1480. [Google Scholar] - Lehr, W.; Queder, F.; Haucap, J. 5G: A new future for Mobile Network Operators, or not? Telecommun. Policy
**2021**, 45, 102086. [Google Scholar] - Mukherjee, S.; Ghosh, S.C. Scalable and fair resource sharing among 5G D2D users and legacy 4G users: A game theoretic approach. Ad Hoc. Netw.
**2021**, 115, 102436, (prepublish). [Google Scholar] - Dhurandher, S.K.; Singh, J.; Obaidat, M.S.; Woungang, I.; Srivastava, S.; Rodrigues, J.J. Reinforcement Learning-Based Routing Protocol for Opportunistic Networks. In Proceedings of the ICC 2020—2020 IEEE International Conference on Communications (ICC), Dublin, Ireland, 7–11 June 2020. [Google Scholar]
- Wang, X.; Lin, Y.; Zhao, Y.; Zhang, L.; Liang, J.; Cai, Z. A novelapproach for inhibiting misinformation propagation in human mobile opportunistic networks. Peer-to-Peer Netw. Appl.
**2017**, 10, 377–394. [Google Scholar] - Wu, J.; Chen, Z.; Zhao, M. An efficient data packet iteration and transmission algorithm in opportunistic social networks. J. Ambintel. Hum. Comp.
**2020**, 11, 3141–3153. [Google Scholar] - Wu, J.; Chen, Z.; Zhao, M. Community recombination and duplication node traverse algorithm in opportunistic social networks. Peer-to-Peer Netw. Appl.
**2020**, 13, 940–947. [Google Scholar] [CrossRef] - Watanabe, Y.; Liu, W.; Shoji, Y. Machine-Learning-Based Hazardous Spot Detection Framework by Mobile Sensing and Opportunistic Networks. IEEE Trans. Veh. Technol.
**2020**, 69, 13646–13657. [Google Scholar] - Xiao, Y. Data transmission and management based on node communication in opportunistic social networks. Symmetry
**2020**, 12, 1288–1301. [Google Scholar] - Li, X.; Wu, J. Node-oriented secure data transmission algorithm based on IoT system in social networks. IEEE Commun. Lett.
**2020**, 24, 2898–2902. [Google Scholar] [CrossRef] - Chen, W.; Chen, Z.; Cui, F. Adaptive Routing Optimization Algorithm in Community-Oriented Opportunistic Networks for Mobile Health. Sensors
**2019**, 19, 1876. [Google Scholar] - Weiyu, Y.; Jingwen, L. Effective date transmission and control base on social communication in social opportunistic complex networks. Complexity
**2020**, 2020, 3721579. [Google Scholar] [CrossRef] - Socievole, A.; Caputo, A.; De Rango, F.; Fazio, P. Routing in Mobile Opportunistic Social Networks with Selfish Nodes. Wirel. Commun. Mob. Comput.
**2019**, 2019, 6359806. [Google Scholar] - Rango, F.D.; Amelio, S.; Fazio, P. Enhancements ofepidemic routing in delay tolerant networks from an energyperspective. In Proceedings of the International Wireless Communications & Mobile Computing Conference, Sardinia, Italy, 1–5 July 2013. [Google Scholar]
- Wu, J.; Chang, L.; Yu, G. Effective Data Decision-Making and Transmission System Based on Mobile Health for Chronic Diseases Management in the Elderly. IEEE Syst. J.
**2020**. [Google Scholar] [CrossRef] - Duan, Z.; Yang, Y.; Fan, N. Opportunistic forwarding algorithm based on connection time in probabilistic routing. Microelectron. Comput.
**2018**, 35, 50–54. [Google Scholar] - Zhou, C.; Dong, Y.; Tian, H. An opportunistic networks energy-saving routing algorithm based on Epidemic and sleeping mechanism. J. Beijing Jiaotong Univ.
**2019**. [Google Scholar] [CrossRef] - Wu, X.; Chang, L.; Luo, J.; Wu, J. Efficient edge cache collaboration transmission strategy of opportunistic social network in trusted community. IEEE Access
**2021**, 9, 51772–51783. [Google Scholar] [CrossRef] - Khalid, K.; Woungang, I.; Dhurandher, S.K.; Singh, J.; Rodrigues, J.P.C. Energy-Efficient Check and Spray Geocast Routing Protocol for Opportunistic Networks. Information
**2020**, 11, 504. [Google Scholar] - Burgess, J.; Gallagher, B.; Jensen, D.D.; Levine, B.N. MaxProp: Routingfor V ehicle-Based Disruption-Tolerant Networks. InInfocom
**2006**, 6, 1–11. [Google Scholar] - Abdali, A.; Sammou, E.M. Routing in Delay Tolerant Networks (DTN)—Improved Routing with MaxProp and the Model of “Transfer by Delegation” (Custody Transfer). Int. J. Commun. Netw. Syst. Sci.
**2011**, 4, 3697. [Google Scholar] - Guidec, F. Deployment and Implementation Support Services Communicating in Pervasive Computing Environments; Université de Bretagne Sud: Lorient, France, 2008; pp. 35–65. [Google Scholar]
- Fall, K.; Hong, W.; Madden, S. Custody Transfer for Reliable Delivery in Delay Tolerant Networks; Technical Report; Intel Research: Berkeley, CA, USA, 2003. [Google Scholar]
- Luo, J.; Wu, J.; Wu, Y. Advanced Data Delivery Strategy Base on Multi-Perceived Community with IoT in Social Complex Networks. Complexity
**2020**, 2020, 3576542. [Google Scholar] [CrossRef] - Gong, N.Z.; Talwalkar, A.; Mackey, L.; Huang, L.; Shin, E.C.R.; Stefanov, E.; Shi, E.; Song, D. Joint link prediction and attribute inference using a social-attribute network. Acm Trans. Intell. Syst. Technol.
**2014**, 5, 27. [Google Scholar] - Fadaee, S.A.; Haeri, M.A. Classification using link prediction. Neurocomputing
**2019**, 359, 395–407. [Google Scholar] - Engineering; Researchers at Dalian University of Technology Target Engineering. Motifs in Big Networks: Methods and Applications. J. Eng.
**2020**. [Google Scholar] [CrossRef] - Huang, Z. Link prediction based on graph topology: The predictive value of generalized clustering coefficient. SSRN Electron. J.
**2010**, 1634014. [Google Scholar] [CrossRef][Green Version] - Costantino, G.; Maiti, R.R.; Martinelli, F.; Santi, P. LoSeRO: A Locality Sensitive Routing Protocol in Opportunistic Networks with Contact Profiles. IEEE Trans. Mob. Comput.
**2020**, 19, 2392–2408. [Google Scholar] - Keranen, A. Opportunistic Network Environment Simulator; Special Assignment Report; Department of Communications and Networking: Espoo, Finland, 2008.

**Figure 1.**The possible interactions between nodes and communities in an opportunistic social network.

**Figure 2.**A more complex interaction hierarchy between two entities in an opportunistic social network. (

**a**) Two entities that both contain two nodes; (

**b**) Two entities containing two nodes and three nodes; (

**c**) Two entities that each contain three nodes; (

**d**) Two entities that each contain three nodes.

Parameter | Value |
---|---|

Simulation area Simulation time | 4500 × 3400 m^{2}1~6 h |

Size of data packet | 200 KB~1 M |

Transmission speed | 256 Kbps |

Maximum transmission distance | 10 m |

Transmission interval | 25–35 s |

Node movement speed | 0.5~2 m/s |

Transmission mode | Broadcast |

Node initial energy | 100 J |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Fang, Z.; Chang, L.; Luo, J.; Wu, J. A Data Transmission Algorithm Based on Triangle Link Structure Prediction in Opportunistic Social Networks. *Electronics* **2021**, *10*, 1128.
https://doi.org/10.3390/electronics10091128

**AMA Style**

Fang Z, Chang L, Luo J, Wu J. A Data Transmission Algorithm Based on Triangle Link Structure Prediction in Opportunistic Social Networks. *Electronics*. 2021; 10(9):1128.
https://doi.org/10.3390/electronics10091128

**Chicago/Turabian Style**

Fang, Zhiyuan, Liu Chang, Jingwen Luo, and Jia Wu. 2021. "A Data Transmission Algorithm Based on Triangle Link Structure Prediction in Opportunistic Social Networks" *Electronics* 10, no. 9: 1128.
https://doi.org/10.3390/electronics10091128