## 3 Content Acquisition Process and Caching Algorithm Optimization
### Content Acquisition Process
#### 3.2.2. Caching optimization for number k of content chunks  
In our strategy, case 1 and case 1 both cache content at relay vehicles. The probability that the relay vehicles can meet the request vehicle is 1 in case 2, which can be regarded as the particular case of case 3 with a prediction probability of 1. So, our paper only discusses the caching optimization of case 3, whereby RSUs averagely divide content into \(k\) chunks and cache them at \(k\) vehicles. If the value of \(k\) increases, then the size of content chunks cached at a vehicle decreases, and the success probability of content chunks transmission increases. However, the probability of meeting between the request vehicle and all of those \(k\) vehicles decreases. On the contrary, if the value of \(k\) decreases, the probability of meeting between the request vehicle and all of those \(k\) vehicles increases, but the size of content chunks cached at a vehicle increases and the success probability of content chunks transmission decreases. So, our strategy optimizes the number \(k\) of content chunks to maximum the success probability of content transmission from \(k\) vehicles in a cluster to the request vehicle. Assuming that \(R_{m}\) needs to cache content chunks at multiple vehicles in cluster \(C_{m,i+1}\) for vehicle \(V_{x}\) on lane \(i\), \(R_{m}\) chooses vehicles with the top \(k\) prediction probability to cache \(k\) content chunks. Every content chunk has the same size of \(\frac{W}{k}\), and the prediction probability of those \(k\) vehicles constitutes the set \(\{P_{i+1,1}^{pre},P_{i+1,2}^{pre},\ldots,P_{i+1,k}^{pre}\}\). Assuming that the speed of two vehicles on the opposite lanes are \(s_{i}^{x}\) and \(s_{i+1}^{y}\), and the average transmission rate is \(V^{a}\) during the process of the two vehicles meeting, the condition of success content chunk transmission is \(\frac{2^{x}\cdot V^{a}}{s_{i}^{x}+s_{i+1}^{y}}\geq\frac{W}{k}\) and the feasible region is \(\text{G0}=\{(s_{i}^{x},s_{i+1}^{y})\big{|}s_{i}^{x}+s_{i+1}^{y}\leq\frac{2^{x }\cdot V^{a}k}{W}\}\). Figure 6: Intersection model. During the meeting between \(C_{m,i+1}\) and the request vehicle, the probability that all of those \(k\) vehicles successfully transfer content chunks to the request vehicle is as follows:  
\[P_{i+1}^{trans}(k)=[\iint_{C0}f(s_{i}^{x},s_{i+1}^{y})d\sigma]^{k} \tag{8}\]  
The success probability of content transmission from cluster \(C_{m,i+1}\) to request the vehicle is as follows:  
\[P_{i+1}^{suc}(k)=P_{i+1}^{trans}(k)\cdot\prod_{j=1}^{k}P_{i+1,j}^{pre} \tag{9}\]  
Our strategy maximizes the success probability of content transmission by optimizing the number of content chunks, and the optimization is formulated as follows:  
\[\underset{k}{\text{max}} P_{i+1}^{suc}(k)=P_{i+1}^{trans}(k)\cdot\prod_{j=1}^{k}P_{i+1,j}^{ pre} \tag{10}\] \[s.t. 1\leq k\leq\min\quad\{NV,C_{i+1}^{num}\}\]  
where, in case \(\text{\textcircled{N}}\)\(NV=H_{x}\), \(H_{x}\) denotes the number of vehicles that are a one-hop distance away from \(V_{x}\), and in case \(\text{\textcircled{S}}\), \(NV=C_{i+1}^{num}\), \(C_{i+1}^{num}\) denotes the number of vehicles in \(C_{m,i+1}\). By optimizing the number of content chunks, \(R_{m}\) maximizes the success probability of content transmission from the cluster to the request vehicle. The process of \(R_{m}\) proactively caches content chunks at multiple vehicles in a cluster, as shown in Algorithm 2.