{'fraction_non_alphanumeric': 0.03370132342074031, 'fraction_numerical': 0.011554739458539534, 'mean_word_length': 4.273113708820404, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Collaborative Multi-Resource Allocation in Terrestrial-Satellite Network Towards 6G

Terrestrial-satellite networks are envisioned to play a significant role in the sixth-generation (6G) wireless networks. In such networks, hot air balloons are useful as they can relay the signals between satellites and ground stations. Most existing works assume that the hot air balloons are deployed at the same height with the same minimum elevation angle to the satellites, which may not be practical due to possible route conflict with airplanes and other flight equipment. In this paper, we consider a TSN containing hot air balloons at different heights and with different minimum elevation angles, which creates the challenge of non-uniform available serving time for the communication between the hot air balloons and the satellites. Jointly considering the caching, computing, and communication (3C) resource management for both the ground-balloon-satellite links and inter-satellite laser links, our objective is to maximize the network energy efficiency. Firstly, by proposing a tapped water-filling algorithm, we schedule the traffic to relay among satellites according to the available serving time of satellites. Then, we generate a series of configuration matrices, based on which we formulate the relationship of relay time and the power consumption involved in the relay among satellites. Finally, the integrated system model of TSN is built and solved by geometric programming with Taylor series approximation. Simulation results demonstrate the effectiveness of our proposed scheme.


I. INTRODUCTION
In 6G, terrestrial-satellite networks (TSN) will become the key leverage to explore airspace resources for communications [1][2][3][4]. In such networks, laser based inter-satellite links working at Terahertz frequency can support high-capacity transmissions among low earth orbit (LEO) satellites [5]. Meanwhile, the large distance between satellites and ground stations necessitates relays, such as hot air balloons, between the terrestrial and satellite segments [6]. A TSN integrates caching, computing, and communication (3C), each of which may consume considerable energy. Therefore, maximizing the energy efficiency performance will be one of the main design objectives of TSN in 6G [7,8].
Communications in a TSN involve steps of data traffic collection, transmission, and relay. In a previous work [1], we studied such a TSN with the above steps but without considering hot air balloons as relays or laser link among satellites. In practice, a TSN can be very complex due to the following reasons.
Firstly, there can be relays such as hot air balloons between satellites and ground stations.
In real-world environment, the relays may be deployed at different heights due to a variety of reasons, such as avoiding airplane routes. Additionally, the minimum elevation angle from the hot air balloons to the satellites may not be identical either. Define the time allowing communications between a relay and its serving satellite as time windows. Then, the time windows for each relay to communicate to a satellite can be unique. Modeling and studying the above real-world TSN scenario is challenging and important. However, relays with different heights and minimum elevation angles are not yet considered in the existing works, to the best of our knowledge.
Secondly, regarding the laser links among the satellites, it is necessary to determine the number of lasers per satellite as well as develop a proper scheme for scheduling inter-satellite traffic. If the number of lasers per satellite is large, delay is low, power consumption can be high, and scheduling can be complex. By contrast, if the number of lasers per satellite is small, power consumption is low, but the delay is large.
Finally, in additional to the energy efficiency of communications between the relays and satellites and among the satellites, as mentioned above, the communications between ground stations and hot air balloons should be involved while considering the network energy efficiency. Moreover, the energy consumption of caching and computing should also be included, in additional to that of communication. This requires a joint allocation of the 3C resources.
Existing works contributed to TSNs from different aspects. In [9], a framework to efficiently deploy customized service function chains was proposed in terrestrial-satellite hybrid cloud networks, which enables computation and data traffic off-loading in a TSN. In [10], a genetic algorithm based method was proposed to increase the coverage of a TSN. In [11], a novel network architecture was proposed to provide seamless and high data-rate wireless service in a TSN, where the terrestrial and satellite segments are jointly designed. In [12], a dynamic space-air-ground resource pool was proposed by a software-defined space-air-ground integrated framework to effectively manage the network in a seamless, efficient, and cost-effective manner.
In [13], an unmanned aerial vehicle (UAV) aided space-air-ground network was proposed to provide seamless coverage and high system throughput. However, the system models used in most of the existing works considered the case that all hot air balloons were deployed at an equal height and with the same minimum elevation angle. In [14], a UAV based relay system was proposed in a non-terrestrial network. In [15], UAV was leveraged to optimize computation offloading with minimum energy consumption in mobile edge computing.
In terms of the relay inter-satellite links, a routing and wavelength assignment algorithm was proposed to reduce the system cost of inter-satellite laser communication in [16]. This work focused on the allocation of optical wavelengths, without considering the optimal minimum number of lasers. In [17], joint wavelength allocation and routing to decrease the system energy consumption was investigated. In [18], a hybrid satellite-terrestrial relay framework was proposed for a TSN with multi-antenna satellites, and a user-relay selection method was developed to minimize system outage probability. However, the relationship between the number of lasers for inter-satellite relaying and the resulting relay time needs further investigation. Motivated by the above observations, we aim to maximize the system energy efficiency in a TSN while considering: 1) relays of hot air balloons between satellites and ground stations at different heights and minimum elevation angles; 2) the relation between the delay of intersatellite relay and the number of configured lasers per satellite; 3) integrated energy efficiency considering the 3C in the integrated TSN.
We first model the system, in which hot air balloons hover at different heights with different elevation angles. The time window between a hot air balloon and a satellite is determined by the minimum elevation angle and their distance. Thus, the time windows are heterogeneous among satellites due to the different heights of hot air balloons. For inter-satellite links, as there are multiple source, relay, and target satellites, the amount of traffic to be relayed among satellites can be represented by a traffic matrix. We propose an algorithm to determine the traffic matrix from finding multiple sub-traffic-matrices (STMs) in a water-filling manner [19,20].
The allocation guarantees that the relaying happens during the time windows of the involved source and target satellites. The next step is to relay the data within STMs to the corresponding target satellites. This step is completed by a well-designed configuration matrices generation algorithm. We derive the relationship between the relay time and the number of lasers, based on which we can sufficiently utilize the relay time and reduce the number of lasers used for inter-satellite communications. Finally, we maximize the system energy efficiency considering constraints including the number of lasers and the traffic delay, etc. By geometric programming with Taylor series approximation, we derive the optimal parameters to maximize the system energy efficiency.
Our main contributions can be summarized as follows: 1) we propose an algorithm in a water-filling manner [19,20] to relay data among satellites.
The proposed algorithm can guarantee that the data is relayed during the time windows of the involved source and target satellites, thereby avoid the overflow.
2) we propose a configuration matrices generation method to relay data traffic in multiple schedules. We also derive the optimal number of lasers subject to the available time for relay among satellites, and achieve a tradeoff between the delay and the required number of lasers for inter-satellite links.
3) we maximize the system energy efficiency considering various real-world constraints, including the period of a satellite serving a ground station, the transmission power of ground stations, hot air balloons, and satellites, and the number of lasers at each satellite, etc. The novelty of our system model is that the hot air balloons hover at different height with different minimum elevation angle. To the best of our knowledge, this is the first work to address the difference in hovering height and minimum elevation angle problem of hot air balloons.
The remainder of this paper is organized as follows. Section II presents the network model. Section III presents the problem formulation. Section IV presents the STMs determination. Section V presents the configuration matrices generation method. Section VI solves the collaborative multi-resource allocation optimization problem. Numerical results demonstrate the performance gain of the proposed algorithms in Section VII. We conclude the paper in Section VIII.
Notation: Standard notations are used in this paper. |x| is the number of entries in vector x, and x(y) is the y-th element in x, where 1 ≤ y ≤ |x|. ⌈·⌉ and ⌊·⌋ denote rounding up and rounding down operations on a real number, respectively.

