# Optimizing Time-Sensitive Traffic Scheduling in Low-Earth-Orbit Satellite Networks
## 3 TPC-CQF Improved from CQF
### Queue Priority Control of TPC-CQF  
The TPC-CQF control plane scheduling mechanism fundamentally differs from traditional CQF in time-sensitive traffic handling. Leveraging the SDN controller, TPC-CQF integrates path computation and flow scheduling management. This controller dynamically assigns flows to priority-tiered queues based on deadline-driven urgency. Furthermore, the queue priority design explicitly balances two critical considerations: packet loss risks from buffer constraints and mandatory service differentiation across priority levels. In each time period, select queue \(\underset{\text{Q}\in\{Q_{1},Q_{2},\ldots,Q_{M}\}}{\max}S_{Q}\) with the highest priority sum to transmit packets, optimizing the forwarding efficiency of high-priority packets. To prevent lower-priority packets from starving due to the continuous arrival of high-priority packets, a dynamic priority adjustment mechanism is introduced. The number of waiting cycles \(\text{N}_{\text{P}}\) for packet P represents the number of time slots it waits:  
\[N_{p}=\left\lceil\frac{t_{\text{current}}-t_{p,\text{arrive}}}{T}\right\rceil \tag{10}\]  
where T is the fixed time slot, \(t_{p,\text{arrive}}\) is the timestamp when the packet enters the queue, and \(t_{\text{current}}\) is the current time. Initial priority \(\pi_{p}=\frac{1}{R_{p,\text{semi}}}\) is adaptively promoted  
Figure 4: Packet scheduling of two time-sensitive flows: (**a**) CQF; (**b**) TPC-CQF. to \(\pi{{}_{p}}^{{}^{\prime}}\) according to job expiration thresholds and queuing duration, with synchronized recomputation of the global priority sum:  
\[\pi{{}_{p}}^{{}^{\prime}}=\frac{\pi_{p}}{1-N_{p}\cdot T\cdot\pi_{p}} \tag{11}\]  
\[S{{}_{Q}}^{{}^{\prime}}=\sum_{p\in D_{Q}}\pi{{}_{p}}^{{}^{\prime}} \tag{12}\]  
where \(R_{p,\text{remain}}\) denotes the initial packet deadline, which can be mapped to urgency levels via the SDN controller. Considering that \(\pi{{}_{p}}^{{}^{\prime}}\) may tend towards infinity, causing numerical instability, we impose a bounded constraint, \(R_{p,\text{remain}}-N_{p}\cdot T\geq\epsilon\). Since queues forward packets within the next time slot at the earliest, the minimum setting for \(\epsilon\) is 0.5. All aforementioned temporal parameters are measured in milliseconds (ms). Priority escalation of queues is verified and adjusted by the queue scheduling module. Unlike TPC-CQF, the CQF mechanism exhibits inherent limitations for time-sensitive traffic. Simply increasing queue capacity cannot enhance forwarding performance because CQF mandates complete packet transmission within every time slot. Moreover, CQF cannot effectively prioritize flows with varying criticality levels. Crucially, it fails to leverage redundant time slots in TSFs, rigidly enforcing next-slot completion instead of flexible future slot utilization. Figure 5 illustrates the queue priority control mechanism of TPC-CQF. Within each time slot, the state transitions of three queues are represented as 'co', 'oc', and 'oc'. Here, 'o' indicates an open queue state, capable of receiving packets, while 'c' indicates a closed queue state, unable to receive packets. The two 'oc' states denote the queue's open or closed status within the time slot, determining whether packets can be transmitted. Queues that are closed to receiving packets are assigned the highest priority. Once a queue is closed to receiving packets, the packets within that queue are guaranteed to be forwarded within the current time slot. Regarding the aforementioned queue scheduling issue, as shown in Algorithm 1:  
Algorithm 1 dynamically selects the transmission queue based on the maximum or total priority of packets in each queue. The specific algorithm steps are as follows:  
1. Initialization: Set the total priority sum for all queues to 0, capacity to the maximum value, and packet count to zero. Initialize an empty packet assignment record. 2. Calculate the waiting cycle based on the packet arrival time and the current time.