The transportation infrastructure of the future will be based on autonomous vehicles. When it comes to transportation, both emerging and established nations are keen on perfecting systems based on autonomous vehicles. Transportation authorities in the United States report that driver error accounts for over 60% of all accidents each year. Almost everywhere in the world is the same. Since the idea of self-driving cars involves a fusion of hardware and software. Despite the rapid expansion of the software business and the widespread adoption of cutting-edge technologies like AI, ML, Data Science, Big Data, etc. However, the identification of natural disasters and the exchange of data between vehicles present the greatest hurdle to the development of autonomous vehicles. The suggested study primarily focused on data cleansing from the cars, allowing for seamless interaction amongst autonomous vehicles. This study's overarching goal is to look at creating a novel kind of Support Vector Machine kernel specifically for P2P networks. To meet the kernel constraints of Mercer's theorem, a newly proposed W-SVM (Weighted-SVM) kernel was produced by using an appropriately converted weight vector derived through hybrid optimization. It would be spectacular to combine the Grey Wolf Optimizer (GWO) with the Elephant Herding Optimization (EHO) for hybridization, thanks to the former's strengths and the latter's talents. Combining the GWO algorithm with the EHO algorithm increases its convergence speed, as well as its exploitation and exploration performances. Therefore, a new hybrid optimization approach is proposed in this study for selecting weights in SVM optimally. When compared to other machine learning methods, the suggested model is shown to be superior in its ability to handle such issues and to produce optimal solutions.