II. NETWORK MODEL
In this section, we introduce the network model of the considered TSN by segments, starting from the hot air balloons.   The considered system model is illustrated in Fig. 1, where S satellites constitute a low earth orbit (LEO) satellite network. The satellites provide service for S ground stations and each satellite has a dedicated ground station. Denote the number of satellites by S. We assume that the distance from all the satellites to the ground is the same, which is denoted by L. All satellites have the same orbital period given by

A. Hot Air Balloons
where µ=398,601.58 km 3 /s 2 is the Kepler constant, and r E is the radius of the Earth. One hot air balloon is hovering above and serving its ground station to play the role of a dedicated relay 6 between its ground station and the corresponding satellite. Considering the practical wireless and geographical environment, the distance from the hot air balloons to the ground stations generally differs with each other. We denote the distance from hot air balloon i (1 ≤ i ≤ S) to its ground station by l i .
Due to the orbiting motion of LEO satellites, a hot air balloon can connect with a satellite periodically. The continuous serving time between the hot air balloon and the satellite in the T LEO is called a time window, which is determined by the minimal elevation angle from the hot air balloon to the satellite. An air balloon can exchange data with its satellite only within the corresponding time window.
Specifically, denote the minimal elevation angle from the hot air balloon i to its satellite by β i and the geocentric angle of the satellite i by α i . Generally, a hot air balloon at a lower height has a larger minimum elevation to the satellite due to the thicker atmosphere for the wireless transmission between the hot air balloon and the satellite. Then, it holds that [1]: The time window of the satellite i denoted by T i , where T i ≤ T LEO , is given by The ground stations are connected through a wired network to form a cooperative computing resource pool as shown in Fig. 1. This network has the computing ability to generate and execute the scheme of collaborative multi-resource allocation to be developed.

