Inter-Satellite Cooperative Offloading Decision and Resource Allocation in Mobile Edge Computing-Enabled Satellite–Terrestrial Networks

Mobile edge computing (MEC)-enabled satellite–terrestrial networks (STNs) can provide task computing services for Internet of Things (IoT) devices. However, since some applications’ tasks require huge amounts of computing resources, sometimes the computing resources of a local satellite’s MEC server are insufficient, but the computing resources of neighboring satellites’ MEC servers are redundant. Therefore, we investigated inter-satellite cooperation in MEC-enabled STNs. First, we designed a system model of the MEC-enabled STN architecture, where the local satellite and the neighboring satellites assist IoT devices in computing tasks through inter-satellite cooperation. The local satellite migrates some tasks to the neighboring satellites to utilize their idle resources. Next, the task completion delay minimization problem for all IoT devices is formulated and decomposed. Then, we propose an inter-satellite cooperative joint offloading decision and resource allocation optimization scheme, which consists of a task offloading decision algorithm based on the Grey Wolf Optimizer (GWO) algorithm and a computing resource allocation algorithm based on the Lagrange multiplier method. The optimal solution is obtained by continuous iterations. Finally, simulation results demonstrate that the proposed scheme achieves relatively better performance than other baseline schemes.


Introduction
With the development of space technology and communication technology, the number of satellites in space has increased dramatically. In the future 6G network, satellite networks can be used as supplements to terrestrial cellular networks to achieve seamless full-domain coverage [1]. In addition, the satellite mobile system also has high viability when disasters happen [2]. When terrestrial network entities are destroyed by natural disasters, such as earthquakes and typhoons, people can rely on satellites to access services. Therefore, for remote areas that are not covered by terrestrial networks or disaster areas where terrestrial networks are destroyed, satellite networks can replace or assist terrestrial networks to provide services to users. The integration of satellite networks and terrestrial networks, i.e., satellite-terrestrial networks (STNs), has received extensive attention from the academic world and the industrial world [3]. STNs have advantages such as wide coverage, strong robustness, and strong damage resistance.
Since the rise in popularity of smartphones and Internet of Things (IoT) devices, various applications have been emerging endlessly in people's daily life. Some of them, The main contributions of this paper are as follows: • The system model of the MEC-enabled STN is established to provide MEC services in remote or disaster areas by utilizing inter-satellite cooperation. The joint task offloading and computing resource allocation problem is formulated to minimize the task completion delay and decomposed into a task offloading decision problem and a computing resource allocation problem. • An inter-satellite cooperative joint offloading decision and resource allocation optimization scheme, which consists of a task offloading decision algorithm based on the Grey Wolf Optimizer (GWO) algorithm and a computing resource allocation algorithm based on the Lagrange multiplier method is proposed. The optimal task offloading decision and computing resource allocation are obtained by the proposed scheme. • The performance of the proposed scheme is evaluated by comparing it with other baseline schemes with respect to the variation of some parameters. Simulation results demonstrate the performance gain of the proposed scheme.
The rest of this paper is organized as follows. Section 2 introduces related works. Section 3 describes the system model. The task completion delay minimization problem for all IoT devices is formulated in Section 4. In order to solve this problem, the corresponding algorithm is designed in Section 5. In Section 6, simulations and an analysis are presented. Section 7 concludes this paper.

