Adaptive data packet scheduling method based on approximate quantile and multiple queues

By combining a lightweight ranking and scoring system with a multi-queue scheduling framework, the problem of balancing performance and resource efficiency in packet scheduling methods is solved, achieving efficient packet reordering and congestion management, and is suitable for resource-constrained programmable data planes.

CN121283970APending Publication Date: 2026-01-06JIANGSU UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511537276.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing packet scheduling methods struggle to balance performance and resource efficiency, especially in resource-constrained environments such as software-defined networks and edge computing, where high-performance solutions are complex while lightweight solutions are underperforming.

Method used

By combining a lightweight ranking and scoring mechanism with a multi-queue scheduling framework, efficient packet reordering and congestion management are achieved through calculating the relative priority scores of packets and intelligent mapping, using minimal resource consumption and low implementation complexity.

Benefits of technology

It achieves high-performance packet scheduling in resource-constrained environments, reduces unnecessary packet dropping, protects medium-priority packets, and provides dynamic adaptive queue congestion management, making it suitable for programmable data planes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283970A_ABST
    Figure CN121283970A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive data packet scheduling method based on approximate quantiles and multiple queues on a programmable data plane, and aims to solve the problem that the scheduling performance and the resource efficiency are difficult to balance in the prior art. According to the method, lightweight ranking scoring, dynamic queue mapping and a cascade enqueue strategy are combined. A relative priority score of the data packet is efficiently calculated through a minimum-maximum normalization mechanism; adaptively mapping the data packets to one of a plurality of FIFO queues according to the scores and real-time congestion conditions of the queues, and providing a fast channel for extremely high priority traffic; and when the target queue is full, trying to store the data packet into a queue with a lower priority in a cascading manner so as to avoid unnecessary discarding. According to the method, resource consumption and implementation complexity are remarkably reduced while the approximate ideal PIFO scheduling performance is achieved, and the method is particularly suitable for resource-limited environments such as a software-defined network and edge computing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer network technology, specifically relating to a lightweight, high-performance, and adaptive packet scheduling method for programmable data planes in resource-constrained environments such as software-defined networking (SDN) and edge computing. Background Technology

[0002] Traditional packet scheduling algorithms, such as Shortest Remaining Processing Time (SRPT) and Weighted Fair Queuing (WFQ), are typically implemented using application-specific integrated circuits (ASICs). This fixed-function hardware deployment is costly and inflexible, making it difficult to adapt to the increasingly diverse and evolving network service demands.

[0003] To address these limitations, researchers proposed the Push-In First-Out (PIFO) queue, a powerful programmable scheduling abstraction. PIFO allows packets to be dynamically inserted into arbitrary positions in the queue based on their priority, while ensuring that packets are dequeued in strict ascending order. However, despite its conceptual elegance, PIFO is difficult to implement in hardware at line speeds because global ordering requires highly complex components such as tri-state content-addressable memory (TCAM) or parallel comparators, which are typically unavailable in high-speed networks.

[0004] Therefore, academia and industry have proposed several implementation schemes approximating PIFO. One type of scheme, such as PACKS (PACKet Scheduler) and PR-AQM (Packet Rank-aware Active Queue Management), uses multiple priority queues for approximate sorting. While offering superior performance, their logic is complex, typically requiring mechanisms like sliding windows to perceive traffic distribution, which places a significant burden on resource-constrained software switches (such as BMv2). Another type of scheme, such as RIFO (Range-In First-Out) and AIFO (Admission-In First-Out), employs a single FIFO queue combined with admission control to pursue ultimate resource efficiency. However, this completely sacrifices the ability to rearrange packets, resulting in limited scheduling performance.

[0005] Existing methods exhibit a clear polarization in scheduling performance and resource overhead. High-performance solutions are complex to implement, while lightweight solutions fall short in performance. This gap is particularly pronounced in scenarios such as software-defined networking (SDN) and edge computing, which require flexible quality of service (QoS) guarantees while facing strict resource constraints. Summary of the Invention