B. LEO Satellites
The LEO satellite network considered in this work is shown in Fig. 2. We assume that, when the satellites circle the earth, they simultaneously arrive at the positions right above their corresponding hot air balloons. This is due to the identical orbital period T LEO for all satellites.
As shown in Fig. 2, the time window for each satellite is equally divided into two parts by the straight line from the ground station to the hot air balloon. For the wireless channel between a satellite and a hot air balloon, as well as that between a hot air balloon and a ground station, we use the omnidirectional path loss model as in existing works [1,[21][22][23]. The path-loss C (dB) for a link with distance l is denoted as: where f is the system operating frequency and equals to 3 GHz in the S-band. The unit of the distance l is kilometer (km), and the unit of the frequency f is GHz in the above path loss model. Due to the line of sight (LOS) channels between the ground stations and the hot air balloons, and that between the hot air balloons and the satellites, we consider only path loss in the wireless channel power gain, |H| 2 , as follows.
For the LEO satellite network, we use the Starlink project launched by SpaceX as a reference [24]. LEO satellites use inter-satellite-links (ISLs) to form a satellite backbone network in a lattice grid manner [25]. For the inter-satellite links, we assume that Terahertz signal [26][27][28] or optical signal is employed. Each satellite is configured with multiple lasers to generate the signals at high frequency, and multiple antennas to transmit and receive the signals.
Signals working at high frequency are highly directional due to the narrow wave beam. As an instance, in Fig. 3, the transmitting-receiving antenna pair must be aligned. This feature can lead to the requirement of multiple schedules to relay data, because of the limited number of lasers and antenna pairs at each satellite. In Fig. 3, each satellite has a cache for storing the data to be transmitted to other satellites. We call a laser currently generating a high frequency signal as an active laser, and a laser that are currently not in use as an inactive laser. In the example shown in Fig. 3, let the maximum number of lasers be 2. Then, at least two schedules are needed to complete a full traffic relay cycle for this four satellites network. For example at satellite 1, the two lasers can generate the signals to be transmitted to satellite 2 and satellite 4, respectively.
Thus, the data traffic heading to the satellite 3 will be transmitted in the next schedule.

C. Traffic Relaying Among Satellites
Traffic relaying among satellites can be illustrated as shown in Fig. 3. Each data traffic stream is generated by a laser and sent by a transmitting antenna. The data traffic is relayed among satellites and received by the receiving antenna of the target satellite. In practice, one hop of the transmission can be built between two satellites with the distance less than or equal to a pre-determined threshold. If the distance from the source satellite to the target satellite is larger than the threshold, a relay satellite is required. For instance, in Fig. 3, satellite 3 sends its data to satellite 1 via path 3 consisting of path 3a and path 3b with satellite 2 as the relay. The inter-satellite data traffic is represented by a matrix A = {a ij }, where a ij is the amount of data from the source satellite i to the target satellite j. We have a ii = 0 because satellite i does not need to send data to itself.
We assume that the number of schedules of the data is ϑ. Denote the average active number of lasers per satellite by m, which is bounded by the maximum value of m max . Denote the power to launch a laser by P Z . Denote the delay of aligning antennas before a scheduled transmission by δ Y . The basic energy consumption including circuit energy consumption, etc., for lasers of the satellites is The velocity of electromagnetic signal propagation in space is V = 3 × 10 8 m/s. Define the maximal distance among all paths of source-target satellites by Ω. Then, the overhead involved in data transmission among satellites is δ R = Ω/V . Prior to a scheduled transmission, overhead δ exists, which includes the alignment of antennas among satellites δ Y , and the data transmission time on paths of source-target satellites δ R . The total overhead time, denoted by δ, is formulated as: In eq. (7), for simplification, we assume that δ Y is the same for each satellite. Since we consider the upper bound of δ R , δ can be treated as a constant in each schedule.
In Fig. 3, a pair of transmitting-receiving antennas can act as the relay for data transmission.
The average traffic relay rate can be calculated by S i=1 S j=1 a ij /T Z k * , where T Z k * is the maximum relay time as shown in Fig. 2. Denote the static power consumption of one laser by P L 0 W/bps, then, the static energy consumption of lasers is Denote the dynamic power consumption of one laser by P L 1 W/bps, and the capacity of the inter-satellite channels by C 0 bps. Then, the dynamic energy consumption of lasers is In practice, P L 1 may depend on the distance between satellites and the signal frequency. In this work, P L 1 is assumed to be a constant for the considered TSN.

III. PROBLEM FORMULATION
In this section, we present the data process steps involved in the considered TSN and formulate a network energy efficiency maximization problem considering constraints on 3C resources.

A. Data Transmission and Relay
A service period in the system consists of 6 steps and is described as follows.
Step 1) Accumulation of data at ground stations. Data is gathered and accumulated at the ground stations for time T A before each transmission, with T A given by where n 0 ≥ 1 represents the number of circles the satellite orbiting over the Earth in between two transmissions, and n 0 T LEO is referred to as the serving period of satellites.
We denote the maximum value of n 0 by n max so that n max T LEO is the maximum tolerable system delay at the ground stations. Denote the average data arrival rate by λ i and the power consumption for caching data during the accumulation duration by P A W/bit.
Then, the energy consumption for caching the data at the ith ground station is P A λ i T A .
Step 2) Calculating the traffic scheduling and routing scheme. After the traffic accumulation, the computing servers of the ground stations cooperatively calculate the scheme of traffic scheduling and routing with a pre-determined algorithm. Denote the computing capacity of the cooperative computing pool at the ground stations by C HAB cycles/second (cps) and the computing demand of the data scheduling and routing in a network with S satellite by ηS cycles, where η is the average computing load for adding one satellite in the satellite relay network. The computing delay T C is give by In terms of the energy consumption of the computing resource, we denote the power consumption of the computing by P C W/cps. The corresponding energy consumption of computing ε C is Step 3) Transmission of data traffic from ground stations to hot air balloons. Let T G i denote the data transmission time from the ith ground station to its serving hot air balloon with transmission power P G i . Assume that the transmission bandwidth is B 0 , which is identical for all ground station to hot air balloon transmissions, and the power spectral density of the Gaussian white noise is σ 2 W/Hz. By eq. (5), the wireless channel power gain is denoted by |H G i | 2 = 10 − 106.3+20×log 10 l i