Related Work
Non-terrestrial networks, particularly satellite networks, were proposed to be integrated with terrestrial networks in the early 2030s. Moreover, the most anticipated function of the STN was to provide coverage to rural and remote areas [18]. The authors in [19] proposed satellite MEC. MEC servers deployed at LEO satellites enabled devices without a nearby MEC server to enjoy MEC services through satellite links. In addition, a cooperative computation offloading model was designed to realize parallel computation in STNs, which minimized user-perceived delay and system energy consumption by optimizing task scheduling. Through radio frequency (RF) communication or optical communication, ISLs can realize data communication, interconnection, and information relay. Moreover, compared with RF ISLs, optical ISLs have the advantages of broader bandwidth, lower energy consumption, and lower interference [20]. According to [21], inter-satellite laser technologies can establish ISLs and achieve transmission between satellites at a high speed. With the aid of optical or visible light communication systems, LEO satellites can achieve connection through intra-plane ISLs and inter-plane ISLs [22]. In [23], some satellites temporarily formed a task group, where the access satellite was responsible for task and resource scheduling, while others were responsible for computing tasks. The authors in [24] proposed a double-edge computing STN architecture, where an access satellite can send tasks to other satellites for computing. They also proposed a double-edge computation offloading algorithm to minimize system energy consumption and reduce task offloading delay. In [25], a double-edge intelligent integrated STN was designed. Satellite MEC servers were grouped by ISLs, and they can assist terrestrial MEC servers in computing tasks. A task migration strategy based on a greedy algorithm was proposed to achieve load balancing and reduce system delay. The authors in [26] proposed a hybrid cloud and edge computing LEO satellite network architecture, where the tasks of ground users can be completed in one of three places, i.e., the ground user themselves, the LEO satellite, or the terrestrial cloud server. They also came up with a distributed algorithm to minimize the sum energy consumption of the ground users. The authors in [27] proposed an MEC framework for the terrestrial-satellite IoT. With the assistance of terrestrial-satellite terminals, IoT mobile devices can offload tasks to LEO satellites for computing. They also proposed an energy-efficient algorithm for computation offloading and resource allocation, thereby minimizing the weighted sum of energy consumption of IoT mobile devices.
Most of the above works investigate the satellite-terrestrial cooperation or the intersatellite cooperation in the presence of terrestrial networks, where satellites usually assist terrestrial entities. However, there are few works that investigate inter-satellite cooperation to assist users in computing tasks in areas not covered by terrestrial networks.
Algorithms for computation offloading include heuristic algorithms, meta-heuristic algorithms, game theory-based algorithms, etc. [28]. Algorithms for resource allocation include convex optimization algorithms, heuristic algorithms, game theory-based algorithms, etc. Convex optimization algorithms are widely investigated and can easily obtain suboptimal solutions. However, they are complex and not easy to implement in actual systems. Heuristic algorithms are efficient and can quickly obtain solutions, but they are prone to fall into the local optimum. Meta-heuristic algorithms have too many parameters, which are not easy to adjust. Game theory-based algorithms are simple, flexible, and easy to implement. However, the obtained solution may not be globally optimal and the Nash equilibrium needs to be reached through continuous iterations [29]. The GWO algorithm is a meta-heuristic algorithm with few parameters. Therefore, we propose a task offloading decision algorithm based on the GWO algorithm.

System Model
In this section, the network model is proposed first. Then, the channel model is presented. Lastly, the computation model is introduced.

Network Model
As shown in Figure 1, a remote area beyond the reach of terrestrial BSs is considered in this paper. There is an LEO satellite 1 in space, called the local satellite, around which there are M − 1 neighboring satellites, i.e., LEO satellite j, j ∈ M, where M = {2, 3, . . . , M}. All satellites in the same orbit move in the same circular direction. We define a satellite within the communication range of the local satellite at the moment as a neighboring satellite. These LEO satellites are all deployed with MEC servers. N IoT devices are randomly distributed in the ground area covered by the local satellite, and the set composed of them is denoted by N . These IoT devices are equipped with satellite antennas and can communicate with the local satellite directly. Each IoT device requests an indivisible task; for instance, IoT device i requests task i, denoted by (c i , a i ), where c i is the computation intensity, i.e., computing resources required for computing one bit of task i (cycles per bit), and a i is the data size of task i (bits). Different IoT devices have different computing capabilities. MEC servers have more computing resources than IoT devices, but the computing resources of MEC servers are still limited. Task generation mechanisms may be periodic generation, random generation, and event-triggered generation. The problem we study is to build the corresponding task model for the set of tasks generated by the IoT devices in the network at a certain moment. We assume that each IoT device has only one task at the moment and perform computation offloading according to the task model. Based on the offloading decision, the local computing portion of the task of each IoT device is computed by the IoT device itself. The satellite allocates its computing resources to the offloading portion of the tasks of the IoT devices and concurrently computes the tasks offloaded by the IoT devices. There are three strategies to complete task i, i ∈ N . IoT device i computes task i locally, i.e., local computing. IoT device i offloads task i to the local satellite, and task i is computed by the local satellite's MEC server, i.e., local satellite edge computing. IoT device i offloads task i to the local satellite, then task i is migrated to neighboring satellite j, j ∈ M and computed by the neighboring satellite's MEC server, i.e., neighboring satellite edge computing.

