Traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer
Through dynamic variable rate token allocation, excess token sharing and idle cache temporary storage strategies, the problem of waste of token resources and insufficient cache space in network congestion control is solved, achieving more efficient traffic shaping and scheduling, and reducing latency. and packet loss rate, improving network performance.
Patent Information
- Application Number
- CN202410606491.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Existing network congestion control algorithms have problems such as waste of token resources, insufficient ability to handle burst traffic, and inflexible cache space utilization in terms of traffic shaping and scheduling, resulting in increased service transmission delays and packet loss rates.
Adopt a traffic shaping scheduling method based on dynamic variable rate token allocation and idle cache, and improve network congestion control efficiency through the idea of dynamic changes in token delivery rates, excess token sharing and lending strategies, and idle cache temporary overflow grouping.
It effectively reduces the network packet transmission delay, reduces the packet loss rate, improves the QoS transmission requirements of different services, and improves network performance.
Smart Images

Figure CN118368252B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of network congestion control, and in particular to a traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer. Background Art
[0002] In recent years, the Internet has played an increasingly important role in various fields, which has led users to place higher requirements on the network's Quality of Service (QoS). With the rapid growth of network traffic, node caches and link bandwidths are gradually unable to withstand the aggregation and transmission of service traffic, resulting in frequent network congestion, which in turn affects network performance. Therefore, establishing an effective congestion control mechanism in the network is crucial to improving network performance.
[0003] At present, there are still some deficiencies in the research of network congestion control at home and abroad: as an effective network congestion control algorithm, in terms of traffic shaping algorithm, the token delivery rate of the existing traffic shaping algorithm is a fixed value, and the token allocation strategy is fixed, which is insufficient to handle burst traffic and easily leads to the problem of reduced service transmission priority; in terms of traffic scheduling, the existing traffic scheduling algorithm lacks flexibility in the use of cache space, and it is easy to have untimely packet scheduling when traffic bursts occur, resulting in a sharp increase in service end-to-end transmission delay and packet loss rate. Therefore, the network traffic shaping and scheduling method based on dynamic variable rate token allocation and idle cache is proposed, which is of great significance to improve the efficiency of network congestion control. Summary of the invention
[0004] The purpose of the present invention is to provide a traffic shaping scheduling method based on dynamic variable rate token allocation and idle cache. First, according to the classification of network service flows, each queue is equipped with a corresponding token bucket for traffic shaping processing, and a dynamic change mechanism of token delivery rate is introduced to solve the problem of token resource waste. Secondly, excess token sharing and token lending strategies are proposed to solve the problem of increased packet transmission delay caused by insufficient tokens. Finally, the idea of temporarily storing overflow packets from other queues in an idle cache is introduced to solve the problem of excessive packet loss caused by insufficient queue cache space, thereby improving the overall efficiency of network congestion control.
[0005] To achieve the above functions, the present invention designs a traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer, including the following steps S1 to S10:
[0006] Step S1: For four types of network traffic services, including file transfer, image, video and voice, corresponding service queues are established and parameters are initialized;
[0007] Step S2: For each service queue, a corresponding token bucket is established to perform network traffic shaping. The token bucket includes a C bucket and an E bucket. For service queue i, the number of tokens T in the C bucket and the E bucket in service queue i is calculated. ci and T ei , determine its relationship with the committed burst size CBS and excess burst size EBS, and dynamically adjust the committed information rate CIR of service queue i i ;
[0008] Step S3: When a new packet arrives at service queue i, determine the number of tokens in bucket C of the service queue Is it established? Indicates the new packet size arriving at service queue i; if true, the number of tokens in bucket C is updated Based on the improved single-rate three-color marking method, the new packet is marked as green for forwarding; if not, proceed to step S4;
[0009] Step S4: Determine the number of tokens in bucket C Is it true, where k represents the lending factor. If true, it enters the token lending mode and updates the number of tokens in bucket C Mark the new packet as green for forwarding; if not, proceed to step S5;
[0010] Step S5: Determine the number of tokens in bucket E Is it true? If so, update the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S6;
[0011] Step S6: Determine the number of tokens in bucket E Is it true? If so, enter the token lending mode and update the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S7;
[0012] Step S7: Enter the excess token sharing mode and determine the number of tokens in bucket E of service queue j And whether i≠j is true, if so, business queue j borrows a certain number of excess tokens from business queue i, marks the new packet as yellow for forwarding, and updates the token number of bucket E of business queue i T lend Indicates the number of excess tokens; if not true, the new group will be marked in red;
[0013] Step S8: Calculate the length L of each service queue. When a new packet enters the service queue, determine whether the packets in the service queue overflow. If overflow, execute step S9;
[0014] Step S9: Find an idle service queue. If there is an idle service queue that meets the conditions, temporarily store the overflow packet in the service queue. Otherwise, discard the packet.
[0015] Step S10: If all service queues in this round have been scheduled, check whether there is a temporarily stored packet in each service queue. If so, determine whether the original service queue of the packet has sufficient buffer to receive the packet. If so, schedule the packet back to the original service queue for forwarding, otherwise discard the packet.
[0016] Beneficial effects: Compared with the prior art, the advantages of the present invention include:
[0017] 1. Introduce a dynamic change mechanism for token release rate to solve the problem of token resource waste;
[0018] 2. Propose excess token sharing and token lending strategies to solve the problem of insufficient tokens, effectively reducing network packet transmission delay;
[0019] 3. Introduce the idea of temporarily storing the overflow packets of other queues in the idle buffer to solve the problem of excessive packet loss rate caused by insufficient queue buffer space;
[0020] 4. Use a combination of weighted round-robin scheduling and priority queue scheduling to effectively ensure the QoS transmission requirements of different services;
[0021] 5. This network traffic shaping and scheduling method based on dynamic variable rate token allocation and idle cache is simple and efficient, which can effectively improve the efficiency of network congestion control and enhance system network performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of a traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffering provided in accordance with an embodiment of the present invention;
[0023] Figure 2 is a network simulation topology diagram provided according to an embodiment of the present invention;
[0024] Figure 3 : is a comparison diagram of the file transmission service delay between the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0025] Figure 4 It is a comparison diagram of image service delays of the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0026] Figure 5 It is a comparison diagram of video service delays of the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0027] Figure 6 It is a comparison diagram of voice service delays of the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0028] Figure 7 1 is a comparison chart of packet loss numbers between the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0029] Figure 8 : is a comparison diagram of video service jitters of the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention;
[0030] Fig. 9 It is a comparison diagram of voice service jitter of the method of the present invention and the LB and srTCM algorithms provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0032] The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer provided in the embodiment of the present invention is referred to Figure 1 , comprising the following steps S1 to S10:
[0033] Step S1: For four types of network traffic services, including file transfer, image, video and voice, corresponding service queues are established and parameters are initialized;
[0034] The initialization parameters include the committed information rate CIR, committed burst size CBS, and excess burst size EBS of the service queue; the initial committed information rate CIR of the service queues corresponding to file transfer, image, video and voice are set to 2Mbps, 2Mbps, 3Mbps and 3Mbps respectively, the initial committed burst size CBS is set to 0.2Mb, 0.2Mb, 0.8Mb and 0.3Mb, and the initial excess burst size EBS is set to 0.3Mb, 0.3Mb, 0.75Mb and 0.4Mb.
[0035] Step S2: For each service queue, a corresponding token bucket is established to perform network traffic shaping. The token bucket includes a C bucket and an E bucket. For service queue i, the number of tokens T in the C bucket and the E bucket in service queue i is calculated. ci and T ei , determine its relationship with the committed burst size CBS and excess burst size EBS, and dynamically adjust the committed information rate CIR of service queue i i ;
[0036] In order to provide differentiated services with different QoS requirements for different network traffic services, an improved single rate three color marker (srTCM) is used to establish corresponding token buckets for each service queue: bucket C and bucket E for traffic shaping. The number of tokens in bucket C and bucket E in service queue i is T, respectively. ci and T ei ; The processing priority is determined according to the color marking of the group, and the processing priority is green, yellow, and red from high to low.
[0037] In step S2, a CIR rate controller is used to periodically detect whether the tokens in the C bucket and the E bucket of each service queue are full. If they are full, the CIR rate controller will reduce the committed information rate CIR of the service queue by a certain proportion and evenly distribute the reduced committed information rate CIR to other service queues. The specific model is as follows:
[0038] CIR j ′=αCIR j
[0039]
[0040] Among them, α is the control parameter, 0<α<1, CIR i is the committed information rate of service queue i before adjustment, CIR i ′ is the committed information rate of service queue i after adjustment.
[0041] Step S3: When a new packet arrives at service queue i, determine the number of tokens in bucket C of the service queue Is it established? Indicates the new packet size arriving at service queue i; if true, the number of tokens in bucket C is updated Based on the improved single-rate three-color marking method, the new packet is marked as green for forwarding; if not, proceed to step S4;
[0042] Step S4: Determine the number of tokens in bucket C Is it true, where k represents the lending factor. If true, it enters the token lending mode and updates the number of tokens in bucket C Mark the new packet as green for forwarding; if not, proceed to step S5;
[0043] In step S4, it is assumed that a traffic burst occurs in a service queue j, and the newly arrived packet new_packet j First, compare it with the number of tokens in bucket C. If the number of groups is greater than the number of tokens, the token lending mode is triggered:
[0044]
[0045]
[0046] new_packet j =new_packet j_green
[0047] Where k is the borrowing factor, 0.9≤k<1, and the size of the newly arrived packet is T cj is the number of C bucket tokens of the current service queue j, T ej is the number of E bucket tokens of the current service queue j, T cj ′ is the number of C bucket tokens of service queue j after update, new_packet j_green Indicates groups marked in green.
[0048] Step S5: Determine the number of tokens in bucket E Is it true? If so, update the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S6;
[0049] Step S6: Determine the number of tokens in bucket E Is it true? If so, enter the token lending mode and update the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S7;
[0050] In step S6, the new packet size is compared with the number of tokens in bucket E. If the packet size is larger than the number of tokens, the token lending mode is triggered:
[0051]
[0052]
[0053] new_packet j =new_packet j_yellow
[0054] Among them, T ej is the number of E bucket tokens of the current service queue j, T ej ′ is the number of E bucket tokens of service queue j after update, new_packet j_yellow Indicates the group marked in yellow; at this time, the new group is marked in yellow and will be processed with lower priority.
[0055] Step S7: Enter the excess token sharing mode and determine the number of tokens in bucket E of service queue j And whether i≠j is true, if so, business queue j borrows a certain number of excess tokens from business queue i, that is, T ej =T ej -T lend ; Mark the new packet as yellow for forwarding, and update the token number of bucket E of service queue i T lend Indicates the number of excess tokens; if not true, the new group will be marked in red;
[0056] In step S7, it is assumed that a burst of traffic is introduced into a service queue j, and the number of tokens in the current bucket C of the service queue j is T cj , the number of tokens in bucket E is T ej , the size of the newly arrived packet is like and The excess token sharing mode is entered, that is, the excess tokens are borrowed from the E buckets of other business queues. Generally, the business queue with the largest number of remaining tokens in the E bucket is selected for borrowing. If the number of remaining tokens in the E buckets of other business queues is less than Then the newly arrived packet new_packet j Marked in red, the packet will be dropped:
[0057] new_packet j =new_packet j_red
[0058] Among them, new_packet j_red Indicates the group marked in red;
[0059] If the number of remaining tokens in bucket E of other service queues is greater than or equal to and T ej The difference between , the number of E bucket tokens of service queue j and the borrowed service queue will change as follows:
[0060] T ej ′=T ej +T lend
[0061] T el ′=T el -T lend
[0062] Among them, T el Indicates the business queue that has borrowed excess tokens, T lend Indicates the number of excess tokens borrowed, T el ′ represents the updated service queue that has borrowed excess tokens; at this time, the number of tokens in bucket E in service queue j is sufficient for packet forwarding, then T ej′ changes, and the group is marked in yellow:
[0063]
[0064] new_packet j =new_packet j_yellow
[0065] Among them, T ej ′ is the number of E bucket tokens of service queue j after update, T ej ″ is the updated T ej ′.
[0066] Step S8: Calculate the length L of each service queue. When a new packet enters the service queue, determine whether the packets in the service queue overflow. If overflow occurs, execute step S9;
[0067] Network traffic services are divided into three types: delay-sensitive, bandwidth-sensitive and best-effort. They are scheduled using a combination of weighted round-robin scheduling and priority queuing. Bandwidth-sensitive services and best-effort services use a weighted round-robin scheduling algorithm, while the resulting data streams and delay-sensitive services use a priority queuing algorithm.
[0068] Step S9: Find an idle service queue, i.e. L≤βB max , if there is an idle service queue that meets the conditions, the overflow packet is temporarily stored in the service queue, otherwise the packet is discarded;
[0069] In step S9, the maximum buffer space of each service queue is set to B max , the total length of packets in the current service queue is L i , the size of the newly arrived packet is when When, look for an idle service queue; if L j <βB max (i≠j), then the service queue j is an idle queue, and the packet is temporarily stored in the idle queue for collaborative scheduling. In order to prevent packet loss, the packet is marked as a temporary packet. At this time, the change of service queue j is:
[0070]
[0071] new_packet i =tem_packet i
[0072] Among them, tem_packet i represents the temporarily stored packets from service queue i. If L j ≥βBmax (i≠j), then service queue j is not an idle queue and does not accept overflow packets from other service queues. j is the total length of packets in service queue j, β is the overflow coefficient, 0.5<β<1.
[0073] Step S10: If all service queues in this round have been scheduled, check whether there is a temporarily stored packet in each service queue. If so, determine whether the original service queue of the packet has sufficient buffer to receive the packet. If so, schedule the packet back to the original service queue for forwarding, otherwise discard the packet.
[0074] In step S10, after a round of scheduling is completed, it is detected whether there is a temporarily stored packet in the service queue. If there is a temporarily stored packet, it is determined whether the original service queue of the packet has enough buffer space to accommodate the packet. If The original service queue buffer space is sufficient, and the length of each service queue changes to:
[0075]
[0076]
[0077] At this point, the temporary storage grouping of each business queue has been processed and the next round of business queue scheduling has begun.
[0078] The following is an application example of the present invention:
[0079] In terms of algorithm performance analysis, this embodiment builds an experimental simulation scenario consisting of 12 terminal devices and 2 routers to simulate the transmission services of various network traffic services. On this basis, the effectiveness of the algorithm is verified, and the performance indicators verified include latency, jitter, and packet loss, and compared with the LB and srTCM algorithms.
[0080] Figure 2 This is a network simulation topology diagram. The link type between each terminal device and the router is set to "10BaseT", with a maximum bandwidth of 10Mb / s; the link type between two routers is "10BaseT". According to the service carrying conditions in the network, this experimental scenario simulates four common services: file transfer, image, video and voice call.
[0081] Figure 3This is a comparison chart of the file transfer service delay of the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that the three algorithms perform relatively well in the normal business transmission service in the first 60 seconds of the simulation, and the overall delay is low and tends to be stable. In the last 60 seconds, due to the burst of traffic, the delay of the three algorithms has increased to a certain extent. The delay of the LB algorithm is the highest among the three algorithms. The reason is that although the LB algorithm can limit the transmission rate of the traffic, its processing ability for burst traffic is very weak. Therefore, when the burst business traffic begins to flow in the 60th second of the simulation, the delay of the LB algorithm increases significantly; the performance of the srTCM algorithm under burst traffic is acceptable. Due to the existence of the E bucket, the srTCM algorithm can handle part of the burst traffic. Therefore, although the delay has increased, it is generally maintained in a low range; the algorithm of the present invention performs best among the three algorithms. Since the burst volume of the file transfer service is not very large, the algorithm of the present invention can handle the burst traffic well. At the same time, with dynamic token allocation, the possibility of packet tag degradation is further reduced, thereby effectively reducing the packet transmission delay.
[0082] Figure 4 This is a comparison chart of the image service delays of the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that in terms of image services, the three algorithms perform relatively well in the normal business transmission service in the first 60 seconds of simulation, and the overall delay is low and tends to be stable. In the last 60 seconds, due to the burst of traffic, the delays of the three algorithms have increased significantly. Among them, the LB algorithm has the highest delay, and the algorithm of the present invention has the lowest delay, but the delays of the three algorithms have been showing an upward trend and have not tended to be stable, indicating that the image service has been greatly affected.
[0083] Figure 5 This is a comparison chart of the video service delays of the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that in terms of video services, the three algorithms perform relatively well in the normal business transmission service in the first 60 seconds of simulation, and the overall delay is low and tends to be stable. In the last 60 seconds, due to the traffic burst, the delay of the three algorithms increased to a certain extent. Among them, the LB algorithm has the highest delay. It can be seen that the rate of traffic bursts is already far greater than the shaping rate of the leaky bucket hole. The delay of the algorithm continues to rise and maintains a high rate of increase; the delays of the srTCM algorithm and the algorithm of the present invention are relatively similar, and the delay of the algorithm of the present invention is lower. This is due to the dynamic token allocation mechanism introduced by the algorithm of the present invention. By sharing the E bucket token and using the token lending mode, the packet can obtain enough tokens for forwarding, thereby avoiding the increase in transmission delay.
[0084] Figure 6This is a comparison chart of voice service delays of the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that in terms of voice services, the delay of the LB algorithm during the entire simulation time is higher than that of the srTCM algorithm and the CRDTA algorithm. In the second half of the simulation, the delay of the LB algorithm changes frequently, which shows that the LB algorithm lacks timely processing of voice services in this simulation scenario; the srTCM algorithm maintains a low delay in the first 60 seconds of the simulation, but after the traffic burst in the 60th second of the simulation, the delay begins to rise slowly; the overall delay of the algorithm of the present invention is the lowest among the three algorithms. After the traffic burst in the 60th second of the simulation, the algorithm has a certain increase in delay, but compared with the LB algorithm and the srTCM algorithm, the increase is relatively small, and in the subsequent simulation time, the delay continues to remain at a low level, and the overall delay change trend is small, indicating that the algorithm of the present invention has a relatively good shaping ability for voice service traffic.
[0085] Figure 7 It is a comparison chart of the number of packet losses of the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that the average delay of the algorithm of the present invention in file transfer service, image service, video service and voice service is less than that of other comparison algorithms. Compared with the LB algorithm, the average delay of the algorithm of the present invention in the four types of services is reduced by 84.4%, 40.0%, 69.4% and 86.9% respectively; compared with the srTCM algorithm, the average delay of the algorithm of the present invention in the four types of services is reduced by 11.8%, 26.4%, 17.4% and 19.1% respectively; in summary, the average delay of the algorithm of the present invention in the four types of services is improved by at least 11.8%, 26.4, 17.4% and 19.1% compared with other comparison algorithms, indicating that the algorithm of the present invention shows good performance in terms of delay indicators.
[0086] Figure 8 This is a comparison chart of the jitter of the algorithm of the present invention and the LB and srTCM algorithms for video services. It can be seen that in the video service, the jitter of the LB algorithm is the largest. Although the algorithm plays a shaping role, its processing capability for burst traffic is weak, resulting in difficulty in forwarding packets and increased delay jitter; the jitter of the srTCM algorithm is second. After a 60s traffic burst, the jitter of the srTCM algorithm has a significant increase. Overall, the jitter of the algorithm is close to that of the LB algorithm, indicating that the jitter performance of srTCM in video services is relatively general; the algorithm of the present invention performs best in jitter, and the jitter has almost no change after a 60s traffic burst, indicating that the excess token sharing mode and token lending mechanism of the algorithm improve the processing capability for burst traffic, enabling packets to obtain tokens to the maximum extent for timely forwarding, and ultimately maintaining the jitter at a low level.
[0087] Fig. 9This is a comparison chart of voice service jitter between the algorithm of the present invention and the LB and srTCM algorithms. It can be seen that in voice services, the jitter of the LB algorithm is still the largest, and compared with the other two algorithms, the jitter change rate of the LB algorithm gradually increases after the traffic burst at the 60th second of the simulation; the srTCM algorithm performs better in jitter than the LB algorithm, and the algorithm has no obvious change in jitter before and after the traffic burst at the 60th second of the simulation; the jitter performance of the algorithm of the present invention is the best among the three algorithms, and the jitter has been maintained at a relatively stable value, indicating that the algorithm of the present invention can effectively limit the impact of burst traffic on the transmission of various types of service traffic in the network.
[0088] In summary, the present invention proposes a traffic shaping scheduling method based on dynamic variable rate token allocation and idle cache. First, according to the classification of network service flows, each queue is equipped with a corresponding token bucket for traffic shaping processing, and a dynamic change mechanism of token delivery rate is introduced to solve the problem of token resource waste. Secondly, excess token sharing and token lending strategies are proposed to solve the problem of increased packet transmission delay caused by insufficient tokens. Finally, the idea of temporarily storing overflow packets from other queues in an idle cache is introduced to solve the problem of excessive packet loss caused by insufficient queue cache space. The algorithm of the present invention realizes effective control of network congestion and shows good performance in terms of delay, jitter and number of packet loss.
[0089] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer, characterized in that: The method comprises the following steps S1 to S10: Step S1: For four types of network traffic services, including file transfer, image, video and voice, corresponding service queues are established and parameters are initialized; Step S2: For each service queue, a corresponding token bucket is established to perform network traffic shaping. The token bucket includes a C bucket and an E bucket. For service queue i, the number of tokens T in the C bucket and the E bucket in service queue i is calculated. ci and T ei , determine its relationship with the committed burst size CBS and excess burst size EBS, and dynamically adjust the committed information rate CIR of service queue i i ; Step S3: When a new packet arrives at service queue i, determine the number of tokens in bucket C of the service queue Is it established? Indicates the new packet size arriving at service queue i; if true, the number of tokens in bucket C is updated Based on the improved single-rate three-color marking method, the new packet is marked as green for forwarding; if not, proceed to step S4; Step S4: Determine the number of tokens in bucket C Is it true, where k represents the lending factor. If true, it enters the token lending mode and updates the number of tokens in bucket C Mark the new packet as green for forwarding; if not, proceed to step S5; Step S5: Determine the number of tokens in bucket E Is it true? If so, update the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S6; Step S6: Determine the number of tokens in bucket E Is it true, where k represents the lending factor. If true, it enters the token lending mode and updates the number of tokens in bucket E Mark the new packet as yellow and forward it; if not, proceed to step S7; Step S7: Enter the excess token sharing mode and determine the number of tokens in bucket E of service queue j And whether i≠j is true, if so, business queue j borrows a certain number of excess tokens from business queue i, marks the new packet as yellow for forwarding, and updates the token number of bucket E of business queue i T lend Indicates the number of excess tokens; If not, the new group will be marked in red; Step S8: Calculate the length L of each service queue. When a new packet enters the service queue, determine whether the packets in the service queue overflow. If overflow, execute step S9; Step S9: Find an idle service queue. If there is an idle service queue that meets the conditions, temporarily store the overflow packet in the service queue. Otherwise, discard the packet. Step S10: If all service queues in this round have been scheduled, check whether there is a temporarily stored packet in each service queue. If so, determine whether the original service queue of the packet has sufficient buffer to receive the packet. If so, schedule the packet back to the original service queue for forwarding, otherwise discard the packet.
2. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1 is characterized in that: In step S1, the initialized parameters include the committed information rate CIR, committed burst size CBS, and excess burst size EBS of the service queue; the initial committed information rate CIR of the service queues corresponding to file transfer, image, video and voice are set to 2Mbps, 2Mbps, 3Mbps and 3Mbps, the initial committed burst size CBS is set to 0.2Mb, 0.2Mb, 0.8Mb and 0.3Mb, and the initial excess burst size EBS is set to 0.3Mb, 0.3Mb, 0.75Mb and 0.4Mb respectively.
3. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1 is characterized in that: In order to provide differentiated services with different QoS requirements for different network traffic services, an improved single-rate three-color marking method is used to establish corresponding token buckets for each service queue: bucket C and bucket E for traffic shaping. The number of tokens in bucket C and bucket E in service queue i is T and T and respectively. ci and T ei ; The processing priority is determined according to the color marking of the group, and the processing priority is green, yellow, and red from high to low.
4. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1 is characterized in that: In step S2, a CIR rate controller is used to periodically detect whether the tokens in the C bucket and the E bucket of each service queue are full. If they are full, the CIR rate controller will reduce the committed information rate CIR of the service queue by a certain proportion and evenly distribute the reduced committed information rate CIR to other service queues. The specific model is as follows: CIR j ′=αCIR j Among them, α is the control parameter, 0<α<1, CIR i is the committed information rate of service queue i before adjustment, CIR i ′ is the committed information rate of service queue i after adjustment.
5. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1, characterized in that: In step S4, it is assumed that a traffic burst occurs in a service queue j, and the newly arrived packet new_packet j First, compare it with the number of tokens in bucket C. If the number of groups is greater than the number of tokens, the token lending mode is triggered: new_packet j =new_packet j_green Where k is the borrowing factor, 0.9≤k<1, and the size of the newly arrived packet is T cj is the number of C bucket tokens of the current service queue j, T ej is the number of E bucket tokens of the current service queue j, T cj ′ is the number of C bucket tokens of service queue j after update, new_packet j_green Indicates groups marked in green.
6. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1, characterized in that: In step S6, the new packet size is compared with the number of tokens in bucket E. If the packet size is larger than the number of tokens, the token lending mode is triggered: new_packet j =new_packet j_yellow Among them, T ej is the number of E bucket tokens of the current service queue j, T ej ′ is the number of E bucket tokens of service queue j after update, new_packet j_yellow Indicates the group marked in yellow; at this time, the new group is marked in yellow and will be processed with lower priority.
7. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1 is characterized in that: In step S7, it is assumed that a burst of traffic is introduced into a service queue j, and the number of tokens in the current bucket C of the service queue j is T cj , the number of tokens in bucket E is T ej , the size of the newly arrived packet is like and Then it enters the excess token sharing mode, that is, borrowing excess tokens from the E buckets of other business queues. If the remaining tokens in the E buckets of other business queues are less than The newly arrived packet new_packet j Marked in red, the packet will be dropped: new_packet j =new_packet j_red Among them, new_packet j_red Indicates the group marked in red; If the number of remaining tokens in bucket E of other service queues is greater than or equal to and T ej The difference between , the number of E bucket tokens of service queue j and the borrowed service queue will change as follows: T ej ′=T ej +T lend T el ′=T el -T lend Among them, T el Indicates the business queue that has borrowed excess tokens, T lend Indicates the number of excess tokens borrowed, T el ′ represents the updated service queue that has borrowed excess tokens; at this time, the number of tokens in bucket E in service queue j is sufficient for packet forwarding, then T ej ′ changes, and the group is marked in yellow: new_packet j =new_packet j_yellow Among them, T ej ′ is the number of E bucket tokens of service queue j after update, T ej ″ is the updated T ej ′,new_packet j_yellow Indicates the group marked in yellow.
8. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1, characterized in that: In step S8, network traffic services are divided into three types: delay-sensitive, bandwidth-sensitive and best-effort, and are scheduled by combining weighted round-robin scheduling and priority queuing. Among them, bandwidth-sensitive services and best-effort services use a weighted round-robin scheduling algorithm, and the resulting data streams and delay-sensitive services use a priority queuing algorithm.
9. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1, characterized in that: In step S9, the maximum buffer space of each service queue is set to B max , the total length of packets in the current service queue is L i , the size of the newly arrived packet is when When, find an idle service queue; if the total length of packets in service queue j is L j <βB max , and business queue j ≠ business queue i, then business queue j is an idle queue, the packet is temporarily stored in the idle queue for collaborative scheduling, and the packet is marked as a temporary storage packet. At this time, the change of business queue j is: new_packet i =tem_packet i Among them, tem_packet i represents the temporarily stored packets from service queue i. If the total length of packets in service queue j is L j ≥βB max , and service queue j ≠ service queue i, then service queue j is not an idle queue and does not accept overflow packets from other service queues, where L j is the total length of packets in service queue j, β is the overflow coefficient, 0.5<β<1.
10. The traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer according to claim 1, characterized in that: In step S10, after a round of scheduling is completed, it is detected whether there is a temporarily stored packet in the service queue. If there is a temporarily stored packet, it is determined whether the original service queue of the packet has enough buffer space to accommodate the packet. If The original service queue buffer space is sufficient, and the length of each service queue changes to: At this point, the temporary storage grouping of each business queue has been processed and the next round of business queue scheduling has begun.
Citation Information
Patent Citations
Rate shaping for wireless communication using token bucket that allows token debt
CN102577569A
Data transmission flow scheduling method and system based on token buckets
CN104734989A