10
. Denote the antenna gain by G T , with |H G i | 2 , we can prove that The delay caused by the transmission is t 1 = l i /V . In order to efficiently utilize the time window of T i for the inter-satellite relay and the rely between hot air balloons and satellites, we have following constraint, Constraint (14) means that the delay in step 2) plus step 3) should be within T LEO − T i .
Accordingly, the following three steps should be completed within the corresponding time windows.
Step 4) Data transmission from hot air balloons to satellites. The transmission time of the ith hot air balloon to the corresponding serving satellite is denoted by T B i , which should be a portion of the time window of satellite i. Denote the transmission power of the ith hot air balloon by P B i . Denote the transmission bandwidth of a hot air balloon by B 1 , which is identical for all balloon to satellite transmissions. Denote the path loss based wireless channel power gain by |H B i | 2 = 10 − 106.3+20×log 10 (L−l i ) 10 . Then, with G T and |H B i | 2 , we can prove that The corresponding transmission delay is Step 5) Data relaying among satellites. After the data transmission from hot air balloons to satellites, the inter-satellite relaying is planned in multiple schedules for forwarding data to target satellites.
Step 6) Data transmission from satellites to hot air balloons. After the inter-satellite relaying, the data will be transmitted from satellites to hot air balloons, which takes a duration of length T D i , and then forwarded to the target ground stations to complete a ground station to ground station data communication cycle. Denote the average data traffic arrival rate at satellite i, as a result of inter-satellite relaying, by µ i . It holds that S i=1 λ i = S i=1 µ i . The amount of the data received at satellite i in duration T i is then n 0 T LEO µ i . Denote the transmission power of sending data from satellite i to its hot air balloon by P D i . Denote the bandwidth by B 2 , which is identical for all satellite to balloon transmissions.
The corresponding channel gain is |H D i | 2 = 10 − 106.3+20×log 10 (L−l i ) 10 . Then, with G T and The propagation delay in this step is Next, the data collected at hot air balloons from satellites will be used for specific objectives such as store-and-forward for hot traffic or transmission to the ground stations for real-time traffic.

