1 Introduction

Vehicular ad-hoc network (VANET), one of the types of mobile ad-hoc networks [1], designed to build a robust communication between the roadside unit (RSU) and the on-board unit (OBU), provides the capability of data transmission. With the VANET, drivers are able to request contents such as vehicular entertainment services and vehicle information services more conveniently. However, due to the high-speed mobility of vehicles and the high-dynamic of network topology, the transmission delay of content becomes an important issue in VANETs. It is reported that the network coverage of vehicles will reach 100% by 2025 [2], and the number of vehicles on the road will reach 250 million by 2050 [3]. As the number of vehicles increases, a large amount of requested data will be generated, resulting in congestion on the backbone network and increasing the delay of content delivery.

Address-centric mechanism, uploading contents to cloud servers located in backbone networks, is widely used in the content delivery. However, the long transmission between the content servers and the content requesters causes the considerable network latency and additional costs [4]. Thus, these RSUs which are close to content requesters can be applied as the edge caching devices for delivering contents conveniently and rapidly. However, providing contents to moving vehicles (MVs) via RSUs is challenging with the following reasons. On one hand, due to the limitation of storage capacity, RSU is unable to cache all contents. If the contents requested by MVs are not cached in RSU, the high transmission delay will be caused by downloading contents from cloud servers. On the other hand, frequent changes of popular contents on the network bring about periodically update of caching strategies, resulting in economic losses.

Fortunately, with the rapid development of vehicle technologies, vehicles with caching capacities can assist content delivery. Moreover, drivers tend to park their vehicles on the side of the road [5], and the on-board battery can be used as a power supply for the OBU without using up energy [6]. Thus, parking vehicles (PVs) are capable of being assistants of RSUs to provide their cached contents and idle storage spaces [7]. Recently, a number of works have used PVs to improve the performance of content delivery [8,9,10]. Specifically, PVs are used as small-scale content centers to collect and disseminate data [8]. Moreover, the network connectivity and storage capacity of RSU can be effectively improved by using PVs as relay nodes [9] and storage nodes [9]. However, few of them focus on the reputation mechanism and incentive mechanism of PVs. PVs assisted content delivery in VANETs is challenging with the following aspects: 1) The insecurity of PVs: the validity and security of contents cannot be guaranteed due to the non-authentication of PVs. Therefore, the dynamic reputation model for PVs should be efficiently designed to improve the security of content delivery. 2) The selfishness of PVs: PVs are reluctant to contribute their idle resources without incentives. Selfishness and rationalism make them refuse to participate in content delivery. Therefore, the incentive mechanism to facilitate the cooperation between PVs and RSUs should be further analyzed.

To address the above mentioned challenges, in this paper, we propose a novel content delivery mechanism among MVs, RSUs, and PVs. Specifically, in order to filter out the malicious PVs and improve the security of content delivery, the reputation evaluation model is first introduced to manage the behavior of PVs. Next, the reverse auction game between the RSU and the PVs is developed, where the optimal bidding strategies of PVs are analyzed to obtain high utility with low energy consumption. The optimal PV is determined by the RSU to deliver content. At last, we model the relationship between MV and RSUs as another auction game to maximize the utility of MV.

To summarize, the main contributions of this paper can be summarized as follows:

  1. 1)

    Reputation Evaluation Model: We develop a reputation model to supervise the behavior of PVs during content delivery. The reputation value is obtained from the historical interaction of the PV, which reflects its honesty. With the reputation model, RSU can prevent the attacks of malicious PVs and guarantee the security by cooperating with honest PVs.

  2. 2)

    Incentive Mechanism: We propose a two-tier auction mechanism to improve the efficiency of content delivery. We model the relationship between RSU and PVs as the first-tier auction game. Different from the traditional content delivery mechanism, PVs cooperate with RSU to obtain benefits by contributing their cached content and idle resources. Then, the relationship between MV and RSUs is modeled as the second-tier auction game to select the optimal RSU for delivering contents.

  3. 3)

    Performance Effectiveness: We validate the proposed cooperative content delivery mechanism by extensive simulations. Simulation results show that, compared with traditional mechanisms, the content delivery mechanism can not only maximize the utility of MVs, RSUs, and PVs, but also isolate malicious PVs, which effectively improves the security of the system.

The remainder of this paper is organized as follows. Section 2 reviews the related work. Section 3 presents the system model. Reverse auction based cooperative content delivery mechanism is described in Section 4. Performance evaluations are shown in Section 5, and Section 6 closes this paper with conclusions.

2 Related work

2.1 Content delivery in VANETs

There have been a number of works focusing on the content delivery. Wang et al. [11] proposed a collaborative content sharing approach. The approach broadcasts popular content to RSUs, and uses the peer-to-peer (P2P) technology to achieve popular content sharing among vehicles. By combining vehicle trajectory prediction and coalition game, Zhou et al. [12] proposed a content distribution scheme in cooperative vehicle networks to improve content distribution efficiency. By exploiting the mobility of vehicles, Yao et al. [13] presented a cooperative content caching scheme based on mobility prediction. Su et al. [14] proposed an edge caching scheme to facilitate timely delivery of the requested content.

Malandrino et al. [15] exploited parking vehicles to extend the service coverage of RSU and improve the efficiency of the content download process. Liu et al. [16] presented the idea of parking vehicle assistance (PVA) to improve connectivity in VANETs and assist moving vehicles in content delivery. Reis et al. [17] used parking vehicles as RSUs to support mobile vehicles in VANETs. Liu et al. [6] proposed a parking-area-assisted routing protocol to facilitate data packet transmission by using parking vehicles as relay nodes.

However, unauthorized and selfish characteristics of parking vehicles have not been fully discussed in most of existing works.

2.2 Reputation scheme in VANETs

