Priority-based packet scheduling method
By adopting priority-based packet scheduling methods in the packet switching network, the priority queue and send queue are constructed, and the header discarding mechanism and forwarding rule table modification is used, the problem of priority-dividing services in complex network environments is solved, and the low-complexity and efficient packet scheduling effect is achieved.
Patent Information
- Application Number
- CN202411972595.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art is difficult to use low-complexity packet scheduling algorithms to achieve strict priority distinction services in complex network environments, resulting in the inability to effectively avoid head-of-line blocking and packet loss of high-priority packets when network congestion.
The priority-based grouping scheduling method is adopted, and the priority-based scheduling method is used to construct a linear priority queue and send queue count, and the send queue capacity is set according to the priority, so as to achieve priority-based distinction service. At the same time, the head of the team is used and the information of the discarded queue records and the packet is discarded, and the forwarding rule table is modified to solve the problem of adaptive modification of the head of the team and the forwarding rule.
In the context of network congestion, it can effectively reduce the packet loss rate of high-priority packets, reduce transmission delay, and significantly improve the effectiveness of distinguishing services and low computational complexity.
Smart Images

Figure CN119945990A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of digital communication, and relates to a packet scheduling method for realizing differentiated services based on priority in a packet switching network, in particular to a packet scheduling method based on priority. Background Art
[0002] With the development of satellite networking technology, the number of network services carried by a single satellite has gradually increased, and congestion of switching nodes has occurred from time to time. In the case of switching nodes being unable to process packet data in a timely manner due to network rate mismatch during information transmission, differentiated services can be implemented according to the priority of packet marking.
[0003] Existing methods rarely consider application scenarios in which packet priorities are used to strictly differentiate services in complex network environments. They cannot effectively solve the practical problems of using low-complexity packet scheduling algorithms to avoid head-of-line blocking and simultaneously serve multiple high-priority packets in network congestion. It is urgent to propose a complete method for packet scheduling based on priority, which can ensure that the packet loss rate in network congestion scenarios decreases monotonically with the increase of priority. Summary of the invention
[0004] In view of the shortcomings of the prior art, the object of the present invention is to provide a priority-based packet scheduling method to solve the problem that the prior art cannot use a low-complexity algorithm to achieve strict priority differentiation of services.
[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions to achieve the above problems:
[0006] A priority-based packet scheduling method schedules packets based on a packet switching network, specifically comprising the following steps:
[0007] S1, create priority queues Q0~Q M and sending queues S1 to S N , extract and record the priority m of the packet currently arriving at the ingress port, and determine whether the packet can be written into the priority queue Q m ;
[0008] The ingress port or egress port is a plurality of physical ports, a plurality of time slices under the same physical port, or a sum of a plurality of physical ports and a plurality of time slices under the same physical port;
[0009] in:
[0010] m represents the sequence number of the priority queue, 0≤m≤M;
[0011] M represents the priority differentiation capability of the packet switching network, which is a positive integer;
[0012] N represents the total number of sending queues;
[0013] S2, read the priority queue Q in order from high to low priority M ~Q0 queue information, get the first non-empty priority queue Q m ', and get the non-empty priority queue Q m 'The head group Q m '(P1);
[0014] The non-empty priority queue Q m 'Includes packets with priority m;
[0015] P1 means Q m 'The first element in;
[0016] S3, extracts and records the header group Q obtained in S2 m '(P1) at least one feature, use this feature as an index, query the forwarding rule table, and determine the header packet Q m '(P1) Is there an outbound port? If so, output the header packet Q m '(P1) output port number n, enter S4; otherwise, the head group Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2;
[0017] The characteristics include the destination station address and the service type;
[0018] The discarding reasons include that the address of the destination station of the packet is not in the forwarding rule table and the service type of the packet is not in the forwarding rule table;
[0019] n represents the sequence number of the sending queue, 1≤n≤N;
[0020] S4, determine the sending queue S n Length L n Is it less than the priority queue Q? m Preset capacity L n (Q m ), if so, group the head into Q m '(P1) Take out from the priority queue Qm and modify the read pointer of the priority queue; group the head group Q m '(P1) is temporarily stored in the temporary storage space. After the priority queue is finished, the head group Q m '(P1) Write to the tail of the send queue Sn, modify the write pointer of the send queue, and enter S5; if not, write the head packet Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2;
[0021] Ln (Q m )=L(S n )-(Mm)*l
[0022] L n Indicates the sending queue S n The actual number of cached packets;
[0023] L(S n ) represents the sending queue S n The total capacity of the physical space;
[0024] l is a positive integer and satisfies l <L(S n ) / M;
[0025] S5, group the head into Q m '(P1) From the sending queue S1~S N Take it out, write it into the temporary storage space, and modify the S1~S of the sending queue of the outbound port N The read pointer.
[0026] S1 specifically includes the following steps:
[0027] S11, based on the priority differentiation capability M of the packet switching network, a linear priority queue Q0~Q M ;
[0028] S12, according to the physical number N of the outbound ports of the packet switching network p and the number of time slices N t , generate a linear structure of the sending queue S1 ~ S N , where N = N p +N t ;
[0029] S13, extract and record the priority m of the packet currently arriving at the ingress port, and determine the priority queue Q m Is the length of less than the preset upper limit? If so, write the packet into the priority queue Q m The tail of the priority queue Q is modified at the same time m write pointer; otherwise, it indicates that the current queue is full and the packet is discarded.
[0030] Modifying the forwarding rule table during the entire execution process of the priority-based packet scheduling method specifically includes the following steps:
[0031] Q1, regularly access the discard queue at time interval T, read the queue information, and determine whether there is a discarded packet based on the queue information. If so, record the characteristics and discard reasons of the discarded packet and enter Q2; otherwise, continue to access the discard queue;
[0032] Q2, determine whether the reason for discarding the head packet of the discarded queue is that the correct egress port number cannot be found. If so, enter Q4; otherwise, enter Q3;
[0033] Q3, determine whether there is an idle port that can be used as the egress port for the same type of packet service flow. If so, enter Q4; otherwise, delete the information of the head packet, modify the read pointer of the discard queue, and return to Q1;
[0034] Q4, query the forwarding rule table according to the characteristics of the head packet of the discarded queue, determine whether there is an output port for the head packet of the discarded queue, if not, modify the forwarding rule table, and update the output port for the same type of packet service flow according to the characteristics of the head packet; if so, delete the information of the head packet, complete the modification of the read pointer of the discarded queue, and return to Q1.
[0035] Compared with the prior art, the present invention has the following beneficial technical effects:
[0036] (I) The present application performs group scheduling based on priority, and efficiently implements priority-differentiated services by constructing a linear priority queue and a sending queue, polling the queues in order of priority, and setting the sending queue capacity based on the priority. This solves the problem that the prior art cannot use a low-complexity algorithm to implement strict priority-differentiated services.
[0037] (II) The present application performs packet scheduling based on priority, which can effectively reduce the transmission delay of high-priority packets during network off-peak hours, and significantly reduce the packet loss rate of high-priority packets during peak hours.
[0038] (III) By using the head-of-line discard mechanism and setting a discard queue to record relevant information of discarded packets, and by modifying the forwarding rule table, the head-of-line blocking and adaptive modification of forwarding rules in the packet switching network under complex network environments can be effectively solved.
[0039] (IV) The computational complexity of the present application is low and the differentiated service effect is obvious. It can be used as a packet scheduling method for satellite-borne switching equipment and can also serve the ground-based packet switching network. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Flowchart of the priority-based packet scheduling of the present invention
[0041] Figure 2 A flow chart of the priority-based packet scheduling of the present invention;
[0042] Figure 3 The flowchart of the present invention for updating the discard queue and modifying the forwarding rule table.
[0043] The specific contents of the present invention are further explained in detail below in conjunction with embodiments. DETAILED DESCRIPTION
[0044] It should be noted that, unless otherwise specified, all components in the present invention are components known in the art.
[0045] Specific embodiments of the present invention are given below. It should be noted that the present invention is not limited to the following specific embodiments, and all equivalent changes made on the basis of the technical solution of this application fall within the protection scope of the present invention.
[0046] The present invention provides a priority-based packet scheduling method, which schedules packets based on a packet switching network, and specifically includes the following steps:
[0047] S1, create priority queues Q0~Q M and sending queues S1 to S N , extract and record the priority m of the packet currently arriving at the ingress port, and determine whether the packet can be written into the priority queue Q m ;
[0048] The ingress port or egress port is a plurality of physical ports, a plurality of time slices under the same physical port, or a sum of a plurality of physical ports and a plurality of time slices under the same physical port;
[0049] in:
[0050] m represents the sequence number of the priority queue, 0≤m≤M;
[0051] M represents the priority differentiation capability of the packet switching network, which is a positive integer;
[0052] N represents the total number of sending queues;
[0053] S2, read the priority queue Q in order from high to low priority M ~Q0 queue information, get the first non-empty priority queue Q m ', and get the non-empty priority queue Q m 'The head group Q m '(P1);
[0054] A non-empty priority queue Q m 'Includes packets with priority m;
[0055] P1 means Q m 'The first element in;
[0056] S3, extracts and records the header group Q obtained in S2 m '(P1) at least one feature, use this feature as an index, query the forwarding rule table, and determine the header packet Q m'(P1) Is there an outbound port? If so, output the header packet Q m '(P1) output port number n, enter S4; otherwise, the head group Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2;
[0057] Characteristics include destination station address and service type;
[0058] The reasons for discarding include that the address of the destination station of the packet is not in the forwarding rule table and the service type of the packet is not in the forwarding rule table;
[0059] n represents the sequence number of the sending queue, 1≤n≤N;
[0060] S4, determine the sending queue S n Length L n Is it less than the priority queue Q? m Preset capacity L n (Q m ), if so, group the head into Q m '(P1) Take out from the priority queue Qm and modify the read pointer of the priority queue; group the head group Q m '(P1) is temporarily stored in the temporary storage space. After the priority queue is finished, the head group Q m '(P1) Write to the tail of the send queue Sn, modify the write pointer of the send queue, and enter S5; if not, write the head packet Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2;
[0061] L n (Q m )=L(S n )-(Mm)*l
[0062] L n Indicates the sending queue S n The actual number of cached packets;
[0063] L(S n ) represents the sending queue S n The total capacity of the physical space;
[0064] l is a positive integer and satisfies l <L(S n )M;
[0065] S5, group the head into Q m '(P1) From the sending queue S1~S N Take it out, write it into the temporary storage space, and modify the S1~S of the sending queue of the outbound port N The read pointer.
[0066] In the above technical scheme, group scheduling is performed based on priority. By constructing a linear priority queue and a sending queue, polling the queues in order of priority, and setting the sending queue capacity according to the priority, priority differentiation services are efficiently implemented, which solves the problem that the existing technology cannot use a low-complexity algorithm to achieve strict priority differentiation of services.
[0067] Priority-based packet scheduling can effectively reduce the transmission delay of high-priority packets during network off-peak hours, while significantly reducing the packet loss rate of high-priority packets during peak hours.
[0068] N is determined by actual usage; the actual value of l can be determined in combination with the reserved bandwidth of each priority group.
[0069] The forwarding rule table is a table used in a packet switching network to decide how to forward packets. It contains:
[0070] 1. Look up the table index, that is, the destination address and service type of the packet.
[0071] 2. Rules, that is, decide which egress port to send the packet to based on the packet's destination address and service type.
[0072] 3. The query result is the outbound port of the packet.
[0073] The discard queue refers to caching the discard reasons for packets that cannot hit the forwarding rule table (ie, packets whose query results are empty and have no outbound ports) and generating a discard queue.
[0074] S1 specifically includes the following steps:
[0075] S11, based on the priority differentiation capability M of the packet switching network, a linear priority queue Q0~Q M ;
[0076] S12, according to the physical number N of the outbound ports of the packet switching network p and the number of time slices N t , generate a linear structure of the sending queue S1 ~ S N , where N = N p +N t ;
[0077] S13, extract and record the priority m of the packet currently arriving at the ingress port, and determine the priority queue Q m Is the length of less than the preset upper limit? If so, write the packet into the priority queue Q m The tail of the priority queue Q is modified at the same time m write pointer; otherwise, it indicates that the current queue is full and the packet is discarded.
[0078] Modifying the forwarding rule table during the entire execution process of the priority-based packet scheduling method specifically includes the following steps:
[0079] Q1, regularly access the discard queue at time interval T, read the queue information, and determine whether there is a discarded packet based on the queue information. If so, record the characteristics and discard reasons of the discarded packet and enter Q2; otherwise, continue to access the discard queue;
[0080] Q2, determine whether the reason for discarding the head packet of the discarded queue is that the correct egress port number cannot be found. If so, enter Q4; otherwise, enter Q3;
[0081] Q3, determine whether there is an idle port that can be used as the egress port for the same type of packet service flow. If so, enter Q4; otherwise, delete the information of the head packet, modify the read pointer of the discard queue, and return to Q1;
[0082] Q4, query the forwarding rule table according to the characteristics of the head packet of the discarded queue, determine whether there is an output port for the head packet of the discarded queue, if not, modify the forwarding rule table, and update the output port for the same type of packet service flow according to the characteristics of the head packet; if so, delete the information of the head packet, complete the modification of the read pointer of the discarded queue, and return to Q1.
[0083] In the above technical solution, by using the head-of-line discard mechanism and setting a discard queue to record relevant information of discarded packets, and by modifying the forwarding rule table, the head-of-line blocking and forwarding rule adaptive modification problems of the switching structure in a complex network environment are effectively solved.
Claims
1. A priority-based packet scheduling method, characterized in that: Scheduling packets based on a packet switching network specifically includes the following steps: S1, create priority queues Q0~Q M and sending queues S1 to S N , extract and record the priority m of the packet currently arriving at the ingress port, and determine whether the packet can be written into the priority queue Q m ; The ingress port or egress port is a plurality of physical ports, a plurality of time slices under the same physical port, or a sum of a plurality of physical ports and a plurality of time slices under the same physical port; in: m represents the sequence number of the priority queue, 0≤m≤M; M represents the priority differentiation capability of the packet switching network, which is a positive integer; N represents the total number of sending queues; S2, read the priority queue Q in order from high to low priority M ~Q0 queue information, get the first non-empty priority queue Q m ', and get the non-empty priority queue Q m 'The head group Q m '(P1); The non-empty priority queue Q m 'Includes packets with priority m; P1 means Q m 'The first element in; S3, extracts and records the header group Q obtained in S2 m '(P1) at least one feature, use this feature as an index, query the forwarding rule table, and determine the header packet Q m '(P1) Is there an outbound port? If so, output the header packet Q m '(P1) output port number n, enter S4; otherwise, the head group Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2; The characteristics include the destination station address and the service type; The discarding reasons include that the address of the destination station of the packet is not in the forwarding rule table and the service type of the packet is not in the forwarding rule table; n represents the sequence number of the sending queue, 1≤n≤N; S4, determine the sending queue S n Length L n Is it less than the priority queue Q? m If the preset capacity Ln(Qm) is Ln, then the head group Q m '(P1) Take out from the priority queue Qm and modify the read pointer of the priority queue; group the head group Q m '(P1) is temporarily stored in the temporary storage space. After the priority queue is finished, the head group Q m '(P1) Write to the tail of the send queue Sn, modify the write pointer of the send queue, and enter S5; if not, write the head packet Q m '(P1)'s characteristics and discard reasons are written into the discard queue, and then return to S2; L n (Q m )=L(S n )-(M-m)*l L n Indicates the sending queue S n The actual number of cached packets; L(S n ) represents the sending queue S n The total capacity of the physical space; l is a positive integer and satisfies l <L(S n ) / M; S5, group the head into Q m '(P1) From the sending queue S1~S N Take it out, write it into the temporary storage space, and modify the S1~S of the sending queue of the outbound port N The read pointer.
2. The priority-based packet scheduling method according to claim 1, characterized in that: S1 specifically includes the following steps: S11, based on the priority differentiation capability M of the packet switching network, a linear priority queue Q0~Q M ; S12, according to the physical number N of the outbound ports of the packet switching network p and the number of time slices N t , generate a linear structure of the sending queue S1 ~ S N , where N = N p +N t ; S13, extract and record the priority m of the packet currently arriving at the ingress port, and determine the priority queue Q m Is the length of less than the preset upper limit? If so, write the packet into the priority queue Q m The tail of the priority queue Q is modified at the same time m write pointer; otherwise, it indicates that the current queue is full and the packet is discarded.
3. The priority-based packet scheduling method according to claim 1, characterized in that: During the entire execution process of the priority-based packet scheduling method according to claim 1 or 2, the forwarding rule table is modified, specifically The following steps are involved: Q1, regularly access the discard queue at time interval T, read the queue information, and determine whether there is a discarded packet based on the queue information. If so, record the characteristics and discard reasons of the discarded packet and enter Q2; otherwise, continue to access the discard queue; Q2, determine whether the reason for discarding the head packet of the discarded queue is that the correct egress port number cannot be found. If so, enter Q4; otherwise, enter Q3; Q3, determine whether there is an idle port that can be used as the egress port for the same type of packet service flow. If so, enter Q4; otherwise, delete the information of the head packet, modify the read pointer of the discard queue, and return to Q1; Q4, query the forwarding rule table according to the characteristics of the head packet of the discarded queue, determine whether there is an output port for the head packet of the discarded queue, if not, modify the forwarding rule table, and update the output port for the same type of packet service flow according to the characteristics of the head packet; if so, delete the information of the head packet, complete the modification of the read pointer of the discarded queue, and return to Q1.