B. Optimization Model
Step 1 Step 2 Step 3 Step 4 Step 5 Time Power Step 6 Fig. 4. Illustration of the six steps of a communication cycle.
In this sub-section, we focus on formulating the system energy efficiency maximization problem. First, we illustrate the constraints of data transmission in the aforementioned 6 steps as in Fig. 4.The ordinate in Fig. 4 is the average power consumption for each step, and the abscissa is the time for each step. The propagation delay is denoted by t 1 for step 3, t 2 for step 4, and t 3 for step 6, respectively, as shown in Fig. 4. To avoid data overflow, T A in step 1 is the upper bound for each of the next steps. Since T A ≥ T LEO as shown in eq. (10), we have and There exists a trade-off between the delay and power consumption in each step, which will be discussed later.
Denote the total energy efficiency from Step 1 to Step 6 by E Total . Considering the analysis above, 1/E Total can be formulated by eq. (19). In eq. (19), the denominator is the total amount of the data transmitted in one serving period. The overall energy consumption, used for caching, computing, wireless transmission (including the lasers), is formulated in the numerator of eq. (19). As there are many variables, we define a set of all variables in eq. (20).
With eqs. (19) and (20), the target optimization problem can be formulated as (17) and (18).  Fig. 3 for instance, each satellite caches the data to be relayed to the other three satellites.  As shown in Fig. 5 (a), the time window T i contains T B i , T D i , and relay time T Z i . Without loss of generality, we assume that the length of the time window satisfies T 1 ≥ T 2 ≥ . . . ≥ T S .
We also assume that the maximum available time for inter-satellite relaying in Step 5 is within the relay time of the k * th satellite, i.e., T Z k * , which is formulated as where 0 < α < 1. By eq. (21), we have i and T D i are determined, the value of α can be found. As we have assumed, the length of the vth time segment is w v . Denote the length of the vth time segment by τ v when α = 1.
Then, we have w v = ατ v , where τ v is a constant determined by the length of time windows, and α will be optimized later.
The data traffic matrix A can be decomposed into S STMs {A 1 , A 2 , . . . , A S }, each representing the data traffic to be relayed in the corresponding time segment. Since only the time segments 15 with the sequence numbers {k * , k * +1, . . . , S} are employed for traffic relay, {A 1 , A 2 , . . . , A k * −1 } are all-zero matrices, i.e., A = S i=1 A i = S i=k * A i . The element of the ith row and the jth column of A v is denoted by a v ij , which represents the amount of data traffic transmitted from the ith satellite to the jth satellite during time segment K v . In the rest of this Section, we will solve the STMs generation problem.
A. Geometric-Water-Filling Algorithm

Fig. 7. Illustration of T-GWF algorithm.
The objective of the STMs determination to different time segments with various length is to guarantee that the relay time is within the time windows of the corresponding source and destination satellites and to achieve data load balancing. Water-filling is well-known for deriving the optimal solutions for power allocation problems [19] as well as load balancing problems [20]. In the following, we introduce the geometric-water-filling (GWF) algorithm. More details can be found in [19,20].
As shown in Fig. 6, we assume a water tank with k uneven bottom steps. The width of the steps is denoted by vector W and height by vector H, representing the time segments width and already allocated data traffic density (i.e., data traffic per unit time), respectively. The total volume of water, D, represents the total amount of data for distribution. The dashed horizontal line represents the formed water surface. The optimal distribution of these data amount is depicted by the water-filling algorithm. The solution returns a vector, X, the height of the distributed water above the steps, denoting the added traffic density for the corresponding time segment. In Fig. 6, the 4th step height h 4 is higher than the water surface, the solution of x 4 is then zero.

Initialization and Input:
Initialization: k * : the index of the widest time window being used for relay; A: traffic matrix (S × S); Av : zero matrices (S × S), v = k * , · · · , S (STMs); W = [0, · · · , w k * , · · · , wS]: width of the time segment; H = zeros(1 : S); D total = S i=1 S j=1 aij; D allocated = 0; n = 1. We can represent the geometric water-filling function as The data amount scheduled for the ith time segment is w i x i . The total data amount satisfies The detailed solution approach can be referred in [19,20]. Without loss of focus, we shall directly apply eq. (22) as a functional block to solve the STMs for satellites traffic relay.