Reputation scheme designed for vehicles is important to improve the security and privacy of content delivery. Dhurandher et al. [18] proposed a malicious node detection and isolation algorithm in VANETs. The algorithm utilizes V2V communication to check reputation and plausibility, reducing the dependence on infrastructure. Lee et al. [19] presented a reputation management scheme to isolate poorly behaving nodes and ensure the efficiency of packet delivery. Gyawali et al. [20] proposed a vehicle network behavior detection scheme based on machine learning and reputation to improve the detection accuracy and ensure the reliability of messages. Engoulou et al. [21] proposed a decentralized reputation management system. The system provides a distributed evaluation scheme for vehicles reputation to protect VANETs from the attacks of malicious nodes. Considering the dynamic and diversified attack strategy, Tian et al. [22] proposed an evaluation scheme for quantifying the effectiveness of the reputation management scheme in vehicle network.

In contrast to the above reputation schemes, our work aims to supervise the behavior of PVs and ensure the security of content delivery by considering the content popularity, content size and transmission rate as evaluation parameters of reputation.

3 System model

In this section, the system model includes network model, content model, reputation model and communication model. The illustration of the content delivery in VANETs is shown in Fig. 1.

Fig. 1
figure 1

Framework of content delivery in VANETs

3.1 Network model

In the networks, the set of MVs is denoted by \({\mathcal {K}} = \left \{ {1,2, {\ldots } ,k, {\ldots } ,K} \right \}\). In the road with length D, the arrival process of MVs obeys the Poisson distribution [24], and the distance between two adjacent MVs can be expressed as an exponential distribution with a parameter of 1/λ [23]. Thus, the number of MVs on the road with length D follows the Poisson distribution [25]. The probability that there are m MVs on the road can be expressed as

$$ P[{M_{k}} = m] = {e^{- \lambda D}}\left[ {\frac{{{{(\lambda D)}^{m}}}}{{m!}}} \right]. $$
(1)

Then, the average number of vehicles on the road is E[Mk] = D × λ.

RSUs deployed by mobile network operators are capable of delivering contents to MVs. Let \({\mathcal {I}} = \left \{ {1,2, {\ldots } ,i, {\ldots } ,I} \right \}\) denote the set of RSUs, and \(\left | \mathcal {I} \right |\) is the number of RSUs around the road. Generally, RSUs are placed on the roadside with parking lots nearby. Compared with off-street parking, on-street parking only costs one fifth. Therefore, drivers are inclined to park their vehicles on the street [8]. Let Mi denote the number of vehicles parking around RSU i. For each RSU, we use the set \({\mathcal {J}} {=} \left \{ {1,2, {\ldots } ,j, {\ldots } ,J} \right \}\) to represent the PVs parking around it. Thus, we have \({M_{i}} = \left | \mathcal {J} \right |\) for each RSU.

3.2 Content model

Popular contents related to traffic, weather conditions, and entertainment are indispensable to drivers. The traffic flow may affect the number of content requests. For example, during peak traffic periods, drivers obtain traffic information at short interval and passengers request entertainment content more frequently, resulting in a surge in requests.

Let \({\mathcal {Q}} = \left \{ {1,2, {\ldots } ,q, {\ldots } ,Q} \right \}\) denote the set of contents in the networks, and a copy of all contents can be found in the cloud server. Sq represents the size of content q. The requesting probability of content q can be described by Zipf model [26]. We have

$$ {f_{q}} = \frac{{{{\left( {\frac{1}{{\tau (q)}}} \right)}^{r}}}}{{\sum\limits_{q = 1}^{Q} {{{\left( {\frac{1}{\tau (q)}} \right)}^{r}}} }}. $$
(2)

Here, r is a positive parameter of Zipf distribution, used to regulate the skewness of the popularity. τ(q) is the descending order of accessing times of content q within a period of time.

RSUs can cache a number of popular contents and provide it to MVs with a low transmission delay. Let Di represent the storage capacity of RSU i, and \({X_{i,q}} = \left \{ {{x_{i,1}},{x_{i,2}}, {\ldots } ,{x_{i,Q}}} \right \}\) denotes the set of contents cached in RSU i. Here, xi, q is a binary value. xi, q = 1 means that the content q is cached in RSU i, otherwise xi, q = 0. To ensure that the total size of the contents cached in the RSU does not exceed its caching capacity, we have \(\sum \limits _{q}^{\left | Q \right |} {{S_{q}}{x_{i,q}} \le {D_{i}}}\).

The PVs come from all corners of the city, with different travel routes, personal preferences and hardware conditions, resulting in the diversity of cached contents. Let Di, j indicate the storage capacity of the PV j parking around the RSU i. \({X_{i,j,q}} = \left \{ {{x_{i,j,1}},{x_{i,j,2}}, {\ldots } ,{x_{i,j,Q}}} \right \}\) denotes the set of contents cached on vehicle i. Similarly, \(\sum \limits _{q}^{\left | Q \right |} {{S_{q}}{x_{i,j,q}} \le {D_{i,j}}}\) is the constraint of storage capacity of PV j.

3.3 Reputation model

In order to evaluate the reputation of PVs, it is necessary to predict the parking behavior of PVs. Firstly, the increasing number of PVs supports the RSU with more cooperation options, but it also leads to a surge in the number of unauthorized drivers. Secondly, the number of PVs is affected by various factors and changed widely throughout the day [27]. Fluctuations in seasons, shifts in weekdays and weekends, peak hours of traffic, and the occurrence of hot spots will bring about changes in the number of PVs. Therefore, RSU needs to dynamically evaluate the reputation of PVs. Thirdly, for honest PVs, the increase in reputation value corresponds to the parking time. As the parking time increases, PVs have more opportunities to assist RSU. The more PVs participate in cooperation, the higher reputation they will achieve.

The parking behavior can be predicted based on the parking history [28]. We consider that the parking behavior is similar to the parking history such as yesterday, last week and the same date of the last year. In addition, parking behavior will also be affected by hot spots such as concert, conference, etc. Thus, let Mi, t denote the number of PVs parking around RSU i at time t, which can be calculated by

