## 3 Preliminaries: Network Model and Problem Definition
### TOMAC-PPO Algorithm Process
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Symbol** & **Meaning** & **Value** \\ \hline \(n\) & Number of edge nodes & 10 \\ \(R^{\text{ud}}\) & User device cache capacity & 49, 152 Mbit \\ \(R^{\text{en}}\) & Edge node cache capacity & 262, 144 Mbit \\ \(B\) & Base station bandwidth resources & 20 MHz \\ \(r\) & Base station service radius & 100 m \\ \(p^{\text{edge}}\) & Base station transmission power & 200 W \\ \(p^{\text{user}}\) & User device transmission power & 0.2 W \\ \(\kappa\) & User device energy efficiency coefficient & \(U\) (\(4.13,66.16\)) \(\times\)\(10^{-27}\) \\ \(\sigma^{2}\) & Gaussian noise power & \(1.5\times 10^{-8}\) W \\ \(V_{\text{space}}\) & The propagation rate of electromagnetic waves in the air & \(3\times 10^{8}\) m/s \\ \(V_{\text{fiber}}\) & The propagation rate of electromagnetic waves in a circuit & \(2\times 10^{8}\) m/s \\ \(C_{\text{fiber}}\) & The transmission rate of wired communication & 1000 Mbit/s \\ \(T_{\text{repair}}\) & Fault repair duration & \(U(10,60)\) s \\ \(\lambda\) & Task input data volume & \(N(5100)\) Mbit \\ \(\lambda^{\text{out}}\) & Task calculation result data volume & \(N(1,50)\) Mbit \\ \(\rho\) & Task computing density & \(N(0.297,0.1)\) G.c./ Mbit \\ \(num^{\text{core}}\) & Number of CPU cores on edge servers & 14 \\ \(f^{\text{edge}}\) & Edge server CPU frequency & 2.4 GHz \\ \(f^{\text{cloud}}\) & Cloud server CPU frequency & 10 GHz \\ \(T^{\text{cloud}}_{\text{delay}}\) & Core network forwarding delay & \(N(50,15)\) ms \\ \(a_{\text{edge}}\) & The distance between adjacent nodes & 150 m \\ \(P_{\text{drop}}\) & RED Dropped Task Probability & \(1/50\) \\ \(\alpha,\beta\) & Learning rate & \(3\times 10^{-4}\) \\ \(e^{max}\) & Training epochs & 1000 \\ \(\gamma\) & Discount rate & 0.95 \\ \(\sigma\) & Target network update ratio & 0.01 \\ \(\varsigma\) & Crop parameters & 0.2 \\ \(c\) & Entropy weight & 0.01 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters setting. Figure 10: Offloading and allocation algorithms conversion and cumulative rewards versus episodes. overhead of TOMAC-PPO and TOMAC-A2C increases sharply and gradually approaches the curve of the LC scheme, and the gap between the two also decreases. When the failure rate reaches 100%, it is equivalent to the entire edge layer device being in a disconnected state. At this time, except for the LC scheme, the average cost of the other schemes is around 2.3, slightly higher than the average cost of the LC scheme, which is 2.24. This indicates that, when the failure rate is 100%, each optimization plan has no other countermeasures besides performing local calculations. Due to the fact that users still need to attempt to report task information at this time, the cost incurred is slightly higher than that of the LC scheme. When the failure rate is less than 50%, the cost curve of the CCP scheme shows a downward trend. This is because line failures force more tasks to be handed over to edge layers with lower latency, reducing unnecessary tasks from cloud migration. When the failure rate exceeds 50%, the CCP overhead curve gradually increases and approaches the LC scheme, because the reduction in the number of available servers results in a large number of tasks that cannot be offloaded and can only be processed at the user layer. In the vast majority of failure rate scenarios, the TOMAC-PPO scheme can maintain the lowest average cost, which proves that compared to other optimization schemes, TOMAC-PPO has better robustness in dealing with various failure situations. To test whether each offloading scheme adopts targeted offloading processing for different types of tasks, we test the processing effect of each scheme on different types of

Figure 11: Average task cost versus user number. Figure 12: Average task cost versus failure probability.