## 1 Introduction  
The main goal of vehicular ad hoc network (VANET) is to provide safety-related services for vehicles. Vehicles on the road periodically exchange information such as location, speed and so on, so that vehicles can perceive the surrounding traffic state, effectively improving traffic safety and travel efficiency. VANET can also provide infotainment services to make passenger journeys more enjoyable. Vehicular ad hoc networks have some different characteristics from other mobile ad hoc networks, such as the high mobility of vehicles and frequent changes of topology, which pose challenges to the design of packet routing protocols [1; 2; 3; 4; 5]. Topology-based routing protocols and position-based routing protocols are common routing protocols in VANET [6]. Topology-based routing protocols [7] use the network topology to design routing protocols, in which each node needs to adjust and maintain its own routing table according to the dynamic changes of the network topology. Topology-based routing protocols can be divided into proactive routing protocols and reactive routing protocols according to the different ways of establishing routing tables. Proactive routing protocols, such as DSDV [8] and OLSR [9], are also called table-driven routing protocols, in which each node uses a periodic route broadcast to exchange routing information and maintain its routing table [10]. The delay of this routing protocol is small, but the protocol needs a large number of broadcast route control messages, which has a large overhead. In addition, the dynamic change of vehicle speed and location leads to the instability of the routing table. Reactive routing protocols, also known as on-demand routing protocols,such as AODV [11] and DSR [12], do not generate routes in advance, but establish routes when the source node has a message to send. In the position-based routing protocol [13; 14; 15], each node is equipped with a Global Positioning System (GPS) or Beidou positioning system, which can easily obtain the position information of the node. Each node can achieve end-to-end routing to the target node through its own position, the position of the target node, and the position of the neighbor node. Each node does not need to periodically exchange information to maintain the routing table, so the position-based routing protocol has a lower network load compared with the topology-based routing protocol. Position-based routing protocols often use a greedy mechanism to forward data packets, such as a GPSR protocol [16], and each node always tries to forward data packets to the nearest neighbor node from the target node. However, there are problems when used in urban environments, such as the impact of building obstacles on the signal, routing loops and wrong directions. In order to alleviate these problems, a geographical source routing (GSR) protocol [17] is proposed. In this protocol, the source node chooses Dijkstra's shortest path algorithm to calculate the shortest path to the destination node, but the protocol does not consider the network connectivity of vehicles in the road. For this reason, many connectivity-aware routing protocols have been proposed [6; 10; 17; 18]. BETA [10] is a VANET routing protocol that uses periodical beacons among vehicles instead of control packets to realize traffic awareness, and reduces the network overhead. In [19], the vehicle density is used to evaluate the network connectivity quality of the street segment, and implicitly assumes that the vehicle density of the street segment is uniformly distributed. In [18], SDCR is a connectivity-aware routing protocol, which calculates the network connectivity of the street segment using both the vehicle number and vehicle distribution of the street segment, and improves the routing performance of VANET. The network connectivity quality of a street segment is related to several factors, such as the density, speed and mobility model of vehicles.