$$ \begin{array}{r} {M_{i,t}} {=} \tilde \alpha \times f_{t}^{lastyear} {+} \tilde \upbeta \times {\Delta}_{t}^{lastweek} {\times} {\left( {F_{t}^{lastweek}} \right)^{T}}{\kern23pt}\\ + \tilde \gamma \times {\Delta}_{t}^{yesterday} \times {\left( {F_{i}^{yesterday}} \right)^{T}} + \tilde \lambda \times \frac{{{M_{i,t - 1}} - {M_{i,t - 2}}}}{{{{\Delta}_{t}}}},{} \end{array} $$
(3)

where \(\tilde \alpha \), \(\tilde \upbeta \), \(\tilde \gamma \), and \(\tilde \lambda \) are the weighted parameters. \(f_{t}^{lastyear}\) is the number of vehicles parked at time t last year. The vector \(F_{t}^{lastweek} = \left [ {f_{1}^{lastweek},f_{2}^{lastweek},} \right .\) \(\left . { {\ldots } ,f_{7}^{lastweek}} \right ]\) denotes the number of vehicles in the previous week. For example, \(f_{1}^{lastweek}\) represents the number of vehicles parked at time t on last monday. \(F_{i}^{yesterday} = \left [ {f_{1}^{yesterday},f_{2}^{yesterday}, {\ldots } ,f_{24}^{yesterday}} \right ]\) denotes the number of vehicles throughout yesterday. \(f_{1}^{yesterday}\) is the number of vehicles parked in the first hour of yesterday. \({\Delta }_{i}^{lastweek}\) and \({\Delta }_{i}^{yesterday}\) are the vectors of weighting parameters that change the influence of the past on the present. The last part of Eq. 3 is the differential term, which is used to overcome the disturbance caused by hot spots.

Reputation value is a critical determinant for evaluating the honesty and credibility of the PV, and it can be quantified as the degree to which PV has fulfilled its promise. In the initialization, the reputation value of each PV is denoted by Repinit. Then, the reputation value will be updated based on the behavior of the PV. For example, let \(s_{i,j,q}^{*}\) and \(r_{i,j,q}^{*}\) denote the content size and the transmission rate promised by the PV j to RSU i, respectively. If the PV j fulfills its promise or performs better than its promise, the reputation value will rise, otherwise it will fall.

The changes of reputation value can be calculated by

$$ \begin{array}{@{}rcl@{}} {\Delta} {\text{Re}}{{\text{p}}_{i,j}} = {\mu_{{\text{rep}}}}{M_{i,t}}\left[ {{\alpha_{rep}} \times \frac{{{s_{i,j,q}} - s_{i,j,q}^{*}}}{{s_{i,j,q}^{*}}} + {{\upbeta}_{rep}} \times \frac{{{r_{i,j,q}} - r_{i,j,q}^{*}}}{{r_{i,j,q}^{*}}}} \right.\\ + \left. {{I_{req}}\log \left( {1 + {\gamma_{rep}} \times \frac{{{s_{i,j,q}}}}{{S_{q}^{\max }}} + {\eta_{req}} \times \frac{{{r_{i,j,q}}}}{{r_{i,j,q}^{\max }}}} \right)} \right]. \\ \end{array} $$
(4)

Here, μrep, αrep, βrep, γrep and ηreq are the nonnegative adjustable parameters. si, j, q and ri, j, q are the actual values of content size and transmission rate respectively. Equation 4 means that if the transmission quality of the content q does not reach the promised value, the reputation will decrease. Conversely, if the quality of content delivery outperforms the promise value, the reputation will rise. Ireq is a binary variable, where Ireq = 1 if \({s_{i,j,q}} = s_{i,j,q}^{*}\) and \({r_{i,j,q}} = r_{i,j,q}^{*}\). Namely, if the PV keeps its promises during the process of cooperative content delivery, it will also gain a positive reputation.

If Repi, j < Repthre, PV j will be banned. Repthre changed dynamically with content q can be obtained as

$$ {\text{Re}}{{\text{p}}_{thre}} {=} {\delta_{rep}} {+} \alpha_{rep}^{thre}\log \left( {1 {+} \frac{{{S_{q}}}}{{\max \left( {{S_{q}}} \right)}}} \right) + {\upbeta}_{rep}^{thre}\log \left( {1 {+} \frac{{{f_{q}}}}{{\max \left( {{f_{q}}} \right)}}} \right). $$
(5)

Here, δrep is a constant. \(\alpha _{rep}^{thre}\) and \({\upbeta }_{rep}^{thre}\) are the weighted parameters. \({\max \limits } \left (\cdot \right )\) denotes the maximum function within PVs.

3.4 Communication model

The distance between the parking lot and the RSU, as well as the communication capability of the PV, causes the difference of transmission rate between PV and RSU. Let ri, j denote the transmission rate between PV j and RSU i. The transmission rate between MV k and RSU i is denoted by rk, i. Let rcloud denote the transmission rate between RSU and cloud server.

Nakagami-m model is adopted to evaluate the impact of channel fading on the wireless communications [29]. The received power \(\mathrm {P}_{j}\left ({{d_{i,j}}} \right )\) of PV j follows the Gamma distribution, which can be calculated by