B. Tapped Geometric-Water-Filling Based STMs Determination
In this subsection, we present the proposed algorithm for STMs determination. During the time window for the k * th satellite, we have a series of time segments, denoted as K k * , · · · , K S with width w k * , · · · , w S respectively. Data of the total traffic matrix A is allocated to STMs, A k * , · · · , A S , one for each time segment. We propose tapped geometric-water-filling (T-GWF) algorithm as described in Algorithm 1 to generate the STMs.
In the initialization stage of Algorithm 1, we set all STMs as all-zero matrices. The elements of the time segment width vector W are set to 0 for time segments K 1 to K k * −1 and the corresponding true width for time segments K k * to K S . D total and D allocated represent the total data amount and the allocated amount, respectively.
In Line 1, a "For" loop is used, running from the K S th time segment to the K k * th time segment. Before the K k * th time segment, we start from time segment K S , where the Sth row and the Sth column of the traffic matrix A is stored in D row and D col respectively in Lines 3 and 4. The total amount of data for the allocation in this round is denoted by D as shown in Line 5.
In Line 11, the GWF algorithm is applied to conduct data traffic allocation. The notation W(m : S) denotes a vector consisting of the mth element to the Sth element of vector W. We design a mechanism recursively updating the STMs through GWF operation. We model that the as T-GWF algorithm for this nature.
In Line 12 of Algorithm 1, the step height is updated. In the following "For" loop, Before the K k * th time segment, the STMs are updated with the scaled mth row and mth column of the traffic matrix A. The scale factor η is the ratio of the allocated traffic for a specific participating time segment to the total allocated traffic.
The last step of the outer "For" loop is to allocate data when m = k * , i.e., for the time segment K k * . The data traffic for allocation is a sub-matrix of A, consisting of its first row to the k * th row, and from the first column to the k * th column, as listed in Line 9. In the inner "For" loop, the STMs are updated in Line 20. Different with Lines 17 and 18, where each update is carried for a row and a column respectively, each update is adding a scaled sub-matrix.
The proposed T-GWF have two great advantages. The first one is to distribute the data traffic among participating time segments to guarantee the relay being in the time windows of the involved source and destination satellites and to achieve load balance. GWF can efficiently solve this problem. The second advantage is the structure of the water-filling solution facilitating the STMs update.
Water-filling structured solution by T-GWF also reveals that the obtained water level for each time segment represents the corresponding data rate, or equivalently, data traffic density. For time segment K k * to K S , the water level is non-decreasing. This reflects that satellites relaying data traffic is not uniform across the time segments, but tends to be more intense towards the central point of the time windows. This is reasonable since the closer to the central point, the more data traffic uploaded from the air balloons is available.

V. CONFIGURATION MATRICES GENERATION
After the STMs determination, the data traffic represented by the STM A v , with the dimension of S × S, is relayed in the time segment of ατ v . Define a set of configuration matrices with the dimension of S × S so that each row and each column for a configuration matrix has at most one, respectively. The rest of the elements for the configuration matrix are all zeroes. The time for transmitting one bit of data, i.e., the inverse of the data transmission rate, is φ seconds, where φ = 1/C 0 . Assume that when n 0 = 1, each configuration matrix has a coefficient ϕ v , which denotes the number of φ to relay the data traffic in the configuration matrix. Then, for a general form when n 0 ≥ 1, each configuration matrix generated from the STM A v has a coefficient n 0 ϕ v . For simplicity, we assume that ϕ v is the same for each configuration matrix.
To determine the required number of active lasers per satellite, i.e., m v , we assume that Φ v configuration matrices are firstly generated for A v . If the Φ v configuration matrices are implemented by satellites with one laser per satellite, the delay is by Φ v n 0 ϕ v φ + Φ v δ. Then, when m v lasers are configured for each satellite, the satellites can simultaneously relay data traffic according to m v configuration matrices, which can be formulated as In practice, m v should be small to reduce the power consumption and the hardware cost of the satellites. We can have From eq. (24), a smaller Φ v leads to a larger ϕ v . This is because that a smaller Φ v increases ineffective occupation time of the transmitting-receiving antenna pairs after the data traffic has been relayed in a configuration matrix. On the other hand, Φ v should be no less than S to cover all the elements in A v .
When n 0 = 1, we denote the average maximum summation of the elements in either a row or a column of A v by A v . Then, when n 0 ≥ 1, the average maximum summation of the elements in either a row or a column of A v is n 0 × A v . We propose Theorem 1 as follows.
Theorem 1 Define ϕ v as follows, with a unit of bits: Then, A v can be covered by at most Φ v configuration matrices. The corresponding time delay for transmitting ϕ v bits of data is ϕ v φ.
Proof : See Appendix A.
Considering Theorem 1, in eq. (24), we have This guarantees the feasibility of the configuration matrices generation.
By eqs. (24) and (25), we can further derive that In practice, m v can be rounded up to an integer, i.e., m = ⌈m v ⌉.
To maximize the energy efficiency of the active lasers, we define the average number of active lasers m as By eq. (6), ε Z can be re-formulated by 1 ≤ n0 ≤ nmax, and 0 < α < 1. By eqs. (8) and (9), the static energy consumption ε L 0 and dynamic energy consumption ε L 1 can be formulated in eqs. (30) and (31), respectively, as follows: In Fig. 8, using a LEO satellite network with 4 satellites, we demonstrate an example of the configuration matrices generation for a specific time segment v with the sub-traffic-matrix A v . We assume that C 0 = 4×10 9 bps, δ = 2 s, ατ v = 1000 s, and Φ v = 7. Then, φ = 1/C 0 = 0.25×10 −9 s/bit, i.e., it takes 0.25 × 10 −9 seconds for relaying 1 bit of data among satellites. By Theorem 1, we can find that ϕ v = 6 × 10 9 bits. This suggests that the transmission delay is ϕ v φ = 1.5 s for a schedule. Furthermore, m v can be calculated by eq. (27) and rounded up to an integer, which gives m v = 1.
A v is decomposed into Φ v configuration matrices, each of which has a coefficient ϕ v . The specific elements in a configuration matrix are determined by the traffic scheduling, which in turn depends on the data traffic routing among satellites and the number of transmitting-receiving antenna pairs, etc. We show an example of traffic scheduling for the Φ v configuration matrices in Fig. 8. Since m v = 1, each satellite can transmit at most one data stream at any given time.
Thus, it takes 7 schedules for completing the relay among satellites. For the third configuration Algorithm 2 Algorithm for solving optimization problem (P3).