Channel Model
In order to avoid the interference among IoT devices, orthogonal frequency division multiple access (OFDMA) technology is used. Subcarriers with equal bandwidth are allocated to IoT devices. The satellite-terrestrial transmission links between IoT devices and the local satellite use the Ka band [27] and have high communication rates. Since the line-of-sight (LOS) transmission is mainly considered in the link, the Rice channel is used. Free-space path loss (FSPL) and additive white Gaussian noise (AWGN) are taken into consideration. The achievable data rate of the link between IoT device i and the local satellite is: where B i,1 is the subchannel bandwidth, p i is the transmission power of IoT device i, g i is the antenna gain of IoT device i, H i,1 is the channel gain of the link, and N 0 i,1 is the noise 2 , c is the light velocity (meter per second), d i,1 is the distance between IoT device i and the local satellite (meter), and f is the carrier frequency (hertz).
where R e is the earth radius, h s is the LEO satellite orbit altitude, and θ ec is the covering geocentric angle. θ ec = arccos R e cos θ min u /(R e + h s ) − θ min u , θ min u is the minimum elevation angle of the IoT devices on the ground to the satellite [30]. The ISLs between the local satellite and neighboring satellites use the Ka band [31]. FSPL and AWGN are taken into account. The achievable data rate of the link between the local satellite and neighboring satellite j, j ∈ M is: where B 1,j is the subchannel bandwidth, P is the transmission power of the local satellite, G is the antenna gain of the local satellite, H 1,j is the channel gain of the link, and N 0 1,j is the noise power of the link. G ≈ (4D TA f /c) 2 , and D TA is the diameter of the local satellite's transmitting antenna [31].
and l 1,j is the distance between the local satellite and neighboring satellite j (meter). Normally, each satellite has four neighboring satellites, two in the same orbit and the other two in the left and right orbits. The distance between the local satellite and the neighboring satellite in the same orbit is and J is the number of satellites in each orbit. The distance between the local satellite and the neighboring satellite in different orbits is l 1,j = ω cos(lat), , where lat is the latitude where the ISL of the current satellite locate, and I is the number of orbits of satellite constellation [32].

Computation Model
To represent the task offloading strategies, we set indicator variables, i.e., y i,0 , y i,1 , y i,j ∈ {0, 1}, ∀i ∈ N , and ∀j ∈ M. When task i is completed by local computing, y i,0 = 1, otherwise, y i,0 = 0. When task i is completed by local satellite edge computing, y i,1 = 1, otherwise, y i,1 = 0. When task i is completed by neighboring satellite edge computing, y i,j = 1, otherwise, y i,j = 0.
When y i,0 = 1, the task computing delay of IoT device i is: where f i,0 is the computing capacity of IoT device i (cycles per second). When y i,1 = 1, the task completion delay of IoT device i includes the delay with which IoT device i offloads task i to the local satellite, the propagation delay between IoT device i and the local satellite, and the delay that the local satellite's MEC server computes task i.
where f i,1 is the computing resource allocated to task i by MEC server of the local satellite (cycles per second). When y i,j = 1, the task completion delay of IoT device i includes the delay that IoT device i offloads task i to the local satellite, the propagation delay between IoT device i and the local satellite, the delay with which the local satellite migrates task i to neighboring satellite j, the propagation delay between the local satellite and neighboring satellite j, and the delay with which neighboring satellite j's MEC server computes task i.
where f i,j is the computing resource allocated to task i by the MEC server of neighboring satellite j (cycles per second).
In all of the cases above, the delay of IoT devices downloading task computing results from the local satellite or neighboring satellites is neglected, because the size of output resulting data obtained after task computation is usually much smaller than the size of input data [33].