$$ {P_{j}}\left( {{d_{i,j}}} \right) = \left\{ {\begin{array}{*{20}{l}} {\sim Gamma\left( {m , \frac{{\widetilde P({d_{i,j}}) \cdot {P_{i}}}}{m}} \right)},&{{d_{i,j}} < {R_{i}}},\\ 0,&{{d_{i,j}} \ge {R_{i}}}, \end{array} } \right. $$
(6)

where m is the factor of channel fading, di, j is the distance between PV j and RSU i. Pi is the transmission power of the RSU i. Ri denotes the coverage of RSU i. \({\widetilde P({d_{i,j}})}\) in Eq. 6 can be described as

$$ \widetilde P({d_{i,j}}) = \frac{{{G_{i}}{G_{j}}{\lambda^{2}}}}{{{{\left( {4\pi } \right)}^{2}}d_{i,j}^{2}L}}, $$
(7)

where Gi and Gj denote the antenna gain of RSU i and PV j, respectively. λ and L represent the electromagnetic and system loss, respectively. Similarly, the received power of RSU i can be expressed as

$$ {P_{i}}\left( {{d_{i,j}}} \right) = \left\{ {\begin{array}{*{20}{l}} {\sim Gamma\left( {m , \frac{{\widetilde P({d_{i,j}}) \cdot {P_{j}}}}{m}} \right)},&{{d_{i,j}} < {R_{j}}},\\ 0,&{{d_{i,j}} \ge {R_{j}}}. \end{array}} \right. $$
(8)

Here, Pj and Rj are the transmission power and the coverage of PV j, respectively.

To guarantee the quality of transmission, RSU i and PV j can communicate with each other only if the conditions \({P_{i}}\left ({{d_{i,j}}} \right ) \ge {P_{i}}^{thre}\) and \({P_{j}}\left ({{d_{i,j}}} \right ) \ge {P_{j}}^{thre}\) are satisfied. \({P_{i}}^{thre}\) and \({P_{j}}^{thre}\) are the minimum receiving power.

4 Analysis of the cooperative content delivery mechanism

In this section, we introduce the proposed cooperative content delivery mechanism from the perspectives of MVs, RSUs and PVs, respectively.

4.1 Auction game between PVs and RSU

In order to deliver the content requested by MV, RSU can obtain content from the cloud server or PVs. During peak traffic periods, the congestion of backbone network leads to a decrease in rcloud, which increases the latency of the delivery process. In this case, the RSU will obtain the content from PVs. However, the PVs is unwilling to cooperate with RSU due to energy consumption and economic costs. Therefore, the auction game between PVs and RSU is formulated to incentivize PVs. The utility of RSU i is defined as

$$ u_{i,j,q}^{RSU} = \text{Re}\text{p}_{i,j}{\Phi} ({s_{i,j,q}},{r_{i,j,q}}) - {p_{i,j,q}}, $$
(9)

where si, j, q and ri, j, q are the size and transmission rate of the content q provided by the PV i to RSU j, respectively. Repi, j is the reputation value of parked vehicle j. Let pi, j, q denote the price paid by RSU i to the PV j. Φ(si, j, q,ri, j, q) is the satisfactory function of RSU i, which is defined by

$$ {\Phi} ({s_{i,j,q}},{r_{i,j,q}}) = \delta - {\alpha_{i,q}}{f_{q}}\left( {\frac{{{S_{q}} - {s_{i,j,q}}}}{{{r_{cloud}}}} + \frac{{{s_{i,j,q}}}}{{{r_{i,j,q}}}}} \right) + {\beta_{i,q}}{f_{q}}{s_{i,j,q}}. $$
(10)

Here, the satisfactory function consists of the time satisfaction \(\frac {{{S_{q}} - {s_{i,j,q}}}}{{{r_{cloud}}}} + \frac {{{s_{i,j,q}}}}{{{r_{i,j,q}}}}\) and the content size satisfaction si, j, q. The evaluation parameters αi, q and βi, q are used to adjust weights. δ is an invariant constant to ensure that the satisfaction function is non-negative.

The utility of PV j can be expressed as

$$ u_{i,j,q}^{PV} = {\varpi_{i,j,q}}({p_{i,j,q}} - {\xi_{i,j,q}}{\theta_{s}}{s_{i,j,q}} - {\xi_{i,j,q}}{\theta_{r}}{r_{i,j,q}}), $$
(11)

where ϖi, j, q is a binary variable. We have ϖi, j, q = 1 if the PV j is selected as the winner in the auction game, otherwise ϖi, j, q = 0. Here, 𝜃s and 𝜃r are the fixed coefficients of the content size and transmission rate, which are common sense to all PVs. ξi, j, q is the cost parameter of the PV j. Moreover, the detailed cost of the PV is the private information and the chips to win the game. PV can clearly understand itself, and the cost parameter of other PVs follows the uniform distribution in \(\left [ {{\xi _{{\min \limits } }},{\xi _{{\max \limits } }}} \right ]\).

To maximize the utility of PV j, the optimization problem can be described as

$$ \begin{array}{@{}rcl@{}} && \max {\mathbb{P}_{i,j}}({p_{i,j,q}} - {\xi_{i,j,q}}{\theta_{s}}{s_{i,j,q}} - {\xi_{i,j,q}}{\theta_{r}}{r_{i,j,q}}) + (1 - {\mathbb{P}_{i,j}}) \cdot 0 \\ & & \text{s.t.} \left\{ \begin{array}{ll} s_{i,j,q}^{\min } \leqslant {s_{i,j,q}} \leqslant {S_{q}}, \hfill \\ r_{i,j,q}^{\min } \leqslant {r_{i,j,q}} \leqslant r_{i,j,q}^{\max }, \hfill \\ u_{i,j,q}^{Pcar} \geqslant 0, \hfill \\ \end{array} \right. \\ \end{array} $$
(12)

where \({\mathbb {P}_{i,j}}\) is the probability that PV j wins the game.

Theorem 1

The optimal bidding strategy of the PV j can be calculated by

$$ \begin{array}{@{}rcl@{}} \left\{ {s_{i,j,q}^{*},r_{i,j,q}^{*}} \right\} = \underset{{s_{i,j,q}},{r_{i,j,q}}}{\arg \max } \!\left\{ {\text{Re}}{{\text{p}}_{i,j}\!\left[ {\delta - {\alpha_{i,q}}{f_{q}}\!\left( {\frac{{{S_{q}} - {s_{i,j,q}}}}{{{r_{cloud}}}}} \right.} \right.} \right.\\ \left. {\left. {\left. {{ + }\frac{{{s_{i,j,q}}}}{{{r_{i,j,q}}}}} \right) + {{\upbeta}_{i,q}}{f_{q}}{s_{i,j,q}}} \right] - {\xi_{i,j,q}}{\theta_{s}}{s_{i,j,q}} - {\xi_{i,j,q}}{\theta_{r}}{r_{i,j,q}}} \right\}. \\ \end{array} $$
(13)

Proof

Refer to Appendix A. □

The PV that maximizes the utility function of RSU will be the winner of the auction. Although \(s_{i,j,q}^{*}\) and \(r_{i,j,q}^{*}\) have been obtained, the optimal bidding price \(p_{i,j,q}^{\text {*}}\) needs to be determined.

Theorem 2

The optimal bidding price of PV j can be obtained by

$$ \begin{array}{l} p_{i,j,q}^{\text{*}} = {\xi_{i,j,q}}{\theta_{s}}s_{i,j,q}^{*} + {\xi_{i,j,q}}{\theta_{r}}r_{i,j,q}^{*}\\ + \frac{{\left( {{\theta_{s}}s_{i,j,q}^{*} + {\theta_{r}}r_{i,j,q}^{*}} \right)}}{N}\left( {\xi_{i,j,q}^{\max } - {\xi_{i,j,q}}} \right). \end{array} $$
(14)

Proof

Refer to Appendix B. □

After receiving the bidding price \(p_{_{i,j,q}}^{*}\), the content size \(s_{i,j,q}^{*}\), and the transmission rate \(r_{i,j,q}^{*}\) of all PVs, RSU i chooses the PV to maximize its utility as the optimal candidate. It can be chosen by

$$ {j^{*}} = \underset{j}{\arg \max } u_{i,j,q}^{RSU}, j \in J. $$
(15)

Then, RSU i obtains the content from PV j. The reputation value will be updated according to the Eq. 4.

After completing the first-tier auction game, the price \(p_{_{i,j,q}}^{*}\) offered by RSU i is applied to encourage PV j to share cached content and compensate for the energy loss of delivering content. As a content requester, MV k can obtain content from different RSUs. Differences in the number of PVs and caching status xi, j, q lead to the differences in the first-tier auction game. \(p_{_{i,j,q}}^{*}\), \(s_{i,j,q}^{*}\), and \(r_{i,j,q}^{*}\) in the first-tier auction game can be regarded as the cost of the RSUs to obtain content q. MV k will obtain higher utility by receiving content from low-cost RSU. Therefore, we model the relationship between RSUs and MV as the second-tier auction game to maximize the utility of MV.

4.2 Auction game between RSUs and MV

There are a number of options for MVs to obtain content from numerous RSUs. The MV k sends auction information to the surrounding RSUs, and chooses the RSU that maximizes its utility to be the winner. RSUs can be divided into two cases. On one hand, if the content q has been cached in the RSU, it can be delivered to the MV directly. On the other hand, if the content q does not cached in the RSU, the RSU will cooperate with PVs to prepare the content or obtain the content from the cloud server.

The utility of the MV k can be expressed as

$$ u_{i,k,q}^{k} = \left\{ {\begin{array}{*{20}{l}} {\delta ' + {\theta_{q}}{S_{q}}{f_{q}} - {p_{i,k,q}},}&{\begin{array}{*{20}{l}} {{\text{if}} {\text{content}} q {\text{is}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{,}}} \end{array}} \\ {\begin{array}{*{20}{l}} {\delta ' + {\theta_{q}}{S_{q}}{f_{q}} - {p_{i,k,q}}} \\ { - {\alpha_{i,k,q}}{t_{i,q}},} \end{array}}&{\begin{array}{*{20}{l}} {{\text{if}} {\text{content}} q {\text{is}} {\text{not}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{.}}} \end{array}} \end{array}} \right. $$
(16)

Here, δ guarantees that the utility function is non-negative. 𝜃q and αi, k, q are the fixed parameters. Let \({t_{i,q}} = \frac {{{S_{q}} - s_{i,{j^{*}},q}^{*}}}{{{r_{cloud}}}} + \frac {{s_{i,{j^{*}},q}^{*}}}{{r_{i,{j^{*}},q}^{*}}}\) denote the time loss caused by RSU obtaining content q from PVs or cloud servers. pi, k, q is the cost paid by MV k to RSU i for obtaining content q.

The utility of the RSU i can be defined as

$$ u_{i,k,q}^{RSU} = \left\{ {\begin{array}{ll} {{p_{i,k,q}} - {\mu_{q}}{S_{q}}{\xi_{i,k,q}},}&{\begin{array}{ll} {{\text{if}} {\text{content}} q {\text{is}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{,}}} \end{array}} \\ \begin{array}{ll} {p_{i,k,q}} - {\mu_{q}}{S_{q}}{\xi_{i,k,q}} \hfill \\ - \left( {{p_{i,{j^{*}},q}} + {p_{cloud,i,q}}} \right), \hfill \\ \end{array} &{\begin{array}{ll} {{\text{if}} {\text{content}} q {\text{is}} {\text{not}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{.}}} \end{array}} \end{array}} \right. $$
(17)

If content q is not cached, \({p_{i,{j^{*}},q}}\) will be the cost for the RSU to obtain the content q from the surrounding PVs. The details can be found in Section 4.1. Moreover, assume that the size of content q delivered by the winning PV is less than Sq. Then, the RSU is supposed to make up the rest of content from the cloud server, resulting in additional costs pcloud, i, q. Let ξi, k, q indicate the cost parameter for the RSU i to deliver content to the MV k.

The maximum utility of MV k can be calculated by

$$ {\varphi_{i,k,q}} = \left\{ {\begin{array}{ll} {\delta ' + {\theta_{q}}{S_{q}}{f_{q}} - {\mu_{q}}{S_{q}}{\xi_{i,k,q}},}&{\begin{array}{ll} {{\text{if}} {\text{content}} q {\text{is}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{,}}} \end{array}} \\ \begin{array}{ll} \delta ' + {\theta_{q}}{S_{q}}{f_{q}} - \left( {{p_{i,{j^{*}},q}} + {p_{cloud,i,q}}} \right) \hfill \\ - {\mu_{q}}{S_{q}}{\xi_{i,k,q}} - {\alpha_{i,k,q}}{t_{i,q}}, \hfill \\ \end{array} &{\begin{array}{*{20}{l}} {{\text{if}} {\text{content}} q {\text{is}} {\text{not}}} \\ {{\text{cached}} {\text{in}} {\text{RSU}} i{\text{.}}} \end{array}} \end{array}} \right. $$
(18)

The RSU i has incomplete information for other RUSs, so it estimates the caching condition of other RSUs with probability \(P_{i^{\prime },q}^{cache}\). Equations 19 and 22 are utilized to solve the optimal bidding price \(p_{i,k,q}^{*}\). In order to win the auction game, RSU determines the appropriate selling price pi, k, q to maximize the utility \(u_{i,k,q}^{k}\) of the MV k and ensures that its utility function satisfies \(u_{i,k,q}^{RSU} > 0\). According to the caching status of RSU i, we discuss the optimal bidding price of the RSU in two cases.

Case 1

Content q is cached in the RSU i.

According to the full probability formula, we have

$$ \begin{aligned} \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}} \right] &= P_{i^{\prime},q}^{cache} \cdot \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}|\mathrm{A}_{i^{\prime},q}^{cache}} \right] \hfill \\ &+ \left( {1 - P_{i^{\prime},q}^{cache}} \right) \cdot \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}|\overline{\mathrm{A}}_{i^{\prime},q}^{cache}} \right] \hfill \\ &= P_{i^{\prime},q}^{cache} \cdot \Pr \left[ {{\xi_{i,k,q}} < {\xi_{i^{\prime},k,q}}} \right] + 1 - P_{i^{\prime},q}^{cache} \hfill \\ &= 1 - P_{i^{\prime},q}^{cache}{\Omega} \left( {{\xi_{i,k,q}}} \right), \hfill \end{aligned} $$
(19)