[0006] The purpose of this invention is to address the difficulty in balancing performance and resource efficiency in existing packet scheduling methods, and to provide a lightweight, adaptive, and high-performance packet scheduling method, particularly suitable for resource-constrained programmable data planes. The core idea is to combine a lightweight ranking and scoring mechanism with a powerful multi-queue scheduling framework, achieving efficient packet reordering and congestion management while maintaining low implementation complexity and minimal resource consumption.

[0007] To achieve the above objectives, this invention proposes an adaptive packet scheduling method based on approximate quantiles and multiple queues, comprising the following steps:

[0008] S1: When a data packet p arrives, calculate the relative priority score (Score(r)) of the data packet based on the ranking of the minimum and maximum data packet priorities observed in the current period. p );

[0009] S2: Define N first-in-first-out strict priority queues Q = {q0, q1, ..., q...} N-1 The queue index is used to store data packets of different priorities; the smaller the index, the higher the priority of the stored data packet.

[0010] S3: Define the highest priority threshold top When the relative priority score Score(r) p Less than the highest priority threshold top If the current data packet is not in the congestion assessment stage, it will be directly mapped to the highest priority queue q0.

[0011] When the relative priority score Score(r) p (greater than the highest priority threshold) top Then the initial target queue Q of the data packet is determined. initial And determine the final target queue Q based on the congestion status of the target queue. final ;

[0012] S4: Get the current queue length qlen(Q) of the initial target queue. initial );

[0013] S5: If Q initial The current length qlen(Q) initial The congestion degradation threshold was exceeded. d If the packet's destination queue is not found, the packet's destination queue will be downgraded to the next lower priority queue, with its final destination queue Q. final It will be set to min(Q) initial +1, N-1); N is the total number of priority queues;

[0014] If Q initial The current length qlen(Q) initial The congestion degradation threshold is lower than the preset threshold. d Then the final target queue is the initial target queue Q. final =Q initial ;

[0015] S6: From the final target queue Q final Start searching downwards for an empty queue, checking if the queue is full; if not full, store the data packet in the queue, completing the enqueue operation; if full, check the next lower priority queue and repeat this process; if all from Q... final If all queues up to the lowest priority are full, the data packet is discarded.

[0016] Furthermore, in S1 above, the relative priority score Score(r) is calculated. p This includes the following steps:

[0017] S1.1 maintains four registers in the data plane: register Min to record the minimum ranking observed in the current period, register Max to record the maximum ranking, a packet counter Counter, and a queue length register Qlength.

[0018] S1.2 When a data packet arrives, assign a priority r to the data packet. p The absolute ranking r of the data packets is determined using the min-max normalization method. p Convert to a relative priority score in the range [0,1]: Score(r) p );

[0019]

[0020] Where, r p The priority value of the arriving data packet p is given by Min, the ranking of the lowest priority data packet observed in the current period, and Max, the ranking of the highest priority data packet observed in the current period. The relative priority score is Score(r). p The smaller the value, the higher the priority.

[0021] S1.3 Updates the values ​​of the Min, Max, and Counter registers as each data packet arrives, and resets all three registers when a preset periodic threshold T is reached.

[0022] Furthermore, the initial target queue Q in S3 above initial Calculation formula:

[0023]

[0024] Among them, Score(r p ) represents the relative priority score of the current data packet p, and N represents the total number of priority queues.

[0025] Furthermore, S4 above includes the following steps:

[0026] S4.1 Set up a periodically generated working data packet r worker Read the specified queue Q initial The current queue length value qlen(Q) after the packet dequeue operation is completed. initial );

[0027] S4.2 working data package r worker Read the current queue length value qlen(Q) initial It is stored in its custom header field;

[0028] S4.3 will process the working data packet r worker Send back to a dedicated ingress port on the switch for this purpose and re-loop;

[0029] S4.4 working data package r worker Upon reaching the inlet port, the inlet pipeline parses its header and extracts the queue length information qlen(Q) from it. initial The pipeline then uses this extracted value to update the queue length register Qlength.

