# UAV-Assisted Caching Strategy Based on Content Cache Pricing in Vehicular Networks
## 4 RSU Caching Strategy Considering Content Cache Pricing
### Stackelberg Game for Joint Pricing and Cache Decision Optimization
#### 4.1.1 Utility Function  
The total utility \(U^{MNO}\) of the NO is determined by the benefit \(W^{MNO}\) obtained from the vehicle user and the average delay \(D^{ave}\) of content delivery. The utility of the CP consists of the rent obtained from the NO and the benefit obtained from the vehicle user. Different caching decisions and vehicle request locations yield different utilities; this section defines the utility functions for CP and NO. Suppose that a vehicle drives at a uniform speed \(V_{m}\) on a roadway covered by \(R_{m}\). If the vehicle user has complete access to the content through \(R_{m}\) only, it must have at least a distance of length \(K_{m}\) to drive within the coverage of \(R_{m}\); \(K_{m}\leq L\), \(K_{m}\) is denoted as  
\[K_{m}=\frac{S}{R}\cdot V_{m} \tag{9}\]  
If the vehicle user obtains the content only through \(R_{m}\), it needs to send the request within the first \(L-K_{m}\) distance after entering the \(R_{m}\) section. Since the time when a vehicle user sends a request obeys a uniform distribution, the probability that any vehicle user can obtain the content \(f_{i}\) completely from \(R_{m}\) is  
\[P_{m}=1-\frac{K_{m}}{L} \tag{10}\]  
Since requests for content are independent, the total utility can be split into the sum of the utilities of all content in the cache. Taking content \(f_{i}\) as an example, when both RSUs cache content \(f_{i}\), i.e., \(y_{l,i}=1\) and \(y_{r,i}=1\), the user of the vehicle requesting \(f_{i}\) must be able to obtain the content completely before driving out of the entire roadway. The benefit \(w^{MNO}_{i,[1,1]}\) and the average request delay obtained by the NO by caching\(f\) are  
\[w^{MNO}_{i,[1,1]}=(N_{l}\cdot P{R_{l,l}}+N_{r}\cdot P{R_{r,i}})\cdot\theta_{1} \cdot b-2a \tag{11}\]  
\[d^{ave}_{i,[1,1]}=\frac{1}{L}\int_{0}^{L}D_{i}(l)dl \tag{12}\]The utility gained by the CP \(u^{CP}_{i,[1,1]}\) is:  
\[u^{CP}_{i,[1,1]}=(N_{l}\cdot PR_{l,i}+N_{r}\cdot PR_{r,i})\cdot(1-\theta_{1})\cdot b +2\cdot a \tag{13}\]  
where \(D_{i}(l)\) represents the transmission delay when the vehicle user requests content \(f_{i}\) after entering the section \(l\) meters, which can be calculated according to the method in Section 3.4. When \(R_{l}\) caches \(f_{i}\) and \(R_{r}\) does not, i.e., \(y_{l,i}=1\) and \(y_{r,i}=0\), the benefits and request delays brought by vehicle users driving in from different directions are different. For the vehicles driving in from the \(R_{l}\) section, only the requests sent within the first \(L-K_{l}\) meters can receive the content through RSU only, otherwise the vehicle users cannot receive the \(f_{i}\) completely when driving out of the \(R_{l}\) section and enter the waiting state until they drive out of the whole section and receive the content from the CP through NO forwarding. Since vehicle users will only send requests within the first section they drive into, vehicles that drive in from the \(R_{r}\) section and request \(f_{i}\) will definitely receive the content. They send the request and enter the wait state until they drive into the \(R_{l}\) section and receive the content from \(R_{l}\).