where \(\mathrm {A}_{i^{\prime },q}^{cache}\) indicates that the content q is cached in RSU \(i^{\prime }\). Otherwise, \(\overline {\mathrm {A}}_{i^{\prime },q}^{cache}\) is used to indicate that the content q is not cached. Let ξi, k, q denote the cost parameter of RSU i. Due to the information asymmetry in the auction mechanism, the RSU estimates that the cost parameters of other RSUs obey the uniform distribution within \(\left [ {\xi _{i,k,q}^{{\min \limits } },\xi _{i,k,q}^{{\max \limits } }} \right ]\). The probability distribution function can be expressed as \({\Omega } \left (\cdot \right )\). The number of RSUs participating in the auction is expressed as I. Therefore, similar to the proof in Appendix B, the optimal price can be calculated by

$$ \begin{array}{l} p_{i,k,q}^{*}{\text{ = }}{\mu_{q}}{S_{q}}{\xi_{i,k,q}}{\text{ + }}{\mu_{q}}{S_{q}}\left[ {F\left( {{\xi_{i,k,q}}} \right)} \right.\\ {{\left. { - {{\left( {1 - P_{i^{\prime},q}^{cache}} \right)}^{I}}\left( {\xi_{i,k,q}^{\max } - \xi_{i,k,q}^{\min }} \right)} \right]} {\left/ {\vphantom {{\left. { - {{\left( {1 - P_{i^{\prime},q}^{cache}} \right)}^{I}}\left( {\xi_{i,k,q}^{\max } - \xi_{i,k,q}^{\min }} \right)} \right]} {G\left( {{\xi_{i,k,q}}} \right)}}} \right.} {G\left( {{\xi_{i,k,q}}} \right)},} \end{array} $$
(20)

