# Data Collection Based on Opportunistic Node Connections in Wireless Sensor Networks
## 4 Data Collection Scheme Based on Opportunistic Node Connections
### Initialization  
To start a data collection period, the mobile sink can launch a data collection task anywhere in network at any time by broadcasting a tag message (including the duration for this data collection and the SID of the sink) by a long radio range \(R_{l}\), and then it should keep stationary until accomplish this data collection task. Therefore, all nodes under this radio range \(R_{l}\) could receive this tag message. On receiving a tag message, by obtaining the duration for this data collection included in this message, a node can calculate its whole working time (according to its own working-sleeping scheduling) and its status transition (from the working status to the sleeping status, or vice versa) frequency during this data collection period, which will be used to construct the OCRG in further. For a node in current data collection scope, the method of Received Signal Strength Indication (RSSI) is used to estimate its distance to the mobile sink, the value of which is used to calculate its Expected Optimal Hops (EOH) (Definition 1) according to Lemma 1. The EOH of a node will be  
Figure 2: The asynchronous working–sleeping cycle strategy for sensor nodes: 0 for the sleeping status and 1 for the working status. employed to select proper forwarders to minimize the overall energy consumption when forwarding the probe message to the mobile sink. In order to facilitate the sleeping node to participate in data collection when it wakes up, the mobile sink can choose to re-broadcast the tag message randomly, and in this case, the nodes that have received the same tag message will not deal with it again. **Definition 1**. : _Expected Optimal Hops (EOH). The Expected Optimal Hops denote the number of hops it takes to forward a probe message from any node to the mobile sink with the minimized energy consumption._  
It should be noted that EOH is different from the shortest path, according to the energy model, the energy consumption for a node to transfer data to the mobile sink is not linearly related to the length of the data transmission path. **Lemma 1**. : _For any node \(v_{i}\) in a data collection scope, its EOH satisfies:_  
\[EOH_{v_{i}}=\sqrt{\frac{\varepsilon_{amp}}{2E_{elce}}}d_{(v_{i},v_{sink})} \tag{3}\]  
_where \(d_{(vi,v_{sink})}\) is the distance between node \(v_{i}\) and the mobile sink._  
Proof of Lemma 1.: Assuming that there is \(B\)-bit data from node \(v_{i}\) should be forwarded to the mobile sink \(v_{sink}\) along the path (\(v_{i}\), \(v_{sink}\), \(k\)), where \(k\) is the hops on the path and satisfies \(1\leq k\leq\text{N}-1\). To unify the path representation, \(v_{sink}\) is represented by \(v_{i+k}\) in the next proof process, from which it means that it needs \(k\) hops to forward a probe message from \(v_{i}\) to \(v_{sink}\). Then, the energy consumption function with respect to \(k\) for this forwarding can be calculated as follows:  
\[\begin{array}{ll}C_{v_{i}}(k)&=\sum\limits_{j=0}^{k-1}\left(E_{T}+E_{R}\right) \\ &=\sum\limits_{j=0}^{k-1}\left\{\left[E_{elce}+\varepsilon_{  
\[\frac{\partial C_{v_{i}}^{\min}}{\partial k}=2E_{dec}B-\frac{\varepsilon_{amp}d_{(v _{i},v_{i+k})}^{2}B}{k^{2}} \tag{8}\]  
Let \(\widehat{\alpha}_{v_{i}}^{\min}/\Delta k\) equal to 0, we can get a value of \(k\).