[0030] After S4.5 completes the update operation, all subsequent arriving data packets can obtain the current queue length qlen(Q) by querying the queue length register Qlength. initial ).

[0031] Furthermore, the congestion degradation threshold th preset in S3 above... d The calculation formula is:

[0032] th d =k*B

[0033] Where k is a configurable degradation factor and B is the queue capacity.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0035] 1. This invention achieves near-ideal PIFO scheduling performance with extremely low resource consumption (only three registers) through lightweight scoring and intelligent mapping, which is significantly better than minimalist schemes such as RIFO, while avoiding the complexity of high-performance schemes such as PACKS, thus achieving a balance between performance and efficiency.

[0036] 2. By using a degradation mechanism based on the real-time occupancy rate of the queue and a cascading enqueue strategy, this invention can intelligently handle congestion, maximize the use of the buffer, reduce unnecessary packet dropping, and especially protect medium-priority packets, thereby achieving dynamic adaptive queue congestion management.

[0037] 3. This invention fully considers the limitations of programmable data planes (such as the P4 language environment). All calculations (such as division) are cleverly converted into integer operations that only include multiplication and shifting, enabling them to be executed efficiently at line speed. It has strong feasibility and practicality and is easy to implement in the data plane. Attached Figure Description

[0038] Figure 1 This is a flowchart of an adaptive packet scheduling method based on approximate quantiles and multiple queues.

[0039] Figure 2 This is an example diagram of an adaptive packet scheduling method based on approximate quantiles and multiple queues.

[0040] Figure 3 This is a performance comparison chart of the method of this invention and various benchmark schedulers in the Netbench simulation environment, when scheduling uniformly distributed traffic, showing packet flipping and dropping.

[0041] Figure 4 This is a statistical comparison chart of the flow completion time of the method of the present invention and various benchmark schedulers under different network load conditions in a leaf-spine network topology. Detailed Implementation

[0042] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. It should be noted that the technical solution and design principle of the present invention will be described in detail below with reference to only one optimized technical solution, but the protection scope of the present invention is not limited thereto.

[0043] The embodiments described above are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments. Any obvious improvements, substitutions or modifications that can be made by those skilled in the art without departing from the essence of the present invention shall fall within the protection scope of the present invention.

[0044] like Figure 1 As shown, this invention is an adaptive packet scheduling method based on approximate quantiles and multiple queues, comprising the following steps:

[0045] S1: When a data packet p arrives, calculate the relative priority score (Score(r)) of the data packet based on the ranking of the minimum and maximum data packet priorities observed in the current period. p ).

[0046] In a preferred embodiment of the present invention, the relative priority score Score(r) is calculated in S1. p This includes the following steps:

[0047] S1.1 maintains four registers in the data plane: register Min to record the minimum ranking observed in the current period, register Max to record the maximum ranking, a packet counter Counter, and a queue length register Qlength.

[0048] S1.2 When a data packet arrives, assign a priority r to the data packet. p The absolute ranking r of the data packets is determined using the min-max normalization method. p Convert to a relative priority score in the range [0,1]: Score(r) p );

[0049]

[0050] Where, r p The priority value of the arriving data packet p is given by Min, the ranking of the lowest priority data packet observed in the current period, and Max, the ranking of the highest priority data packet observed in the current period. The relative priority score is Score(r). p The smaller the value, the higher the priority.

[0051] S1.3 The values ​​of the Min, Max and Counter registers are updated when each data packet arrives. When the number of data packets arrives reaches a threshold, i.e. when the Counter reaches a preset periodic threshold T, these three registers are reset to adapt to the changing traffic characteristics.

[0052] S2: Define N first-in-first-out strict priority queues Q = {q0, q1, ..., q...} N-1 The queue index is used to store data packets of different priorities; the smaller the index, the higher the priority of the stored data packet.

[0053] S3: Define the highest priority threshold top When the relative priority score Score(r) p Less than the highest priority threshold top If the current data packet is not in the congestion assessment stage, it will be directly mapped to the highest priority queue q0.