where

$$ \left\{ {\begin{array}{*{20}{l}} {F\left( {{\xi_{i,k,q}}} \right) = {{\left( {\frac{{\xi_{i,k,q}^{\max } - \xi_{i,k,q}^{\min } + P_{i^{\prime},q}^{cache} \cdot \xi_{i,k,q}^{\min } - P_{i^{\prime},q}^{cache} \cdot {\xi_{i,k,q}}}}{{\xi_{i,k,q}^{\max } - \xi_{i,k,q}^{\min }}}} \right)}^{I}}},\\ {G\left( {{\xi_{i,k,q}}} \right) = {{\left[ {1 - \frac{{P_{i^{\prime},q}^{cache}\left( {{\xi_{i,k,q}} - \xi_{i,k,q}^{\min }} \right)}}{{\xi_{i,k,q}^{\max } - \xi_{i,k,q}^{\min }}}} \right]}^{I - 1}} \cdot I \cdot P_{i^{\prime},q}^{cache} }. \end{array}} \right. $$
(21)

Case 2

Content q is not cached in the RSU i.

According to the full probability formula, we can have

$$ \begin{aligned} \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}} \right] &= P_{i^{\prime},q}^{cache} \cdot \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}|\mathrm{A}_{i^{\prime},q}^{cache}} \right] \hfill \\ &+ \left( {1 - P_{i^{\prime},q}^{cache}} \right) \cdot \Pr \left[ {{\varphi_{i,k,q}} > {\varphi_{i^{\prime},k,q}}|\overline{\mathrm{A}}_{i^{\prime},q}^{cache}} \right] \\ &= 0 {\text{ + }} \left( {1 - P_{i^{\prime},q}^{cache}} \right) \cdot \Pr \left( {{{\xi '}_{i,k,q}} < {{\xi '}_{i^{\prime},k,q}}} \right) \\ &= 1 {-} P_{i^{\prime},q}^{cache} - {\Omega} '\left( {{{\xi '}_{i,k,q}}} \right) + P_{i^{\prime},q}^{cache}{\Omega} '\left( {{{\xi '}_{i,k,q}}} \right), \end{aligned} $$
(22)

