In this section, we first explain the system model under the cloud edge hybrid architecture, including the network model, vehicle application model, transmission model, and computation model.
Network Model
A hybrid cloud-edge system is considered, as shown in Fig. 1, which consists of a cloud, multiple eNodes with multiple servers, and some intelligent vehicles with applications. The eNodes all have their different locations and wireless communication coverage, and we denote the set of these eNodes in a certain range as \(N=\{N_1,N_2,...,N_K\}\), the set of the \(k_{}^{th}\) eNode servers as \(S_k=\{S_{k,1},S_{k,2},...,S_{k,L}\}\). In the system, the intelligent vehicles travel on the road and the set of intelligent vehicles is indicated by \(V=\{V_1,V_2,...,V_h\}\). Each intelligent vehicle has computational-intensive and latency-sensitive applications that need to be offloaded to an eNode server or a server in the cloud for execution. The set of these applications is denoted as \(N=\{A_1,A_2,...,A_I\}\). An application can be structured with j tasks and the set of tasks belonging to the same application \(A_i\) is \(A_i=\{T_{i,1},T_{i,2},...,T_{i,J}\}\). In this paper, we consider scenarios where scheduling and computation are done on a task-by-task basis. Each task can be divided into any eNode which the intelligent vehicle can communicate with, and tasks belonging to the same application do not have to be assigned to the same eNode, e.g. \(T_{1,1}\) can be scheduled to \(N_1\) for execution, while \(T_{1,2}\) can be scheduled to \(N_2\) for execution. The intelligent vehicle can only schedule tasks to the eNodes that are communicable at the current moment. Considering the mobility of the intelligent vehicle, if the intelligent vehicle moves out of the communication range of the eNode, then the intelligent vehicle will no longer be able to offload tasks to that eNode. Whereas the communication range of the cloud server is full coverage of the scenario. The notations used in this paper are summarized in Fig. 2.
Application Model
We consider that the tasks in the application of intelligent vehicles are dependent on each other, so we represent the applications as directed acyclic graphs shown in Fig. 3. A directed acyclic graph represents a class of intelligent vehicle applications. In the same directed acyclic graph, the task pointed by the arrow needs to be executed after the task at the end of the arrow is executed. For instance, \(T_{1,2}\) and \(T_{1,3}\) can be executed only after \(T_{1,1}\) is executed in the figure, and \(T_{1,8}\) needs to be executed after both \(T_{1,6}\) and \(T_{1,7}\) have been executed. The dependencies between tasks of the same application cause them to require the results of other tasks to be executed before they can be executed. There are no dependencies between different applications, so there is no restriction on the order of execution between their tasks.
Transmission Model
The completion of each application needs to go through three stages, which are scheduling the task to the designated server, executing the task at the designated server, and transmitting the task execution result from the server back to the intelligent vehicle. The application is not completed until the last task execution result is transmitted back to the intelligent vehicle. Since the data of task results are usually small and can be neglected, the finishing time of the application comprises task data transmission time and task computation time.
eNode Transmission
We assume that the wireless communication between intelligent vehicles and eNodes is based on non-orthogonal multiple access technology [33, 34], so in this system, the bandwidths between different eNodes and intelligent vehicles are different and their communication does not interfere with each other. The bandwidth between eNode \(N_k\) and intelligent vehicle \(V_h\) is denoted by \(b_{h,k}\), the channel gain between intelligent vehicle \(V_h\) and eNode \(N_k\) is denoted by \(g_{h,k}\), and the transmission power between intelligent vehicle \(V_h\) and eNode \(N_k\) is denoted by \(p_{h,k}\). Therefore, the transmission rate between intelligent vehicle \(V_h\) and eNode \(N_k\) can be given by
$$\begin{aligned} R_{h,k}={b_{h,k}}log_{}\left( 1+\frac{g_{h,k}p_{h,k}}{N_{0}} \right) \end{aligned}$$
(1)
where \(N_0\) indicates the Gaussian noise power inside the channel and \(t_{k,h}\) the transmission time of input data \(d_k\) from intelligent vehicle \(V_h\) and eNode \(N_k\). Consequently, the transmission duration \(t_{k,h}\) is
$$\begin{aligned} t_{h,k}=\frac{d_{i,j}}{{b_{k,h}}log_{}\left( 1+\frac{g_{h,k}p_{h,k}}{N_{0}} \right) } \end{aligned}$$
(2)
Cloud Transmission
Similarly, when the tasks are transmitted from the intelligent vehicle \(V_h\) to the cloud, the corresponding transmission rate is:
$$\begin{aligned} R_{h,C}={b_{h,C}}log_{}\left( 1+\frac{g_{h,C}p_{h,C}}{N_{0}} \right) \end{aligned}$$
(3)
where \(b_{h,C}\) indicates the bandwidth between an intelligent vehicle \(V_h\) and the cloud, \(g_{h,k}\) represents the channel gain between intelligent vehicle \(V_h\) and the cloud, and \(p_{h,k}\) the transmission power between intelligent vehicle \(V_h\) and the cloud. The transmission time \(t_{k,C}\) for a task with size \(d_k\) to be transferred from intelligent vehicle \(V_h\) to the cloud is
$$\begin{aligned} t_{h,C}=\frac{d_{i,j}}{b_{h,C}log_{}\left( 1+\frac{g_{h,C}p_{h,C}}{N_{0}} \right) } \end{aligned}$$
(4)
Computation Model
Due to limited computing resources, we assume that each server on the eNode can only execute one task at the same time, and each task can only be executed by one server.
Since there are dependencies between tasks and eNodes have coverage limits, there are two conditions that need to be satisfied for each task to start its execution. Condition one is that all tasks pointing to it in the directed acyclic graph have been completed, and condition two is that there are free servers in the communicable eNodes of the intelligent vehicle this task is located in to execute it.
We use a Boolean variable \(e_{m,j}^i\) to denote whether the task \(T_{i,m}\) in the directed acyclic graph points to \(T_{i,j}\), it can be given as
$$\begin{aligned} e_{m,j}^i=\left\{ \begin{array}{cc} 1 ,&{} if \ task \ T_{i,m} \ points\ to\ T_{i,j} \ in \ the \ DAG \\ 0 ,&{} otherwise \end{array}\right. \end{aligned}$$
(5)
If \(e_{m,j}^i =1\) , the task \(T_{i,j}\) needs to be executed after the execution of \(T_{i,m}\) is finished.
We denote the real end time of the task \(T_{i,j}\) by \(RET_{i,j}\). When all the tasks pointing to the task \(T_{i,j}\) in the directed acyclic graph are completed, the task \(T_{i,j}\) is ready to wait for the idle server to execute it, and its readiness time \(RT_{i,j}\) can be expressed as
$$\begin{aligned} RT_{i,j}= {\underset{e_{x,j}^i=1}{\max}} RET_{i,x} \end{aligned}$$
(6)
where \(pre(T_{i,j})\) denotes the set of all tasks pointing to task \(T_{i,j}\) in the directed acyclic graph.
If the task \(T_{i,j}\) will be scheduled by the algorithm to be executed on eNode server \(S_{k,l}\), and server \(S_{k,l}\) is idle when the task \(T_{i,j}\) is ready, the task can start execution at the readiness time. If there is task \(T_{x,y}\) being executed on the server \(S_{k,l}\) when the task is ready, the task needs to wait until the server \(S_{k,l}\) is idle before execution, so the earliest beginning time of the task \(T_{i,j}\) can be expressed as
$$\begin{aligned} EBT_{i,j}=max\{RT_{i,j},RET_{x,y}\} \end{aligned}$$
(7)
where \(RET_{x,y}\) denotes the real ending time of the task executed on the server before task \(T_{i,j}\).
The computation time \(CT_{i,j,k,l}\) of task \(T_{i,j}\) on eNode server \(S_{k,l}\) is
$$\begin{aligned} CT_{i,j,k,l}=\frac{d_{i,j}}{c_{k,l}} \end{aligned}$$
(8)
where \(d_{i,j}\) indicates the size of input data of task \(T_{i,j}\) and \(c_{k,l}\) the computing speed of \(S_{k,l}\).
To be similar, the computation time \(CT_{i,j,C}\) of task \(T_{i,j}\) deployed on the cloud server is
$$\begin{aligned} CT_{i,j,C}=\frac{d_{i,j}}{C} \end{aligned}$$
(9)
where C indicates the computing speed of the cloud server.
With the knowledge of the application completion time constraints and the dependencies between the tasks, we can calculate the latest ending time and the latest beginning time of the task \(T_{i,j}\) accordingly, and they can be expressed as
$$\begin{aligned} LET_{i,j}={\underset{T_{i,x} \in suc(T_{i,j})}{\min}} (LET_{i,x}-\min (CT_{i,x}^{min},CT_{i,x,C})) \end{aligned}$$
(10)
$$\begin{aligned} LBT_{i,j}=LET_{i,j}-\min (CT_{i,x}^{min},CT_{i,x,C}) \end{aligned}$$
(11)
where \(suc(T_{i,j})\) represents the set of all tasks pointed to by \(T_{i,j}\) in the directed acyclic graph and \(CT_{i,x}^{min}\) represents the shortest computation time of task \(T_{i,x}\) among all the servers that can communicate with the intelligent vehicle.
The earliest ending time \(EET_{i,j}\) of task \(T_{i,j}\) can be expressed as
$$\begin{aligned} EET_{i,j}=EST_{i,j}+\min (t_{h,k}+CT_{i,j},t_{h,C}+CT_{i,j,C}) \end{aligned}$$
(12)
We denote whether the application \(A_I\) is completed in time by \(IT_i\), and it can be given as
$$\begin{aligned} IT_i=\left\{ \begin{array}{cc} 1 ,&{} if \ A_i \ is\ completed\ in\ time\\ 0 ,&{} otherwise \end{array}\right. \end{aligned}$$
(13)
Then we can obtain the in-time completion rate P for this batch of applications as
$$\begin{aligned} CR=\frac{\sum _{i=1}^{I}A_i}{I} \end{aligned}$$
(14)
Problem Formulation
In this section, we define the problem of minimizing the completion time under the condition that the completion time constraint is satisfied as much as possible.
We use \(x(T_{i,j},S_{k,l})\) to denote whether task \(T_{i,j}\) is scheduled to be executed on eNode server \(S_{k,l}\), it can be given as
$$\begin{aligned} x(T_{i,j},S_{k,l})=\left\{ \begin{array}{cc} 1 ,&{} if \ task \ T_{i,j} \ is\ scheduled\ to \ server \ S_{k,l} \\ 0 ,&{} otherwise \end{array}\right. \end{aligned}$$
(15)
Therefore, the real ending time \(RET_i\) of application \(A_i\) scheduled to eNodes can be denoted as
$$\begin{aligned} RET_i=RET_{i,J}= RT_{i,J}+\sum\limits_{k=1}^{K}\sum\limits_{l=1}^{L}[x(T_{i,J},S_{k,l})CT_{i,j,k,l}+t_{h,k}+WT_{k,l}] \end{aligned}$$
(16)
and if scheduled to the cloud can be denoted as
$$\begin{aligned} RET_i=RET_{i,J}= RT_{i,J}+CT_{i,j,C}+t_{h,C} \end{aligned}$$
(17)
where \(WT_{k,l}\) represents the waiting time to wait for the server to be idle if the task is ready but the server still has tasks in progress.
We denote the completion time constraint of application \(A_i\) as \(CTC_i\). The application completes in time requires the real ending time to be less than the completion time constraint. Furthermore, the problem can be formulated as
$$\begin{aligned}{} & {} (\textbf{P1}) \min (\frac{\sum _{i=1}^{I}RET_{i}}{\alpha CR}) \\{} & {} s.t. \ RET_{i}\le CTC_i \ \quad \quad \quad \quad \forall A_i \in A\\{} & {} \quad dist(T_{i,j},S_{k,l}) \le Rad_k \quad {\forall } x(T_{i,j},S_{k,l})=1 \\{} & {} \quad Count_{k,l}\le 1 \ \quad \quad \quad \quad \quad \quad {\forall }t \in T \\{} & {} \quad RET_{i,m} \le RBT_{i,j} \ \ \quad \quad \quad {\forall } e_{m,j}^i=1 \\ \end{aligned}$$
where \(\alpha\) denotes a factor of completion rate CR. \(dist(T_{i,j},S_{k,l})\) denotes a distance from task \(T_{i,j}\) to server \(S_{k,l}\), \(Rad_k\) denotes the coverage of eNode \(N_k\), and \(dist(T_{i,j},S_{k,l})\) needs to be less than \(Rad_k\) for the task \(T_{i,j}\) to be delivered to server \(S_{k,l}\). \(Count_{k,l}\) denotes the number of tasks on the server at the moment t, and only one task can be executed at the same time. \(RBT_{i,j}\) denotes the real beginning time of the task \(T_{i,j}\).
If the mobility of intelligent vehicles is not considered and there is only one eNode and all intelligent vehicles can communicate with this eNode, then this problem can be reduced to a job-shop scheduling problem (JSP), which is NP-hard and difficult to solve directly [35].