## 4 DMRF Protocol
### Network Congestion Detection Method  
**Algorithm 2** is the congestion detection algorithm used in the DMRF protocol. We adopt the similar mechanism as used in [29]. Node buffer utilization and congestion factor are used to predict congestion. The detailed congestion detection description is illustrated in [29]. Congested node will update its own state as **CONG** and feed back this information to its upstream node. If the congested node recovers back to normal state, the information is also fed back to its upstream node. If the **FCS** nodes are all in **CONG** state, then the transmission mode is converted to jumping transmission mode. The detailed congestion detection process is described in **Algorithm 2. **  
```
Data: FCS, occupy factor of the Node and congestion factor[29] Result: Node State. 1 Initialize the FCS. 2 Predict the congestion using the method in [29]. 3 IF Congestion happens Node \(i\) THEN
4 Set the state of Node \(i\) as CONG. 5 IF the state of FCS is CONG or JCONG THEN
6 Set the state of Node \(i\) as JCONG, inform to its upstream node. 7 IF Node \(i\) receives feedback message from Node \(j\) THEN
8 Set the state of Node \(j\) as CONG. 9 IF the state of Node \(i\) converts to normal THEN
10 Set the state of Node \(i\) as NORMAL, inform to its upstream node. 11 IF Node \(i\) receives the updating message THEN
12 Node \(i\) updates the record in the routing table. ### VOID Region Detection

In the DMRF protocol, the VOID region detection method is similar to FTSPEED [5]. If no other nodes exist in the sensing range \(r\) of the current node, then the state of the current node is set to VOID, and the information is fed back to its upstream node. When the nodes in **FCS** are all in the VOID state, the state of the current node is also set to VOID. The detailed VOID region detection algorithm is shown in **Algorithm 3**. ```
Data: FCS Result: Node state 1 Initialize FCS. 2 IF Node \(i\) has not FCS THEN Node \(i\) send feedback message to its upstream Node. 4 IF the states of all Nodes in FCS are VOID state THEN Set the state of Node \(i\) VOID. 6 IF Node \(i\) receives feedback message from Node \(j\) THEN Set the state of Node \(j\) VOID. ```
**Algorithm 3** Void region detection algorithm

### The Jumping Transmission and Routing Selection

#### 4.4.1 Jumping transmission

Once node failure, network congestion or VOID region occurs, the transmission mode will switch to jumping transmission mode. The node chooses the next hop node according to jumping probability. Once a jumping transmission fails, each node will re-calculate the corresponding jumping probabilities. Therefore, in the earlier stages of the jumping transmission, transmission failure may occur, but as the transmission proceeds, the transmission failure probability will be reduced greatly. At last each transmission can succeed. The jumping transmission flow chart is shown in Figure 4.

(1) Jumping probability adjustment when jumping transmission failure

If node \(i\) uses jumping transmission and does not receive any reply from the next hop node in a specified time interval, then the current jumping transmission is considered as failure. \(T_{t}\left(t=1,2,...m\right)\) denotes the number of transmissions from the current node to each subsequent node \(t\) in **FCS**. \(S_{{}_{t}}\) represents the number of successful transmissions. Accordingly the successful transmission ratio is \(\mathit{Suc}_{{}_{t}}=S_{{}_{t}}/\ T_{{}_{t}}\left(t=1,2,3,...m\right).\) Therefore, the jumping probability from the current node to node \(t\) can be calculated as

\[p_{{}_{t}}=\frac{\mathit{Suc}_{{}_{t}}}{\mathop{\mathbf{\hat{d}}}\limits_{{}_{l }}^{m}\mathit{Suc}_{{}_{t}}}(t=1,2,3,...m) \tag{1}\]

Once a transmission error occurs, the successful transmission ratio is adjusted as \(\mathit{Suc}_{{}_{t}}^{\prime}=\left(S_{{}_{t}}\ -1\right)/\ T_{{}_{t}}(t=1,2,3,...m).\) Corresponding to the change in the successful transmission ratio, the jumping probability will be recalculated using Equation (1).