# Research on Task-Oriented Computation Offloading Decision in Space-Air-Ground Integrated Network
## 2 Materials and Methods
### Computation Offloading Decision Process
To avoid network interruption caused by the change of offloading network, it is required to select the most optimal offloading sites before computation offloading process, construct the most optimal offloading network, and reduce the probability of network switching in the decision process. Figure 4 shows the mobile model of the task offloading process. Among the model, Point O represents the terminal position where the current task of the network is offloaded, Point A represents the initial position of the offloading sites when task offloading, and Points B, C, and D are the positions during the movement of the offloading sites. When the offloading sites move to the boundary of D, but the task offloading calculation has not been completed, the task offloading may be failing. Next, we choose the offloading network by calculating the residence time of the offloading sites within the network. From the Friss equation for calculating the turbulence transmission loss in free space [29] and the wireless signal strength attenuation model based on cubic spline interpolation [30], the signal strength \(P_{A}\) of the offloading terminal at A point can be obtained, as shown in Equation (1):  
\[P_{A}=P_{\xi}-10\phi\times\log_{10}(d) \tag{1}\]  
where \(P_{\xi}\) represents the signal strength reference value, and \(\phi\) represents the wireless network signal attenuation factor. Figure 4: Task Offloading Process Movement Model. The connection boundary of the wireless network is a circular shape. Its center, O, is the transmitting and receiving antenna of the signal of the offload terminal device, which represents the terminal location of the current task offload of the network. The radius of the boundary circle (indicated by the dotted line) is the connection range of the infinite network, and the solid line indicates the moving path of the terminal equipment within the circle, where Point A represents the initial position of the offloading site when the task is unloaded, and Points B, C and D are the positions of the offloading site in the process of moving. The distance \(d_{OA}\) between the offloading terminal O and the initial position A of the offloading site is shown in Equation (2):  
\[d_{OA}=\frac{P_{\xi}-P_{A}}{10\phi} \tag{2}\]  
In the same way, the distance \(d_{OB}\) from Point O to Point B can be obtained. From the known moving speed \(v\) of the offloading terminal O and the time \(t_{AB}\) required for the offloading terminal to move in the AB segment, calculate the distance \(d_{AB}\) between AB, as shown in Equation (3):  
\[d_{AB}=t_{AB}\times\
u \tag{3}\]  
OC is the vertical line of the offloading terminal's moving path. According to the triangle side length equation, triangle similarity theorem, and the known triangle side length, the distance between AD can be calculated finally. The resident time \(T_{j}^{resident}\) of the terminal device in the wireless network is as shown in Equation (4):  
\[T_{j}^{resident}=\frac{d_{AD}}{\
u} \tag{4}\]  
A task \(i\) of the offloading terminal is offloaded to the offloading site \(j\) for execution, and the maximum calculation amount \(f_{maxgive}\) provided by the offloading site \(j\) to the terminal device in the network is calculated as Equation (5):  
\[f_{maxgive}=(T_{j}^{resident}-T_{i}^{s}-T_{i}^{r})\times f_{j} \tag{5}\]  
where \(T_{i}^{s}\) represents the transmission time of task \(i\) data offloading to the specified offloading site, \(T_{i}^{r}\) represents the data return time after the task is calculated and processed at the offloading site, and \(f_{j}\) represents the computing capacity of the offloading node \(j\). In the task computation offloading decision process, the computing capacity of all offloading sites in the current network is judged according to \(T_{j}^{resident}\) and \(f_{maxgive}\), the \(f_{maxgive}\) s are sorted according to the value, and then select the most optimal offloading network. Use control parameters to represent the system state of the [PERSON] decision process model in the offloading network.