3:
while (E Total has not converged) or (tmax = 0) do Solve the geometric programming problem (P3) with tmax and k * . matrix, satellite 1 transmits to satellite 4, while satellite 2 transmits to satellite 3, using satellite 1 and satellite 4 as relays. In our future work, we will discuss the data traffic scheduling in each configuration matrix and the corresponding routing schemes for relay among satellites.

VI. COLLABORATIVE MULTI-RESOURCE ALLOCATION
In this section, we present the approximation and transformation to solve the original optimization problem of (P1).
In (P3), t max is a positive integer that denotes the maximum number of terms used in the Taylor series. We propose Algorithm 2 to solve problem (P3). In Algorithm 2, t max is determined in an iterative manner until the values of all optimization variables converge. It is difficult to determine the optimal value of k * , especially when the number of time segments is large. In Algorithm 2, the value of k * is determined heuristically, and its value stops updating when the system energy efficiency does not increase further as k * increases.  Table I gives the general simulation parameters. The noise temperature is assumed to be 260 K. We consider satellites deployed at the height of 550 km above the Earth, same as the setting is evenly distributed between l min and l max . The hot air balloon at lower height generally has a larger minimum elevation to the satellite. We set the minimum elevation, for the hot air balloon at the maximum and the minimum height to the Earth, to β min = 5 • and β max = 45 • , respectively.

A. Simulations
The minimum elevation of the other S − 2 hot air balloons is evenly distributed between β min and β max . The traffic matrix A is randomly generated, where the diagonal elements are 0, and the other entries of A are random and uniformly distributed over [0, θ] bits. Unless otherwise specified, we assume that θ = 10 4 bits.
Since the system model that we consider is new, there is no existing algorithm that considers the same network model and scenario for comparison. To evaluate the performance of our proposed scheme, we name the scheme using both Algorithm 1 and Algorithm 2 as scheme 1.
Let scheme 2 be the semi-fixed method using Algorithm 1 and Algorithm 2 with α = 0.5 and k * = 1. Let scheme 3 be the semi-fixed method using Algorithm 1 and Algorithm 2 with n 0 = 1 and k * = 1. Then, the performance of scheme 1 is compared with those of scheme 2 and scheme 3.
In Fig. 9, the performance of the three schemes versus the maximum value of n 0 , i.e., n max , is illustrated. In Fig. 9(a), as n max increases, the energy efficiency of the schemes 1 and 2 firstly increases due to the increased throughput and relatively small energy consumption. As n max further increases, the energy efficiency gradually saturates because of the ever-increasing energy consumption. Scheme 3 has a fixed energy efficiency performance because its n 0 remains 1, then the energy efficiency is independent on n max . Based on the figure, our proposed scheme 1 outperforms the other schemes in terms of energy efficiency. The gap is much smaller between the performance of schemes 1 and 2 than between the performance of schemes 1 and 3. This suggests that more frequent transmission in a terrestrial-satellite network cannot guarantee a larger energy efficiency, because the large power consumption only supports a limited amount of data traffic corresponding to a relatively small n max . In Fig. 9(b), the required n 0 increases for both schemes 1 and 2. This is because when the amount of data is relatively small, an increasing n 0 leads to a larger amount of data traffic, which enables higher energy efficiency.
From Fig. 9(c), we can verify that the required m increases for schemes 1 and 2 to meet the relay requirement among satellites due to the increasing amount of data traffic. As n max further increases, m remains constant for schemes 1 and 2, because the amount of data traffic remains.
In Fig. 9(d), α for scheme 1 gradually decreases, because the increasing amount of data traffic requires a longer time interval to transmit between satellites and hot air balloons.
In Fig. 10, the performance of the three schemes versus the number of satellites S is illustrated.
In Fig. 10(a), as S increases, the energy efficiency performance of schemes 1 and 2 monotonously decreases. This is because a larger S results in a larger power consumption dominating the performance of energy efficiency in wireless transmission and the lasers for relay. For scheme 3, as S increases, the energy efficiency firstly increases because the increasing amount of data traffic brought by the increased satellites. As S further increases, the energy efficiency of the schemes 1 and 3 gradually merges. This is because, as S increases, the optimal n 0 is 1 to decrease the energy consumption of lasers and wireless transmission. This can be verified in Fig. 10(b), in which the required n 0 approaches 1 for all the schemes as S increases. In Fig. 10(b), the n 0 for scheme 1 is larger than that of scheme 2 when n max < 25. This suggests that scheme 1 can  Fig. 11. The performance of the system energy efficiency with θ and β max , respectively. support a larger amount of data traffic due to the optimal resource allocation. In Fig. 10(c), as S further increases, m also increases due to the increasing amount of data traffic. The optimal m for scheme 2 is larger than those of schemes 1 and 3. This is caused by the smaller α for scheme 2, which can be verified in Fig. 10(d). In Fig. 10(d), as S increases, the required α for both the scheme 1 and scheme 3 gradually increases, because the increased power consumption by lasers for relay among satellites. As S further increases, the required α of schemes 1 and 3 gradually remains and merges. This is because that n 0 approaches 1 for both schemes. Then, the performance of scheme 1 becomes the same with that of scheme 3.
In Fig. 11, we illustrate the energy efficiency versus θ, the maximum amount of data to relay between arbitrary two satellites, and β max , the maximum minimal elevation angle, respectively.
In Fig. 11(a), as θ increases, the energy efficiency firstly increases for all the schemes. This is because a larger θ can increase the data traffic amount to improve the energy efficiency. As θ further increases, the energy efficiency arrives the peak and then gradually falls for all three schemes, because the high power consumption used for communications. In Fig. 11(b), as β max increases, the energy efficiency of schemes 1 and 2 monotonously decreases. This is because a larger β max leads to a smaller time windows between hot air balloons and satellites. Accordingly, a shorter relay time among satellites causes higher power consumption of relay by lasers and reduced energy efficiency. For the scheme 3, the energy efficiency remains constant, because a smaller n 0 will not cause the higher power consumption by lasers when β max is not very large.

