Clustering is an efficient method for improving the communication performance of Vehicular Ad hoc NETworks (VANETs) that adopt Vehicle to Vehicle (V2V) communications. However, how to maximize the cluster stability while accounting for the high mobility of vehicles remains a challenging problem. In this project propose the similarity function of the Affinity Propagation (AP) clustering algorithm by introducing communication related parameters, so the vehicles with low relative mobility and good communication performance can easily be selected as cluster heads. Then, by formally defining three scaling functions, a weighted mechanism is designed to quantitatively assess the effect on the cluster stability when a vehicle joins it. Base on them, from the perspective of global balance, a new AP clustering algorithm for the whole clustering process is proposed. To ensure the validity of simulations, we use the vehicular mobility data generated on the realistic map of Cologne, Germany, and perform a series of simulations for eleven metrics commonly adopted in similar works. The results show that our proposed algorithm performs better than other algorithms in terms of the cluster stability, and it also effectively improves throughput and reduces packet loss rate of VANETs over the classical APROVE algorithm and the NMDP-APC algorithm.