# Research on Task-Oriented Computation Offloading Decision in Space-Air-Ground Integrated Network
## 3 Results  
The Space-Air-Ground Integrated Network simulation scene is set as follows: According to the \(6+5+x\) structure of the Space-Air-Ground Integrated Network, two space-based backbone nodes, two ground-based backbone nodes, and six edge access nodes were selected for simulation. That is, there are one offloading terminal and ten computation offloading sites, among which four are used to simulate the computation offloading sites of space-based or ground-based backbone nodes (B_offloadee), and the rest are computation offloading sites of edge computing nodes (E_offloadee), which are randomly distributed in different latitudes, and all nodes are connected through the wireless network. The factors that affect the task computation offloading decision include the offloading terminal, offloading sites, and attributes of the task itself, as shown in Table 1. Considering the diversity of offloading sites of space-based backbone nodes, ground-based backbone nodes, and edge access nodes in the network, the performance of ten offloading sites are set, as shown in Table 2, where \(B1\cdots B4\) represents the performance of backbone nodes and \(E5\cdots E10\) represents the performance of six edge offloading sites. The simulation in this paper utilized Python 3.7 for algorithm simulation and algorithm analysis, and the code run dependency libraries including Tensorflow, Keras, Numpy, Scipy, Matplotlib, CUDA, etc. We used Spyder which the integrated development environment (IDE) that comes with Anaconda, perform the simulation verification, and the specific results are as follows. Firstly, taking the weighted total cost of delay and energy consumption as indicators, the optimization performance of the DQN computation offloading algorithm is compared with that of traditional computation offloading algorithm including Lyapunov-based methods and classical Q-learning-based methods. Figure 5 shows the comparison of the total cost for delay and energy consumption weight of 0.5 each, indicating the need to balance delay and energy consumption when offloading tasks. Figure 6 compares the total delay and energy cost of the three computational offloading methods for delay-sensitive offloading tasks. The curves obtained from the three computation offloading methods in Figures 5 and 6 show an increasing trend, indicating that the total delay and energy consumption cost for task offloading in the integrated network increases with the amount of tasks to be offloaded, while the offloading strategy based on the DQN computational offloading algorithm proposed in this paper can significantly reduce the delay and energy consumption cost. \begin{table}
\begin{tabular}{c c} \hline \hline
**Type** & **Factors Affecting Decision** \\ \hline Terminal (Offloader) & Data privacy and location \\ Offloading sites (Offloadee) & CPU performance, energy, storage space, memory size \\ Task characteristics & Calculate the data size and execution delay of offloading tasks \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Factors Affecting Computation Task Offloading Decisions. \begin{table}
\begin{tabular}{c c} \hline \hline
**Type** & **Computing Frequency** \\ \hline B1 & 3 GHz \\ B2 & 3.5 GHz \\ B3 & 4 GHz \\ B4 & 5 GHz \\ E1 & 2 MHz \\ E2 & 3 MHz \\ E3 & 5 MHz \\ E4 & 1 MHz \\ E5 & 2.5 MHz \\ E6 & 4 MHz \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance of Each Offloadee. Figure 5: Comparison of total cost of delay and energy consumption weight at 0.5. Black indicates the computation offloading method based on Lyapunov algorithm, red indicates the computation offloading method based on classical Q-learning algorithm, and green indicates the computation offloading method of DQN algorithm proposed in this paper, comparing the cost of the three approaches when the delay and energy consumption are equally important. Figure 6: Comparison of total cost when the delay weight is 0.9.