B. Discussions
We have studied a relatively complex system model in this work, including: 1) different hovering heights of the hot air balloons with different minimum elevation angle from hot air balloons to the satellites; 2) the caching, computing, and communication power consumption in this integrated system; 3) different lengths of time windows and the corresponding STMs determination for relay among satellites; 4) the configuration matrix generation to form multiple configuration matrices corresponding to the schedules; 5) an integrated optimization of the variables to maximize the overall system energy efficiency.
Two directions can be considered for future works, which can advance the research in terrestrialsatellite networks.
Firstly, joint traffic scheduling and routing scheme is of interest. As illustrated in Fig. 8, the joint traffic scheduling and routing can be considered to determine the elements in a specific configuration matrix. The elements in configuration matrices will determine the number of the active lasers and affect the number of transmitting-receiving antenna pairs. Additionally, the routing scheme of traffic relay among satellites also effects the performance of the total routing distance and the number of transmitting-receiving antenna pairs in use at each satellite.
Secondly, in this work, we assume that the time windows are overlapping and symmetrical with respective to a central line, as shown in the lower part of Fig. 2. The central line represents the assumption that the satellites will simultaneously arrive right above their corresponding hot air balloons. For a large satellite network, such assumption might not be practical. Instead, as shown on the left-hand side of Fig. 12, the starting point of the time windows for the satellites may differ with each other, leading to asymmetric time windows as shown on the right-hand side of Fig. 12. In the figure, when the satellite k is right above its hot air balloon, the time window of satellite j just starts, and the time window of satellite i is yet to start. In this scenario, the STM determination needs further investigation.
Lastly, applications, such as content provision [30], can be studied based on our proposed framework for TSN.

VIII. CONCLUSION
In this work, we studied the energy efficiency performance of TSN while jointly considering the caching, computing, and communication resources. We considered a practical scenario, in which different hot air balloons can be deployed at different heights with different minimum and S j=1 q ij ≤ Φ v − S. Hence, the maximum line summation of A v is Φ v − S. According to graph theory [31], the corresponding bipartite graph of Q has the maximum endpoint degree Φ v − S. Then, Q can be decomposed into Φ v − S configuration matrices with the coefficient of 1 for each. Moreover, by eq. (33), we have r ij < n 0 A v /(Φ v − S). This suggests that R can be covered by at most S configuration matrices with the coefficient of n 0 A v / (Φ v − S) for each. Then, A v can be covered by at most Φ v configuration matrices, each of which the coefficient of