## 4 Model
### Vehicle Cluster Model and Algorithm  
**Definition 1**. : _Stability of vehicle clusters. Typically, the stability of a cluster is measured by the keeping time of the cluster. The keeping time of the cluster refers to the time elapsed from the moment when the cluster is established until a CM exists in the cluster and the distance between this CM and the CH is greater than the DSRC communication radius._  
When performing vehicle clustering, we have to consider the stability of the cluster. A stable vehicle cluster can reduce the risk of communication interruptions due to cluster dissolution. In addition, the more stable the vehicle cluster is, the longer the interval for reestablishing the cluster is required, thereby reducing the time and resource overhead (e.g., communication resources, computing device resources, etc.) required for rebuilding the cluster [18]. The number of CMs included in a cluster should also be reasonably controlled, because the communication data of the CM needs to be forwarded through the CH, and the communication capability of the CH is limited. In this paper, the number of CMs in a single cluster must not exceed \(N\)[15]. Reasonable control of the number of clusters is conducive to saving communication resources, reducing the occupation of the cellular network bandwidth, and can also affect the number of forwarding hops when CH and RSU perform multi-hop transmissions to a certain extent. Generally, as the number of clusters increases, the number of forwarding hops will also increase slightly, resulting in more delay [19]. Table 2 is the explanation of the mathematical symbols used in the paper, and these symbols will also be explained in the text when they appear. Figure 2: Basic operation logic of the three core algorithms in CTDHR. Based on the above considerations, we were inspired by the idea of the hierarchical clustering algorithm and designed a vehicle clustering method that satisfies the above conditions. Hierarchical clustering is a bottom-up clustering method. It first initializes a class for each element. Then, we continue to merge the two closest clusters until only one class remains. Finally, the hierarchical clustering algorithm will obtain a clustering tree, and then select the appropriate number of classes from this clustering tree [30]. We first define some symbols to facilitate the following description. We use \(G(\mathcal{V},\mathcal{E})\) to denote the topological map composed of CH and RSU and use \(\mathcal{V}=\{a_{1},a_{2},\ldots,a_{M},RSU\}\) to denote the set composed of CH and RSU, where \(a_{j},i\in\{1,\ldots,M\}\) represents the CH of the \(i\)-th cluster and CH is a vehicle entity that includes attributes, such as speed, location, packet buffer, and data generation rate. \(\mathcal{E}=\{\ldots,e(i,j),\ldots,e(k,RSU),\ldots\}\) represents the set of edges in the topology graph, and \(e(i,j)\) represents the edge from \(a_{i}\) to \(a_{j}\). \(\mathcal{C}=\{c_{1},c_{2},\ldots,c_{M}\}\) is the set of clusters, where \(c_{i},i\in\{1,\ldots,M\}\) represents the \(i\)-th cluster. Different from using Euclidean distance in hierarchical clustering to measure whether two clusters can be merged, in the clustering algorithm of this paper, the two clusters with the largest value of \(D^{cluster}_{ij}\) will be merged. \(D^{cluster}_{ij}\) is the weighted sum of \(\Upsilon_{ij}\) and \((R-d^{cluster}_{ij})^{-1}\), \(Y_{ij}\) refers to the estimated remaining time of \(c_{i}\) and \(c_{j}\) within the DSRC communication range, \(R\) refers to the DSRC communication radius, and \(d^{cluster}_{ij}\) refers to the