## 3 Optimization of Vehicle Edge System Model  
### System Model  
As shown in Figure 1, the intersection scene is built up with vehicle sets V =\((v_{1},v_{2},\ldots,v_{N})\) and RSU and R =\((R_{1},R_{2},\ldots,R_{J})\), and the time is discrete into a single observable time \(t=(1,2,\ldots,\tau)\) slot with the length of \(\Delta=\frac{t}{\tau}\). The RSU configuration interval is brief in the intersection situation. Only one MEC server is needed for vehicle job calculation and processing in order to prevent resource waste. The tasks carried by each vehicle can be simplified into a binary form \(Task_{vi}=\{S_{vi},T_{vi}^{max}\},i\in(1,N)\), which respectively describes the vehicle task data size and the maximum allowable delay. Some duties must be delegated to an edge server with high processing capacity due to the vehicle's limited computing capabilities, so the task computation uses a binary representation. If tasks are unloaded simultaneously onto the MEC server while there is heavy traffic flow at the intersection, the machine will become overloaded and eventually fail. Therefore, the task queue model is created based on the randomness of tasks. Tasks in the system are randomly generated and delivered to a specific RSU. After the storage period, the tasks are migrated to the MEC server for calculation. The task queue length on any RSU is \(Q_{j}(\tau)(j\in J)\), and it is updated according to the following equation:  
\[Q_{j}(\tau+1)=max(Q_{j}(\tau)-W_{j}(\tau),0)+U_{j}(\tau) \tag{1}\]  
\(W_{j}(\tau)\) is a task that has been migrated, while \(U_{j}(\tau)\) indicates that the task has been received. It is set so that when the RSU task buffer exceeds the threshold \(Q_{max}\), the vehicle is no longer permitted to place tasks. 1. Local Computation  
The vehicle itself has a certain amount of computing resources, but because there are only so many of them, it can only handle a certain amount of computational work. Then, the number of CPU cycles allocated for the local computing task can be described as:  
\[Cycle_{vi}=\sqrt{\frac{\Gamma_{vi}^{local}}{\Phi(1-\eta)S_{vi}^{local}}} \tag{2}\]  
where the computing capability of the \(\Gamma_{vi}^{local}\) vehicle is \(v_{i}\), \(\Phi\) represents the effective constant of the capacitor switch of the vehicle, \(S_{vi}^{local}=(1-a_{vi}^{\tau})S_{vi}\) is the number of tasks that the vehicle needs to compute locally, and \(a_{vi}^{\tau}\) refers to the unloading scale factor. The following summarizes the local execution duration and energy usage:  
\[T_{vi}^{local}=\frac{(1-\eta)S_{vi}^{local}}{Cycle_{vi}} \tag{3}\]  
\[E_{vi}^{local}=k(\Gamma_{vi}^{local})^{2}(1-a_{vi}^{\tau})S_{vi} \tag{4}\]  
\(k\) depends on the energy coefficient of the chip structure. 2. Unloading calculation  
During the uninstall process, the delay is divided into uplink transmission delay, waiting delay, and calculation delay (the transmission time between the MEC server and  
Figure 1: Application scenario of intersections. the RSU and the task result sending time are ignored). According to the relationship between the limit data transmission rate and bandwidth in a noisy channel (Shannon's theorem), the transmission rate between the vehicle and the RSU is defined as:  
\[r_{vi,j}^{un}=B_{vi}\log_{2}(1+\frac{p_{vi,j}^{un}\text{H}_{vi,j}}{\text{O}^{2}}) \tag{5}\]  
where, \(B_{vi}\) represents the bandwidth resource allocated by the system to the vehicle \(vi\), \(p_{vi,j}^{un}\) represents the channel transmission power, \(\text{H}_{vi,j}(\tau)\) is the standard channel vector between the vehicle and the RSU, and O represents the white Gaussian noise. The transmission delay generated by the unloading process is expressed as \(T_{vi,j}^{un}=\frac{\eta S_{vi}^{un}}{\tau_{vi,j}^{un}(\tau)}\), energy consumption generated \(E_{vi,j}^{un}=p_{vi,j}^{un}*T_{vi,j}^{un}\), \(S_{vi,j}^{un}=a_{vi}^{\text{T}}S_{vi}\) represents the number of tasks unloaded by the vehicle \(vi\) to the RSU \(j\), and \(p_{vi,j}^{un}\) is the transmission power.