[0054] When the relative priority score Score(r) p (greater than the highest priority threshold) top Then the initial target queue Q of the data packet is determined. initialAnd determine the final target queue Q based on the congestion status of the target queue. final .

[0055] Initial target queue Q initial Calculation formula:

[0056]

[0057] Among them, Score(r p ) represents the relative priority score of the current data packet p, and N represents the total number of priority queues.

[0058] S4: Get the current queue length qlen(Q) of the initial target queue. initial );

[0059] In a preferred embodiment of the present invention, S4 includes the following steps:

[0060] S4.1 Set up a periodically generated working data packet r worker Read the specified queue Q initial The current queue length value qlen(Q) after the packet dequeue operation is completed. initial );

[0061] S4.2 working data package r worker Read the current queue length value qlen(Q) initial It is stored in its custom header field;

[0062] S4.3 will process the working data packet r worker Send back to a dedicated ingress port on the switch for this purpose and re-loop;

[0063] S4.4 working data package r worker Upon reaching the inlet port, the inlet pipeline parses its header and extracts the queue length information qlen(Q) from it. initial The pipeline then uses this extracted value to update the queue length register Qlength.

[0064] After S4.5 completes the update operation, all subsequent arriving data packets can obtain the current queue length qlen(Q) by querying the queue length register Qlength. initial ).

[0065] S5: If Q initial The current length qlen(Q) initial The congestion degradation threshold was exceeded. d If the packet's destination queue is not found, the packet's destination queue will be downgraded to the next lower priority queue, with its final destination queue Q. final It will be set to min(Q)initial +1, N-1); N is the total number of priority queues;

[0066] If Q initial The current length qlen(Q) initial The congestion degradation threshold is lower than the preset threshold. d Then the final target queue is the initial target queue Q. final =Q initial ;

[0067] S6: From the final target queue Q final Start searching downwards for an empty queue, checking if the queue is full; if not full, store the data packet in the queue, completing the enqueue operation; if full, check the next lower priority queue and repeat this process; if all from Q... final If all queues up to the lowest priority are full, the data packet is discarded.

[0068] like Figure 2 As shown, assuming the system is configured with 4 priority queues, each with a capacity of 4, and a degradation factor k = 0.75, degradation is triggered when the queue length exceeds 3, with a threshold. top =0.05. Within the current period, Min = 1, Max = 8.