Problem Formulation
The task completion delay of all IoT devices can be expressed as: The optimization objective of this paper is minimizing the task completion delay of all IoT devices. The optimization variables are y i,0 , y i,1 , y i,j , f i,1 , and f i,j . The problem P is as follows.

P : min
Equation (7a) is the objective function. Equation (7b) represents that computing resources allocated to task i cannot surpass the resources owned by the local satellite's MEC server, i.e., F 1 . Equation (7c) shows that computing resources allocated to task i cannot exceed the resources of the MEC server of neighboring satellite j, i.e., F j . Equations (7d) and (7e) mean that the MEC server's computing resource allocation for task i is non-negative. Equation (7f) denotes that only one strategy is selected to complete task i. Equation (7g) means that y i,0 , y i,1 , and y i,j are 0 or 1. P consists of the IoT devices' task offloading decision and the computing resource allocation of the local satellite's MEC server and neighboring satellites' MEC servers. P includes discrete variables and continuous variables, so it is a mixed-integer nonlinear programming problem (MINLP), which is NP-hard.

Algorithm Design
From P, it can be seen that y i,1 and f i,1 , y i,j and f i,j interact with each other, respectively. Since the variables are coupled, it is necessary to decouple them. Assuming y * i,0 , y * i,1 , and y * i,j , ∀i ∈ N , ∀j ∈ M are given, the sets N D = i y * i,0 = 1 , N L = i y * i,1 = 1 , and N N = i y * i,j = 1, ∀j ∈ M can be obtained. P can be transformed into P1.
Equation (8a) is the objective function. The meanings of (8b)-(8e) are similar to the meanings of (7b)-(7e). From P1, it can be seen that the delay of local computing is a constant. Moreover, the computing resource allocation problem of the local satellite's MEC server and the computing resource allocation problem of the neighboring satellites' MEC servers are independent of each other. Therefore, P1 can be decomposed into two sub-problems, i.e., P1.1 and P1.2, and then f * i,1 and f * i,j can be obtained by solving P1.1 and P1.2, respectively.
P1.1 is the computing resource allocation problem for the local satellite's MEC server, which is represented as: s.t. (8b) and (8d).
The objective function in (9) is set as U L . Then we can have ∂U L /∂ f i,1 = −c i a i /( f i,1 ) 2 , which is less than 0. ∂ 2 U L /∂( f i,1 ) 2 = 2c i a i /( f i,1 ) 3 , which is greater than 0. ∂ 2 U L /(∂ f i,1 ∂ f j,1 ) = 0, i, j ∈ N L , i = j. The Hessian matrix of U L is positive definite, so U L is convex. P1.1 can be solved by using the Lagrange multiplier method. The Lagrangian function is constructed as: where θ is the Lagrange multiplier and θ ≥ 0. The KKT conditions of P1.1 are listed as: (8b) and (8d), f i,1 = √ c i a i /θ is obtained from (11). Substituting it into (12), we can obtain Considering (8d), we can deduce: P1.2 is the computing resource allocation problem for neighboring satellites' MEC servers, which is expressed as: s.t. (8c) and (8e).
Since the computing resource allocation of each neighboring satellite is independent of each other, P1.2 can be decomposed into M − 1 sub-problems, one of which is P1.3.
The objective function in (17) is set as U N . Then, we can have which is less than 0.
The Hessian matrix of U N is positive definite. Hence, U N is convex. P1.3 can be solved by using the Lagrange multiplier method. The Lagrangian function is constructed as: where λ is the Lagrange multiplier and λ ≥ 0. The KKT conditions of P1.3 are listed as: (8c) and (8e), Similar to solving P1.1, f i,j = √ c i a i /λ is obtained from (19). Substituting it into (20), we can obtain Given (8e), we can obtain: s.t. (7f) and (7g).
Equation (24) is the objective function. P2 is an integer linear programming (ILP) problem, which is NP-hard. When the scale of a problem is large, it is difficult to obtain the optimal solution in polynomial time. ILP problems can be solved by intelligence optimization algorithms, one of which is the GWO algorithm. The GWO algorithm is widely used and has few parameters and is easy to implement [34].
According to the GWO algorithm [35], the grey wolf population is highly hierarchical and each wolf represents a feasible solution. The top rank wolf is α, i.e., the optimal solution. The second rank wolf is β, i.e., the suboptimal solution. The third rank wolf is δ, i.e., the third optimal solution. The remaining wolves are ω, which are the lowest rank and form a set N ω , i.e., the remaining solutions. The prey is the optimal solution to the problem. During each iteration, α, β, and δ command ω to encircle, hunt, and attack the prey to obtain the optimal solution.
We use N W to represent the number of grey wolves in the population. The wolf l is encoded as X l = [x l,1 , x l,2 , x l,3 , . . . , x l,N ], where x l,i is the task offloading decision of task i of wolf l. To be specific, x l,i = 0 represents local computing, x l,i = 1 means local satellite edge computing, x l,i = j, j ∈ M denotes neighboring satellite j edge computing. After such coding, Equations (7f) and (7g) are satisfied. The grey wolves' hunting of prey consists of three phases, i.e., encircling, hunting, and attacking.
During the encircling phase, the grey wolves scour the prey, and then approach and encircle it gradually. The distance between l and the prey p is denoted by D = C · X p (t) − X l (t) , ∀l ∈ N ω , and the updating of X l is X l (t + 1) = X p (t) − A · D, where t is the number of iterations, X l is the position of l, X p is the position of p, and A and C are coefficient vectors. A = 2 a · r 1 − a, C = 2 · r 2 , where a is the convergence factor, which reduces from 2 to 0 linearly as t increases, a = 2 · (1 − t/t max ). Both r 1 and r 2 are random vectors in [0, 1]. t max is the maximum number of iterations.
During the hunting phase, the grey wolves ω identify and track the location of prey according to the command of α, β, and δ. The distance between l and α, β, δ are expressed as X β , and X δ are the positions of α, β, and δ in that order. C 1 , C 2 , and C 3 are all random vectors. The step length and direction that l moves forward to α, β, and δ are X 1 = X α − A 1 · D α , X 2 = X β − A 2 · D β , and X 3 = X δ − A 3 · D δ respectively. The updating of X l is X l (t + 1) = X 1 + X 2 + X 3 /3.
During the attacking phase, the prey stops moving and the grey wolves attack it. As the value of a decreases from 2 to 0 linearly, the value of A varies within the interval − a , a . When A < 1, the grey wolves the prey. When A > 1, the grey wolves move away from it to find a better one, which is conducive to jump out of the local optimum.
In addition to A, another search coefficient, i.e., C also helps obtain the global optimal solution. C is composed of random values in [0, 2], which can provide random weights for the prey, so that the search of prey by grey wolves has randomness, thus helping to avoid falling into the local optimum.
The fitnesses of l, α, β, and δ are U l , U α , U β , and U δ , respectively. During each iteration, the GWO algorithm compares U l with U α , U β , and U δ , and then updates X α , X β , X δ , U α , U β , and U δ . When t max is reached, X α is the optimal solution to the problem, and U α is the optimal objective function value. According to X α , y * i,0 , y * i,1 , and y * i,j can be determined. In this paper, we propose an inter-satellite cooperative task offloading scheme based on the GWO algorithm. We make some modifications to the GWO algorithm. Since X l is a real number, which is inconsistent with the task offloading decision in integer form, we round it to convert the real number code into the integer code, so that the corresponding objective function value can be calculated and obtained.
The detailed step of the proposed joint offloading decision and resource allocation optimization scheme, which consists of a task offloading decision algorithm based on the GWO algorithm and a computing resource allocation algorithm based on the Lagrange multiplier method, and considers inter-satellite cooperation (GWOORAC), is expressed in Algorithm 1.