where \({\Omega } '\left (\cdot \right )\) is the probability distribution function of the cost parameter ξi, k, q′. \({\mathrm {A}_{i^{\prime },q}^{cache}}\) and \({\overline {\mathrm {A}}_{i^{\prime },q}^{cache}}\) indicate the caching status of the content q, respectively.

From the perspective of RSU i, \({p_{i,{j^{*}},q}} + {p_{cloud,i,q}}\), μqSqξi, k, q and αi, k, qti, q can be considered as the cost of selling content q. Therefore, \({p_{i,{j^{*}},q}} + {p_{cloud,i,q}} + {\mu _{q}}{S_{q}}{\xi _{i,k,q}} + {\alpha _{i,k,q}}{t_{i,q}}\) can be regarded as Sqξi, k, q′. This means that the larger the content q, the higher the cost for RSU i to obtain and deliver the content. Similarly, RSU i estimates the cost parameters of other RSUs following the uniform distribution with \(\left [ {\underline {\xi '}_{i,k,q}^{},\overline {\xi '}_{i,k,q}^{}} \right ]\). The optimal price can be calculated by

$$ \begin{array}{l} p_{i,k,q}^{*} = {p_{i,{j^{*}},q}} + {p_{cloud,i,q}} + {\mu_{q}}{S_{q}}{\xi_{i,k,q}}\\ + \frac{{{S_{q}}\left( {\overline {\xi '}_{i,k,q}^{} - {{\xi '}_{i,k,q}}} \right)F^{\prime}\left( {{{\xi '}_{i,k,q}}} \right)}}{{G^{\prime}\left( {{{\xi '}_{i,k,q}}} \right)}}, \end{array} $$
(23)

where