[0069] When a packet with a priority of 5 arrives: Score(r p The value of Q is 0.57. initial The current length of queue 2 is 2, which does not reach the downgrade threshold of 3, so it is directly enqueued into queue 2.

[0070] When a packet with a ranking of 3 arrives: Score(r p The value is 0.28, Q initial The length of queue 1 is 1. At this point, the length of queue 1 is 3, which has reached the degradation threshold. Therefore, the data packet is downgraded and redirected to queue 2.

[0071] When a packet with a rank of 1 arrives: Score(r p The value is 0, which is below the threshold. top This triggers the fast-track mechanism, directly enqueuing the device into the highest priority queue 0 without requiring congestion checks.

[0072] When a packet ranked 8 arrives, its destination queue is the lowest priority queue, which has exceeded the congestion threshold, so it is dropped.

[0073] To verify the scheduling effect of the proposed adaptive packet scheduling method based on approximate quantiles and multiple queues, and to evaluate its effectiveness, we conducted comparative experiments with several benchmark schedulers. The experiments were performed using the packet-level simulation tool Netbench, simulating a constant bit rate stream running for one second on a 10Gbps bottleneck link. Performance was evaluated based on packet flipping, packet dropping, and stream completion time under different loads. Experimental results are as follows: Figure 3 , Figure 4 As shown in the figure. Observations revealed that the present invention has significant effects on controlling packet flipping, reducing packet dropping, and stream completion time under different loads. Experimental results show that by combining lightweight ranking scoring, congestion-aware degradation, and cascading enqueue strategies, the present invention can achieve performance similar to current advanced complex scheduling schemes while reducing resource consumption and implementation complexity, verifying the feasibility and efficiency of the present invention on the programmable data plane.

Claims

1. An adaptive packet scheduling method based on approximate quantile and multi-queue, characterized in that, Comprising the steps of: S1 : When a packet p arrives, compute its relative priority score Score(r p ) based on the ranking of the minimum and maximum packet priorities observed in the current period; S2: define N first-in-first-out strict priority queues Q = {q0, q1, …, q N-1} for storing data packets of different priorities, and the smaller the index of a queue is, the higher the priority of the stored data packets is; S3: define a highest priority threshold threshold top When the relative priority score Score(r p ) is less than the highest priority threshold threshold top , the current data packet is directly mapped to the highest priority queue q0 without congestion judgment phase. When the relative priority score Score(r p ) is greater than the highest priority threshold threshold top , the preliminary target queue Q initial of the data packet is determined, and the final target queue Q final is determined according to the congestion condition of the target queue. S4: Obtain the current queue length qlen(Q of the preliminary target queue initial ); S5: If the current length qlen(Q initial ) of the target queue Q initial exceeds the preset congestion degradation threshold th d , the target queue of the data packet is degraded to the next lower priority queue, and the final target queue Q final will be set to min(Q initial +1,N-1); N is the total number of priority queues; If Q initial 's current length qlen(Q initial ) is lower than a preset congestion degradation threshold th d , the final target queue is the preliminary target queue Q final =Q initial ; S6: From the final target queue Q final Start to search for a free queue downward, check whether the queue is full; if not, store the data packet into the queue, complete the enqueue operation; If full, check the next lower priority queue, repeat this process; if all queues from Q final to the lowest priority queue are full, discard the packet.

2. An adaptive packet scheduling method based on approximate quantile and multi-queue, characterized in that, The relative priority score Score(r p ) is calculated in S1 and comprises the steps of: S1.1 Maintaining four registers in the data plane: a register Min for recording the minimum rank observed in the current period, a register Max for recording the maximum rank, a data packet counter Counter and a queue length register Qlength; S1.2 When a data packet arrives, assign a priority r to the data packet p The absolute rank r of the data packet is converted to a relative priority score Score(r) in the range [0, 1] using the Min-Max normalization method p p );​ wherein r p is the priority value of the arrived data packet p, Min is the rank of the minimum priority data packet observed in the current period, Max is the rank of the maximum priority data packet observed in the current period, and the smaller the relative priority score Score(r p ) indicates the higher priority. S1.3 Updating the values of the Min, Max and Counter registers at the same time as each data packet arrives, and resetting all three registers when a preset period threshold T is reached.

3. An adaptive packet scheduling method based on approximate quantile and multi-queue, characterized in that, The preliminary target queue Q in S3 initial Calculation formula: where Score(r p ) is the relative priority score of the current packet p, and N is the total number of priority queues.

4. An adaptive packet scheduling method based on approximate quantile and multi-queue, characterized in that, The S4 comprises the steps of: S4.1 Set up a periodically generated work packet r worker , read the specified queue Q initial The current queue length value qlen(Q initial ) after the packet dequeue operation is completed; S4.2 working data packet r worker The read current queue length value qlen(Q initial ) is stored in its custom header field; S4.3 The work packet r worker is sent back to the ingress port on the switch that is dedicated for this purpose for recirculation; S4.4 working data packet r worker Upon arrival at the ingress port, the ingress pipeline parses its header, extracting from it the queue length information qlen (Q initial ); subsequently, the pipeline uses this extracted value to update the queue length register Qlength; S4.5 After the update operation is completed, all subsequent arriving data packets, upon entering, can obtain a current queue length qlen (Q initial ) by querying the queue length register Qlength.

5. An adaptive packet scheduling method based on approximate quantile and multi-queue, characterized in that, The preset congestion degradation threshold th in S3 d The calculation formula is: th d = k * B where k is a configurable degradation factor and B is the queue capacity.

Citation Information

Cited By

  • Intelligent network flow scheduling method based on FPGA programmable chip

    CN121842126A