# BeiDou Short-Message Satellite Resource Allocation Algorithm Based on Deep Reinforcement Learning
## 2 System Model
To achieve these three optimization objectives, we formally describe the transmission energy consumption in the short-message terminal, the resource utilization of the satellite system, and the quality of service from the terminal. **Definition 1**. : _Path transmission loss (\(L\)) is used to describe the transmission energy consumption of the short-message terminal, and it represents the transmission loss during the process of task transmission from the short-message terminal to the target satellite in dB._  
**Definition 2**. : _The load balancing index (LI) is used to describe the resource utilization rate of the satellite system. It indicates the degree of balance in task processing by short-message satellites, where the larger LI is, the higher the resource utilization rate of the satellite system will be._  
**Definition 3**. : _The service satisfaction index (SI) is used to describe the service quality of a short-message satellite transmitting to a short-message terminal. It indicates the efficiency at which a task is sent by the short-message satellite to the short-message terminal: the larger the SI, the higher the service quality._  
Additionally, the system model includes a communication model and a resource allocation model. Communication model: The short-message terminal transmits the task request and content to the short-message satellite via the satellite link. The transmission delay is related to the size of the task data and the transmission rate. According to [PERSON]'s theorem, the communication model of \(ST_{i}\) and \(SAT_{j}\) can be defined as shown in Equation (1):  
\[r_{i,j}=B\log_{2}\left(1+\frac{P_{i}h_{i,j}}{\sigma^{2}+\sum\limits_{m\in \mathbf{ST},m\
eq i}P_{m}h_{m,j}}\right) \tag{1}\]  
where \(i\) is \(ST_{i}\), \(j\) is \(SAT_{j}\), and \(m\) is \(ST_{m}\), \(m\in\mathbf{ST}\) but \(m\
eq i\). \(r_{i,j}\) represents the communication rate between \(ST_{i}\) and \(SAT_{j}\). \(B\) is the channel bandwidth. \(\sigma^{2}\) is the communication noise power (Gaussian white noise). \(P_{i}\) is the transmission power of \(ST_{i}\), which can be approximated by the path transmission loss \(L_{ij}\) between \(ST_{i}\) and \(SAT_{j}\), i.e., \(P_{i}\approx L_{ij}\). \(h_{i,j}\) is the channel gain between \(ST_{i}\) and \(SAT_{j}\). \(P_{m}h_{m,j}\) is the interference to \(ST_{i}\) caused by other short-message terminals. Resource allocation model: This is divided into the satellite resource allocation model and the task queue model, as shown in Figure 2.  
For satellite resource allocation, a snapshot is divided into \(s\) time slices, where \(s\) is the number of time slices in a snapshot. The duration of a time slice is called a time unit, and the value of the time unit is determined by its actual application. Because the amount of data transmitted by the short-message task is limited, the maximum single transmission length of GSMC is 560 bits. In this article, a certain time unit is required for the short-message satellite to process the task of maximum length \(C_{\text{max}}\) (assuming that all satellites have the same task processing ability). Thus, in a snapshot, the short-message satellite resource can be formally described as resource matrix \(\mathbf{A}_{n\times s}\) with \(n\times s\). Each row in \(\mathbf{A}_{n\times s}\) represents the utilization of the short-message request processing resource \(\mathbf{a}_{i_{s}}\) that a satellite has over \(s\) time slices, \(i_{s}\in\{1,2,\cdots,n\}\). For element \(a_{i_{s},i_{t}}\) in matrix \(\mathbf{A}_{n\times s}\), \(i_{t}\in\{1,2,\cdots,n_{t}\}\), \(a_{i_{s},i_{t}}\) represents the resource utilization on time slice \(t_{t}\) of \(SAT_{i_{s}}\), where \(a_{i_{s},i_{t}}\in\{0,1\}\). When \(a_{i_{s},i_{t}}=0\), the resource is available. When \(a_{i_{s},i_{t}}=1\), the resource has been allocated. The task queue is shared by all short-message satellites following the first-in-first-out principle.