## 3 System Model and Problem Formulation
### Network Model  
As shown in Figure 2, we consider a unidirectional road, where \(M\) UAVs are located along the road. Each UAV is equipped with a MEC server with limited computing resources. We denote the ID set of UAVs as \(\mathbf{M}=\{1,...,M\}\). For ease of description, we divide the road into \(M\) segments and denote the ID set of roads as \(\mathbf{L}=\{L_{1},L_{2},...,L_{M}\}\).  
There are \(N\) vehicles arriving at the starting point of the road (we denote the ID set of vehicles as \(\mathbf{N}=\{1,2,...,N\}\)), and they obey the Poisson distribution. Each vehicle has a task to be processed (for example, the geographic information, the security information, and the location service information can be exchanged between vehicles and UAVs), expressed as \(\Xi_{i}\triangleq\left\{d_{i},c_{i},T^{th},\lambda_{i,j}\right\}\), \(i\in\mathbf{N}=\{1,2,...,N\}\), \(j\in\mathbf{M}=\{1,2,...,M\}\), where \(d_{i}\) represents the size of the computing task, \(c_{i}\) represents the computing resources required for the execution of task \(\Xi_{i}\), \(T^{th}\) represents the task maximized allowed latency, and \(\lambda_{i,j}\) represents the ratio of the offloaded task to the total task. In other words, vehicle \(i\) can offload a task, \(\lambda_{i,j}d_{i}\), to the MEC server on UAV \(j\) and compute the rest of the task, \(\left(1-\lambda_{i,j}\right)d_{i}\), locally. In this scheme, we assume that each vehicle can only select one MEC server for computational offloading. We define \(x_{i,j}\) as the selection decision of vehicle \(i\), i.e., \(x_{i,j}\in\{0,1\}\). Specifically, if vehicle \(i\) chooses UAV \(j\) for task offloading, \(x_{i,j}=1\), and \(x_{i,j}=0\) otherwise. In addition, there is an eavesdropper in our concerned system model, denoted as Eve, that can eavesdrop the transmitted information \(\Xi_{i}\).  
Therefore, based on the above analysis, the task \(\Xi_{i}\) processing delay consists of three parts:  
**Part 1:** The time \(T_{i,j}^{1}\) that vehicle \(i\) moves from the starting point to the coverage of UAV \(j\), i.e., \(T_{i,j}^{1}=\sum_{k=1}^{j-1}\frac{L_{k}}{v_{i}}\), \(L_{k}\in\mathbf{L}\).  
**Part 2:** The transmission time \(T_{i,j}^{2}\) for vehicle \(i\) to offload the task \(\Xi_{i}\) to UAV \(j\) via a wireless channel.  
**Part 3:** The time \(T_{i,j}^{3}\) that for UAV \(j\) processes the task \(\Xi_{i}\).  
According to the above analysis, our proposed algorithm operation in the real scenario mainly includes the following steps. First, \(N\) vehicles arrive at the starting point of the road, and each vehicle has tasks waiting to be processed. Then, according to our proposed algorithm, each vehicle selects the MEC server and calculates the ratio of the offloaded task. Afterward, each vehicle uses the IEEE 802.11p protocol to transmit the unloading task. After receiving the unloading task, the MEC server on the UAV allocates computing resources to process the unloading task according to our proposed algorithm. Meanwhile, the vehicle processes the rest of the computing task locally. Finally, the MEC server on the UAV returns the processing results to the vehicle.