Consider a IoV cloud-edge computing (IoV-CEC) system with \(N\) vehicle users and multiple MEC servers to perform computation offloading operation. Assuming that there is a bidirectional road and all computing devices share the same uplink spectrum of the system. All channel gains are modeled as large-scale path loss and small-scale Rayleigh fading, and \(H_{ij}\) denotes the channel gain from \(i\)th vehicular user to associated \(j\)th MEC server. The additional noise of the user's destination is an independent cyclosymmetric complex Gaussian random variable with mean zero and variance \(\sigma^{2}\). \(E_{i}\) denotes the transmission power of the \(i\)th user is, and \(C_{i}\) denotes the number of CPU cycles required by the user to execute unit data. Assume that the total amount of workload for \(i\)th user is \(L_{i}\), \(\alpha L_{i}\) will be offloaded to the MEC and the rest will be processed locally. The user's local CPU frequency is \(F_{i}\), which is measured by the number of CPU cycles per second. Then, the time consumption for local computing of the \(i\)th user can be given by:

$$T_{{{\text{Local}},i}} = \frac{{\left( {1 - \alpha } \right)L_{i} C_{i} }}{{F_{i} }}$$

(1)

Once the IoV user conducts the computation offloading decision, the time consumption of the offloading task includes the time consumption of workload transmission in uplink channel, the time consumption of task execution on the MEC server and the time consumption of results feedback. Therefore, the time consumption of computation offloading can be calculated by:

$$T_{{{\text{OFF}},i}} = t_{u,i} + t_{c,i} + t_{d,i}$$

(2)

where \(t_{u,i}\), \(t_{c,i}\) and \(t_{d,i}\) represent the time consumption of workload transmission in uplink channel, task execution on the MEC server and results feedback, respectively.

Since the local processing and offloading of the workload can be performed simultaneously, the time consumption of \(i\)th user to execute the task can be expressed as follows:

$$T_{i} = \max \{ T_{{{\text{Local}},i}} ,T_{{{\text{OFF}},i}} \}$$

(3)

After the offloaded task is processed, the corresponding results will be sent back to the IoV user through the downlink channel. Let \(\beta L_{k}\) denote the amount of the results, and \(\beta\) represents the ratio of the output to input offloaded workload. Hence, the time consumption of result transmission through downlink channel can be given by:

$$t_{d,i} = \frac{{\beta L_{i} }}{{\upsilon_{i} }}$$

(4)

where \(\upsilon_{i}\) is the uplink transmission rate of \(i\)th user. According to Shannon's theory, the uplink transmission rate can be defined as:

$$\upsilon_{i} = B_{i} \log_{2} \left( {1 + \frac{{E_{i} H_{i} }}{{B_{i} N_{0} }}} \right)$$

(5)

where \(N_{0}\) is the power spectral density of the noise. Besides, \(B_{i}\) is the communication band obtained by the communication between the user and the MEC server, i.e., the bandwidth being occupied by \(i\)th user for offloaded workload.

Furthermore, if \(f_{i}\) denotes the computing ability allocated to \(i\)th user by the associated MEC server, the time consumption of task processing can be obtained by

$$t_{c,i} = \frac{{\alpha L_{i} C_{i} }}{{f_{i} }}$$

(6)

For simplicity, the equal distribution is taken into account, and we have

$$f_{i} = \frac{{F_{c} }}{N}$$

(7)

where \(F_{c}\) represents the total computing ability of the MEC server and can be measured by the number of CPU cycles per second.

Meanwhile, owing to the user's communication overhead of the interaction with the MEC server, the user's transmission power can be regarded as a constraint condition, and it can be described by \(E_{i} \le E_{\max }\).

Since the user will consume the resources of the MEC server to perform the offloading task, the MEC server should provide enough computing capacity to complete the offloaded task. Therefore, in order to balance the demand and supply of resources, it is necessary to consider the energy consumption of the data generated by the communication between vehicle users and the MEC servers when they make offloading decisions.

The energy consumption for local computing can be given by

$$E_{{{\text{Local}},i}} = \gamma \left( {1 - \alpha } \right)L_{i}$$

(8)

where \(\gamma\) is the energy consumption of the user’s CPU.

The MEC server can rent the corresponding computing resources to the user, and the user will cause energy consumption for workload transmission during the course of offloading, which can be expressed by:

$$E_{{{\text{Trans}},i}} = \frac{{E_{i} \alpha L_{i} }}{{B_{i} \log_{2} \left( {1 + \frac{{E_{i} H_{i} }}{{B_{i} N_{0} }}} \right)}}$$

(9)

Similarly, the energy consumption of the computing tasks offloaded from \(i\)th user in the MEC server can be given by

$$E_{{{\text{OFF}},i}} = \gamma_{c} \alpha L_{i}$$

(10)

where \(\gamma_{c}\) is the CPU’s energy consumption of the MEC server.

Let \(\mu = \{ \mu_{1} ,\mu_{2} , \cdots ,\mu_{N} \}\) be the monetary cost corresponding to the user's energy consumption and the goal of IoV-MEC system is to maximize the utility of MEC provider by offering limited resources to IoV users. Mathematically, the optimization problem can be formulated by

$${\mathbf{P1}}:\quad \mathop {\max }\limits_{\mu } {\kern 1pt} {\kern 1pt} {\kern 1pt} U_{c} \left( \mu \right) = \sum\limits_{i = 1}^{N} {\mu_{i} E_{{{\text{OFF}},i}} }$$

(11)

For IoV user, the cost of the workload includes the energy consumption of local processing with specific delay, the energy consumption for communication, and the energy consumption of task processing at the MEC server, which can be calculated by

$$C_{i} \left( {L_{i} ,\mu_{i} } \right) = E_{{{\text{Local}},i}} + E_{{{\text{Trans}},i}} + \mu_{i} E_{{{\text{OFF}},i}}$$

(12)

For each IoV user, the determination of the optimal offloading workload according to the monetary cost of the MEC servers can reduce the payment to the greatest extent. Therefore, the optimization problem can be described as follows:

$${\mathbf{P2}}:\quad \mathop {\min }\limits_{{}} \sum\limits_{i = 1}^{N} {C_{i} \left( {L_{i} ,\mu_{i} } \right)}$$

(13)

$$\begin{gathered} s.t.{\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} {\kern 1pt} E_{i} \le E_{\max } \hfill \\ \sum\limits_{i = 1}^{N} {\alpha L_{i} C_{i} } \le F_{\max } \hfill \\ \end{gathered}$$

where \(F_{\max }\) is the maximum processing time of MEC server.