Algorithm 1 GWOORAC
1: Initialize the grey wolf population, a, A, and C. Set t = 1. Set t max .
2: Obtain f * i,1 by (15), obtain f * i,j by (23), thus calculating the fitness of each grey wolf. The top three wolves in fitness are identified as α, β, and δ, the other wolves are ω. 3: while 1 ≤ t ≤ t max do 4: for each l ∈ N ω do 5: Update X l . 6: Update a, A, and C.
To sum up, the X α that is obtained finally is the optimal task offloading decision, i.e., y * i,0 , y * i,1 , and y * i,j . The corresponding f * i,1 and f * i,j are the optimal computing resource allocation. U α is the minimum task completion delay. The complexity of Algorithm 1 is O(t max N W N).

Simulation and Analysis
In this section, the delay is evaluated by performing our scheme and other baseline schemes. The results are also analyzed.

Simulation Parameters
The simulation parameters of this paper are shown in Table 1. The variables a i and f i,0 follow random distribution within the intervals of [0.5, 5] Mbits and [1,2] Gcycles/s, respectively. K is the Rice factor. The main references for simulation parameter settings are [16,24,25,27,30,31]. To validate our scheme, GWOORAC was compared with other baseline schemes described below. The first scheme uses the GWO algorithm to determine the offloading decision, allocates the resources randomly, and considers inter-satellite cooperation (GWORandRAC). The second scheme obtains the offloading decision randomly, optimizes the resource allocation, and considers inter-satellite cooperation (RandORAC). The third scheme uses the GWO algorithm to make the offloading decision, optimizes the resource allocation, and takes no account of inter-satellite cooperation (GWOORANC). The fourth scheme only has local computing, and the rest is the same as our scheme (OLC). The fifth scheme uses the particle swarm optimization (PSO) algorithm to determine the offloading decision, optimizes the resource allocation, and considers inter-satellite cooperation (PSOORAC). The number of particles is 20. The maximum number of iterations is 200. The inertia weight is 0.8 and both learning factors are 1.5. All simulation results were obtained by averaging 300 times simulations.

