## 3 System Model and Problem Description
### System Model
Based on the sliding window mechanism, this paper updates the failure rate of each ESs in real-time to ensure that the transmission path of each task is high-quality. The probability of a failure of task \(r_{i}\) executed on edge server \(e_{i}^{b}\) is:  
\[P_{i}^{j}(F\mid t_{i}^{f^{\prime}})=\frac{P_{i}^{j}(t_{i}^{f^{\prime}}\mid F)P_ {i}^{j}(F)}{P_{i}^{j}(t_{i}^{f^{\prime}})} \tag{1}\]  
Figure 1: Vehicle edge computing environment. Figure 2: Abstract VEC network structure. \(P_{i}^{j}(t_{i}^{j^{\prime}}\mid F)\), \(P_{i}^{j}(F)\), and \(P_{i}^{j}(t_{i}^{j^{\prime}})\) can be calculated according to the data in the sliding window \(sw_{j}^{b}\) of \(e_{j}^{b}\). Where \(F\) represents the migration failure, and \(t_{i}^{j^{\prime}}\) represents the execution time \(t_{i}^{j}\) of task \(r_{i}\) on \(e_{j}^{b}\) to normalize data, the normalization process is expressed as follows:  
\[t_{i}^{j^{\prime}}=\frac{t_{i}^{j}-t_{min}}{t_{max}-t_{min}} \tag{2}\]  
where \(t_{max}\) and \(t_{min}\) respectively represent the longest and shortest execution time of tasks in \(sw_{j}^{b}\) on \(e_{j}^{b}\), and the execution time \(t_{i}^{j}\) is calculated as follows:  
\[t_{i}^{j}=\frac{p_{i}^{r}}{y_{i}^{k}c_{j}^{b}} \tag{3}\]  
where \(y_{i}^{k}\) represents the number of ES in the migration path \(m_{k}^{r_{i}}\), \(p_{i}^{r}\) represents the amount of computation required to complete the task \(r_{i}\), and \(c_{j}^{b}\) represents the remaining computation force in \(e_{j}^{b}\). \(MT_{i}^{k}\) of the total time of service migration of task \(r_{i}\) on path \(m_{k}^{r_{i}}\) consists of task calculation time \(Z_{i}^{k}\) and data transmission time \(D_{i}^{k}\):  
\[MT_{i}^{k}=Z_{i}^{k}+D_{i}^{k} \tag{4}\]  
Since NR only forwards data and does not participate in calculation, all the tasks are calculated in ES:  
\[Z_{i}^{k}=\sum_{x=1}^{y_{i}^{k}}t_{i}^{x}+FZ_{i}^{k} \tag{5}\]  
where \(FZ_{i}^{k}\) represents the redundant calculation time, an optional item, and only needs to be calculated when ES fails. \(D_{i}^{k}\) consists of the following four parts:  
\[D_{i}^{k}=DU_{i}^{k}+DT_{i}^{k}+DD_{i}^{k}+FD_{i}^{k} \tag{6}\]  
\(DU_{i}^{k}\) represents the uplink transmission time of \(d_{i}^{r}\) from user equipment to ES:  
\[DU_{i}^{k}=\frac{d_{i}^{r}}{\beta\log_{2}(1+\frac{P_{i}}{\lambda^{2}})} \tag{7}\]  
where \(\beta\) is the channel bandwidth of the BS, \(\rho_{i}\) is the signal transmission power of the mobile device, and \(\lambda^{2}\) is the Gaussian noise power of the device. \(DT_{i}^{k}\) represents the transit time of \(d_{i}^{r}\) between ESs and NRs:  
\[DT_{i}^{k}=\sum_{(x,y)\in m_{k}^{r_{i}}}\frac{d_{i}^{r}}{bw_{xy}} \tag{8}\]  
\((x,y)\in m_{k}^{r_{i}}\) represents the record of task \(r_{i}\) from node \(x\) to node \(y\), \(bw_{xy}\) represents the bandwidth between \(x\) and \(y\). \(DD_{i}^{k}\) indicates the downlink transmission time for the data calculation result to be returned from the ES to the user equipment:  
Figure 1:0  
where \(d_{i}^{r^{\prime}}\) represents the calculation result of task \(r_{i}\). \(FD_{i}^{k}\) represents the redundant calculation time, an optional item, and only needs to be calculated when ES or NR fails. In the actual scenario, EU must upload some instruction information in addition to computing tasks, but the amount of data of this extra information is small, so it is not considered in our model.