$$ \left\{ {\begin{array}{*{20}{l}} {F\left( {{{\xi '}_{i,k,q}}} \right) = {{\left( {\frac{{\left( {1 - P_{i^{\prime},q}^{cache}} \right) \cdot \left( {\overline {\xi '}_{i,k,q}^{} - {{\xi '}_{i,k,q}}} \right)}}{{\overline {\xi '}_{i,k,q}^{} - \underline {\xi '}_{i,k,q}^{}}}} \right)}^{I - 1}}},\\ \begin{array}{l} G\left( {{{\xi '}_{i,k,q}}} \right) = I\left[ {1 - P_{i^{\prime},q}^{cache} - \frac{{{{\xi '}_{i,k,q}} - \underline {\xi '}_{i,k,q}^{}}}{{\overline {\xi '}_{i,k,q}^{} - \underline {\xi '}_{i,k,q}^{}}}} \right.\\ + {\left. {P_{i^{\prime},q}^{cache}\left( {\frac{{{{\xi '}_{i,k,q}} - \underline {\xi '}_{i,k,q}^{}}}{{\overline {\xi '}_{i,k,q}^{} - \underline {\xi '}_{i,k,q}^{}}}} \right)} \right]^{I - 1}}. \end{array} \end{array}} \right. $$
(24)

By comparing the utilities of MV k with the bidding price of all RSUs, the optimal RSU is chosen by

$$ {i^{*}} = \underset{i}{\arg \max } u_{i,k,q}^{k}, i \in I. $$
(25)

4.3 Algorithm design

Algorithm 1 is provided to depict the process of the reputation-based cooperative content delivery mechanism, which can be divided into two phases. In the Phase 1, the reputation values of all PVs are initialized to be Repinit. Then, according to the travel path and personal preference, PVs set their content caching status xi, j, q to 1 or 0. Similarly, xi, q will be initialized by each RSU.

After the MV sends the content request, the auction process in Phase 2 will be executed until the optimal RSU and PV are selected. Phase 2 consists of four parts: 1) Calculate the optimal bidding price based on the caching status xi, q for each RSU; 2) Calculate reputation threshold based on the feature of the requested content to filter the trustless PVs; 3) Calculate the optimal strategy for each PV; 4) Update the reputation value Repi, j, caching status xi, q, respectively.

figure d

5 Performance evaluation

The goal of this section is to evaluate the performance of the proposed mechanism and compare it with the conventional mechanisms. In the simulation scenario, the number of RSUs is set to be \(\left [ {3,15} \right ]\), and the initial number of PVs around the RSU is randomly selected from \(\left [ {20,300} \right ]\) [30]. Initially, we set the ratio of honest PVs, speculative PVs, and malicious PVs to be 0.6, 0.3, and 0.1, respectively [27]. MV requests content once per second. Based on [8], [31], other parameters are summarized in Table 1.

Table 1 Simulation parameters

In Fig. 2, PVs are divided into three types: the honest PV, the speculative PV, and the malicious PV. The honest PVs comply with the content size and transmission rate promised in the auction. The malicious PVs refuse to provide content after winning the auction. The speculative PVs switch to be honest mode and malicious mode randomly. According to the evolution of reputation value, we can observe that the reputation value of the honest PV increases over time. However, the reputation value of the malicious PV and the speculative PV decline rapidly over time. The reason is that the honest PV keeps its promise and provides high-quality services to increase its reputation value. On the contrary, the malicious PV fails to keep its promise, resulting in a rapid decline in reputation. In addition, owing to the limitation of reputation value, the reputation value of honest PV tends to be 0.8. However, for malicious PV and speculative PV, the lower limitation of the reputation value is determined by Repthre. It means that PV with the reputation value less than Repthre will be banned from participating in auctions, and the reputation value will not change.

Fig. 2
figure 2

The evolution of reputation value with different simulation time

Figure 3 shows the utility of the PV by comparing the proposal with three conventional mechanisms. We select a PV with the requested content and change its bidding strategy, while the other PVs maintain the proposed mechanism. As the parking time increased, more content requests are generated. We can observe that the utility of the PV increases with the simulation time. Moreover, the utility of PV is higher than that of other mechanisms. This is because the optimal bidding strategy selected by PV can not only maximize its utility but also improve the utility of the RSU, which increases the probability of the PV winning the game.

Fig. 3
figure 3

Utility of PV with different parking times and mechanisms

In Fig. 4, the proposed mechanism is compared with the random selection mechanism and the fixed price mechanism.

  • The random selection mechanism [32]: In this mechanism, the RSU randomly selects a PV with the requested content to obtain content. The selected PV randomly determines the strategies of si, j, q, ri, j, q and pi, j, q to provide content.

  • The fixed price mechanism [33]: In this mechanism, the content size, transmission rate and price are fixed. We use the average value of content size, transmission rate, and PV transmission cost as the pricing scale for RSU. If there are multiple PVs that meet the conditions, RSU will choose the PV that maximizes its utility as the winner.

Here, the simulation time is changed from 0.5 hour to 2.5 hours. Figure 4 shows that the proposed auction mechanism can maximize the utility of the RSU compared with the other two mechanisms. According to the simulation results in Figs. 3 and 4, the proposed auction mechanism between PVs and RSU can not only maximize the utility of the PV, but also improve the utility of the RSU.

Fig. 4
figure 4

Utility of RSU with different parking times and mechanisms

Figure 5 shows the changes in the content delivery rate when the ratio of honest PV changes in different mechanisms. Here, the honesty rate of PV is distributed in \(\left [ {0.5,0.9} \right ]\). The simulation results in Fig. 5 show that our proposed mechanism can effectively improve the content delivery rate. Especially, when the ratio of honest PV at a low level, the proposed mechanism has significant advantages over the other two mechanisms. The content delivery rate of the random mechanism is greatly affected by the honest PVs. The success rate of content delivery will decrease as the honest PVs rate declines. In addition, the auction-based content delivery mechanism, lacking monitoring mechanisms for PV behavior, has the lowest content delivery rate. The reason is that in the auction-based mechanism, malicious PV will defraud the auction game by lowering the bidding price.

Fig. 5
figure 5

Content delivery rate with different ratio of honest PV and different mechanism.

Figure 6 shows that the utility of RSU changes with the number of RSUs and PVs. When the number of PVs parked around the RSU remains constant, the utility of the RSU decreases as the number of RSUs participating in the auction increases. This is because the increase in the number of RSUs leads to the intense competition in auction game. Thus, the RSU reduces the price to increase the probability of winning the auction, which leads to a reduction in the utility. On the contrary, when the number of RSUs remains constant, as the number of PVs parked around the RSU increases, the utility of this RSU gradually increases. This is because the more PVs around the RSU, the more intense competition among PVs. Therefore, the RSU can obtain content from the surrounding PVs with a lower price and a higher transmission rate, which results in the increase of utility.

Fig. 6
figure 6

Utility of RSU with different number of RSUs and number of PVs

Figure 7 shows that the utility of MV changes with the number of RSUs and PVs. In contrast to Fig. 6, the utility of the MV increases as the number of RSUs participating in the auction increases, when the number of PVs parked around the RSU remains constant. The reason is that the competition between RSUs leads to a decrease in bidding prices, which increases the utility of MV. In addition, as the number of PVs increases, the cost of RSU obtaining content decreases, which is already shown in Fig. 6. In this case, RSU will cut the selling price to increase the probability of winning the auction. Therefore, MV can obtain content from the RSU instead of the cloud server, which increases the utility of MV.

Fig. 7
figure 7

Utility of MV with different number of RSUs and number of PVs

Figure 8 is the comparison among the proposal mechanism, random price mechanism and linear price mechanism.

  • The random price mechanism [34]: In this mechanism, RSU i randomly selects the bidding price based on the content transmission cost. The random price should be greater than the content transmission cost of RSU i to ensure that the utility is positive and less than the maximum transmission cost corresponding to the maximum cost parameter \({\overline {\xi '}_{i,k,q}^{}}\).

  • The linear price mechanism [35]: In this mechanism, RSU i linearly selects the bidding price based on the cost of the content. To improve the performance of the linear price mechanism, we set the linear pricing coefficient to be 1.05.

Fig. 8
figure 8

Utility of RSU with different simulation times and mechanisms

Figure 8 shows that the proposed mechanism outperforms other two conventional mechanisms. By adopting the bidding strategy proposed in this paper, the RSU can significantly improve its utility. In Fig. 9, with the simulation time ranged from 5 to 25, the proposal can maximize the utility of the MV compared with the random mechanism and the fixed price mechanism. The reason is that RSUs compete with each other and reduce the selling prices to win the auction. Thus, the MV can obtain the content with the low cost and significantly improve its utility. In opposite, due to the lack of incentives, RSUs in the conventional mechanisms have no obligation to reduce prices. The higher price improves the utility of RSU, but it increases the cost of obtaining content for the MV as well.

Fig. 9
figure 9

Utility of MV with different simulation times and mechanisms

Figure 10 shows the changes in the utility of MV when the simulation time changes in different mechanisms. The simulation time changes in \(\left [ {0,23} \right ]\). From Fig. 10, we can see that our proposed mechanism can significantly improve the utility of MV. Compared with the proposed mechanism, the utility of MV in the random selection mechanism changes significantly over time. The reason is that during peak parking periods, RSU can cooperate with PV for content delivery. However, in the low parking periods, the number of parked vehicles with requested content is at a low level. The delay of content delivery will be increased and the utility of the MV will be reduced under the circumstance where there is no suitable PV around the RSU that randomly selected by MV.

Fig. 10
figure 10

Utility of MV with different times and mechanisms

6 Conclusion

In this paper, we have proposed a reputation-based cooperative content delivery mechanism to securely deliver content with the assistance of PVs. In specific, the reputation model has been developed to effectively isolate the malicious PVs and guarantee the security of content delivery. Then, in the two-layer auction game among PVs, RSUs, and MVs, PVs can obtain the high utility with low energy consumption by using the optimal bidding strategy. RSUs deliver content more economically and efficiently by determining the optimal PV. MVs can maximize their utility by adopting the cooperation mechanism. Finally, numerical results have demonstrated that the proposed mechanism outperforms the conventional mechanisms. As for the future work, we will further study the efficiency and security of cooperative content delivery in VANETs.