A token updating system and method for a traffic shaper
By distinguishing empty queues and non-empty queues in the traffic shaper, and configuring the cycle update frequency according to the expected time, the system bottleneck problem caused by the token update mechanism in the existing technology is solved, and efficient token update and multi-traffic shaping are achieved devices work at the same time.
Patent Information
- Application Number
- CN202110749311.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-01
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-07-01
AI Technical Summary
In the existing technology, the token update mechanism of the traffic shaper involves a large number of read and write operations, causing a system bottleneck and making it difficult to support the simultaneous operation of a large number of traffic shapers.
Adopt a mechanism that separates empty queues and non-empty queues. The empty queue triggers updates when a message arrives, and the non-empty queue performs cyclic updates when the token is invalid. The update level and frequency are configured according to the expected time through the cyclic update pool to reduce reading and writing. Number of operations.
It effectively reduces the number of read and write operations for token update, reduces latency, and supports the simultaneous operation of a large number of traffic shapers.
Smart Images

Figure CN113645147B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data communication networks, and in particular to a token updating system and method for a traffic shaper. Background Art
[0002] QoS (Quality of Service) is a network security mechanism and a technology used to solve network delays and congestion problems. Traffic shapers are an important technology in the field of QoS. Usually, messages arriving from other ports are sent to each transmission port through a forwarder. When the speed of the arriving message exceeds the bandwidth of the export traffic for a short time or the export service rate needs to be adjusted for QoS considerations, it is necessary to schedule the message at the export. Generally, traffic shapers are used together with schedulers. The scheduler is used to select which queue's messages are to be transmitted first, and the traffic shaper is used to screen out candidate queues that are eligible to participate in the scheduling at the current moment for the scheduler to select, thereby achieving control of the flow rate of various services at the export of ports and queues.
[0003] Among them, the traffic shaper is usually implemented based on the token bucket principle. When the message arrives, it first determines whether the number of tokens in the token bucket is valid. When the number of tokens is valid, scheduling is allowed. When the number of tokens is invalid, the message is blocked. In the prior art, there are multiple traffic shapers working at the same time, and the number often reaches thousands. In order to improve efficiency and save resources, there will be a special module to centrally process all traffic shapers, and the traditional approach for the token generation part is to adopt a cyclic update mechanism. Under this cyclic update mechanism, assuming that the update rate of each token bucket is 1.5M, one thousand traffic shapers require about 3G (1.5M*1K*2) read and write operations per second, which is very demanding on the system and is usually implemented in parallel by multiple sets of hardware. If the number of SHAPERs increases to a certain number, the number of reads and writes per second will be a large order of magnitude. Since the number of reads and writes per second of the system is limited, there is a serious system bottleneck. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention provides a token update system for a traffic shaper, wherein a plurality of traffic shapers are pre-configured, each of the traffic shapers is associated with a data queue and performs traffic shaping on the data queue through a token bucket; the token update system comprises:
[0005] A first updating module is used for updating the token of the token bucket of the associated traffic shaper for a non-empty queue in each of the data queues when a message in the data queue is scheduled, and adding the data queue to an empty queue pool when the data queue is an empty queue after scheduling is completed, and generating a cyclic update signal when the data queue is a non-empty queue after scheduling is completed and the number of tokens in the updated token bucket is a negative value;
[0006] A second updating module, connected to the empty queue pool, is used for updating the token of the token bucket of the associated traffic shaper for each of the empty queues when a new message arrives;
[0007] A cyclic update pool, comprising a plurality of update pools with different update levels, and each of the update pools also has a cyclic update frequency positively correlated with the update level;
[0008] a third update module, connected to the first update module and the cyclic update pool, respectively, for obtaining the update level of the corresponding traffic shaper according to the cyclic update signal processing, and placing the traffic shaper into the update pool corresponding to the update level, so as to perform token update on the token bucket according to the cyclic update frequency;
[0009] The fourth update module is connected to the cyclic update pool and is used to move the traffic shaper out of the update pool to participate in scheduling when it is detected that the number of tokens in the token bucket corresponding to the traffic shaper is a non-negative value during the token update process of each token bucket.
[0010] Preferably, each update pool represents the update level through a pre-configured standard time, and the smaller the standard time is, the higher the update level is, and thus the higher the cyclic update frequency is.
[0011] Preferably, the third update module includes:
[0012] A processing unit, configured to obtain an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket, and a pre-configured token generation rate;
[0013] a matching unit, connected to the processing unit, for comparing the expected time with each of the standard times, and taking the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper;
[0014] An updating unit, connected to the matching unit, is used to place the traffic shaper into the update pool corresponding to the update level, so as to perform token updates on the token bucket according to the cyclic update frequency.
[0015] Preferably, the expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time;
[0016] The matching unit compares the expected time with each of the standard times during the change of the expected time and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper has changed;
[0017] The updating unit adjusts the update pool where the traffic shaper is located according to the adjustment signal.
[0018] The present application also provides a token update method for a traffic shaper, which is applied to the above-mentioned token update system, wherein the token update system is configured with a cyclic update pool, including multiple update pools with different update levels, and each of the update pools also has a cyclic update frequency that is positively correlated with the update level;
[0019] Then the token updating method comprises:
[0020] Step S1, the token update system updates the token of the token bucket of the associated traffic shaper for each non-empty queue in the data queue when a message in the data queue is scheduled, and determines whether the data queue is an empty queue after the scheduling is completed:
[0021] If yes, the data queue is added to an empty queue pool, and then the process goes to step S2;
[0022] If not, go to step S3;
[0023] Step S2, the token update system updates the token of the token bucket of the associated traffic shaper for each of the empty queues when a new message arrives, and then returns to step S1;
[0024] Step S3: The token update system determines whether the number of tokens in the updated token bucket is a negative value:
[0025] If not, return to step S1;
[0026] If yes, a loop update signal is generated, and then the process goes to step S4;
[0027] Step S4, the token update system obtains the update level of the corresponding traffic shaper according to the cyclic update signal processing, and puts the traffic shaper into the update pool corresponding to the update level to perform token update on the token bucket according to the cyclic update frequency;
[0028] Step S5: During the token update process of each token bucket, when the token update system detects that the number of tokens in the token bucket corresponding to the traffic shaper in each update pool is a non-negative value, the traffic shaper is removed from the update pool to participate in scheduling.
[0029] Preferably, each update pool represents the update level through a pre-configured standard time, and the smaller the standard time is, the higher the update level is, and thus the higher the cyclic update frequency is.
[0030] Preferably, step S4 comprises:
[0031] Step S41, the token update system obtains an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket and a pre-configured token generation rate;
[0032] Step S42, the token update system compares the expected time with each of the standard times, and uses the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper;
[0033] Step S43: The token update system places the traffic shaper into the update pool corresponding to the update level to perform token updates on the token bucket according to the cyclic update frequency.
[0034] Preferably, the expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time;
[0035] Then in the step S42, the token update system compares the expected time with each of the standard times during the change of the expected time and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper has changed;
[0036] In the step S43, the token update system adjusts the update pool where the traffic shaper is located according to the adjustment signal.
[0037] The above technical solution has the following advantages or beneficial effects:
[0038] 1) The data queue is divided into an empty queue and a non-empty queue, wherein the empty queue does not participate in the cyclic update, effectively reducing the number of read and write operations for token updates; the non-empty queue is updated during scheduling and cyclically updated when the corresponding token bucket is invalid, and an update pool with a corresponding cyclic update frequency is configured according to the expected time, further reducing the number of read and write operations while reducing latency;
[0039] 2) The empty queue triggers token update when a new message arrives, and the non-empty queue performs cyclic update when the token bucket is invalid. That is, the packet-driven update mechanism is combined with the improved cyclic update mechanism to separate the token update from the number of traffic shapers, which can support a large number of traffic shapers working simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of the structure of a token update system for a traffic shaper in a preferred embodiment of the present invention;
[0041] Figure 2 A flow chart of a token updating method for a traffic shaper in a preferred embodiment of the present invention;
[0042] Figure 3 This is a flow chart of a token update system updating a traffic shaper's token according to a cyclic update signal in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0043] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment, and other embodiments may also fall within the scope of the present invention as long as they conform to the gist of the present invention.
[0044] In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a token update system for a traffic shaper is provided, wherein a plurality of traffic shapers are pre-configured, each traffic shaper is associated with a data queue and performs traffic shaping on the data queue through a token bucket; Figure 1 As shown, the token renewal system includes:
[0045] A first updating module 1 is used for updating the token of the associated traffic shaper for a non-empty queue in each data queue when a message in the data queue is scheduled, and adding the data queue to an empty queue pool 2 when the data queue is an empty queue after scheduling is completed, and generating a cyclic update signal when the data queue is a non-empty queue after scheduling is completed and the updated token bucket is in an invalid state;
[0046] The second updating module 3 is connected to the empty queue pool 2 and is used to update the token bucket of the associated traffic shaper for each empty queue when a new message arrives;
[0047] The cyclic update pool 4 includes a plurality of update pools 41 with different update levels, and each update pool 41 also has a cyclic update frequency positively correlated with the update level;
[0048] The third update module 5 is connected to the first update module 1 and the cyclic update pool 4 respectively, and is used to obtain the update level of the corresponding traffic shaper according to the cyclic update signal processing, and put the traffic shaper into the update pool corresponding to the update level to perform token update on the token bucket according to the cyclic update frequency;
[0049] The fourth updating module 6 is connected to the cyclic updating pool 4 and is used for removing the traffic shaper from the updating pool to participate in the scheduling when it is detected that the token bucket corresponding to the traffic shaper is in a valid state during the token updating process of each token bucket.
[0050] As a preferred embodiment, the token update system of the traffic shaper of the present invention can be configured in a switch or smart network card according to the needs to realize the export service rate adjustment of the switch or smart network card. The above-mentioned traffic shaper performs traffic shaping on the data queue through the token bucket principle, and the token bucket principle can include a token generation part and a token consumption part, and the token generation part and the token consumption part work in parallel and independently. For the token generation part, tokens are usually added to the token bucket at a pre-configured token generation rate, and the bucket overflows when it is full; for the token consumption part, when a message comes in, the token bucket status is directly checked. If the number of tokens in the token bucket is a non-negative number, it means that the token bucket is in a valid state. At this time, the message can pass. After the message passes, the number of tokens corresponding to the message length is subtracted from the token bucket. If the number of tokens in the token bucket is a negative number, it means that the token bucket is in an invalid state, and the message is blocked until the number of tokens in the token bucket accumulates to a non-negative number.
[0051] In the traditional token update mechanism, taking one thousand traffic shapers as an example, when the traditional cyclic update mechanism is adopted, the amount of computation is linearly related to the number of traffic shapers due to the cyclic access method for updating, that is, the amount of computation increases linearly with the increase in the number of traffic shapers, and it is difficult to achieve a large number of traffic shapers working at the same time. And it is easy for one or more traffic shapers to fail to schedule because the token bucket has not been updated to the traffic shaper when the token bucket is valid, that is, there is a delay. In order to reduce the delay, the update rate needs to be increased as much as possible. Since the number of reads and writes per second in the system is limited, there is a serious system bottleneck.
[0052] Based on the above technical problems, in this embodiment, an empty queue triggers a token update when a new message arrives, and a non-empty queue performs a cyclic update when the token bucket is invalid. That is, a packet-driven update mechanism is adopted, combined with an improved cyclic update mechanism, to transfer the speed bottleneck of the traffic shaper update to the port service rate, thereby decoupling the token update from the number of traffic shapers, and supporting a large number of traffic shapers to work simultaneously.
[0053] Among them, the packet-driven update mechanism is a data packet triggering a token update. Specifically, when the data queue is an empty queue, there is no message in the data queue that needs to be scheduled. At this time, the associated traffic shaper is not cyclically updated, which can greatly reduce the number of read and write operations for token updates. When a new message arrives in the empty queue, the message contains at least one data packet, which immediately triggers the token bucket of the traffic shaper corresponding to the empty queue to perform a token update; when the data queue is a non-empty queue and the message in the non-empty queue is scheduled, the token bucket of the corresponding traffic shaper is triggered to perform a token update. If the data queue only includes one message, after the message is scheduled, the data queue is Empty queue. At this time, no matter what state the token bucket is in after the token is updated, the traffic shaper associated with the empty queue will not be cyclically updated. If the data queue includes more than one message, after the message is scheduled, the data queue is still a non-empty queue. At this time, check the state of the updated token bucket. Preferably, confirm its state by obtaining the number of tokens in the token bucket. When the number of tokens is negative, it means that it is invalid. Even if there are messages in the data queue, it cannot pass through the traffic shaper. At this time, it is necessary to wait for the number of tokens in the token bucket of the traffic shaper to become non-negative before it can participate in scheduling again. At this time, the traffic shaper can be placed in the cyclic update pool 4 for token update.
[0054] Among them, the cyclic update mechanism in the cyclic update pool 4 is a time-driven update mechanism, and whether or not a message arrives will not affect the cyclic update mechanism in the cyclic update pool 4. In order to further reduce the amount of system data calculation, multiple update pools 41 are configured in the cyclic update pool 4. Since the token generation rate of the token bucket is certain, the expected time for the token bucket of the traffic shaper to restore to a valid state can be obtained according to the current number of tokens in the token bucket and the token generation rate. Based on this, different cyclic update frequencies can be configured accordingly to further reduce the amount of data calculation. In this embodiment, each update pool can be divided into multiple update levels according to the urgency of the update time. The shorter the expected time, the more urgent its update time is. At this time, it is placed in a higher-level update pool for token update. The update pool with a high update level has a higher cyclic update frequency. In other words, the update pool with a high update level is configured with more system overhead.
[0055] Furthermore, when each token bucket is updating its tokens in the cyclic update pool 4 and it is detected that the token bucket corresponding to the traffic shaper is in a valid state, it means that the number of tokens in the token bucket of the traffic shaper can meet the message passing requirements. In other words, the data queue corresponding to the traffic shaper is eligible to participate in the scheduling. At this time, the traffic shaper is moved out of the update pool to effectively reduce the delay.
[0056] In a preferred embodiment of the present invention, when the number of tokens in the token bucket is a negative value, it indicates that the token bucket is in an invalid state, and when the number of tokens is a non-negative value, it indicates that the token bucket is in a valid state.
[0057] In a preferred embodiment of the present invention, each update pool 41 represents the update level through a pre-configured standard time, and the smaller the standard time, the higher the update level, and thus the higher the cyclic update frequency.
[0058] In a preferred embodiment of the present invention, the third update module 5 includes:
[0059] The processing unit 51 is used to obtain an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket and a pre-configured token generation rate;
[0060] The matching unit 52 and the connection processing unit 51 are used to compare the expected time with each standard time respectively, and use the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper;
[0061] The updating unit 53 is connected to the matching unit 52 and is used to put the traffic shaper into an updating pool corresponding to the updating level so as to perform token updating on the token bucket according to the cyclic updating frequency.
[0062] Specifically, in this embodiment, taking three update pools as an example, the standard time corresponding to the first update pool may be 30 seconds, the standard time corresponding to the second update pool may be 60 seconds, and the standard time corresponding to the third update pool may be 80 seconds, then the update level of the corresponding first update pool is higher than the update level of the second update pool, and the update level of the second update pool is higher than the update level of the third update pool. If the above expected time is 50 seconds, the traffic shaper is placed in the second update pool for updating.
[0063] In a preferred embodiment of the present invention, the expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time;
[0064] The matching unit 52 compares the expected time with each standard time during the change of the expected time and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper has changed;
[0065] The updating unit 53 adjusts the update pool where the traffic shaper is located according to the adjustment signal.
[0066] Specifically, in this embodiment, since the expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time, the expected time is in a constantly changing process as time goes by. Taking the current time as the starting point, the above expected time is 50 seconds. For example, during the initial configuration, the traffic shaper is placed in the second update pool for update. After 21 seconds, the above expected time becomes 29 seconds. At this time, the traffic shaper needs to be placed in the first update pool for update. Preferably, the first update pool is configured with the highest cyclic update frequency so that the token bucket of the traffic shaper in the first update pool can be detected in time to become valid, thereby triggering the removal of the traffic shaper from the update pool to participate in scheduling.
[0067] As a preferred implementation, since the update level of the traffic shaper is a real-time adjustment process, it is possible to timely obtain the moment when the token bucket of the traffic shaper becomes valid by querying the first update pool only, without querying all update pools, thereby further reducing the amount of data and thus reducing system overhead. The number of the first update pools can be configured according to demand, which is not limited here and can be one or two.
[0068] The present application also provides a token update method for a traffic shaper, which is applied to the above-mentioned token update system, wherein a cyclic update pool is configured in the token update system, including multiple update pools with different update levels, and each update pool also has a cyclic update frequency that is positively correlated with the update level;
[0069] like Figure 2 As shown, the token update method includes:
[0070] Step S1: The token update system updates the token bucket of the associated traffic shaper for each non-empty queue in each data queue when a message in the data queue is scheduled, and determines whether the data queue is an empty queue after the scheduling is completed:
[0071] If yes, the data queue is added to an empty queue pool, and then the process goes to step S2;
[0072] If not, go to step S3;
[0073] Step S2: The token updating system updates the token bucket of the associated traffic shaper for each empty queue when a new message arrives, and then returns to step S1;
[0074] Step S3: The token update system determines whether the updated token bucket is in an invalid state:
[0075] If not, return to step S1;
[0076] If yes, a loop update signal is generated, and then the process goes to step S4;
[0077] Step S4, the token update system obtains the update level of the corresponding traffic shaper according to the cyclic update signal processing, and puts the traffic shaper into the update pool corresponding to the update level to perform token update on the token bucket according to the cyclic update frequency;
[0078] Step S5: During the token update process of each token bucket, when the token update system detects that the token bucket corresponding to the traffic shaper in each update pool is in a valid state, the traffic shaper is removed from the update pool to participate in scheduling.
[0079] In a preferred embodiment of the present invention, when the number of tokens in the token bucket is a negative value, it indicates that the token bucket is in an invalid state, and when the number of tokens is a non-negative value, it indicates that the token bucket is in a valid state.
[0080] In a preferred embodiment of the present invention, each update pool represents the update level through a pre-configured standard time, and the smaller the standard time, the higher the update level, and thus the higher the cyclic update frequency.
[0081] In a preferred embodiment of the present invention, Figure 3 As shown, step S4 includes:
[0082] Step S41, the token update system obtains an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket and a pre-configured token generation rate;
[0083] Step S42: The token update system compares the expected time with each standard time, and uses the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper.
[0084] Step S43: The token update system places the traffic shaper into an update pool corresponding to the update level to perform token updates on the token bucket according to the cyclic update frequency.
[0085] In a preferred embodiment of the present invention, the expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time;
[0086] Then in step S42, the token update system compares the expected time with each standard time during the change of the expected time and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper has changed;
[0087] In step S43, the token update system adjusts the update pool where the traffic shaper is located according to the adjustment signal.
[0088] The above description is only a preferred embodiment of the present invention, and does not limit the implementation mode and protection scope of the present invention. For those skilled in the art, it should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.
Claims
1. A token update system for a traffic shaper, characterized in that: A plurality of traffic shapers are pre-configured, each of the traffic shapers is associated with a data queue and performs traffic shaping on the data queue through a token bucket; the token update system comprises: A first updating module is used for updating the token of the token bucket of the associated traffic shaper for a non-empty queue in each of the data queues when a message in the data queue is scheduled, and adding the data queue to an empty queue pool when the data queue is an empty queue after scheduling is completed, and generating a cyclic update signal when the data queue is a non-empty queue after scheduling is completed and the number of tokens in the updated token bucket is a negative value; A second updating module, connected to the empty queue pool, is used for updating the token of the token bucket of the associated traffic shaper for each of the empty queues when a new message arrives; A cyclic update pool, comprising a plurality of update pools with different update levels, and each of the update pools also has a cyclic update frequency positively correlated with the update level; a third update module, connected to the first update module and the cyclic update pool, respectively, for obtaining the update level of the corresponding traffic shaper according to the cyclic update signal processing, and placing the traffic shaper into the update pool corresponding to the update level, so as to perform token update on the token bucket according to the cyclic update frequency; A fourth update module, connected to the cyclic update pool, is used to move the traffic shaper out of the update pool to participate in scheduling when it is detected that the number of tokens in the token bucket corresponding to the traffic shaper is a non-negative value during the token update of each token bucket; Each update pool represents the update level through a pre-configured standard time, and the smaller the standard time is, the higher the update level is, and thus the higher the cyclic update frequency is; The third update module includes: A processing unit, configured to obtain an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket, and a pre-configured token generation rate; a matching unit, connected to the processing unit, for comparing the expected time with each of the standard times, and taking the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper; An updating unit, connected to the matching unit, is used to place the traffic shaper into the update pool corresponding to the update level, so as to perform token updates on the token bucket according to the cyclic update frequency.
2. The token renewal system according to claim 1, characterized in that: The expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time; During the change of the expected time, the matching unit compares the expected time with each of the standard times and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper changes; The updating unit adjusts the update pool where the traffic shaper is located according to the adjustment signal.
3. A token update method for a traffic shaper, characterized in that: Applied to the token update system as claimed in claim 1 or 2, wherein a cyclic update pool is configured in the token update system, including a plurality of update pools with different update levels, and each of the update pools also has a cyclic update frequency positively correlated with the update level; The token updating method comprises: Step S1, the token update system updates the token of the token bucket of the associated traffic shaper for each non-empty queue in the data queue when a message in the data queue is scheduled, and determines whether the data queue is an empty queue after the scheduling is completed: If yes, the data queue is added to an empty queue pool, and then the process goes to step S2; If not, go to step S3; Step S2, the token update system updates the token of the token bucket of the associated traffic shaper for each of the empty queues when a new message arrives, and then returns to step S1; Step S3: The token update system determines whether the number of tokens in the updated token bucket is a negative value: If not, return to step S1; If yes, a loop update signal is generated, and then the process goes to step S4; Step S4, the token update system obtains the update level of the corresponding traffic shaper according to the cyclic update signal processing, and puts the traffic shaper into the update pool corresponding to the update level to perform token update on the token bucket according to the cyclic update frequency; Step S5: During the token update process of each token bucket, when the token update system detects that the number of tokens in the token bucket corresponding to the traffic shaper in each update pool is a non-negative value, the traffic shaper is removed from the update pool to participate in scheduling.
4. The token updating method according to claim 3, characterized in that: Each update pool represents the update level through a preconfigured standard time, and the smaller the standard time is, the higher the update level is, and thus the higher the cyclic update frequency is.
5. The token updating method according to claim 4, characterized in that: The step S4 comprises: Step S41, the token update system obtains an expected time for the number of tokens to accumulate to zero according to the cyclic update signal, the number of tokens in the token bucket and a pre-configured token generation rate; Step S42, the token update system compares the expected time with each of the standard times, and uses the update level corresponding to the standard time that is greater than the expected time and closest to the expected time as the update level of the traffic shaper; Step S43: The token update system places the traffic shaper into the update pool corresponding to the update level to perform token updates on the token bucket according to the cyclic update frequency.
6. The token updating method according to claim 5, characterized in that: The expected time is the time difference between an expected time when the number of tokens accumulates to zero and the current time; Then in the step S42, the token update system compares the expected time with each of the standard times during the change of the expected time and continuously outputs the comparison result, and outputs an adjustment signal when the comparison result indicates that the update level of the traffic shaper has changed; In the step S43, the token update system adjusts the update pool where the traffic shaper is located according to the adjustment signal.
Citation Information
Patent Citations
Method and device for controlling output flow based on token bucket
CN103259743A
Method and device for transmitting data
CN103281258A
Message transmission method and device
CN103701721A
Token bucket algorithm-based satellite data ground transmission network flow control system
CN105763478A
Message forwarding method and device
CN107800643A
