# A DRL-Based Satellite Service Allocation Method in LEO Satellite Networks
## 2 System Model
### Resource Model  
The transmission of operational data between the terminal and the satellite is conducted through a satellite-to-ground link, where each operation utilizes a fixed communication resource in the LEO. Introducing the variable \(\delta(t)\triangleq[\delta_{n,k}(t)]_{\forall(n,k)}\) denotes the link connectivity status between the satellite and the user. \[\delta_{n,k}(t)=\left\{ \begin{array}{c}1,UE_{k}\text{ is connected with LEO}_{n}.\\ 0,\text{otherwise}.\end{array} \right. \tag{3}\]  
Due to the constraint that each user can only access a single satellite, the following restrictions are established:  
\[\sum_{\forall n\in\mathcal{N}}\delta_{n,k}(t)\leq 1,\forall k\in\mathcal{K}. \tag{4}\]  
Figure 2: LEO constellation architecture. Due to the increasing complexity of current service, the conventional approach of measuring node resources solely based on bandwidth and CPU frequency has become insufficient. In order to address this challenge, as shown in Figure 3, we have developed a five-dimensional resource model, considering the capabilities of communication bandwidth, CPU general computation, GPU mathematical computation, storage, and caching. A unified measurement model has been constructed to account for these dimensions. We denote communication resource quantity as bandwidth (BW), and for the standardization of diverse resources, we map the communication resource quantity to the interval \([0,\alpha]\) and represent it as \(B\). For convenience, we define the n-th LEO satellite and k-th user as \(Sat_{n}\) and \(UE_{k}\), respectively. The channel gain between the LEO satellite and the user can be expressed as follows:  
\[h_{n,k}=\frac{G^{Sat}G^{UE}\psi(\mu_{n,k})}{PL_{n,k}}, \tag{5}\]  
where \(PL_{n,k}=(4\pi f_{c}d_{n,k}/c)^{2}\) and \(d_{n,k}\) represent the free-space path loss between the n-th LEO satellite and the k-th user; \(G^{Sat}\) and \(G^{UE}\) are the maximum antenna gains for the LEO satellite and user, respectively; and \(\mu_{n,k}\) is the maximum boresight angle from \(Sat_{n}\) to \(UE_{k}\). The \(\psi(\mu)\) in the channel gain formula represents the beamforming pattern function and is expressed as follows:  
\[\psi(\mu)=\left\{ \begin{array}{c}1,\mu=0,\\ 4\left|\frac{I_{1}(uu\ \sin\mu)}{w\ \sin\mu}\right|\,\mu\
eq 0,\end{array} \right. \tag{6}\]  
where \(w=2\pi f_{c}/c\), \(a\), \(f_{c}\), and \(c\) are the antenna aperture radius, operation frequency, and light speed, respectively; and \(J_{1}(\cdot)\) denotes the first-order Bessel function. Consequently, the available communication resources for a single satellite can be expressed as follows:  
\[B_{n}^{Sat}=\frac{W_{n}^{Sat}}{W_{\max}^{Sat}}=\frac{W_{n}^{Sat}}{\max\{W_{1}^ {Sat},W_{1}^{Sat},...,W_{N}^{Sat}\}}. \tag{7}\]  
The communication resource demand for a user is expressed as follows:  
\[B_{n,k}^{UE}=\alpha\frac{R_{n,k}^{UE}}{W_{\max}^{Sat}}, \tag{8}\]  
Figure 3: Resource and requirements model. where  
\[R^{UE}_{n,k}=W^{UE}_{k}\log_{2}\left(1+\frac{P_{n,k}h_{n,k}}{\sigma_{n}W^{UE}_{k} }\right), \tag{9}\]  
where \(\sigma_{n}\) represents the noise power density per Hz. Therefore, the following can be obtained:  
\[\sum_{\forall k\in\mathcal{K}}\delta_{n,k}(t)B^{UE}_{n,k}\leq B^{Sat}_{n}, \forall(n,t). \tag{10}\]  
We employ a methodology similar to that used in constructing communication resource models to establish mathematical representations for the remaining four types of resources. For the sake of brevity, we refrain from elaborating on their actual mapping processes into mathematical forms. Ultimately, the mapping patterns for the representations of the other four resources also follow the method of referencing the maximum capacity of a single satellite resource, with all resources being mapped into specific ranges.