# Smart Handoff Technique for Internet of Vehicles Communication using Dynamic Edge-Backup Node
## 3 Proposed Methodology
### Algorithm  
Algorithm 1 of the proposed methodology works through the following steps: A list of Candidate backup mobile edge-nodes will be created on the basis of storage capacity, communication range, and energy. If a backup mobile edge-node has gone away from its cluster (took another intersection), then it sends a message to the cluster head prior to its movement to provide an alert to start new election process for new backup node. The cluster head will select another high scoring backup node from the candidate list. At the time when handoff is not performing, after the time span of one minute, the backup mobile edge-node sends a hello message. Location is improved and the list of BS is handled and maintained. Associate BS1 and BS2, which are as of late framed and set up close to the cluster head. For physical handoff, send a physical affirmation of handoff to the cluster's head ```
0:\(\text{V}_{\text{d}}1\) = {V\({}_{11}\), V\({}_{12}\), V\({}_{13}\),..., V\({}_{1n}\)}// groups of Vehicles
0:\(\text{H}_{\text{d1}}\) = {h\({}_{11}\), h\({}_{12}\), h\({}_{13}\),..., h\({}_{1k}\)}// groups of vehicles to be selected as cluster midpoints from set V\({}_{\text{d}}1\)
```

**Algorithm 1** Cluster Formation. ```
0:\(\text{V}_{\text{d}}1\) = {V\({}_{11}\), V\({}_{12}\), V\({}_{13}\),..., V\({}_{1n}\)}// groups of Vehicles
0:\(\text{H}_{\text{d1}}\) = {h\({}_{11}\), h\({}_{12}\), h\({}_{13}\),..., h\({}_{1k}\)}// groups of vehicles to be selected as cluster midpoints from set V\({}_{\text{d}}1\)
```

**Algorithm 2** Cluster Formation. ```
0:\(\text{V}_{\text{d}}1\) = {V\({}_{11}\), V\({}_{12}\), V\({}_{13}\),..., V\({}_{1n}\)}// groups of Vehicles
0:\(\text{H}_{\text{d1}}\) = {h\({}_{11}\), h\({}_{12}\), h\({}_{13}\),..., h\({}_{1k}\)}// groups of vehicles to be selected as cluster midpoints from set V\({}_{\text{d}}1\)
```

**Algorithm 3** Cluster Formation. ```
0:\(\text{V}_{\text{d}}1\) = {V\({}_{11}\), V\({}_{12}\), V\({}_{13}\),..., V\({}_{1n}\)}// groups of Vehicles
0:\(\text{H}_{\text{d1}}\) = {h\({}_{11}\), h\({}_{12}\), h\({}_{13}\),..., h\({}_{1k}\)}// groups of vehicles to be selected as cluster midpoints from set V\({}_{\text{d}}1\)
```

**Algorithm 4** Cluster Formation. Due to the complex nature of a road network with vehicles frequently joining and leaving the network (like an urban network), this challenge of dynamic topology that exists with vehicular communication makes the connection link unstable and there is high possibility of the link breaking down [34]. For this reason, our proposed DEBCK was introduced to overcome this issue as the dynamic nature inherently involved with it in proactively forming the backup cluster node that will take over the lead whenever a breakdown with the topology has occurred, due to vehicles' redirections. Hence, the periodic info exchanged along with direction each time will be calculated to form a decision in deciding on the backup node so that can avoid such a situation. As BS1 is more remote BS along these lines, separate from it and make another connection with BS3 because of its closest area. Set up a physical connection with new BS and begin refreshing the list of nodes more than once. When handoff is not playing out, the location is refreshed through the backup mobile edge-node by sending a hello message within range of a 30-meter range BS. At that point, the adjacent BS gets a route request (RREQ) message through the backup mobile edge-node and send route reply (RREP) messages to the node. The separation of accessible BS is determined through the backup mobile edge-node and spares them in its list. The packet loss ratio is reduced by BS which is closest and has a far stronger signal capacity. When the connection between the old BS and cluster head detaches, the productive communication between the backup mobile edge-node and the devices builds up to increase steadily and ceaselessly on the network. It reduces the packet loss rate and low handoff aggravation is accomplished. Finally, cluster head sets up a connection with new BS.