## 2 Queue Scheduling and Optimization Mechanism of Large-Scale LEO Satellite Communication Networks
### Queue Analysis and Optimization Mechanism Based on PSO Algorithm  
The traditional traversal algorithm identifies the optimal combination of queue lengths and numbers for the transmission of time-sensitive traffic within each satellite node by trying every possible combination. It requires all possible cases to be calculated sequentially, and the optimal result can only be determined by comparing the results of the calculations for all cases [18]. However, when the total number of satellites in the network is \(s\), the computational complexity of the traversal algorithm becomes \((u\cdot n)^{s}\). As the total number of satellites in the network increases, the traversal algorithm has a large amount of computational workload, and the onboard satellite switches will struggle to complete the computation. The PSO-QSO mechanism proposed in this paper calculates the maximum time-sensitive service load in the network and utilizes the PSO algorithm to optimize the settings of queues at the output ports of each node in the large-scale LEO satellite communication network, obtaining the optimal combination of queue lengths and numbers for transmitting time-sensitive traffic. In this paper, the maximum transmission unit (\(MTU\)) of time-sensitive traffic transmitted within large-scale LEO satellite communication networks is considered to be 1500 bytes. To ensure all packets can be fully accommodated in the queues, the queue length \(l\) is set as \(l=MTU\cdot u\), where \(u\in[1,200]\). The number of queues \(n\) is bounded by \(n\in[2,7]\). If optimization calculations are performed frequently, it will lead to high computational  
Figure 5: Structure of onboard switches in large-scale LEO satellite communication networks. costs. The frequent reconfiguration of the onboard switch buffer based on the calculation results will also affect the normal transmission of time-sensitive traffic. Therefore, this paper considers performing a calculation and configuration of queue lengths and numbers every 1000 transmission slots. The loads of time-sensitive traffic arriving at the output ports of each node within the 1000 slots are calculated, and the maximum value is recorded as \(L_{peak}\). To obtain the optimal combination of queue lengths and numbers, the settings of queues need to be able to withstand the highest load \(L_{peak}\) while keeping the queue lengths and numbers as small as possible. Therefore, the objective function of the PSO can be expressed as  
\[f(u,n)=\left|MTU\cdot u\cdot(n-1)-L_{peak}\right| \tag{3}\]  
In Equation (3), \(MTU\cdot u\cdot(n-1)\) represents the product of the lengths and numbers of the queues used to receive time-sensitive traffic, i.e., the total depth of the queues. Detailed steps of the proposed optimization mechanism are as follows. Firstly, the parameters of the PSO algorithm are initialized. Learning factors \(c_{1}\) and \(c_{2}\) are used to control the global search and local search ability of PSO. While self learning factor \(c_{1}\) is larger, the particle flight trajectory mainly refers to the history information of the particles themselves. While social learning factor \(c_{2}\) is larger, the particle flight trajectory mainly refers to the social information of particles movement [19]. In this study, both learning factors \(c_{1}\) and \(c_{2}\) were set to 1.5. \(\omega\) is an inertia weight that is initialized typically in the range of \([0,1]\). A larger inertia weight facilitates global exploration, and a smaller inertia weight tends to facilitate local exploration to fine-tune the current search area [20]. In this study, \(\omega\) was set to 0.9 to enhance the search speed for the global optimal solution. In most applications, authors follow the initial suggestion from [21] and restrict the number of particles NP to 20-50 particles. The algorithm proposed in this paper utilizes 20 particles. To improve the search accuracy, this study set the maximum number of iterations to 1000.