Simulation Results and Analysis
As shown in Figure 3, as the number of IoT devices, i.e., N, increases, the delay of all schemes increases gradually. GWOORAC has the lowest delay, and the more IoT devices, the more the delay reduction. Compared with GWORandRAC, the delay is relatively close when N = 10. However, when N > 10, the delay reduction increases notably, which demonstrates that our optimal resource allocation is effective. The delay of GWOORAC is lower than that of RandORAC. Moreover, the delay reduction increases notably when N > 15, which proves the effectiveness of the GWO algorithm. Compared with GWOORANC, there is little difference in the delay when N ≤ 25. By contrast, when N > 25, the difference between the delay of GWOORAC and that of GWOORANC increases gradually, which indicates that the inter-satellite cooperation is of great significance in reducing the delay. The computing resources of MEC servers are much larger than those of IoT devices, and each task can be allocated more computing resources than the computing capacity of IoT devices when tasks are offloaded to satellites for computing; thus, the delay of OLC is much higher than that of GWOORAC. Moreover, although the delay increases as N increases, the increasing speed of GWOORAC is much smaller than that of OLC.  Figure 4 shows that GWOORAC has the lowest delay. As the number of satellites, i.e., M increases, the delay of GWOORAC, GWORandRAC, and RandORAC decreases gradually, because more neighboring satellites bring more computing resources, and more computing resources are available for each offloaded task. Neither GWOORANC nor OLC takes into account neighboring satellites, so their delay almost does not change with the variation of M. Due to the optimal resource allocation, the delay of GWOORAC is much lower than that of GWORandRAC. The delay of GWOORAC is much lower than that of RandORAC, which indicates that the GWO algorithm is appropriate to solve the problem. When M ≥ 2, the delay of GWOORAC is lower than that of GWOORANC, and the gap gets larger, which demonstrates that the inter-satellite cooperation reduces the delay. Compared with OLC, the delay of GWOORAC is much lower, and the delay reduction becomes larger as M increases, because a large number of computing resources can be allocated to each offloaded task, far more than the computing capacity of IoT devices. As Figure 5 shows, the delay of all schemes except OLC shows downward trends as the computing resources of each satellite, i.e., F 1 and F j , increase. The reason is that the more computing resources a satellite has, the more computing resources are allocated to offloaded tasks, which reduces the delay of computing tasks. OLC does not consider computation offloading, so its delay is not affected by F 1 and F j . Due to reasonable resource allocation, the delay of GWOORAC is much lower than that of GWORandRAC. The delay of GWOORAC is lower than that of RandORAC, which indicates that the GWO algorithm can obtain an appropriate task offloading decision, thereby reducing the delay. The delay of GWOORAC is lower than that of GWOORANC, which proves that the inter-satellite cooperation reduces the delay effectively. The delay of GWOORAC is much lower than that of OLC, and the delay reduction becomes larger gradually. This demonstrates that a combination of suitable task offloading decisions and reasonable computing resource allocation can reduce the delay significantly. As shown in Figure 6, the delay of all schemes shows upward trends as the computation intensity, i.e., c i , increases, because of the increased task computation delay. The delay of GWOORAC is much lower than that of GWORandRAC due to the optimal computing resource allocation. The delay of RandORAC is higher than that of GWOORAC, which validates that the GWO algorithm can obtain the proper task offloading decision, thus reducing the delay. Thanks to the inter-satellite cooperation, the delay of GWOORAC is lower than that of GWOORANC. The computing capacity of IoT devices is weaker than that of MEC servers, so the delay of OLC is higher than that of GWOORAC, and its growth speed is much faster than that of GWOORAC. When c i ≤ 400 cycles/bit, the delay of GWOORAC and other schemes is fairly close. When c i > 400 cycles/bit, the gap becomes larger, which validates that both the appropriate task offloading decision and the proper computing resource allocation are necessary. As shown in Figure 7, the data size of each task, i.e., a i is assumed to be the same. As a i increases, the delay of all schemes increases. The reason is that the data size is bigger, and the corresponding task transmission delay and task migration delay are higher. Additionally, the computing resources required by a task are proportional to its data size, which means that big data sizes bring high task computation delay. Compared with GWORandRAC, the delay of GWOORAC is much lower due to the optimal resource allocation. As can be seen from the fact that the delay of GWOORAC is lower than that of RandORAC, the task offloading decision obtained by the GWO algorithm can reduce the delay. The gap between the delay of GWOORAC and that of GWOORANC shows the contribution of the inter-satellite cooperation. The delay of OLC is much higher than that of GWOORAC, which validates the effectiveness of GWOORAC.
As Figure 8 shows, the delay of both schemes increases with the increase of N. The delay of GWOORAC is lower than that of PSOORAC. This is because the values of the parameters, such as A, are adaptive, allowing for a better balance between exploration and exploitation, thus more effectively avoiding falling into the local optimum.

Conclusions
In this paper, we investigate inter-satellite cooperative task offloading and resource allocation in an MEC-enabled STN. The task completion delay optimization problem for all IoT devices when the tasks are indivisible is formulated and decomposed. Then, we propose a joint offloading decision and resource allocation optimization scheme, which consists of a task offloading decision algorithm based on the GWO algorithm and a computing resource allocation algorithm based on the Lagrange multiplier method, thus obtaining the optimal task offloading decision and allocating optimal computing resources of the local satellite's MEC server and neighboring satellites' MEC servers. Simulation results validate that the proposed scheme performs better than the other baseline schemes in the following cases: the number of IoT devices is large, the number of satellites is large, each satellite has numerous computing resources, the computation intensity is high, or the data size is big. Much work remains to be done in the future. For example, we will investigate inter-satellite cooperation, where multiple satellites with MEC servers can simultaneously receive tasks offloaded by IoT devices and assist IoT devices in computing tasks in areas not covered by terrestrial networks.