## 3 Intelligent Cluster-Based Routing Approach
### Cluster Formation
In a real-world context, variations in speed would be observed, but our approach accommodates these fluctuations by considering the relative speed, thus maintaining an efficient and reliable communication architecture. Furthermore, the speed of each vehicular node is monitored to enhance content delivery efficiency. If a vehicle's speed falls below a certain \(V_{cl}^{val}\), the threshold is permanently associated with the RSU. After verifying the connectivity parameters within the cluster, our system identifies and flags malicious nodes that exhibit suspicious behavior. The selection of malicious nodes is achieved through a deep learning process, significantly enhancing the efficiency of learning and detection, as detailed in Algorithm 2. We employ logistic regression, a binary classification algorithm, and ANN, a supervised deep learning technique, to identify black holes or malicious nodes. A precise and accurate model is cultivated using backpropagation, a method for minimizing error by reducing the cost function. Nodesidentified as abnormal or malicious are subsequently excluded or rejected, while secure or normal nodes are integrated into the cluster. A three-layered deep learning model is deployed to detect and classify malicious attacks within the proposed system. Artificial neurons and successive layers process the input data, ultimately evaluating architectural values to pinpoint black holes or malicious or counterfeit nodes. Training the deep learning network hinges on detecting malicious attacks based on parameters such as black hole attack intensity, packet drop ratio, data content, timestamps, packet rates, and the distance between nodes and RSU in the network. This architectural approach repetitively uses 25, 50, 75, and 100 nodes to detect malicious nodes with black hole attacks. Once malicious nodes are identified, communication paths are determined using a modified AODV-based routing table and updated following the provided AODV architecture, as expounded in Algorithm 2, detailing the deep learning model for malicious node detection. ```
Input:\(P\) as properties of \(v\), \(N_{type}\) for algorithm, \(N_{k}\) for Neural network \(\mathit{kernel}\) function, \(\mathit{ML}_{\mathit{Illeration}}\), \(\mathit{ML}_{\mathit{Neurons}}^{\mathit{Quantity}}\), \(\mathit{data}-\mathit{Division}(25,50,75,100)\), \(\mathit{C}_{N}^{\mathit{VN}}\) is current Node from all \(V\)Ns, Output:\(\mathit{Blackhole}\) detection and \(\mathit{transformation}\)
```
**STEPS:**
``` TRAINING MODEL OF MACHINE LEARNING \(P_{\mathit{initial}}\)\(\leftarrow\) Algorithm 2 \(\mathit{kernel}_{\mathit{Routing}}^{\mathit{ML}}()\) \(\leftarrow\) (initialize) \(\mathit{Initialize}\) \(\leftarrow\) \(\mathit{ML}



communication with all RSUs within their operational range. To achieve robust and stable cluster formation, we employ four critical conditions. These conditions consider the relative change in speed (denoted as \(\mathrm{V_{cl}^{val}}\)), the distance (D) covered by the vehicle during the timestamp, and the number of neighboring vehicles within the range of cluster nodes. The distance between an RSU and a new vehicular node is computed upon entering the system. According to Algorithm 1, the vehicular node is affiliated with the RSU if this distance is below a certain threshold. This continual process involves connecting and influencing vehicles and ensures a steady data flow and an efficient, reliable communication framework. It is important to note that we assume all vehicles move in the same direction. In a real-world context, variations in speed would be observed, but our approach accommodates these fluctuations by considering the relative speed, thus maintaining an efficient and reliable communication architecture. Furthermore, the speed of each vehicular node is monitored to enhance content delivery efficiency. If a vehicle's speed falls below a certain \(\mathrm{V_{cl}^{vel}}\), the threshold is permanently associated with the RSU.