# Data Collection Based on Opportunistic Node Connections in Wireless Sensor Networks
## 4 Data Collection Scheme Based on Opportunistic Node Connections
### Opportunistic Connection Random Graph Construction  
After receiving these probe messages, the mobile sink constructs an OCRG (Definition 2) by analyzing the included source information to reflect the opportunistic node connections in this data collection scope. **Definition 2**. : _Opportunistic Connection Random Graph (OCRG). The OCRG is constructed based on the intermittent communication caused by asynchronous working-sleeping cycle strategy of nodes, which can be analyzed from all the source information, to reflect the opportunistic node connections in the data collection scope, denoted as G(V, E, P\({}_{e}\))._  
In an OCRG, V denotes a set of all message sources, E denotes a set of all opportunistic connections between any two adjacent nodes in set V, and \(P_{e}\) denotes the link connectivity between any two adjacent nodes in set V.  
For sake of exposition, the link connectivity \(P_{e}\) between any two adjacent nodes \(v_{i}\) and \(v_{j}\) is denoted as \(P_{v_{2}v_{j}}\). There are two factors affect the value of \(P_{v_{2}v_{j}}\), of which the first one is the whole working time of nodes \(v_{i}\) and \(v_{j}\), the longer the nodes' whole working time, the more likely they can communicate with each other. In addition, the second one is the status transition frequencies of nodes \(v_{i}\) and \(v_{j}\), which can be explained by that, under the same duration for a data collection, sensor nodes with different status transition frequencies may produce the same whole working time, but nodes with higher status transition frequencies contribute more to improve the link connectivity. This phenomenon can be illustrated in Figure 4, in which the duration for a data collection for the mobile sink is 12 min, and the working-sleeping cycle for node \(v_{1}\) and \(v_{2}\) is 3 min and 8 min, respectively, so both of them work 8 min during this process, but the status transition frequency for node \(v_{1}\) is about 2.3 times that of node \(v_{2}\). Based on the analysis above, the link connectivity (\(P_{v_{2}v_{j}}\)) between any two adjacent nodes \(v_{i}\) and \(v_{j}\) can be calculated as follows:  
\[P_{v_{2}v_{j}}=f_{i}p_{v_{i}}\times f_{j}p_{v_{j}}=\left(\frac{f_{v_{i}}}{f_{ \max}}\times\frac{T_{v_{j}}}{T_{p}}\right)\left(\frac{f_{v_{j}}}{f_{\max}} \times\frac{T_{v_{j}}}{T_{p}}\right) \tag{12}\]  
where \(T_{v_{i}}\) and \(T_{v_{j}}\) is the whole working time of node \(v_{i}\) and \(v_{j}\) in a data collection period \(T_{p}\), respectively, while \(f_{v_{i}}\) and \(f_{v_{j}}\) is the status transition frequencies of node \(v_{i}\) and \(v_{j}\) in this period, respectively. Here \(f_{\max}\) is the max value of the status transition frequency obtained from all the probe messages, and it is used to achieve normalization of the node's status transition frequency. Noted that the mobile sink is always in working status, any of its adjacent node (under its short radio range \(R_{s}\)) that in working status can communicate with it at any time. Hence, for the mobile  
Figure 4: Comparison of the asynchronous working–sleeping cycle strategy for different nodes, where 0 represents the sleeping status and 1 represents the working status. sink and any of its adjacent node \(v_{i}\), their link connectivity (\(P_{v_{i}v_{sink}}\)) can be affected by the whole working time and the status transition frequency of node \(v_{i}\), and accordingly, \(P_{v_{i}v_{sink}}\) can be calculated as follows:  
\[P_{v_{i}v_{sink}}=f_{i}p_{v_{i}}\times P_{v_{sink}}=\frac{f_{v_{i}}}{f_{\max}} \times\frac{T_{v_{i}}}{T_{p}} \tag{13}\]  
By combing Equations (12) and (13), \(P_{e}\) can be described as follows:  
\[P_{e}=\left\{ \begin{array}{ll}\frac{f_{v_{i}}}{f_{\max}}\times\frac{T_{v_{i} }}{T_{p}},&P_{v_{i}v_{sink}}\\ \left(\frac{f_{v_{i}}}{f_{\max}}\times\frac{T_{v_{i}}}{T_{p}}\right)\left( \frac{f_{v_{j}}}{f_{\max}}\times\frac{T_{v_{j}}}{T_{p}}\right),&P_{v_{j}v_{j}} \end{array} \right. \tag{14}\]  
Figure 5 depicts the link connectivity between four node pairs varies by the max status transition frequency of nodes.